Search is not available for this dataset
repo_name string | path string | license string | full_code string | full_size int64 | uncommented_code string | uncommented_size int64 | function_only_code string | function_only_size int64 | is_commented bool | is_signatured bool | n_ast_errors int64 | ast_max_depth int64 | n_whitespaces int64 | n_ast_nodes int64 | n_ast_terminals int64 | n_ast_nonterminals int64 | loc int64 | cycloplexity int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
scolobb/fgl | Data/Graph/Inductive/Internal/Thread.hs | bsd-3-clause | splitPar :: Split t i r -> Split u j s -> Split (t,u) (i,j) (r,s)
splitPar split split' (i,j) (t,u) = ((r,s),(t',u'))
where (r,t') = split i t
(s,u') = split' j u | 240 | splitPar :: Split t i r -> Split u j s -> Split (t,u) (i,j) (r,s)
splitPar split split' (i,j) (t,u) = ((r,s),(t',u'))
where (r,t') = split i t
(s,u') = split' j u | 240 | splitPar split split' (i,j) (t,u) = ((r,s),(t',u'))
where (r,t') = split i t
(s,u') = split' j u | 174 | false | true | 0 | 9 | 111 | 137 | 75 | 62 | null | null |
sbergot/ArgParser | src/System/Console/ArgParser/Params.hs | bsd-3-clause | fullFlagformat :: FlagFormat -> String -> String
fullFlagformat fmt key = case fmt of
Short -> shortfmt ++ ", " ++ longfmt
Long -> longfmt
where
shortfmt = shortflagformat key
longfmt = longflagformat key | 220 | fullFlagformat :: FlagFormat -> String -> String
fullFlagformat fmt key = case fmt of
Short -> shortfmt ++ ", " ++ longfmt
Long -> longfmt
where
shortfmt = shortflagformat key
longfmt = longflagformat key | 219 | fullFlagformat fmt key = case fmt of
Short -> shortfmt ++ ", " ++ longfmt
Long -> longfmt
where
shortfmt = shortflagformat key
longfmt = longflagformat key | 170 | false | true | 2 | 7 | 49 | 70 | 33 | 37 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | The ID of the prefix.
pliPrefixListId :: Lens' PrefixListId (Maybe Text)
pliPrefixListId = lens _pliPrefixListId (\ s a -> s{_pliPrefixListId = a}) | 152 | pliPrefixListId :: Lens' PrefixListId (Maybe Text)
pliPrefixListId = lens _pliPrefixListId (\ s a -> s{_pliPrefixListId = a}) | 125 | pliPrefixListId = lens _pliPrefixListId (\ s a -> s{_pliPrefixListId = a}) | 74 | true | true | 0 | 9 | 23 | 46 | 25 | 21 | null | null |
valderman/dpress | DissociatedPress/Text.hs | mit | insertText :: T.Text -> Dictionary Word -> Dictionary Word
insertText s d =
foldl' (\dict str -> updateDict (words' $ T.map toLower str) dict) d ls
where
ls = map addFullStop $ filter (not . T.null) $ T.lines s
addFullStop l
| T.last l `elem` (".!?" :: String) = l
| otherwise ... | 341 | insertText :: T.Text -> Dictionary Word -> Dictionary Word
insertText s d =
foldl' (\dict str -> updateDict (words' $ T.map toLower str) dict) d ls
where
ls = map addFullStop $ filter (not . T.null) $ T.lines s
addFullStop l
| T.last l `elem` (".!?" :: String) = l
| otherwise ... | 341 | insertText s d =
foldl' (\dict str -> updateDict (words' $ T.map toLower str) dict) d ls
where
ls = map addFullStop $ filter (not . T.null) $ T.lines s
addFullStop l
| T.last l `elem` (".!?" :: String) = l
| otherwise = T.snoc l '.' | 282 | false | true | 3 | 12 | 105 | 150 | 73 | 77 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/BoxFunMinMax/Expressions/Translators/FPTaylor.hs | bsd-3-clause | testOutput :: String
testOutput =
"Loading configuration file: /home/junaid/Research/git/FPTaylor/default.cfg \
\FPTaylor, version 0.9.2+dev \
\Loading: heronInit1PlusXDiv1 copy.txt \
\Processing: Expression 1 \
\************************************* \
\Taylor form for: rnd32((1 + rnd32((X / 1)))) \
... | 1,841 | testOutput :: String
testOutput =
"Loading configuration file: /home/junaid/Research/git/FPTaylor/default.cfg \
\FPTaylor, version 0.9.2+dev \
\Loading: heronInit1PlusXDiv1 copy.txt \
\Processing: Expression 1 \
\************************************* \
\Taylor form for: rnd32((1 + rnd32((X / 1)))) \
\... | 1,840 | testOutput =
"Loading configuration file: /home/junaid/Research/git/FPTaylor/default.cfg \
\FPTaylor, version 0.9.2+dev \
\Loading: heronInit1PlusXDiv1 copy.txt \
\Processing: Expression 1 \
\************************************* \
\Taylor form for: rnd32((1 + rnd32((X / 1)))) \
\Conservative bound: [... | 1,819 | false | true | 0 | 6 | 322 | 18 | 7 | 11 | null | null |
ashnikel/haskellbook | ch11/ch11.6_ex.hs | mit | -- 1 - :type myCar :: Vehicle
-- 2
isCar :: Vehicle -> Bool
isCar (Car _ _) = True | 82 | isCar :: Vehicle -> Bool
isCar (Car _ _) = True | 47 | isCar (Car _ _) = True | 22 | true | true | 0 | 7 | 19 | 28 | 15 | 13 | null | null |
gcampax/ghc | compiler/prelude/PrimOp.hs | bsd-3-clause | -- Output stuff:
pprPrimOp :: PrimOp -> SDoc
pprPrimOp other_op = pprOccName (primOpOcc other_op) | 99 | pprPrimOp :: PrimOp -> SDoc
pprPrimOp other_op = pprOccName (primOpOcc other_op) | 81 | pprPrimOp other_op = pprOccName (primOpOcc other_op) | 52 | true | true | 0 | 7 | 15 | 33 | 15 | 18 | null | null |
anton-dessiatov/stack | src/Stack/Constants/Config.hs | bsd-3-clause | -- | The filename used for modification check of .cabal
configCabalMod :: (MonadThrow m, MonadReader env m, HasEnvConfig env)
=> Path Abs Dir -- ^ Package directory.
-> m (Path Abs File)
configCabalMod dir =
liftM
(</> $(mkRelFile "stack-cabal-mod"))
(distDirFromDi... | 326 | configCabalMod :: (MonadThrow m, MonadReader env m, HasEnvConfig env)
=> Path Abs Dir -- ^ Package directory.
-> m (Path Abs File)
configCabalMod dir =
liftM
(</> $(mkRelFile "stack-cabal-mod"))
(distDirFromDir dir) | 270 | configCabalMod dir =
liftM
(</> $(mkRelFile "stack-cabal-mod"))
(distDirFromDir dir) | 104 | true | true | 0 | 9 | 95 | 81 | 41 | 40 | null | null |
gibiansky/IHaskell | src/IHaskell/Convert/Args.hs | mit | mergeArg unexpectedArg _ = error $ "IHaskell.Convert.mergeArg: impossible argument: "
++ show unexpectedArg | 142 | mergeArg unexpectedArg _ = error $ "IHaskell.Convert.mergeArg: impossible argument: "
++ show unexpectedArg | 142 | mergeArg unexpectedArg _ = error $ "IHaskell.Convert.mergeArg: impossible argument: "
++ show unexpectedArg | 142 | false | false | 4 | 5 | 47 | 27 | 10 | 17 | null | null |
vladfi1/hs-misc | Utils.hs | mit | liftA2_FNS :: forall f g h a bs. (forall b. f b a -> g b a -> h b a) -> FlipNP f bs a -> FlipNS g bs a -> FlipNS h bs a
liftA2_FNS f (FlipNP xs) (FlipNS ys) = FlipNS $ liftA2_NS' f' xs ys
where
f' :: forall b. Flip f a b -> Flip g a b -> Flip h a b
f' (Flip x) (Flip y) = Flip $ f x y | 294 | liftA2_FNS :: forall f g h a bs. (forall b. f b a -> g b a -> h b a) -> FlipNP f bs a -> FlipNS g bs a -> FlipNS h bs a
liftA2_FNS f (FlipNP xs) (FlipNS ys) = FlipNS $ liftA2_NS' f' xs ys
where
f' :: forall b. Flip f a b -> Flip g a b -> Flip h a b
f' (Flip x) (Flip y) = Flip $ f x y | 294 | liftA2_FNS f (FlipNP xs) (FlipNS ys) = FlipNS $ liftA2_NS' f' xs ys
where
f' :: forall b. Flip f a b -> Flip g a b -> Flip h a b
f' (Flip x) (Flip y) = Flip $ f x y | 174 | false | true | 0 | 11 | 88 | 191 | 93 | 98 | null | null |
yiannist/lambda-lifting | LLifter/Internal.hs | gpl-3.0 | incrTurn :: Game ()
incrTurn = do
gs@(GS{turn = trn}) <- get
put gs{turn = succ trn} | 92 | incrTurn :: Game ()
incrTurn = do
gs@(GS{turn = trn}) <- get
put gs{turn = succ trn} | 92 | incrTurn = do
gs@(GS{turn = trn}) <- get
put gs{turn = succ trn} | 72 | false | true | 0 | 12 | 24 | 55 | 28 | 27 | null | null |
rockdragon/julia-programming | code/haskell/SimpleJSON.hs | mit | getInt :: JValue -> Maybe Int
getInt (JNumber d) = Just (truncate(d)) | 69 | getInt :: JValue -> Maybe Int
getInt (JNumber d) = Just (truncate(d)) | 69 | getInt (JNumber d) = Just (truncate(d)) | 39 | false | true | 0 | 8 | 11 | 43 | 20 | 23 | null | null |
SAdams601/HaRe | old/testing/refacFunDef/Test1_TokOut.hs | bsd-3-clause | g = f 1 | 7 | g = f 1 | 7 | g = f 1 | 7 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
gwright83/Wheeler | src/Math/Symbolic/Wheeler/Basic.hs | bsd-3-clause | fractionParts e = (e, Const 1) | 30 | fractionParts e = (e, Const 1) | 30 | fractionParts e = (e, Const 1) | 30 | false | false | 1 | 6 | 5 | 21 | 9 | 12 | null | null |
jamesdarcy/Hastur | src/Hastur.hs | bsd-3-clause | onOpenFile :: HasturContext -> IO ()
onOpenFile HasturContext {guiWidgets=hxw} = do
maybePath <- fileOpenDialog (guiFrame hxw) True True "Open Image" [("Dicom files",["*.dcm"]),("All files",["*.*"])] "" ""
case maybePath of
Nothing -> return ()
Just path -> importDicomFile (guiText hxw) path
-- | 310 | onOpenFile :: HasturContext -> IO ()
onOpenFile HasturContext {guiWidgets=hxw} = do
maybePath <- fileOpenDialog (guiFrame hxw) True True "Open Image" [("Dicom files",["*.dcm"]),("All files",["*.*"])] "" ""
case maybePath of
Nothing -> return ()
Just path -> importDicomFile (guiText hxw) path
-- | 310 | onOpenFile HasturContext {guiWidgets=hxw} = do
maybePath <- fileOpenDialog (guiFrame hxw) True True "Open Image" [("Dicom files",["*.dcm"]),("All files",["*.*"])] "" ""
case maybePath of
Nothing -> return ()
Just path -> importDicomFile (guiText hxw) path
-- | 273 | false | true | 3 | 13 | 54 | 128 | 64 | 64 | null | null |
rsasse/tamarin-prover | lib/theory/src/Theory.hs | gpl-3.0 | -- | Adds the RHS lemma attribute.
addRightLemma :: Lemma p -> Lemma p
addRightLemma lem =
L.set lAttributes (RHSLemma:(L.get lAttributes lem)) lem | 152 | addRightLemma :: Lemma p -> Lemma p
addRightLemma lem =
L.set lAttributes (RHSLemma:(L.get lAttributes lem)) lem | 117 | addRightLemma lem =
L.set lAttributes (RHSLemma:(L.get lAttributes lem)) lem | 81 | true | true | 0 | 10 | 27 | 51 | 25 | 26 | null | null |
fpco/cabal | Cabal/Distribution/Simple/UHC.hs | bsd-3-clause | buildExe :: Verbosity -> PackageDescription -> LocalBuildInfo
-> Executable -> ComponentLocalBuildInfo -> IO ()
buildExe verbosity _pkg_descr lbi exe clbi = do
systemPkgDir <- rawSystemProgramStdoutConf verbosity uhcProgram (withPrograms lbi) ["--meta-pkgdir-system"]
userPkgDir <- ge... | 843 | buildExe :: Verbosity -> PackageDescription -> LocalBuildInfo
-> Executable -> ComponentLocalBuildInfo -> IO ()
buildExe verbosity _pkg_descr lbi exe clbi = do
systemPkgDir <- rawSystemProgramStdoutConf verbosity uhcProgram (withPrograms lbi) ["--meta-pkgdir-system"]
userPkgDir <- ge... | 843 | buildExe verbosity _pkg_descr lbi exe clbi = do
systemPkgDir <- rawSystemProgramStdoutConf verbosity uhcProgram (withPrograms lbi) ["--meta-pkgdir-system"]
userPkgDir <- getUserPackageDir
let runUhcProg = rawSystemProgramConf verbosity uhcProgram (withPrograms lbi)
let uhcArgs = -- common flags lib/exe
... | 701 | false | true | 0 | 14 | 288 | 176 | 85 | 91 | null | null |
exbb2/text-locale-encoding | Data/Text/Lazy/Encoding/Locale.hs | bsd-3-clause | decodeLocale :: L.ByteString -> IO TL.Text
decodeLocale = chooseDecoder Nothing Nothing | 87 | decodeLocale :: L.ByteString -> IO TL.Text
decodeLocale = chooseDecoder Nothing Nothing | 87 | decodeLocale = chooseDecoder Nothing Nothing | 44 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
keithodulaigh/Hets | Common/Lib/RelCheck.hs | gpl-2.0 | tr = transClosure test1 | 23 | tr = transClosure test1 | 23 | tr = transClosure test1 | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
tonyday567/chart-svg | src/Chart/Surface.hs | bsd-3-clause | -- | Creation of the classical heatmap glyph within a legend context.
surfaceLegendChart :: Range Double -> SurfaceLegendOptions -> ChartTree
surfaceLegendChart dataRange l =
legendFrame (view #sloLegendOptions l) hs
where
a = makeSurfaceTick l (named "pchart" pchart)
pchart
| l ^. #sloLegendOptions %... | 1,397 | surfaceLegendChart :: Range Double -> SurfaceLegendOptions -> ChartTree
surfaceLegendChart dataRange l =
legendFrame (view #sloLegendOptions l) hs
where
a = makeSurfaceTick l (named "pchart" pchart)
pchart
| l ^. #sloLegendOptions % #place == PlaceBottom
|| l ^. #sloLegendOptions % #place ==... | 1,327 | surfaceLegendChart dataRange l =
legendFrame (view #sloLegendOptions l) hs
where
a = makeSurfaceTick l (named "pchart" pchart)
pchart
| l ^. #sloLegendOptions % #place == PlaceBottom
|| l ^. #sloLegendOptions % #place == PlaceTop =
vertGlyph
| otherwise = horiGlyph
t = Text... | 1,255 | true | true | 22 | 15 | 452 | 481 | 252 | 229 | null | null |
grafi-tt/Maizul | fpu-misc/original/fadd-grafi/Test.hs | bsd-2-clause | fakeAdder24 :: Bool -> Bits24 -> Bits24 -> (Bool, Bits24)
fakeAdder24 cin (Bits24 xs) (Bits24 ys) = (id *** Bits24) $ fakeAdder 24 cin xs ys | 140 | fakeAdder24 :: Bool -> Bits24 -> Bits24 -> (Bool, Bits24)
fakeAdder24 cin (Bits24 xs) (Bits24 ys) = (id *** Bits24) $ fakeAdder 24 cin xs ys | 140 | fakeAdder24 cin (Bits24 xs) (Bits24 ys) = (id *** Bits24) $ fakeAdder 24 cin xs ys | 82 | false | true | 0 | 11 | 25 | 73 | 36 | 37 | null | null |
pharaun/alldice | src/Scheme/Primitives.hs | apache-2.0 | unpackStr :: LispVal s -> ThrowsError T.Text
unpackStr (String s) = return s | 76 | unpackStr :: LispVal s -> ThrowsError T.Text
unpackStr (String s) = return s | 76 | unpackStr (String s) = return s | 31 | false | true | 0 | 9 | 12 | 39 | 17 | 22 | null | null |
TransformingMusicology/libaudioDB-haskell | src/Sound/Audio/Database/Ingest.hs | gpl-3.0 | insertMaybeFeaturesPtr :: (Ptr ADB) -> Maybe ADBDatumPtr -> IO Bool
insertMaybeFeaturesPtr adb (Just datumPtr) = insertFeaturesPtr adb datumPtr | 143 | insertMaybeFeaturesPtr :: (Ptr ADB) -> Maybe ADBDatumPtr -> IO Bool
insertMaybeFeaturesPtr adb (Just datumPtr) = insertFeaturesPtr adb datumPtr | 143 | insertMaybeFeaturesPtr adb (Just datumPtr) = insertFeaturesPtr adb datumPtr | 75 | false | true | 0 | 7 | 17 | 47 | 22 | 25 | null | null |
prowdsponsor/country-codes | src/Data/CountryCodes/ISO31661.hs | bsd-3-clause | toName PE = "Peru" | 18 | toName PE = "Peru" | 18 | toName PE = "Peru" | 18 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
wavewave/weblogger-type | lib/Application/WebLogger/Type.hs | bsd-2-clause | addLog :: WebLoggerInfo
-> Update WebLoggerRepo WebLoggerInfo
addLog minfo = do
modify (|> minfo)
return minfo
{-
-- |
queryWebLogger :: UUID -> Query WebLoggerInfoRepository (Maybe WebLoggerInfo)
queryWebLogger uuid = do
m <- ask
return (M.lookup uuid m)
-}
-- | | 294 | addLog :: WebLoggerInfo
-> Update WebLoggerRepo WebLoggerInfo
addLog minfo = do
modify (|> minfo)
return minfo
{-
-- |
queryWebLogger :: UUID -> Query WebLoggerInfoRepository (Maybe WebLoggerInfo)
queryWebLogger uuid = do
m <- ask
return (M.lookup uuid m)
-}
-- | | 293 | addLog minfo = do
modify (|> minfo)
return minfo
{-
-- |
queryWebLogger :: UUID -> Query WebLoggerInfoRepository (Maybe WebLoggerInfo)
queryWebLogger uuid = do
m <- ask
return (M.lookup uuid m)
-}
-- | | 217 | false | true | 0 | 9 | 71 | 46 | 21 | 25 | null | null |
nomicflux/threals | src/Threal/Impartial.hs | gpl-2.0 | rotateWinnerTree (WNode trees) = WNode (nub $ map rotateWinnerTree trees) | 73 | rotateWinnerTree (WNode trees) = WNode (nub $ map rotateWinnerTree trees) | 73 | rotateWinnerTree (WNode trees) = WNode (nub $ map rotateWinnerTree trees) | 73 | false | false | 0 | 8 | 9 | 30 | 14 | 16 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | maxHitPoints ZergEvolutionChamber = 238 | 39 | maxHitPoints ZergEvolutionChamber = 238 | 39 | maxHitPoints ZergEvolutionChamber = 238 | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Xandaros/MinecraftCLI | app/Main.hs | bsd-2-clause | minecraftThread :: TChan CBPacket -> TChan [SBPacket] -> IORef Bool -> Profile -> Server -> (String -> IO ()) -> IO ()
minecraftThread inbound outbound shutdown profile server printfunc = do
let addr = takeWhile (/= ':') . T.unpack $ server ^. serverAddress
port = readMay $ drop 1 . dropWhile (/= ':') . T.u... | 2,714 | minecraftThread :: TChan CBPacket -> TChan [SBPacket] -> IORef Bool -> Profile -> Server -> (String -> IO ()) -> IO ()
minecraftThread inbound outbound shutdown profile server printfunc = do
let addr = takeWhile (/= ':') . T.unpack $ server ^. serverAddress
port = readMay $ drop 1 . dropWhile (/= ':') . T.u... | 2,714 | minecraftThread inbound outbound shutdown profile server printfunc = do
let addr = takeWhile (/= ':') . T.unpack $ server ^. serverAddress
port = readMay $ drop 1 . dropWhile (/= ':') . T.unpack $ server ^. serverAddress
void $ connect addr port $ do
liftIO $ printfunc "Sending handshake"
... | 2,595 | false | true | 0 | 32 | 922 | 733 | 341 | 392 | null | null |
ksaveljev/hake-2 | src/Game/GameWeapon.hs | bsd-3-clause | bfgTouch :: EntTouch
bfgTouch =
GenericEntTouch "bfg_touch" $ \_ _ _ _ -> do
io (putStrLn "GameWeapon.bfgTouch") >> undefined -- TODO | 139 | bfgTouch :: EntTouch
bfgTouch =
GenericEntTouch "bfg_touch" $ \_ _ _ _ -> do
io (putStrLn "GameWeapon.bfgTouch") >> undefined -- TODO | 139 | bfgTouch =
GenericEntTouch "bfg_touch" $ \_ _ _ _ -> do
io (putStrLn "GameWeapon.bfgTouch") >> undefined -- TODO | 118 | false | true | 2 | 11 | 26 | 54 | 24 | 30 | null | null |
brendanhay/gogol | gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs | mpl-2.0 | -- | DS campaign ID.
cCampaignId :: Lens' Conversion (Maybe Int64)
cCampaignId
= lens _cCampaignId (\ s a -> s{_cCampaignId = a}) .
mapping _Coerce | 155 | cCampaignId :: Lens' Conversion (Maybe Int64)
cCampaignId
= lens _cCampaignId (\ s a -> s{_cCampaignId = a}) .
mapping _Coerce | 134 | cCampaignId
= lens _cCampaignId (\ s a -> s{_cCampaignId = a}) .
mapping _Coerce | 88 | true | true | 0 | 10 | 32 | 55 | 28 | 27 | null | null |
joshcough/L5-Haskell | src/L/Registers.hs | mit | low8 R8 = "r8b" | 16 | low8 R8 = "r8b" | 16 | low8 R8 = "r8b" | 16 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
romanb/amazonka | amazonka-rds/gen/Network/AWS/RDS/DescribeOptionGroupOptions.hs | mpl-2.0 | -- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the marker,
-- up to the value specified by 'MaxRecords'.
dogoMarker :: Lens' DescribeOptionGroupOptions (Maybe Text)
dogoMarker = lens _dogoMarker (\s a -> s { _dogoMarker = a ... | 322 | dogoMarker :: Lens' DescribeOptionGroupOptions (Maybe Text)
dogoMarker = lens _dogoMarker (\s a -> s { _dogoMarker = a }) | 121 | dogoMarker = lens _dogoMarker (\s a -> s { _dogoMarker = a }) | 61 | true | true | 0 | 9 | 51 | 48 | 27 | 21 | null | null |
romanb/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/DeleteEnvironmentConfiguration.hs | mpl-2.0 | -- | 'DeleteEnvironmentConfiguration' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'decApplicationName' @::@ 'Text'
--
-- * 'decEnvironmentName' @::@ 'Text'
--
deleteEnvironmentConfiguration :: Text -- ^ 'decApplicationName'
-> Text -- ^ 'decEnvironme... | 530 | deleteEnvironmentConfiguration :: Text -- ^ 'decApplicationName'
-> Text -- ^ 'decEnvironmentName'
-> DeleteEnvironmentConfiguration
deleteEnvironmentConfiguration p1 p2 = DeleteEnvironmentConfiguration
{ _decApplicationName = p1
, _decEnvironmentNam... | 332 | deleteEnvironmentConfiguration p1 p2 = DeleteEnvironmentConfiguration
{ _decApplicationName = p1
, _decEnvironmentName = p2
} | 137 | true | true | 0 | 7 | 126 | 52 | 32 | 20 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-lang/Language/Drasil/Symbol.hs | bsd-2-clause | compsy (Special _) _ = LT | 26 | compsy (Special _) _ = LT | 26 | compsy (Special _) _ = LT | 26 | false | false | 0 | 7 | 6 | 17 | 8 | 9 | null | null |
haslab/SecreC | src/Language/SecreC/Prover/Expression.hs | gpl-3.0 | stmt2Prover (ExpressionStatement l e) = expr2ProverMb e >> return () | 68 | stmt2Prover (ExpressionStatement l e) = expr2ProverMb e >> return () | 68 | stmt2Prover (ExpressionStatement l e) = expr2ProverMb e >> return () | 68 | false | false | 0 | 7 | 9 | 29 | 13 | 16 | null | null |
sdiehl/ghc | testsuite/tests/th/TH_Lift.hs | bsd-3-clause | g1 :: Natural
g1 = $( (\x -> [| x |]) (5 :: Natural) ) | 54 | g1 :: Natural
g1 = $( (\x -> [| x |]) (5 :: Natural) ) | 54 | g1 = $( (\x -> [| x |]) (5 :: Natural) ) | 40 | false | true | 0 | 10 | 14 | 42 | 22 | 20 | null | null |
vshatskyi/i3wm-config-haskell | app/DSL.hs | bsd-3-clause | toBindingList :: Free BindingF a -> [Binding]
toBindingList = reverse . toList' []
where toList' accumulator (Pure _) = accumulator
toList' accumulator (Free (BindingF i3 next)) = toList' (i3:accumulator) next | 219 | toBindingList :: Free BindingF a -> [Binding]
toBindingList = reverse . toList' []
where toList' accumulator (Pure _) = accumulator
toList' accumulator (Free (BindingF i3 next)) = toList' (i3:accumulator) next | 219 | toBindingList = reverse . toList' []
where toList' accumulator (Pure _) = accumulator
toList' accumulator (Free (BindingF i3 next)) = toList' (i3:accumulator) next | 173 | false | true | 1 | 9 | 39 | 86 | 43 | 43 | null | null |
castaway/pandoc | src/Text/Pandoc/XML.hs | gpl-2.0 | -- | Escape one character as needed for XML.
escapeCharForXML :: Char -> String
escapeCharForXML x = case x of
'&' -> "&"
'<' -> "<"
'>' -> ">"
'"' -> """
c -> [c]
-- | Esc... | 387 | escapeCharForXML :: Char -> String
escapeCharForXML x = case x of
'&' -> "&"
'<' -> "<"
'>' -> ">"
'"' -> """
c -> [c]
-- | Escape string as needed for XML. Entity referen... | 342 | escapeCharForXML x = case x of
'&' -> "&"
'<' -> "<"
'>' -> ">"
'"' -> """
c -> [c]
-- | Escape string as needed for XML. Entity references are not preserved. | 307 | true | true | 0 | 9 | 181 | 63 | 31 | 32 | null | null |
cgorski/general-games | src/Game/Game/Poker.hs | mit | isHand ThreeOfAKind cards = if isThreeOfAKind cards then True else False | 72 | isHand ThreeOfAKind cards = if isThreeOfAKind cards then True else False | 72 | isHand ThreeOfAKind cards = if isThreeOfAKind cards then True else False | 72 | false | false | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
pranjaltale16/codeworld | codeworld-api/src/CodeWorld/App.hs | apache-2.0 | pictureRule :: (state -> Picture) -> Rule state
pictureRule = PictureRule . const | 81 | pictureRule :: (state -> Picture) -> Rule state
pictureRule = PictureRule . const | 81 | pictureRule = PictureRule . const | 33 | false | true | 1 | 8 | 12 | 36 | 16 | 20 | null | null |
Elastifile/git-sling | server/src/Sling/Options.hs | gpl-2.0 | prefixOption :: Mod OptionFields String -> Parser Prefix
prefixOption args = prefixFromText . verify . T.pack <$> strOption args
where
verify t = if T.null t then error "Prefix can't be empty" else t | 211 | prefixOption :: Mod OptionFields String -> Parser Prefix
prefixOption args = prefixFromText . verify . T.pack <$> strOption args
where
verify t = if T.null t then error "Prefix can't be empty" else t | 211 | prefixOption args = prefixFromText . verify . T.pack <$> strOption args
where
verify t = if T.null t then error "Prefix can't be empty" else t | 154 | false | true | 0 | 7 | 45 | 69 | 33 | 36 | null | null |
hmemcpy/milewski-ctfp-pdf | src/content/3.9/code/haskell/snippet05.hs | gpl-3.0 | h = join . fmap g . f | 21 | h = join . fmap g . f | 21 | h = join . fmap g . f | 21 | false | false | 3 | 5 | 7 | 23 | 8 | 15 | null | null |
kowey/pandoc-old | src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | blockToHtml _ (RawHtml str) = return $ primHtml str | 51 | blockToHtml _ (RawHtml str) = return $ primHtml str | 51 | blockToHtml _ (RawHtml str) = return $ primHtml str | 51 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
catseye/ZOWIE | impl/zowie-hs/src/Language/ZOWIE/Parser.hs | unlicense | comment = do
spaces
string ";"
many $ satisfy (\x -> x /= '\n') | 75 | comment = do
spaces
string ";"
many $ satisfy (\x -> x /= '\n') | 75 | comment = do
spaces
string ";"
many $ satisfy (\x -> x /= '\n') | 75 | false | false | 1 | 12 | 25 | 41 | 17 | 24 | null | null |
matonix/pfds | src/PFDS/Sec3/Ex4b.hs | bsd-3-clause | -- 演習問題 3.3
fromList :: Ord e => [e] -> WLHeap e
fromList = loop . map (\x -> T 1 x E E) | 90 | fromList :: Ord e => [e] -> WLHeap e
fromList = loop . map (\x -> T 1 x E E) | 76 | fromList = loop . map (\x -> T 1 x E E) | 39 | true | true | 0 | 9 | 25 | 53 | 27 | 26 | null | null |
ml9951/ThreadScope | GUI/BookmarkView.hs | bsd-3-clause | bookmarkViewSetLabel :: BookmarkView -> Int -> String -> IO ()
bookmarkViewSetLabel BookmarkView{bookmarkStore} n label = do
(ts,_) <- listStoreGetValue bookmarkStore n
listStoreSetValue bookmarkStore n (ts, label)
--------------------------------------------------------------------------- | 295 | bookmarkViewSetLabel :: BookmarkView -> Int -> String -> IO ()
bookmarkViewSetLabel BookmarkView{bookmarkStore} n label = do
(ts,_) <- listStoreGetValue bookmarkStore n
listStoreSetValue bookmarkStore n (ts, label)
--------------------------------------------------------------------------- | 295 | bookmarkViewSetLabel BookmarkView{bookmarkStore} n label = do
(ts,_) <- listStoreGetValue bookmarkStore n
listStoreSetValue bookmarkStore n (ts, label)
--------------------------------------------------------------------------- | 232 | false | true | 0 | 9 | 31 | 76 | 38 | 38 | null | null |
telser/numerals | src-test/Text/Numeral/Language/LLD/TestData.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Test data
--------------------------------------------------------------------------------
-- Sources:
-- http://www.languagesandnumbers.com/how-to-count-in-ladin/en/lld/
cardinals ∷ (Integral i) ⇒ TestData i
cardinals =
[ ( "mascu... | 3,436 | cardinals ∷ (Integral i) ⇒ TestData i
cardinals =
[ ( "masculine"
, masculine defaultInflection
, [ (0, "zero")
, (1, "un")
, (2, "doi")
, (3, "trei")
, (4, "cater")
, (5, "cinch")
, (6, "sies")
, (7, "set")
, (8, "ot")
, (9, "nuef")
, (10, "diesc")
... | 3,178 | cardinals =
[ ( "masculine"
, masculine defaultInflection
, [ (0, "zero")
, (1, "un")
, (2, "doi")
, (3, "trei")
, (4, "cater")
, (5, "cinch")
, (6, "sies")
, (7, "set")
, (8, "ot")
, (9, "nuef")
, (10, "diesc")
, (11, "undesc")
, (12, "d... | 3,140 | true | true | 0 | 11 | 1,035 | 1,036 | 677 | 359 | null | null |
MaxGabriel/yesod | yesod-core/Yesod/Core/Internal/Run.hs | mit | safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())
-> ErrorResponse
-> YesodApp
safeEh log' er req = do
liftIO $ log' $(qLocation >>= liftLoc) "yesod-core" LevelError
$ toLogStr $ "Error handler errored out: " ++ show er
return $ YRPlain
H.status500
[]
t... | 1,468 | safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())
-> ErrorResponse
-> YesodApp
safeEh log' er req = do
liftIO $ log' $(qLocation >>= liftLoc) "yesod-core" LevelError
$ toLogStr $ "Error handler errored out: " ++ show er
return $ YRPlain
H.status500
[]
t... | 1,468 | safeEh log' er req = do
liftIO $ log' $(qLocation >>= liftLoc) "yesod-core" LevelError
$ toLogStr $ "Error handler errored out: " ++ show er
return $ YRPlain
H.status500
[]
typePlain
(toContent ("Internal Server Error" :: S.ByteString))
(reqSession req)
-- | R... | 1,365 | false | true | 0 | 15 | 316 | 155 | 84 | 71 | null | null |
travitch/dalvik | src/Dalvik/AccessFlags.hs | bsd-3-clause | codeFlag AClass 0x00400 = ACC_ABSTRACT | 39 | codeFlag AClass 0x00400 = ACC_ABSTRACT | 39 | codeFlag AClass 0x00400 = ACC_ABSTRACT | 39 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
limdauto/learning-haskell | snippets/MonadTransformers.hs | mit | liftEither :: Either e a -> ExceptIO e a
liftEither x = ExceptIO (return x) | 75 | liftEither :: Either e a -> ExceptIO e a
liftEither x = ExceptIO (return x) | 75 | liftEither x = ExceptIO (return x) | 34 | false | true | 0 | 7 | 14 | 37 | 17 | 20 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 701 = 700 | 9 | 701 = 700 | 9 | 701 = 700 | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
haskell-pkg-janitors/feed | Text/Feed/Constructor.hs | bsd-3-clause | feedFromXML :: XML.Element -> Feed.Types.Feed
feedFromXML f = XMLFeed f | 72 | feedFromXML :: XML.Element -> Feed.Types.Feed
feedFromXML f = XMLFeed f | 71 | feedFromXML f = XMLFeed f | 25 | false | true | 0 | 6 | 10 | 26 | 13 | 13 | null | null |
lubomir/dot-race | fay/DotRace/FFI.hs | bsd-3-clause | showCrashDialog :: Fay ()
showCrashDialog = showDialog "crash-dialog" | 69 | showCrashDialog :: Fay ()
showCrashDialog = showDialog "crash-dialog" | 69 | showCrashDialog = showDialog "crash-dialog" | 43 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
DougBurke/swish | tests/RDFGraphTest.hs | lgpl-2.1 | toNS :: T.Text -> String -> Namespace
toNS p = makeNamespace (Just p) . toURI | 77 | toNS :: T.Text -> String -> Namespace
toNS p = makeNamespace (Just p) . toURI | 77 | toNS p = makeNamespace (Just p) . toURI | 39 | false | true | 0 | 8 | 14 | 37 | 18 | 19 | null | null |
Erdwolf/autotool-bonn | server/gen/Package.hs | gpl-2.0 | base :: String
base = "de.htwk.autolat.Connector" | 49 | base :: String
base = "de.htwk.autolat.Connector" | 49 | base = "de.htwk.autolat.Connector" | 34 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Tomoaki-Hashizaki/pesca | src/PrSequent.hs | gpl-2.0 | prArgList tt =
case tt of
[] -> ""
_ -> "(" ++ prTList "," tt ++ ")" | 78 | prArgList tt =
case tt of
[] -> ""
_ -> "(" ++ prTList "," tt ++ ")" | 78 | prArgList tt =
case tt of
[] -> ""
_ -> "(" ++ prTList "," tt ++ ")" | 78 | false | false | 0 | 10 | 27 | 40 | 19 | 21 | null | null |
tomahawkins/mecha | attic/Viewer.hs | bsd-3-clause | initState = State
{ leftButton = False
, middleButton = False
, rightButton = False
, theta = 45 * pi / 180
, phi = 30 * pi / 180
, scale' = 0.4
, theta' = 0
, phi' = 0
, x' = 0
, y' = 0
, i = 0
, j = 0
, i' = 0
, j' = 0
, running = True
} | 304 | initState = State
{ leftButton = False
, middleButton = False
, rightButton = False
, theta = 45 * pi / 180
, phi = 30 * pi / 180
, scale' = 0.4
, theta' = 0
, phi' = 0
, x' = 0
, y' = 0
, i = 0
, j = 0
, i' = 0
, j' = 0
, running = True
} | 304 | initState = State
{ leftButton = False
, middleButton = False
, rightButton = False
, theta = 45 * pi / 180
, phi = 30 * pi / 180
, scale' = 0.4
, theta' = 0
, phi' = 0
, x' = 0
, y' = 0
, i = 0
, j = 0
, i' = 0
, j' = 0
, running = True
} | 304 | false | false | 0 | 9 | 136 | 118 | 73 | 45 | null | null |
teuffy/interactive-brokers | library/API/IB/Monadic.hs | bsd-3-clause | -----------------------------------------------------------------------------
send :: ServiceIn -> IB Bool
send msg = do
req <- asks request -- use lens when Service updated
sent <- liftIO $ atomically $ M.send req msg
case msg of
IBRequest msg' -> do
when (sent && updateRequestId msg') $ ibsNextReque... | 378 | send :: ServiceIn -> IB Bool
send msg = do
req <- asks request -- use lens when Service updated
sent <- liftIO $ atomically $ M.send req msg
case msg of
IBRequest msg' -> do
when (sent && updateRequestId msg') $ ibsNextRequestId %= (+1)
return True
_ ->
return sent | 299 | send msg = do
req <- asks request -- use lens when Service updated
sent <- liftIO $ atomically $ M.send req msg
case msg of
IBRequest msg' -> do
when (sent && updateRequestId msg') $ ibsNextRequestId %= (+1)
return True
_ ->
return sent | 270 | true | true | 0 | 17 | 86 | 114 | 53 | 61 | null | null |
bj4rtmar/sdl2 | src/SDL/Video/Renderer.hs | bsd-3-clause | getWindowSurface :: (Functor m, MonadIO m) => Window -> m Surface
getWindowSurface (Window w) =
fmap unmanagedSurface $
throwIfNull "SDL.Video.getWindowSurface" "SDL_GetWindowSurface" $
Raw.getWindowSurface w | 214 | getWindowSurface :: (Functor m, MonadIO m) => Window -> m Surface
getWindowSurface (Window w) =
fmap unmanagedSurface $
throwIfNull "SDL.Video.getWindowSurface" "SDL_GetWindowSurface" $
Raw.getWindowSurface w | 214 | getWindowSurface (Window w) =
fmap unmanagedSurface $
throwIfNull "SDL.Video.getWindowSurface" "SDL_GetWindowSurface" $
Raw.getWindowSurface w | 148 | false | true | 0 | 7 | 29 | 69 | 31 | 38 | null | null |
fpco/cabal | cabal-install/Distribution/Client/Config.hs | bsd-3-clause | initialSavedConfig :: IO SavedConfig
initialSavedConfig = do
cacheDir <- defaultCacheDir
logsDir <- defaultLogsDir
worldFile <- defaultWorldFile
extraPath <- defaultExtraPath
return mempty {
savedGlobalFlags = mempty {
globalCacheDir = toFlag cacheDir,
globalRemoteRepos = [defa... | 807 | initialSavedConfig :: IO SavedConfig
initialSavedConfig = do
cacheDir <- defaultCacheDir
logsDir <- defaultLogsDir
worldFile <- defaultWorldFile
extraPath <- defaultExtraPath
return mempty {
savedGlobalFlags = mempty {
globalCacheDir = toFlag cacheDir,
globalRemoteRepos = [defa... | 807 | initialSavedConfig = do
cacheDir <- defaultCacheDir
logsDir <- defaultLogsDir
worldFile <- defaultWorldFile
extraPath <- defaultExtraPath
return mempty {
savedGlobalFlags = mempty {
globalCacheDir = toFlag cacheDir,
globalRemoteRepos = [defaultRemoteRepo],
globalWorldFile... | 770 | false | true | 0 | 15 | 194 | 146 | 80 | 66 | null | null |
mzini/qlogic | Qlogic/SatSolver.hs | gpl-3.0 | addNegatively' (p,_) fm@(Maj a b c) = do aneg <- addNegatively a >>= negateELit
bneg <- addNegatively b >>= negateELit
cneg <- addNegatively c >>= negateELit
addLitClause $ Clause [p, aneg, bneg]
... | 526 | addNegatively' (p,_) fm@(Maj a b c) = do aneg <- addNegatively a >>= negateELit
bneg <- addNegatively b >>= negateELit
cneg <- addNegatively c >>= negateELit
addLitClause $ Clause [p, aneg, bneg]
... | 526 | addNegatively' (p,_) fm@(Maj a b c) = do aneg <- addNegatively a >>= negateELit
bneg <- addNegatively b >>= negateELit
cneg <- addNegatively c >>= negateELit
addLitClause $ Clause [p, aneg, bneg]
... | 526 | false | false | 0 | 9 | 291 | 135 | 66 | 69 | null | null |
ardumont/haskell-lab | src/Tree/BinarySearchTree.hs | gpl-2.0 | deleteMax (Node x _ Empty) = (Just x, Empty) | 44 | deleteMax (Node x _ Empty) = (Just x, Empty) | 44 | deleteMax (Node x _ Empty) = (Just x, Empty) | 44 | false | false | 0 | 6 | 8 | 29 | 14 | 15 | null | null |
ribag/ganeti-experiments | src/Ganeti/HTools/Program/Hscan.hs | gpl-2.0 | main :: Options -> [String] -> IO ()
main opts clusters = do
let local = "LOCAL"
let nlen = if null clusters
then length local
else maximum . map length $ clusters
unless (optNoHeaders opts) $
printf "%-*s %5s %5s %5s %5s %6s %6s %6s %6s %10s\n" nlen
"Name" "No... | 862 | main :: Options -> [String] -> IO ()
main opts clusters = do
let local = "LOCAL"
let nlen = if null clusters
then length local
else maximum . map length $ clusters
unless (optNoHeaders opts) $
printf "%-*s %5s %5s %5s %5s %6s %6s %6s %6s %10s\n" nlen
"Name" "No... | 862 | main opts clusters = do
let local = "LOCAL"
let nlen = if null clusters
then length local
else maximum . map length $ clusters
unless (optNoHeaders opts) $
printf "%-*s %5s %5s %5s %5s %6s %6s %6s %6s %10s\n" nlen
"Name" "Nodes" "Inst" "BNode" "BInst" "t_mem" "... | 825 | false | true | 10 | 11 | 265 | 256 | 126 | 130 | null | null |
iand675/disruptor | src/Data/CheckedException.hs | mit | -- | Use this in places where all the @Union@ed options have been exhausted.
typesExhausted :: Union '[] -> a
typesExhausted = error "Union types exhausted - empty Union" | 170 | typesExhausted :: Union '[] -> a
typesExhausted = error "Union types exhausted - empty Union" | 93 | typesExhausted = error "Union types exhausted - empty Union" | 60 | true | true | 0 | 9 | 28 | 32 | 14 | 18 | null | null |
andrew-m-h/libmu-HS | src/LibMu/MuPrelude.hs | bsd-3-clause | uptr_void = UvmTypeDef "uptr.void" (UPtr void) | 46 | uptr_void = UvmTypeDef "uptr.void" (UPtr void) | 46 | uptr_void = UvmTypeDef "uptr.void" (UPtr void) | 46 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
gdetrez/gf-predictability | src/GF/Predictability/Experiments.hs | gpl-3.0 | m2 = sum . take 2 . distribution | 32 | m2 = sum . take 2 . distribution | 32 | m2 = sum . take 2 . distribution | 32 | false | false | 1 | 7 | 7 | 21 | 8 | 13 | null | null |
open-etcs/openetcs-dmi | src/ETCS/DMI/Windows/MainWindow.hs | bsd-3-clause | fromButtonI _ 8 = ButtonMaintainShunting | 40 | fromButtonI _ 8 = ButtonMaintainShunting | 40 | fromButtonI _ 8 = ButtonMaintainShunting | 40 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
mdsteele/fallback | src/Fallback/Scenario/Compile.hs | gpl-3.0 | getMonsterScript :: ScenarioTriggers -> AreaTag -> MonsterScriptId
-> Grid.Entry Monster -> Script TownEffect ()
getMonsterScript scenario tag scriptId =
fromMaybe (fail ("no such monster script: " ++ show scriptId)) $
Map.lookup scriptId $ aspecMonsterScripts $ TM.get tag $
scenarioAreas scenari... | 321 | getMonsterScript :: ScenarioTriggers -> AreaTag -> MonsterScriptId
-> Grid.Entry Monster -> Script TownEffect ()
getMonsterScript scenario tag scriptId =
fromMaybe (fail ("no such monster script: " ++ show scriptId)) $
Map.lookup scriptId $ aspecMonsterScripts $ TM.get tag $
scenarioAreas scenari... | 321 | getMonsterScript scenario tag scriptId =
fromMaybe (fail ("no such monster script: " ++ show scriptId)) $
Map.lookup scriptId $ aspecMonsterScripts $ TM.get tag $
scenarioAreas scenario | 191 | false | true | 0 | 14 | 62 | 94 | 44 | 50 | null | null |
elliottt/hsopenid | src/Network/OpenID/Authentication.hs | bsd-3-clause | verifyWithAssociation :: Monad m
=> Params -> Association -> ExceptionT Error m ()
verifyWithAssociation ps a = do
mode <- lookupParam "openid.mode" ps
unless (mode == "id_res") $ raise $ Error $ "unexpected openid.mode: " ++ mode
sigParams <- breaks (',' ==) `fmap` lookupParam "openid.signe... | 725 | verifyWithAssociation :: Monad m
=> Params -> Association -> ExceptionT Error m ()
verifyWithAssociation ps a = do
mode <- lookupParam "openid.mode" ps
unless (mode == "id_res") $ raise $ Error $ "unexpected openid.mode: " ++ mode
sigParams <- breaks (',' ==) `fmap` lookupParam "openid.signe... | 725 | verifyWithAssociation ps a = do
mode <- lookupParam "openid.mode" ps
unless (mode == "id_res") $ raise $ Error $ "unexpected openid.mode: " ++ mode
sigParams <- breaks (',' ==) `fmap` lookupParam "openid.signed" ps
sig <- decode `fmap` lookupParam "openid.sig" ps
sps <- getSignedFields sigParams ps
let h ... | 620 | false | true | 0 | 14 | 186 | 275 | 134 | 141 | null | null |
esmolanka/simple-pi | src/Language/SimplePi/Token.hs | bsd-3-clause | position :: LocatedBy p a -> p
position (L p _) = p | 51 | position :: LocatedBy p a -> p
position (L p _) = p | 51 | position (L p _) = p | 20 | false | true | 0 | 6 | 12 | 35 | 16 | 19 | null | null |
DougBurke/swish | src/Swish/RDF/Formatter/NTriples.hs | lgpl-2.1 | quoteT '\r' = "\\r" | 19 | quoteT '\r' = "\\r" | 19 | quoteT '\r' = "\\r" | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
lukexi/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | getRegister' :: DynFlags -> Bool -> CmmExpr -> NatM Register
getRegister' dflags is32Bit (CmmReg reg)
= case reg of
CmmGlobal PicBaseReg
| is32Bit ->
-- on x86_64, we have %rip for PicBaseReg, but it's not
-- a full-featured register, it can only be used for
-- ri... | 867 | getRegister' :: DynFlags -> Bool -> CmmExpr -> NatM Register
getRegister' dflags is32Bit (CmmReg reg)
= case reg of
CmmGlobal PicBaseReg
| is32Bit ->
-- on x86_64, we have %rip for PicBaseReg, but it's not
-- a full-featured register, it can only be used for
-- rip... | 866 | getRegister' dflags is32Bit (CmmReg reg)
= case reg of
CmmGlobal PicBaseReg
| is32Bit ->
-- on x86_64, we have %rip for PicBaseReg, but it's not
-- a full-featured register, it can only be used for
-- rip-relative addressing.
do reg' <- getPicBaseNat (a... | 805 | false | true | 0 | 18 | 339 | 206 | 94 | 112 | null | null |
avieth/diplomacy | Diplomacy/OrderResolution.hs | bsd-3-clause | typicalResolution
:: M.Map Zone (Aligned Unit, SomeOrderObject Typical)
-> Resolution Typical
typicalResolution = dropAssumptionTags . typicalResolutionAssuming . noAssumptions | 184 | typicalResolution
:: M.Map Zone (Aligned Unit, SomeOrderObject Typical)
-> Resolution Typical
typicalResolution = dropAssumptionTags . typicalResolutionAssuming . noAssumptions | 184 | typicalResolution = dropAssumptionTags . typicalResolutionAssuming . noAssumptions | 82 | false | true | 0 | 9 | 25 | 51 | 23 | 28 | null | null |
nakamuray/htig | HTIG/Core.hs | bsd-3-clause | runHook :: StatusHook -> MessageContext -> Status -> HTIG (Maybe Status)
runHook h ctx st = do
f <- runQuery h ctx
appEndo f (return $ Just st) | 151 | runHook :: StatusHook -> MessageContext -> Status -> HTIG (Maybe Status)
runHook h ctx st = do
f <- runQuery h ctx
appEndo f (return $ Just st) | 151 | runHook h ctx st = do
f <- runQuery h ctx
appEndo f (return $ Just st) | 78 | false | true | 0 | 10 | 35 | 69 | 32 | 37 | null | null |
tdammers/ginger | test/Text/Ginger/PropertyTests.hs | mit | roundTripGValExP :: (ToGVal Identity a, FromGVal Identity a)
=> (a -> a -> Bool)
-> a
-> Bool
roundTripGValExP cmp orig =
let g :: GVal Identity
g = toGVal orig
in case fromGVal g of
Nothing -> False
Just final -> cmp orig final | 305 | roundTripGValExP :: (ToGVal Identity a, FromGVal Identity a)
=> (a -> a -> Bool)
-> a
-> Bool
roundTripGValExP cmp orig =
let g :: GVal Identity
g = toGVal orig
in case fromGVal g of
Nothing -> False
Just final -> cmp orig final | 305 | roundTripGValExP cmp orig =
let g :: GVal Identity
g = toGVal orig
in case fromGVal g of
Nothing -> False
Just final -> cmp orig final | 166 | false | true | 0 | 10 | 121 | 103 | 50 | 53 | null | null |
johnbcoughlin/locus | src/SnapUtil.hs | mit | finishWithError :: MonadSnap m => (Response -> Response) -> m a
finishWithError error = modifyResponse error >> (getResponse >>= finishWith) | 140 | finishWithError :: MonadSnap m => (Response -> Response) -> m a
finishWithError error = modifyResponse error >> (getResponse >>= finishWith) | 140 | finishWithError error = modifyResponse error >> (getResponse >>= finishWith) | 76 | false | true | 0 | 8 | 19 | 49 | 24 | 25 | null | null |
urbanslug/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | isVecExpr (CmmMachOp (MO_VF_Insert {}) _) = True | 49 | isVecExpr (CmmMachOp (MO_VF_Insert {}) _) = True | 49 | isVecExpr (CmmMachOp (MO_VF_Insert {}) _) = True | 49 | false | false | 0 | 9 | 7 | 24 | 12 | 12 | null | null |
josefs/MiniDSL | Feldspar/Core.hs | bsd-3-clause | newVar (Var v) = 0 | 27 | newVar (Var v) = 0 | 27 | newVar (Var v) = 0 | 27 | false | false | 0 | 6 | 13 | 16 | 7 | 9 | null | null |
hvr/containers | Data/Set/Base.hs | bsd-3-clause | isSubsetOfX (Bin _ x l r) t
= found && isSubsetOfX l lt && isSubsetOfX r gt
where
(lt,found,gt) = splitMember x t
#if __GLASGOW_HASKELL__ >= 700
| 153 | isSubsetOfX (Bin _ x l r) t
= found && isSubsetOfX l lt && isSubsetOfX r gt
where
(lt,found,gt) = splitMember x t
#if __GLASGOW_HASKELL__ >= 700
| 153 | isSubsetOfX (Bin _ x l r) t
= found && isSubsetOfX l lt && isSubsetOfX r gt
where
(lt,found,gt) = splitMember x t
#if __GLASGOW_HASKELL__ >= 700
| 153 | false | false | 0 | 7 | 35 | 65 | 32 | 33 | null | null |
eigengrau/haskell-ircbot | Network/IRC/Bot/Part/Dice.hs | bsd-3-clause | diceCommand :: (BotMonad m) => ParsecT ByteString () m ()
diceCommand =
do try $ botPrefix >> string "dice"
logM Debug "dicePart"
target <- maybeZero =<< replyTo
(numDice, numSides, modifier) <- (do
skipMany1 space
nd <- nat <|> return 1
if nd > 100
then f... | 1,098 | diceCommand :: (BotMonad m) => ParsecT ByteString () m ()
diceCommand =
do try $ botPrefix >> string "dice"
logM Debug "dicePart"
target <- maybeZero =<< replyTo
(numDice, numSides, modifier) <- (do
skipMany1 space
nd <- nat <|> return 1
if nd > 100
then f... | 1,098 | diceCommand =
do try $ botPrefix >> string "dice"
logM Debug "dicePart"
target <- maybeZero =<< replyTo
(numDice, numSides, modifier) <- (do
skipMany1 space
nd <- nat <|> return 1
if nd > 100
then fail "You can not roll more than 100 dice."
els... | 1,040 | false | true | 3 | 21 | 410 | 362 | 170 | 192 | null | null |
utky/openflow | src/Network/OpenFlow/Encode.hs | bsd-3-clause | encode :: OfpMessage -> B.ByteString
encode = undefined | 55 | encode :: OfpMessage -> B.ByteString
encode = undefined | 55 | encode = undefined | 18 | false | true | 0 | 6 | 7 | 17 | 9 | 8 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/interview/zalora/src/Interview.hs | unlicense | uhb :: IO Bool
uhb = sendUpdate u
where
u = do
dc <- prefix "dc" (iriRef "http://purl.org/dc/elements/1.1/")
ex <- prefix "ex" (iriRef "http://example/")
ut1 <- updateTriple (ex .:. "book1") (dc .:. "title") (T.pack "A HASKELL book")
ut2 <- updateTriple (ex .:. "book1") (dc .:. "... | 534 | uhb :: IO Bool
uhb = sendUpdate u
where
u = do
dc <- prefix "dc" (iriRef "http://purl.org/dc/elements/1.1/")
ex <- prefix "ex" (iriRef "http://example/")
ut1 <- updateTriple (ex .:. "book1") (dc .:. "title") (T.pack "A HASKELL book")
ut2 <- updateTriple (ex .:. "book1") (dc .:. "... | 534 | uhb = sendUpdate u
where
u = do
dc <- prefix "dc" (iriRef "http://purl.org/dc/elements/1.1/")
ex <- prefix "ex" (iriRef "http://example/")
ut1 <- updateTriple (ex .:. "book1") (dc .:. "title") (T.pack "A HASKELL book")
ut2 <- updateTriple (ex .:. "book1") (dc .:. "title") (T.pack... | 519 | false | true | 1 | 12 | 132 | 197 | 96 | 101 | null | null |
limaner2002/EPC-tools | USACScripts/src/Scripts/AdminReview.hs | bsd-3-clause | form486ReviewConf = FullReviewConf form486Initial2017 form486Final2017 form486Solix2017 form486Usac2017 | 103 | form486ReviewConf = FullReviewConf form486Initial2017 form486Final2017 form486Solix2017 form486Usac2017 | 103 | form486ReviewConf = FullReviewConf form486Initial2017 form486Final2017 form486Solix2017 form486Usac2017 | 103 | false | false | 1 | 5 | 6 | 18 | 7 | 11 | null | null |
input-output-hk/cardano-sl-explorer | src/Pos/Explorer/Socket/App.hs | mit | notifierServer
:: (MonadIO m, WithLogger m, MonadCatch m, WithLogger m)
=> NotifierSettings
-> ConnectionsVar
-> m ()
notifierServer notifierSettings connVar = do
loggerName <- getLoggerName
let settings :: Settings
settings = toConfig notifierSettings loggerName
liftIO $ do
... | 1,684 | notifierServer
:: (MonadIO m, WithLogger m, MonadCatch m, WithLogger m)
=> NotifierSettings
-> ConnectionsVar
-> m ()
notifierServer notifierSettings connVar = do
loggerName <- getLoggerName
let settings :: Settings
settings = toConfig notifierSettings loggerName
liftIO $ do
... | 1,684 | notifierServer notifierSettings connVar = do
loggerName <- getLoggerName
let settings :: Settings
settings = toConfig notifierSettings loggerName
liftIO $ do
handler <- initialize waiAPI $ notifierHandler connVar loggerName
runSettings settings (addRequestCORSHeaders . app $ handl... | 1,550 | false | true | 4 | 16 | 636 | 296 | 146 | 150 | null | null |
mpickering/ghc-exactprint | tests/examples/ghc8/TH_repE3.hs | bsd-3-clause | consExpr :: ExpQ
consExpr = [| 4:5:6:[] |] | 42 | consExpr :: ExpQ
consExpr = [| 4:5:6:[] |] | 42 | consExpr = [| 4:5:6:[] |] | 25 | false | true | 0 | 4 | 7 | 14 | 9 | 5 | null | null |
EchoTeam/harlson | TelnetHandler.hs | bsd-2-clause | handleTelnet' :: (String -> IO String) -> SockAddr -> Handle -> IO ()
handleTelnet' runCmd sa h = do
hPutStrLn h "Ctrl-D to quit"
hPutStr h "> "
hFlush h
c <- hLookAhead h
unless (c == chr 4) $
do
cmd <- fmap strip $ hGetLine h
unless (cmd == ":q" || cmd == [chr 4])... | 496 | handleTelnet' :: (String -> IO String) -> SockAddr -> Handle -> IO ()
handleTelnet' runCmd sa h = do
hPutStrLn h "Ctrl-D to quit"
hPutStr h "> "
hFlush h
c <- hLookAhead h
unless (c == chr 4) $
do
cmd <- fmap strip $ hGetLine h
unless (cmd == ":q" || cmd == [chr 4])... | 496 | handleTelnet' runCmd sa h = do
hPutStrLn h "Ctrl-D to quit"
hPutStr h "> "
hFlush h
c <- hLookAhead h
unless (c == chr 4) $
do
cmd <- fmap strip $ hGetLine h
unless (cmd == ":q" || cmd == [chr 4]) $
do
out <- runCmd cmd
... | 426 | false | true | 0 | 15 | 222 | 181 | 79 | 102 | null | null |
weiningl/dataStructure | BinomialHeap.hs | bsd-3-clause | insert :: Ord a => a -> Heap a -> Heap a
insert x ts = insertTree t ts
where t = Node 1 x empty | 109 | insert :: Ord a => a -> Heap a -> Heap a
insert x ts = insertTree t ts
where t = Node 1 x empty | 109 | insert x ts = insertTree t ts
where t = Node 1 x empty | 68 | false | true | 0 | 8 | 39 | 56 | 26 | 30 | null | null |
rodrigo-machado/verigraph | src/library/Rewriting/DPO/TypedGraph.hs | gpl-3.0 | -- | Return the nodes deleted by a rule
deletedNodes :: TypedGraphRule a b -> [G.NodeId]
deletedNodes r = TGM.orphanTypedNodeIds (leftMorphism r) | 145 | deletedNodes :: TypedGraphRule a b -> [G.NodeId]
deletedNodes r = TGM.orphanTypedNodeIds (leftMorphism r) | 105 | deletedNodes r = TGM.orphanTypedNodeIds (leftMorphism r) | 56 | true | true | 0 | 7 | 21 | 40 | 20 | 20 | null | null |
ekmett/speculation | src/Control/Concurrent/Speculation/Foldable.hs | bsd-2-clause | or :: Foldable t => (Int -> Bool) -> t Bool -> Bool
or g = getAny . foldMap (Any . g) Any | 89 | or :: Foldable t => (Int -> Bool) -> t Bool -> Bool
or g = getAny . foldMap (Any . g) Any | 89 | or g = getAny . foldMap (Any . g) Any | 37 | false | true | 0 | 8 | 22 | 55 | 27 | 28 | null | null |
exercism/xhaskell | exercises/practice/linked-list/src/Deque.hs | mit | unshift :: Deque a -> a -> IO ()
unshift deque x = error "You need to implement this function." | 95 | unshift :: Deque a -> a -> IO ()
unshift deque x = error "You need to implement this function." | 95 | unshift deque x = error "You need to implement this function." | 62 | false | true | 0 | 8 | 19 | 35 | 16 | 19 | null | null |
GaloisInc/feed | Text/Feed/Constructor.hs | bsd-3-clause | filterChildren :: (XML.Element -> Bool) -> XML.Element -> XML.Element
filterChildren pre e =
case elContent e of
[] -> e
cs -> e { elContent = mapMaybe filterElt cs }
where
filterElt xe@(XML.Elem el)
| pre el = Just xe
| otherwise = Nothing
filterElt xe = Just xe | 305 | filterChildren :: (XML.Element -> Bool) -> XML.Element -> XML.Element
filterChildren pre e =
case elContent e of
[] -> e
cs -> e { elContent = mapMaybe filterElt cs }
where
filterElt xe@(XML.Elem el)
| pre el = Just xe
| otherwise = Nothing
filterElt xe = Just xe | 304 | filterChildren pre e =
case elContent e of
[] -> e
cs -> e { elContent = mapMaybe filterElt cs }
where
filterElt xe@(XML.Elem el)
| pre el = Just xe
| otherwise = Nothing
filterElt xe = Just xe | 234 | false | true | 2 | 9 | 90 | 128 | 60 | 68 | null | null |
projedi/type-inference-rank2 | src/ASUP.hs | bsd-3-clause | polyVarName :: String -> Int -> String
polyVarName x i = x ++ "_type_" ++ show i | 80 | polyVarName :: String -> Int -> String
polyVarName x i = x ++ "_type_" ++ show i | 80 | polyVarName x i = x ++ "_type_" ++ show i | 41 | false | true | 0 | 6 | 16 | 35 | 17 | 18 | null | null |
ancientlanguage/haskell-analysis | greek-script/app/ScriptQueries.hs | mit | queryWordExtraAccent :: ctx :* Word -> [[ExtraAccents]]
queryWordExtraAccent (_, w) = [toListOf (_wordAccent . _Just . _accentExtra) w] | 135 | queryWordExtraAccent :: ctx :* Word -> [[ExtraAccents]]
queryWordExtraAccent (_, w) = [toListOf (_wordAccent . _Just . _accentExtra) w] | 135 | queryWordExtraAccent (_, w) = [toListOf (_wordAccent . _Just . _accentExtra) w] | 79 | false | true | 0 | 9 | 17 | 53 | 29 | 24 | null | null |
sukwon0709/z3-haskell | src/Z3/Monad.hs | bsd-3-clause | -- | Rotate bits of /t1/ to the left /t2/ times.
--
-- Reference: <http://research.microsoft.com/en-us/um/redmond/projects/z3/group__capi.html#gaf46f1cb80e5a56044591a76e7c89e5e7>
mkExtRotateLeft :: MonadZ3 z3 => AST -> AST -> z3 AST
mkExtRotateLeft = liftFun2 Base.mkExtRotateLeft | 280 | mkExtRotateLeft :: MonadZ3 z3 => AST -> AST -> z3 AST
mkExtRotateLeft = liftFun2 Base.mkExtRotateLeft | 101 | mkExtRotateLeft = liftFun2 Base.mkExtRotateLeft | 47 | true | true | 0 | 8 | 29 | 37 | 19 | 18 | null | null |
ekmett/order-statistics | Statistics/Order.hs | bsd-3-clause | permille :: Fractional r => Rational -> L r
permille n = quantile (n/1000) | 74 | permille :: Fractional r => Rational -> L r
permille n = quantile (n/1000) | 74 | permille n = quantile (n/1000) | 30 | false | true | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
alphalambda/hsmath | src/Learn/Geometry/Drawing.hs | gpl-2.0 | plot_resolution = 0.1 | 21 | plot_resolution = 0.1 | 21 | plot_resolution = 0.1 | 21 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
fpco/serial-bench | binary-0.4.3.1/src/Data/Binary/Builder.hs | bsd-3-clause | ------------------------------------------------------------------------
--
-- copied from Data.ByteString.Lazy
--
defaultSize :: Int
defaultSize = 32 * k - overhead
where k = 1024
overhead = 2 * sizeOf (undefined :: Int)
------------------------------------------------------------------------
-- | Seq... | 355 | defaultSize :: Int
defaultSize = 32 * k - overhead
where k = 1024
overhead = 2 * sizeOf (undefined :: Int)
------------------------------------------------------------------------
-- | Sequence an IO operation on the buffer | 239 | defaultSize = 32 * k - overhead
where k = 1024
overhead = 2 * sizeOf (undefined :: Int)
------------------------------------------------------------------------
-- | Sequence an IO operation on the buffer | 220 | true | true | 4 | 6 | 55 | 66 | 31 | 35 | null | null |
yav/parsimony | src/Parsimony/UserState.hs | bsd-2-clause | -- | Set the user state.
setUserState :: u -> ParserU u s ()
setUserState u = updateInput (\i -> i { userState = u }) | 130 | setUserState :: u -> ParserU u s ()
setUserState u = updateInput (\i -> i { userState = u }) | 103 | setUserState u = updateInput (\i -> i { userState = u }) | 61 | true | true | 0 | 9 | 38 | 47 | 25 | 22 | null | null |
AaronFriel/Iota | Data/Iota/Stateful/Text.hs | bsd-3-clause | -- Additional combinators
feedInnerS :: (IotaS a' b') => IotaResultS a' b' -> (IotaResultS a' b' -> a) -> Text -> Writer Builder a
feedInnerS s' s i = tell o >> return (s (flush, a, b, t))
where (o, a, b, t) = feedIotaS s' i
| 228 | feedInnerS :: (IotaS a' b') => IotaResultS a' b' -> (IotaResultS a' b' -> a) -> Text -> Writer Builder a
feedInnerS s' s i = tell o >> return (s (flush, a, b, t))
where (o, a, b, t) = feedIotaS s' i
| 201 | feedInnerS s' s i = tell o >> return (s (flush, a, b, t))
where (o, a, b, t) = feedIotaS s' i
| 96 | true | true | 0 | 10 | 50 | 117 | 61 | 56 | null | null |
stevedonnelly/haskell | code/Data/Tuple/Extensions.hs | mit | getters2 = (first2, second2) | 28 | getters2 = (first2, second2) | 28 | getters2 = (first2, second2) | 28 | false | false | 1 | 5 | 3 | 15 | 7 | 8 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.