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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
geophf/1HaskellADay | exercises/HAD/Y2017/M09/D20/Exercise.hs | mit | -- the above function assumes an empty keyword table
-- hint: you may wish to convert the Dictionary value to [Key]
-- then 2. insert all the keywords for AP900327-0094.txt into article_keyword
insertAllArticleKeyWords :: Connection -> Int -> Map Int KeyWord -> IO ()
insertAllArticleKeyWords conn artId kws = undefin... | 322 | insertAllArticleKeyWords :: Connection -> Int -> Map Int KeyWord -> IO ()
insertAllArticleKeyWords conn artId kws = undefined | 125 | insertAllArticleKeyWords conn artId kws = undefined | 51 | true | true | 0 | 9 | 52 | 43 | 22 | 21 | null | null |
SamirTalwar/advent-of-code | 2016/AOC_22_2.hs | mit | normalSize = Terabyte 100 | 25 | normalSize = Terabyte 100 | 25 | normalSize = Terabyte 100 | 25 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
nevrenato/Hets_Fork | CSL/GenericInterpreter.hs | gpl-2.0 | transExprWithVars :: MonadState (ASState s) as =>
[String] -> EXPRESSION -> as ([String], EXPRESSION)
transExprWithVars vl e = do
r <- get
let bm = getBMap r
args = translateArgVars bm vl
(bm', e') = translateExprWithVars vl bm e
put r { getBMap = bm' }
return (args, e') | 312 | transExprWithVars :: MonadState (ASState s) as =>
[String] -> EXPRESSION -> as ([String], EXPRESSION)
transExprWithVars vl e = do
r <- get
let bm = getBMap r
args = translateArgVars bm vl
(bm', e') = translateExprWithVars vl bm e
put r { getBMap = bm' }
return (args, e') | 312 | transExprWithVars vl e = do
r <- get
let bm = getBMap r
args = translateArgVars bm vl
(bm', e') = translateExprWithVars vl bm e
put r { getBMap = bm' }
return (args, e') | 189 | false | true | 0 | 10 | 89 | 128 | 64 | 64 | null | null |
nek0/haskelloids | src/InGame.hs | gpl-3.0 | drawGame :: UserData -> Affection ()
drawGame ud = do
hasks <- liftIO $ readMVar (haskelloids ud)
pews <- liftIO $ readMVar (shots ud)
wlcond <- liftIO $ readMVar (wonlost ud)
s <- liftIO $ readMVar (ship ud)
mapM_ (drawHaskelloid (nano ud)) hasks
mapM_ (drawPew (nano ud)) pews
case wlcond of
Just x -... | 381 | drawGame :: UserData -> Affection ()
drawGame ud = do
hasks <- liftIO $ readMVar (haskelloids ud)
pews <- liftIO $ readMVar (shots ud)
wlcond <- liftIO $ readMVar (wonlost ud)
s <- liftIO $ readMVar (ship ud)
mapM_ (drawHaskelloid (nano ud)) hasks
mapM_ (drawPew (nano ud)) pews
case wlcond of
Just x -... | 381 | drawGame ud = do
hasks <- liftIO $ readMVar (haskelloids ud)
pews <- liftIO $ readMVar (shots ud)
wlcond <- liftIO $ readMVar (wonlost ud)
s <- liftIO $ readMVar (ship ud)
mapM_ (drawHaskelloid (nano ud)) hasks
mapM_ (drawPew (nano ud)) pews
case wlcond of
Just x -> drawWonLost (nano ud) x
Nothing... | 344 | false | true | 0 | 12 | 85 | 187 | 85 | 102 | null | null |
wavewave/evchain | lib/HEP/Automation/EventChain/Process.hs | gpl-3.0 | mkOccNumDecay MkD {..} cntr = mkOccNum (ptl_ptlid dnode) cntr | 61 | mkOccNumDecay MkD {..} cntr = mkOccNum (ptl_ptlid dnode) cntr | 61 | mkOccNumDecay MkD {..} cntr = mkOccNum (ptl_ptlid dnode) cntr | 61 | false | false | 1 | 6 | 8 | 36 | 14 | 22 | null | null |
overminder/punch-forward | src/Network/Punch/Peer/Reliable.hs | bsd-3-clause | recvRcb :: RcbRef -> STM (Maybe B.ByteString)
-- Blocks when toApp buffer is empty
recvRcb rcb@(Rcb {..}) = recvMailbox rcbToApp | 128 | recvRcb :: RcbRef -> STM (Maybe B.ByteString)
recvRcb rcb@(Rcb {..}) = recvMailbox rcbToApp | 91 | recvRcb rcb@(Rcb {..}) = recvMailbox rcbToApp | 45 | true | true | 0 | 9 | 19 | 45 | 23 | 22 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Upgrade.hs | mit | mineralsBase MuscularAugments = 150 | 35 | mineralsBase MuscularAugments = 150 | 35 | mineralsBase MuscularAugments = 150 | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
kadena-io/pact | src/Pact/Repl/Lib.hs | bsd-3-clause | tc :: RNativeFun LibState
tc i as = case as of
[TLitString s] -> go s False
[TLitString s,TLiteral (LBool d) _] -> go s d
_ -> argsError i as
where
go modname dbg = do
md <- getModule i (ModuleName modname Nothing)
de <- viewLibState _rlsDynEnv
r :: Either TC.CheckerException ([TC.TopLevel... | 793 | tc :: RNativeFun LibState
tc i as = case as of
[TLitString s] -> go s False
[TLitString s,TLiteral (LBool d) _] -> go s d
_ -> argsError i as
where
go modname dbg = do
md <- getModule i (ModuleName modname Nothing)
de <- viewLibState _rlsDynEnv
r :: Either TC.CheckerException ([TC.TopLevel... | 793 | tc i as = case as of
[TLitString s] -> go s False
[TLitString s,TLiteral (LBool d) _] -> go s d
_ -> argsError i as
where
go modname dbg = do
md <- getModule i (ModuleName modname Nothing)
de <- viewLibState _rlsDynEnv
r :: Either TC.CheckerException ([TC.TopLevel TC.Node],[TC.Failure]) <-... | 767 | false | true | 3 | 19 | 227 | 309 | 146 | 163 | null | null |
lfritz/python-type-inference | python-type-inference/src/Language/Python/TypeInference/CFG/Fragment.hs | bsd-3-clause | -- | Get the nodes corresponding to @continue@ statements (or an empty set for
-- an empty fragment).
getContinue :: Fragment -> Set Label
getContinue EmptyFragment = Set.empty | 176 | getContinue :: Fragment -> Set Label
getContinue EmptyFragment = Set.empty | 74 | getContinue EmptyFragment = Set.empty | 37 | true | true | 0 | 6 | 27 | 25 | 13 | 12 | null | null |
brownplt/strobe-old | src/BrownPLT/TypedJS/TypeTheory.hs | bsd-2-clause | -- |Note that field names must be in ascending order.
stringObjectType = TObject "String" []
[ ("charAt", True,
TArrow (TObject "String" [] [])
(ArgType [rIntType] Nothing)
rStrType)
, ("charCodeAt", True,
TArrow (TObject "String" [] [])
(ArgType [rIntType] Nothing)
... | 1,327 | stringObjectType = TObject "String" []
[ ("charAt", True,
TArrow (TObject "String" [] [])
(ArgType [rIntType] Nothing)
rStrType)
, ("charCodeAt", True,
TArrow (TObject "String" [] [])
(ArgType [rIntType] Nothing)
rIntType)
, ("indexOf", True,
TArrow (TObject... | 1,273 | stringObjectType = TObject "String" []
[ ("charAt", True,
TArrow (TObject "String" [] [])
(ArgType [rIntType] Nothing)
rStrType)
, ("charCodeAt", True,
TArrow (TObject "String" [] [])
(ArgType [rIntType] Nothing)
rIntType)
, ("indexOf", True,
TArrow (TObject... | 1,273 | true | false | 0 | 12 | 500 | 416 | 223 | 193 | null | null |
olorin/nagios-perfdata | tests/Perfdata.hs | bsd-3-clause | defaultTemplateData :: ByteString
defaultTemplateData =
"DATATYPE::SERVICEPERFDATA\tTIMET::1388445486\tHOSTNAME::node4.example.com\tSERVICEDESC::diskio\tSERVICEPERFDATA::overall_read_count=32294c;;;;; overall_write_count=6497849c;;;;; overall_read_bytes=468035584c;;;;; overall_write_bytes=40444282880c;;;;; dm-1_rea... | 907 | defaultTemplateData :: ByteString
defaultTemplateData =
"DATATYPE::SERVICEPERFDATA\tTIMET::1388445486\tHOSTNAME::node4.example.com\tSERVICEDESC::diskio\tSERVICEPERFDATA::overall_read_count=32294c;;;;; overall_write_count=6497849c;;;;; overall_read_bytes=468035584c;;;;; overall_write_bytes=40444282880c;;;;; dm-1_rea... | 907 | defaultTemplateData =
"DATATYPE::SERVICEPERFDATA\tTIMET::1388445486\tHOSTNAME::node4.example.com\tSERVICEDESC::diskio\tSERVICEPERFDATA::overall_read_count=32294c;;;;; overall_write_count=6497849c;;;;; overall_read_bytes=468035584c;;;;; overall_write_bytes=40444282880c;;;;; dm-1_read_count=1343c;;;;; dm-1_write_coun... | 873 | false | true | 0 | 4 | 28 | 11 | 6 | 5 | null | null |
haskell-tinc/tinc | src/Tinc/SourceDependency.hs | bsd-3-clause | subject :: Source a -> String
subject addSource = case addSource of
Git url _ subdir -> maybe "" (\dir -> "directory " ++ show dir ++ " of ") subdir ++ "git repository " ++ url
Local dir -> "directory " ++ dir | 213 | subject :: Source a -> String
subject addSource = case addSource of
Git url _ subdir -> maybe "" (\dir -> "directory " ++ show dir ++ " of ") subdir ++ "git repository " ++ url
Local dir -> "directory " ++ dir | 213 | subject addSource = case addSource of
Git url _ subdir -> maybe "" (\dir -> "directory " ++ show dir ++ " of ") subdir ++ "git repository " ++ url
Local dir -> "directory " ++ dir | 183 | false | true | 6 | 12 | 47 | 75 | 38 | 37 | null | null |
dylanmc/cryptol | sbv/Data/SBV/SMT/SMTLib2.hs | bsd-3-clause | smtType (KUninterpreted s) = s | 30 | smtType (KUninterpreted s) = s | 30 | smtType (KUninterpreted s) = s | 30 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
rpereira/servant-blog | src/Api.hs | bsd-3-clause | -- | Tell Servant how to run the 'App' monad with the 'server' function.
appToServer :: Config -> Server API
appToServer cfg = enter (convertApp cfg) server | 156 | appToServer :: Config -> Server API
appToServer cfg = enter (convertApp cfg) server | 83 | appToServer cfg = enter (convertApp cfg) server | 47 | true | true | 0 | 7 | 26 | 33 | 16 | 17 | null | null |
DavidAlphaFox/ghc | libraries/deepseq/tests/Main.hs | bsd-3-clause | case_4_4 = testCase "Case4.4" $ withSeqState 0xffffffffffffffff $ do
evaluate $ rnf $ (genCase 63)
where
genCase n | n > 1 = Case4c (SeqSet n) (genCase (n-1))
| otherwise = Case4b (SeqSet 0) (SeqSet 1)
---------------------------------------------------------------------------- | 309 | case_4_4 = testCase "Case4.4" $ withSeqState 0xffffffffffffffff $ do
evaluate $ rnf $ (genCase 63)
where
genCase n | n > 1 = Case4c (SeqSet n) (genCase (n-1))
| otherwise = Case4b (SeqSet 0) (SeqSet 1)
---------------------------------------------------------------------------- | 309 | case_4_4 = testCase "Case4.4" $ withSeqState 0xffffffffffffffff $ do
evaluate $ rnf $ (genCase 63)
where
genCase n | n > 1 = Case4c (SeqSet n) (genCase (n-1))
| otherwise = Case4b (SeqSet 0) (SeqSet 1)
---------------------------------------------------------------------------- | 309 | false | false | 0 | 10 | 67 | 108 | 51 | 57 | null | null |
jml/hazard | lib/Hazard/Views.hs | apache-2.0 | games :: (Foldable f, MonadIO m) => f a -> View m
games games' =
dualResponse j h
where
j = gamesLinks
h = H.docTypeHtml $ do
H.head $ H.title "Hazard :: Games"
H.body $ do
H.h1 "/games"
H.p "Endpoint for registering and creating games."
H.h2 "GET"
H.p "Returns a ... | 1,145 | games :: (Foldable f, MonadIO m) => f a -> View m
games games' =
dualResponse j h
where
j = gamesLinks
h = H.docTypeHtml $ do
H.head $ H.title "Hazard :: Games"
H.body $ do
H.h1 "/games"
H.p "Endpoint for registering and creating games."
H.h2 "GET"
H.p "Returns a ... | 1,145 | games games' =
dualResponse j h
where
j = gamesLinks
h = H.docTypeHtml $ do
H.head $ H.title "Hazard :: Games"
H.body $ do
H.h1 "/games"
H.p "Endpoint for registering and creating games."
H.h2 "GET"
H.p "Returns a list of games."
H.h2 "POST"
H.p "W... | 1,095 | false | true | 2 | 15 | 408 | 297 | 129 | 168 | null | null |
keenbug/iexpr | Language/Simple/Backends/Evaluator.hs | gpl-2.0 | compileLet :: Name -> Compilation -> Compilation -> Compilation
compileLet var compiledval compiledbody = do
val <- compiledval
with (addEnv var val) compiledbody | 166 | compileLet :: Name -> Compilation -> Compilation -> Compilation
compileLet var compiledval compiledbody = do
val <- compiledval
with (addEnv var val) compiledbody | 166 | compileLet var compiledval compiledbody = do
val <- compiledval
with (addEnv var val) compiledbody | 102 | false | true | 0 | 10 | 26 | 59 | 26 | 33 | null | null |
lynnard/reflex-cocos2d | src/Reflex/Cocos2d/Misc/Chipmunk.hs | mit | liftStateVar :: MonadIO m => (b -> StateVar a) -> Attrib' b m a
liftStateVar f = Attrib (S.get . f) ((S.$=) . f) | 112 | liftStateVar :: MonadIO m => (b -> StateVar a) -> Attrib' b m a
liftStateVar f = Attrib (S.get . f) ((S.$=) . f) | 112 | liftStateVar f = Attrib (S.get . f) ((S.$=) . f) | 48 | false | true | 0 | 9 | 23 | 67 | 34 | 33 | null | null |
vdweegen/UvA-Software_Testing | Lab2/Bauke/Exercises.hs | gpl-3.0 | deran :: Integer -> [[Integer]]
deran n = [ a | a <- permutations [0..n], isDerangement [0..n] a ] | 98 | deran :: Integer -> [[Integer]]
deran n = [ a | a <- permutations [0..n], isDerangement [0..n] a ] | 98 | deran n = [ a | a <- permutations [0..n], isDerangement [0..n] a ] | 66 | false | true | 0 | 10 | 18 | 63 | 31 | 32 | null | null |
gafiatulin/codewars | src/7 kyu/Averages.hs | mit | averages :: Maybe [Double] -> [Double]
averages = maybe [] (\xs -> zipWith (\a b -> (a+b)/2) xs (tail xs)) | 106 | averages :: Maybe [Double] -> [Double]
averages = maybe [] (\xs -> zipWith (\a b -> (a+b)/2) xs (tail xs)) | 106 | averages = maybe [] (\xs -> zipWith (\a b -> (a+b)/2) xs (tail xs)) | 67 | false | true | 0 | 13 | 19 | 73 | 39 | 34 | null | null |
tjakway/ghcjvm | compiler/coreSyn/TrieMap.hs | bsd-3-clause | fdA :: (a -> b -> b) -> AltMap a -> b -> b
fdA k m = foldTM k (am_deflt m)
. foldTM (foldTM k) (am_data m)
. foldTM (foldTM k) (am_lit m) | 153 | fdA :: (a -> b -> b) -> AltMap a -> b -> b
fdA k m = foldTM k (am_deflt m)
. foldTM (foldTM k) (am_data m)
. foldTM (foldTM k) (am_lit m) | 153 | fdA k m = foldTM k (am_deflt m)
. foldTM (foldTM k) (am_data m)
. foldTM (foldTM k) (am_lit m) | 110 | false | true | 2 | 9 | 49 | 102 | 47 | 55 | null | null |
randen/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | tyvarNames :: LHsQTyVars DocName -> [Name]
tyvarNames = map (getName . hsLTyVarName) . hsQTvExplicit | 100 | tyvarNames :: LHsQTyVars DocName -> [Name]
tyvarNames = map (getName . hsLTyVarName) . hsQTvExplicit | 100 | tyvarNames = map (getName . hsLTyVarName) . hsQTvExplicit | 57 | false | true | 0 | 8 | 13 | 42 | 19 | 23 | null | null |
vollmerm/accelerate-apart | Data/Array/Accelerate/Apart/Exp.hs | bsd-3-clause | isSignedIntegralType (TypeCUShort{}) = False | 44 | isSignedIntegralType (TypeCUShort{}) = False | 44 | isSignedIntegralType (TypeCUShort{}) = False | 44 | false | false | 0 | 7 | 3 | 16 | 8 | 8 | null | null |
elieux/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | mkHsComp ctxt stmts expr = mkHsDo ctxt (stmts ++ [last_stmt])
where
last_stmt = L (getLoc expr) $ mkLastStmt expr | 119 | mkHsComp ctxt stmts expr = mkHsDo ctxt (stmts ++ [last_stmt])
where
last_stmt = L (getLoc expr) $ mkLastStmt expr | 119 | mkHsComp ctxt stmts expr = mkHsDo ctxt (stmts ++ [last_stmt])
where
last_stmt = L (getLoc expr) $ mkLastStmt expr | 119 | false | false | 4 | 8 | 24 | 61 | 25 | 36 | null | null |
mgreenly/roguelike | src/RogueLike/Render/Pickup.hs | isc | renderPickup :: App()
renderPickup = do
gameState <- get
appConfig <- ask
liftCurses $ updateWindow (window appConfig) $ do
clear
renderPickupTitle
renderPickupItems appConfig gameState
liftCurses render | 243 | renderPickup :: App()
renderPickup = do
gameState <- get
appConfig <- ask
liftCurses $ updateWindow (window appConfig) $ do
clear
renderPickupTitle
renderPickupItems appConfig gameState
liftCurses render | 243 | renderPickup = do
gameState <- get
appConfig <- ask
liftCurses $ updateWindow (window appConfig) $ do
clear
renderPickupTitle
renderPickupItems appConfig gameState
liftCurses render | 221 | false | true | 0 | 12 | 65 | 76 | 31 | 45 | null | null |
hazel-el/hazel | Hazel/Hierarchy.hs | gpl-3.0 | insertEquivalents :: Hierarchy -> Concept -> [Concept] -> Hierarchy
insertEquivalents (Hierarchy parents equivalents domain) concept equivalents' =
Hierarchy parents (extend equivalents concept equivalents') domain | 222 | insertEquivalents :: Hierarchy -> Concept -> [Concept] -> Hierarchy
insertEquivalents (Hierarchy parents equivalents domain) concept equivalents' =
Hierarchy parents (extend equivalents concept equivalents') domain | 222 | insertEquivalents (Hierarchy parents equivalents domain) concept equivalents' =
Hierarchy parents (extend equivalents concept equivalents') domain | 154 | false | true | 0 | 8 | 31 | 60 | 30 | 30 | null | null |
gabesoft/kapi | src/Api/Lono.hs | bsd-3-clause | apiUserPostProxyGetSingle
:: Proxy (LonoApiPath :> (UserPostApiPath :> GetSingle))
apiUserPostProxyGetSingle =
Proxy :: Proxy (LonoApiPath :> UserPostApiPath :> GetSingle) | 175 | apiUserPostProxyGetSingle
:: Proxy (LonoApiPath :> (UserPostApiPath :> GetSingle))
apiUserPostProxyGetSingle =
Proxy :: Proxy (LonoApiPath :> UserPostApiPath :> GetSingle) | 175 | apiUserPostProxyGetSingle =
Proxy :: Proxy (LonoApiPath :> UserPostApiPath :> GetSingle) | 90 | false | true | 1 | 9 | 21 | 48 | 24 | 24 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/nativeGen/SPARC/Base.hs | bsd-3-clause | - Size of the available spill area
spillAreaLength :: DynFlags -> Int
spillAreaLength
= rESERVED_C_STACK_BYTES
| 119 | spillAreaLength :: DynFlags -> Int
spillAreaLength
= rESERVED_C_STACK_BYTES | 83 | spillAreaLength
= rESERVED_C_STACK_BYTES | 48 | true | true | 0 | 7 | 23 | 35 | 15 | 20 | null | null |
vTurbine/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | mkExtraObjToLinkIntoBinary :: DynFlags -> IO FilePath
mkExtraObjToLinkIntoBinary dflags = do
when (gopt Opt_NoHsMain dflags && haveRtsOptsFlags dflags) $ do
log_action dflags dflags NoReason SevInfo noSrcSpan defaultUserStyle
(text "Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.... | 1,680 | mkExtraObjToLinkIntoBinary :: DynFlags -> IO FilePath
mkExtraObjToLinkIntoBinary dflags = do
when (gopt Opt_NoHsMain dflags && haveRtsOptsFlags dflags) $ do
log_action dflags dflags NoReason SevInfo noSrcSpan defaultUserStyle
(text "Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.... | 1,680 | mkExtraObjToLinkIntoBinary dflags = do
when (gopt Opt_NoHsMain dflags && haveRtsOptsFlags dflags) $ do
log_action dflags dflags NoReason SevInfo noSrcSpan defaultUserStyle
(text "Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main." $$
text " Call hs_init_ghc() from your... | 1,626 | false | true | 2 | 14 | 444 | 291 | 141 | 150 | null | null |
rueshyna/gogol | gogol-safebrowsing/gen/Network/Google/Resource/SafeBrowsing/FullHashes/Find.hs | mpl-2.0 | -- | Multipart request metadata.
fhfPayload :: Lens' FullHashesFind FindFullHashesRequest
fhfPayload
= lens _fhfPayload (\ s a -> s{_fhfPayload = a}) | 151 | fhfPayload :: Lens' FullHashesFind FindFullHashesRequest
fhfPayload
= lens _fhfPayload (\ s a -> s{_fhfPayload = a}) | 118 | fhfPayload
= lens _fhfPayload (\ s a -> s{_fhfPayload = a}) | 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
DougBurke/swish | src/Swish/GraphPartition.hs | lgpl-2.1 | -- | Returns a list of partitions.
getPartitions :: PartitionedGraph lb -> [GraphPartition lb]
getPartitions (PartitionedGraph ps) = ps | 135 | getPartitions :: PartitionedGraph lb -> [GraphPartition lb]
getPartitions (PartitionedGraph ps) = ps | 100 | getPartitions (PartitionedGraph ps) = ps | 40 | true | true | 0 | 7 | 18 | 38 | 18 | 20 | null | null |
dmalikov/cabal2nix | src/Cabal2Nix/PostProcess.hs | bsd-3-clause | agdaPostInstall :: String
agdaPostInstall = unlines
[ "postInstall = ''"
, " $out/bin/agda -c --no-main $(find $out/share -name Primitive.agda)"
, " $out/bin/agda-mode compile"
, "'';"
] | 198 | agdaPostInstall :: String
agdaPostInstall = unlines
[ "postInstall = ''"
, " $out/bin/agda -c --no-main $(find $out/share -name Primitive.agda)"
, " $out/bin/agda-mode compile"
, "'';"
] | 198 | agdaPostInstall = unlines
[ "postInstall = ''"
, " $out/bin/agda -c --no-main $(find $out/share -name Primitive.agda)"
, " $out/bin/agda-mode compile"
, "'';"
] | 172 | false | true | 0 | 5 | 37 | 26 | 15 | 11 | null | null |
sdiehl/ghc | compiler/simplCore/SimplEnv.hs | bsd-3-clause | seqTyVar :: TyVar -> ()
seqTyVar b = b `seq` () | 47 | seqTyVar :: TyVar -> ()
seqTyVar b = b `seq` () | 47 | seqTyVar b = b `seq` () | 23 | false | true | 0 | 6 | 10 | 28 | 15 | 13 | null | null |
c0c0n3/audidoza | app/Audit/ContentHistory.hs | gpl-3.0 | -- pointers to subsequent versions of content identified by κ, in desc order.
-- last change added through pushChange comes first in the list, second last
-- comes second, etc.
historyLine ∷ Ord κ ⇒ κ → ContentHistory κ ξ → [AuditId]
historyLine contentKey = versions
∘ Map.findWithDefault emptyH... | 380 | historyLine ∷ Ord κ ⇒ κ → ContentHistory κ ξ → [AuditId]
historyLine contentKey = versions
∘ Map.findWithDefault emptyHistoryLine contentKey
∘ historyLines | 202 | historyLine contentKey = versions
∘ Map.findWithDefault emptyHistoryLine contentKey
∘ historyLines | 145 | true | true | 0 | 8 | 99 | 55 | 28 | 27 | null | null |
timthelion/archivemount-hs | src/System/Directory/Archivemount.hs | gpl-3.0 | appendToTar
:: FilePath -- ^ archive
-> [(FilePath,BS.ByteString)] -- ^ objects to append
-> IO ()
appendToTar archive fileObjects = do
withSystemTempDirectory (filter (\c->notElem c pathSeparators) archive) appendObjects
return ()
where
appendObjects tempDir = mapM (appendObject tempDir) fileObjects
appendObje... | 1,425 | appendToTar
:: FilePath -- ^ archive
-> [(FilePath,BS.ByteString)] -- ^ objects to append
-> IO ()
appendToTar archive fileObjects = do
withSystemTempDirectory (filter (\c->notElem c pathSeparators) archive) appendObjects
return ()
where
appendObjects tempDir = mapM (appendObject tempDir) fileObjects
appendObje... | 1,425 | appendToTar archive fileObjects = do
withSystemTempDirectory (filter (\c->notElem c pathSeparators) archive) appendObjects
return ()
where
appendObjects tempDir = mapM (appendObject tempDir) fileObjects
appendObject tempDir (path,content) = do
createDirectoryIfMissing True $ tempDir </> takeDirectory path
putS... | 1,323 | false | true | 0 | 12 | 219 | 242 | 119 | 123 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | The columns in this table type
ssqlttColumns :: Lens' StandardSQLTableType [StandardSQLField]
ssqlttColumns
= lens _ssqlttColumns
(\ s a -> s{_ssqlttColumns = a})
. _Default
. _Coerce | 208 | ssqlttColumns :: Lens' StandardSQLTableType [StandardSQLField]
ssqlttColumns
= lens _ssqlttColumns
(\ s a -> s{_ssqlttColumns = a})
. _Default
. _Coerce | 172 | ssqlttColumns
= lens _ssqlttColumns
(\ s a -> s{_ssqlttColumns = a})
. _Default
. _Coerce | 109 | true | true | 0 | 11 | 47 | 53 | 28 | 25 | null | null |
nitrix/lspace | legacy/Grid.hs | unlicense | lookup :: Integral k => k -> k -> Grid k v -> [v]
lookup x y (MkGrid natural) = fromMaybe [] $ (\chunk -> chunk V.! idx x y) <$> M.lookup (coord x y) natural | 157 | lookup :: Integral k => k -> k -> Grid k v -> [v]
lookup x y (MkGrid natural) = fromMaybe [] $ (\chunk -> chunk V.! idx x y) <$> M.lookup (coord x y) natural | 157 | lookup x y (MkGrid natural) = fromMaybe [] $ (\chunk -> chunk V.! idx x y) <$> M.lookup (coord x y) natural | 107 | false | true | 0 | 10 | 35 | 98 | 48 | 50 | null | null |
GaloisInc/halvm-ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | -- | Show some labelled 'SDoc' if a particular flag is set or at a verbosity level of @-v -ddump-most@ or higher
dumpIfSet_dyn :: DumpFlag -> String -> SDoc -> CoreM ()
dumpIfSet_dyn flag str doc
= do { dflags <- getDynFlags
; unqual <- getPrintUnqualified
; when (dopt flag dflags) $ liftIO $
E... | 360 | dumpIfSet_dyn :: DumpFlag -> String -> SDoc -> CoreM ()
dumpIfSet_dyn flag str doc
= do { dflags <- getDynFlags
; unqual <- getPrintUnqualified
; when (dopt flag dflags) $ liftIO $
Err.dumpSDoc dflags unqual flag str doc } | 247 | dumpIfSet_dyn flag str doc
= do { dflags <- getDynFlags
; unqual <- getPrintUnqualified
; when (dopt flag dflags) $ liftIO $
Err.dumpSDoc dflags unqual flag str doc } | 191 | true | true | 0 | 12 | 85 | 94 | 45 | 49 | null | null |
rahulmutt/ghcvm | compiler/Eta/HsSyn/HsPat.hs | bsd-3-clause | pprPatBndr :: OutputableBndr name => name -> SDoc
pprPatBndr var -- Print with type info if -dppr-debug is on
= getPprStyle $ \ sty ->
if debugStyle sty then
parens (pprBndr LambdaBind var) -- Could pass the site to pprPat
-- but is ... | 366 | pprPatBndr :: OutputableBndr name => name -> SDoc
pprPatBndr var -- Print with type info if -dppr-debug is on
= getPprStyle $ \ sty ->
if debugStyle sty then
parens (pprBndr LambdaBind var) -- Could pass the site to pprPat
-- but is ... | 366 | pprPatBndr var -- Print with type info if -dppr-debug is on
= getPprStyle $ \ sty ->
if debugStyle sty then
parens (pprBndr LambdaBind var) -- Could pass the site to pprPat
-- but is it worth it?
else
pprPrefixOcc var | 316 | false | true | 0 | 10 | 147 | 62 | 32 | 30 | null | null |
c19/Exercism-Haskell | grade-school/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_grade_school.hs | mit | libdir = "/Users/c19/Documents/projects/exercism/haskell/haskell/grade-school/.stack-work/install/x86_64-osx/lts-8.21/8.0.2/lib/x86_64-osx-ghc-8.0.2/grade-school-0.1.0.2-8XmvH99oQw66n0pHqliuYi" | 197 | libdir = "/Users/c19/Documents/projects/exercism/haskell/haskell/grade-school/.stack-work/install/x86_64-osx/lts-8.21/8.0.2/lib/x86_64-osx-ghc-8.0.2/grade-school-0.1.0.2-8XmvH99oQw66n0pHqliuYi" | 197 | libdir = "/Users/c19/Documents/projects/exercism/haskell/haskell/grade-school/.stack-work/install/x86_64-osx/lts-8.21/8.0.2/lib/x86_64-osx-ghc-8.0.2/grade-school-0.1.0.2-8XmvH99oQw66n0pHqliuYi" | 197 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
greydot/persistent | persistent-template/Database/Persist/TH.hs | mit | mkKeyTypeDec :: MkPersistSettings -> EntityDef -> Q (Dec, [Dec])
mkKeyTypeDec mps t = do
(instDecs, i) <-
if mpsGeneric mps
then if not useNewtype
then do pfDec <- pfInstD
return (pfDec, [''Generic])
else do gi <- genericNewtypeInstances
... | 5,500 | mkKeyTypeDec :: MkPersistSettings -> EntityDef -> Q (Dec, [Dec])
mkKeyTypeDec mps t = do
(instDecs, i) <-
if mpsGeneric mps
then if not useNewtype
then do pfDec <- pfInstD
return (pfDec, [''Generic])
else do gi <- genericNewtypeInstances
... | 5,500 | mkKeyTypeDec mps t = do
(instDecs, i) <-
if mpsGeneric mps
then if not useNewtype
then do pfDec <- pfInstD
return (pfDec, [''Generic])
else do gi <- genericNewtypeInstances
return (gi, [])
else if not useNewtype
... | 5,435 | false | true | 0 | 17 | 1,796 | 612 | 331 | 281 | null | null |
abuiles/turbinado-blog | tmp/dependencies/hsx-0.4.5/src/HSX/Transform.hs | bsd-3-clause | genVarName :: RN HsName
genVarName = do
k <- getRNState
setRNState $ k+1
return $ name $ "harp_rnvar" ++ show k | 124 | genVarName :: RN HsName
genVarName = do
k <- getRNState
setRNState $ k+1
return $ name $ "harp_rnvar" ++ show k | 124 | genVarName = do
k <- getRNState
setRNState $ k+1
return $ name $ "harp_rnvar" ++ show k | 100 | false | true | 0 | 10 | 33 | 56 | 24 | 32 | null | null |
mreid/papersite | src/test/TestSite.hs | mit | tests = [ testGroup "Test Parsed Entry Fields"
[ testID, testFirstPage, testLastPage, testTitle, testNotThere ],
testGroup "Simple Entry Supplementary"
[ testCase "No Supp"
. H.assertEqual "No" Nothing
. maybe Nothing parseSupplementary
. g... | 636 | tests = [ testGroup "Test Parsed Entry Fields"
[ testID, testFirstPage, testLastPage, testTitle, testNotThere ],
testGroup "Simple Entry Supplementary"
[ testCase "No Supp"
. H.assertEqual "No" Nothing
. maybe Nothing parseSupplementary
. g... | 636 | tests = [ testGroup "Test Parsed Entry Fields"
[ testID, testFirstPage, testLastPage, testTitle, testNotThere ],
testGroup "Simple Entry Supplementary"
[ testCase "No Supp"
. H.assertEqual "No" Nothing
. maybe Nothing parseSupplementary
. g... | 636 | false | false | 0 | 17 | 207 | 133 | 66 | 67 | null | null |
damianfral/soundchorden | src/Chord.hs | mit | _add11 = [I, IV , V, IV] | 29 | _add11 = [I, IV , V, IV] | 29 | _add11 = [I, IV , V, IV] | 29 | false | false | 1 | 5 | 11 | 21 | 11 | 10 | null | null |
Melvar/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | getExps (PExp _ _ _ tm : xs) = tm : getExps xs | 46 | getExps (PExp _ _ _ tm : xs) = tm : getExps xs | 46 | getExps (PExp _ _ _ tm : xs) = tm : getExps xs | 46 | false | false | 0 | 7 | 12 | 33 | 15 | 18 | null | null |
neothemachine/monadiccp | src/Control/Monatron/ZipperExamples.hs | bsd-3-clause | eval4 :: Expr3 -> M4 Int
eval4 = fix ( fmask (i `vcomp` o `vcomp` o) evalMem2
<@> fmask o evalVar
<@> evalLit) | 144 | eval4 :: Expr3 -> M4 Int
eval4 = fix ( fmask (i `vcomp` o `vcomp` o) evalMem2
<@> fmask o evalVar
<@> evalLit) | 144 | eval4 = fix ( fmask (i `vcomp` o `vcomp` o) evalMem2
<@> fmask o evalVar
<@> evalLit) | 119 | false | true | 0 | 12 | 56 | 57 | 30 | 27 | null | null |
enolan/pdxfunc-cis194 | test/Main.hs | bsd-3-clause | validateHanoi _ [_] _ = error "validateHanoi called with only one peg" | 70 | validateHanoi _ [_] _ = error "validateHanoi called with only one peg" | 70 | validateHanoi _ [_] _ = error "validateHanoi called with only one peg" | 70 | false | false | 1 | 5 | 11 | 21 | 9 | 12 | null | null |
NightRa/FurnitureAI | src/Model.hs | mit | rotateCounterClockwise :: Furniture -> Furniture
rotateCounterClockwise (Furniture p w h) = Furniture p h (-w) | 110 | rotateCounterClockwise :: Furniture -> Furniture
rotateCounterClockwise (Furniture p w h) = Furniture p h (-w) | 110 | rotateCounterClockwise (Furniture p w h) = Furniture p h (-w) | 61 | false | true | 0 | 7 | 14 | 40 | 20 | 20 | null | null |
hachibu/project-euler | src/ProjectEuler/Problem017.hs | mit | toWords 50 = "fifty" | 20 | toWords 50 = "fifty" | 20 | toWords 50 = "fifty" | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
merijn/GPU-benchmarks | benchmark-analysis/src/Schema/UnknownPredictions.hs | gpl-3.0 | updateModelUnknownTable
:: (MonadLogger m, MonadSql m, MonadThrow m) => Transaction m ()
updateModelUnknownTable = do
Utils.executeSql [i|
ALTER TABLE "ModelUnknown"
RENAME COLUMN "unknownCount" TO "count"
|]
Utils.executeSql [i|
ALTER TABLE "ModelUnknown"
RENAME TO "UnknownPrediction"
|]
Utils.execut... | 406 | updateModelUnknownTable
:: (MonadLogger m, MonadSql m, MonadThrow m) => Transaction m ()
updateModelUnknownTable = do
Utils.executeSql [i|
ALTER TABLE "ModelUnknown"
RENAME COLUMN "unknownCount" TO "count"
|]
Utils.executeSql [i|
ALTER TABLE "ModelUnknown"
RENAME TO "UnknownPrediction"
|]
Utils.execut... | 406 | updateModelUnknownTable = do
Utils.executeSql [i|
ALTER TABLE "ModelUnknown"
RENAME COLUMN "unknownCount" TO "count"
|]
Utils.executeSql [i|
ALTER TABLE "ModelUnknown"
RENAME TO "UnknownPrediction"
|]
Utils.executeSql [i|
ALTER TABLE "UnknownSet"
RENAME COLUMN "modelUnknownId" TO "unknownPredId"
|] | 313 | false | true | 0 | 9 | 63 | 79 | 42 | 37 | null | null |
brendanhay/gogol | gogol-spanner/gen/Network/Google/Spanner/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'TransactionOptions' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'toReadWrite'
--
-- * 'toPartitionedDml'
--
-- * 'toReadOnly'
transactionOptions
:: TransactionOptions
transactionOptions =
TransactionO... | 408 | transactionOptions
:: TransactionOptions
transactionOptions =
TransactionOptions'
{_toReadWrite = Nothing, _toPartitionedDml = Nothing, _toReadOnly = Nothing} | 168 | transactionOptions =
TransactionOptions'
{_toReadWrite = Nothing, _toPartitionedDml = Nothing, _toReadOnly = Nothing} | 123 | true | true | 0 | 7 | 66 | 50 | 30 | 20 | null | null |
ian-ross/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | check True pc = Just pc | 24 | check True pc = Just pc | 24 | check True pc = Just pc | 24 | false | false | 1 | 5 | 6 | 18 | 6 | 12 | null | null |
talanis85/mudblood | src/Mudblood/Screen/Gtk.hs | gpl-3.0 | runScreen ctrls stref (Screen s) = runReaderT s (stref, ctrls) | 62 | runScreen ctrls stref (Screen s) = runReaderT s (stref, ctrls) | 62 | runScreen ctrls stref (Screen s) = runReaderT s (stref, ctrls) | 62 | false | false | 0 | 7 | 9 | 30 | 15 | 15 | null | null |
robrix/surface | src/Text/Pretty.hs | bsd-3-clause | showBracket :: Bool -> ShowS -> ShowS
showBracket b s = if b
then showString "[ " . s . showString " ]"
else s | 146 | showBracket :: Bool -> ShowS -> ShowS
showBracket b s = if b
then showString "[ " . s . showString " ]"
else s | 146 | showBracket b s = if b
then showString "[ " . s . showString " ]"
else s | 108 | false | true | 0 | 8 | 60 | 52 | 24 | 28 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Spec/CoreToLogic.hs | bsd-3-clause | splitArgs e = (f, reverse es)
where
(f, es) = go e
go (C.App (C.Var i) e) | ignoreVar i = go e
go (C.App f (C.Var v)) | isErasable v = go f
go (C.App f e) = (f', e:es) where (f', es) = go f
go f = (f, []) | 245 | splitArgs e = (f, reverse es)
where
(f, es) = go e
go (C.App (C.Var i) e) | ignoreVar i = go e
go (C.App f (C.Var v)) | isErasable v = go f
go (C.App f e) = (f', e:es) where (f', es) = go f
go f = (f, []) | 245 | splitArgs e = (f, reverse es)
where
(f, es) = go e
go (C.App (C.Var i) e) | ignoreVar i = go e
go (C.App f (C.Var v)) | isErasable v = go f
go (C.App f e) = (f', e:es) where (f', es) = go f
go f = (f, []) | 245 | false | false | 2 | 9 | 92 | 182 | 85 | 97 | null | null |
aa755/roshask | src/executable/FieldImports.hs | bsd-3-clause | genImports :: ByteString -> [ByteString] -> [MsgType] -> ByteString
genImports pkgPath pkgMsgs fieldTypes =
B.concat $ concatMap (\i -> ["import ", i, "\n"])
(S.toList (allImports fieldTypes))
where getDeps = typeDependency pkgPath pkgMsgs
allImports = foldl' ((. getDeps) . f... | 340 | genImports :: ByteString -> [ByteString] -> [MsgType] -> ByteString
genImports pkgPath pkgMsgs fieldTypes =
B.concat $ concatMap (\i -> ["import ", i, "\n"])
(S.toList (allImports fieldTypes))
where getDeps = typeDependency pkgPath pkgMsgs
allImports = foldl' ((. getDeps) . f... | 340 | genImports pkgPath pkgMsgs fieldTypes =
B.concat $ concatMap (\i -> ["import ", i, "\n"])
(S.toList (allImports fieldTypes))
where getDeps = typeDependency pkgPath pkgMsgs
allImports = foldl' ((. getDeps) . flip S.union) S.empty | 272 | false | true | 0 | 11 | 84 | 118 | 63 | 55 | null | null |
TomMD/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | lvectDeclName (L _ (HsVectInstIn _))
= panic "HsDecls.lvectDeclName: HsVectInstIn" | 84 | lvectDeclName (L _ (HsVectInstIn _))
= panic "HsDecls.lvectDeclName: HsVectInstIn" | 84 | lvectDeclName (L _ (HsVectInstIn _))
= panic "HsDecls.lvectDeclName: HsVectInstIn" | 84 | false | false | 0 | 8 | 10 | 27 | 12 | 15 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2015-Thinking_Functionally-Richard_Bird/ch_01_06.hs | unlicense | ------------------------------------------------------------------------------
-- E
eE :: [Test]
eE = U.tt "eE"
[ 1 + ( 2 + 3 ) == ( 1 + 2) + 3
, [1] ++ ([2] ++ [3]) == ([1] ++ [2]) ++ [3]
, ((+1) . ((*2) . (+3))) 5 == (((+1) . (*2)) . (+3)) 5
, 1 - ( 2 - 3 ) /=... | 602 | eE :: [Test]
eE = U.tt "eE"
[ 1 + ( 2 + 3 ) == ( 1 + 2) + 3
, [1] ++ ([2] ++ [3]) == ([1] ++ [2]) ++ [3]
, ((+1) . ((*2) . (+3))) 5 == (((+1) . (*2)) . (+3)) 5
, 1 - ( 2 - 3 ) /= ( 1 - 2) - 3
, 1 + 0 == 1 && 0 + 1 == 1
... | 517 | eE = U.tt "eE"
[ 1 + ( 2 + 3 ) == ( 1 + 2) + 3
, [1] ++ ([2] ++ [3]) == ([1] ++ [2]) ++ [3]
, ((+1) . ((*2) . (+3))) 5 == (((+1) . (*2)) . (+3)) 5
, 1 - ( 2 - 3 ) /= ( 1 - 2) - 3
, 1 + 0 == 1 && 0 + 1 == 1
, ... | 504 | true | true | 0 | 13 | 301 | 323 | 184 | 139 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/DataPipelinePipelinePipelineObject.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects.html#cfn-datapipeline-pipeline-pipelineobjects-name
dpppioName :: Lens' DataPipelinePipelinePipelineObject (Val Text)
dpppioName = lens _dataPipelinePipelinePipelineObjectName (\s a -> s { _dataPipeli... | 355 | dpppioName :: Lens' DataPipelinePipelinePipelineObject (Val Text)
dpppioName = lens _dataPipelinePipelinePipelineObjectName (\s a -> s { _dataPipelinePipelinePipelineObjectName = a }) | 183 | dpppioName = lens _dataPipelinePipelinePipelineObjectName (\s a -> s { _dataPipelinePipelinePipelineObjectName = a }) | 117 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
apyrgio/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | osValidateCalls :: FrozenSet String
osValidateCalls = ConstantUtils.mkSet [osValidateParameters] | 96 | osValidateCalls :: FrozenSet String
osValidateCalls = ConstantUtils.mkSet [osValidateParameters] | 96 | osValidateCalls = ConstantUtils.mkSet [osValidateParameters] | 60 | false | true | 0 | 6 | 7 | 22 | 11 | 11 | null | null |
nevrenato/Hets_Fork | DFOL/Comorphism.hs | gpl-2.0 | senTransl sig (Pred t) = makePredication p (map (termTransl sig) as) sig
where (p,as) = termFlatForm t | 127 | senTransl sig (Pred t) = makePredication p (map (termTransl sig) as) sig
where (p,as) = termFlatForm t | 127 | senTransl sig (Pred t) = makePredication p (map (termTransl sig) as) sig
where (p,as) = termFlatForm t | 127 | false | false | 0 | 9 | 41 | 55 | 27 | 28 | null | null |
Hodapp87/ivory | ivory-stdlib/src/Ivory/Stdlib/String.hs | bsd-3-clause | stdlibStringModule :: Module
stdlibStringModule = package "ivory_stdlib_string" $ do
incl memcmp
incl memcpy
incl do_istr_eq
incl string_copy_z | 151 | stdlibStringModule :: Module
stdlibStringModule = package "ivory_stdlib_string" $ do
incl memcmp
incl memcpy
incl do_istr_eq
incl string_copy_z | 151 | stdlibStringModule = package "ivory_stdlib_string" $ do
incl memcmp
incl memcpy
incl do_istr_eq
incl string_copy_z | 122 | false | true | 0 | 8 | 24 | 42 | 17 | 25 | null | null |
taojang/haskell-programming-book-exercise | src/randomstuff/DRegx.hs | bsd-3-clause | alt p1 Nil = p1 | 16 | alt p1 Nil = p1 | 16 | alt p1 Nil = p1 | 16 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2020/M07/D28/Solution.hs | mit | callUndVerify :: FilePath -> String -> IO String
callUndVerify exe arg =
readProcessWithExitCode exe [arg] "" >>= \(code, ans, _) ->
return (let errOut = "Whazzamattahfur you? I can't do no sum o' no " ++ arg
answer = chomp ans
in verify code arg answer) | 288 | callUndVerify :: FilePath -> String -> IO String
callUndVerify exe arg =
readProcessWithExitCode exe [arg] "" >>= \(code, ans, _) ->
return (let errOut = "Whazzamattahfur you? I can't do no sum o' no " ++ arg
answer = chomp ans
in verify code arg answer) | 288 | callUndVerify exe arg =
readProcessWithExitCode exe [arg] "" >>= \(code, ans, _) ->
return (let errOut = "Whazzamattahfur you? I can't do no sum o' no " ++ arg
answer = chomp ans
in verify code arg answer) | 239 | false | true | 0 | 13 | 79 | 91 | 46 | 45 | null | null |
badp/ganeti | src/Ganeti/Kvmd.hs | gpl-2.0 | touchFile :: FilePath -> IO ()
touchFile file = withFile file WriteMode (const . return $ ()) | 93 | touchFile :: FilePath -> IO ()
touchFile file = withFile file WriteMode (const . return $ ()) | 93 | touchFile file = withFile file WriteMode (const . return $ ()) | 62 | false | true | 0 | 8 | 16 | 43 | 21 | 22 | null | null |
tjakway/ghcjvm | compiler/prelude/PrelNames.hs | bsd-3-clause | int64TyConName = tcQual gHC_INT (fsLit "Int64") int64TyConKey | 65 | int64TyConName = tcQual gHC_INT (fsLit "Int64") int64TyConKey | 65 | int64TyConName = tcQual gHC_INT (fsLit "Int64") int64TyConKey | 65 | false | false | 0 | 7 | 10 | 19 | 9 | 10 | null | null |
mariefarrell/Hets | Common/Lib/MapSet.hs | gpl-2.0 | -- | difference function for differenceWith, returns Nothing for empty sets
setDifference :: Ord a => Set.Set a -> Set.Set a -> Maybe (Set.Set a)
setDifference s t = let d = Set.difference s t in
if Set.null d then Nothing else Just d | 238 | setDifference :: Ord a => Set.Set a -> Set.Set a -> Maybe (Set.Set a)
setDifference s t = let d = Set.difference s t in
if Set.null d then Nothing else Just d | 162 | setDifference s t = let d = Set.difference s t in
if Set.null d then Nothing else Just d | 92 | true | true | 0 | 11 | 47 | 87 | 41 | 46 | null | null |
jO-Osko/adventofcode2015 | 2018/haskell/day5.hs | mit | process res x y Empty =
case cond x y of
True -> res
False -> res :|> x :|> y | 99 | process res x y Empty =
case cond x y of
True -> res
False -> res :|> x :|> y | 99 | process res x y Empty =
case cond x y of
True -> res
False -> res :|> x :|> y | 99 | false | false | 1 | 9 | 42 | 51 | 21 | 30 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/ParseUtils.hs | bsd-3-clause | optsField :: String -> CompilerFlavor -> (b -> [(CompilerFlavor,[String])])
-> ([(CompilerFlavor,[String])] -> b -> b) -> FieldDescr b
optsField name flavor get set =
liftField (fromMaybe [] . lookup flavor . get)
(\opts b -> set (reorder (update flavor opts (get b))) b) $
field nam... | 939 | optsField :: String -> CompilerFlavor -> (b -> [(CompilerFlavor,[String])])
-> ([(CompilerFlavor,[String])] -> b -> b) -> FieldDescr b
optsField name flavor get set =
liftField (fromMaybe [] . lookup flavor . get)
(\opts b -> set (reorder (update flavor opts (get b))) b) $
field nam... | 939 | optsField name flavor get set =
liftField (fromMaybe [] . lookup flavor . get)
(\opts b -> set (reorder (update flavor opts (get b))) b) $
field name showF (sepBy parseTokenQ' (munch1 isSpace))
where
update _ opts l | all null opts = l --empty opts as if no opts
update f opts ... | 791 | false | true | 3 | 15 | 269 | 321 | 167 | 154 | null | null |
nikivazou/verified_string_matching | src/AutoProofs/ListMonoidLemmata.hs | bsd-3-clause | {-@ listAssoc :: x:List a -> y:List a -> z:List a
-> {(append x (append y z)) == (append (append x y) z) } @-}
listAssoc :: List a -> List a -> List a -> Proof
listAssoc N _ _ = trivial | 197 | listAssoc :: List a -> List a -> List a -> Proof
listAssoc N _ _ = trivial | 80 | listAssoc N _ _ = trivial | 31 | true | true | 0 | 8 | 54 | 40 | 19 | 21 | null | null |
rvion/stack | src/Stack/Setup.hs | bsd-3-clause | chunksOverTime :: (Monoid a, MonadIO m) => NominalDiffTime -> Conduit a m a
chunksOverTime diff = do
currentTime <- liftIO getCurrentTime
evalStateC (currentTime, mempty) go
where
-- State is a tuple of:
-- * the last time a yield happened (or the beginning of the sink)
-- * the accumulated awaits... | 750 | chunksOverTime :: (Monoid a, MonadIO m) => NominalDiffTime -> Conduit a m a
chunksOverTime diff = do
currentTime <- liftIO getCurrentTime
evalStateC (currentTime, mempty) go
where
-- State is a tuple of:
-- * the last time a yield happened (or the beginning of the sink)
-- * the accumulated awaits... | 750 | chunksOverTime diff = do
currentTime <- liftIO getCurrentTime
evalStateC (currentTime, mempty) go
where
-- State is a tuple of:
-- * the last time a yield happened (or the beginning of the sink)
-- * the accumulated awaits since the last yield
go = await >>= \case
Nothing -> do
(... | 674 | false | true | 3 | 13 | 232 | 210 | 101 | 109 | null | null |
lukemaurer/sequent-core | src/Language/SequentCore/FloatOut/Summary.hs | bsd-3-clause | delBinderSumm :: Var -> Summary -> Summary
delBinderSumm var summ = summ { sm_varsUsed = var `delBinderVU` sm_varsUsed summ } | 125 | delBinderSumm :: Var -> Summary -> Summary
delBinderSumm var summ = summ { sm_varsUsed = var `delBinderVU` sm_varsUsed summ } | 125 | delBinderSumm var summ = summ { sm_varsUsed = var `delBinderVU` sm_varsUsed summ } | 82 | false | true | 0 | 8 | 19 | 41 | 22 | 19 | null | null |
josefs/autosar | oldARSim/examples/Stateful.hs | bsd-3-clause | end :: Prop a b
end _ [] = True | 32 | end :: Prop a b
end _ [] = True | 31 | end _ [] = True | 15 | false | true | 1 | 6 | 10 | 26 | 11 | 15 | null | null |
christiaanb/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | ah_RDR = mkVarUnqual (fsLit "a#") | 42 | ah_RDR = mkVarUnqual (fsLit "a#") | 42 | ah_RDR = mkVarUnqual (fsLit "a#") | 42 | false | false | 0 | 7 | 13 | 15 | 7 | 8 | null | null |
kathawala/symdiff | cublas/Foreign/CUDA/Cublas/TH.hs | gpl-3.0 | typeDat (ComplexC t) = prim
[t| Complex $(ctype) |]
[t| Complex $(hstype) |]
[| bothc $(fromC) |]
[| bothc $(toC) |]
where
TD ctype hstype (fromC, Pure) (toC, Pure) = typeDat t | 188 | typeDat (ComplexC t) = prim
[t| Complex $(ctype) |]
[t| Complex $(hstype) |]
[| bothc $(fromC) |]
[| bothc $(toC) |]
where
TD ctype hstype (fromC, Pure) (toC, Pure) = typeDat t | 188 | typeDat (ComplexC t) = prim
[t| Complex $(ctype) |]
[t| Complex $(hstype) |]
[| bothc $(fromC) |]
[| bothc $(toC) |]
where
TD ctype hstype (fromC, Pure) (toC, Pure) = typeDat t | 188 | false | false | 0 | 7 | 43 | 74 | 42 | 32 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/DLP/Types/Product.hs | mpl-2.0 | -- | The Google Cloud Platform project ID of the project containing the
-- table. If omitted, project ID is inferred from the API call.
gpdvbqtProjectId :: Lens' GooglePrivacyDlpV2BigQueryTable (Maybe Text)
gpdvbqtProjectId
= lens _gpdvbqtProjectId
(\ s a -> s{_gpdvbqtProjectId = a}) | 292 | gpdvbqtProjectId :: Lens' GooglePrivacyDlpV2BigQueryTable (Maybe Text)
gpdvbqtProjectId
= lens _gpdvbqtProjectId
(\ s a -> s{_gpdvbqtProjectId = a}) | 156 | gpdvbqtProjectId
= lens _gpdvbqtProjectId
(\ s a -> s{_gpdvbqtProjectId = a}) | 85 | true | true | 0 | 9 | 49 | 49 | 26 | 23 | null | null |
locaweb/leela | src/warpdrive/src/Leela/Storage/Backend/ZMQ/Protocol.hs | apache-2.0 | encodeLazy :: Query -> [L.ByteString]
encodeLazy = (msgPackMagicL :) . (: []) . E.encodeLazy . encode | 101 | encodeLazy :: Query -> [L.ByteString]
encodeLazy = (msgPackMagicL :) . (: []) . E.encodeLazy . encode | 101 | encodeLazy = (msgPackMagicL :) . (: []) . E.encodeLazy . encode | 63 | false | true | 1 | 9 | 15 | 52 | 26 | 26 | null | null |
jsavatgy/hatupist | hatupist-104.hs | gpl-2.0 | amountOfIntervals = rDuration `div` iDuration | 45 | amountOfIntervals = rDuration `div` iDuration | 45 | amountOfIntervals = rDuration `div` iDuration | 45 | false | false | 0 | 5 | 4 | 12 | 7 | 5 | null | null |
d-rive/rivers | Data/Rivers/Pointed.hs | bsd-3-clause | (\/) _ g (Con x) = g x | 34 | (\/) _ g (Con x) = g x | 34 | (\/) _ g (Con x) = g x | 34 | false | false | 1 | 6 | 19 | 27 | 12 | 15 | null | null |
tolysz/dsp | DSP/Filter/FIR/PolyInterp.hs | gpl-2.0 | optimal_2p3o32x :: (Ord a, Fractional a) => a -> a
optimal_2p3o32x x | 0 <= x && x < 1 = polyeval [ 0.98472017575676363, -0.87053863725307623,
-0.29667081825572522, 0.19775766248673177 ] x
| 1 <= x = 0
| otherwise = opti... | 336 | optimal_2p3o32x :: (Ord a, Fractional a) => a -> a
optimal_2p3o32x x | 0 <= x && x < 1 = polyeval [ 0.98472017575676363, -0.87053863725307623,
-0.29667081825572522, 0.19775766248673177 ] x
| 1 <= x = 0
| otherwise = opti... | 336 | optimal_2p3o32x x | 0 <= x && x < 1 = polyeval [ 0.98472017575676363, -0.87053863725307623,
-0.29667081825572522, 0.19775766248673177 ] x
| 1 <= x = 0
| otherwise = optimal_2p3o32x (-x) | 285 | false | true | 0 | 10 | 139 | 102 | 51 | 51 | null | null |
hguenther/nbis | MemoryModel/Snow/Object.hs | agpl-3.0 | validPointers AnyPointer = [] | 29 | validPointers AnyPointer = [] | 29 | validPointers AnyPointer = [] | 29 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
brendanhay/gogol | gogol-debugger/gen/Network/Google/Resource/CloudDebugger/Debugger/Debuggees/Breakpoints/Get.hs | mpl-2.0 | -- | Required. The client version making the call. Schema:
-- \`domain\/type\/version\` (e.g., \`google.com\/intellij\/v1\`).
ddbgClientVersion :: Lens' DebuggerDebuggeesBreakpointsGet (Maybe Text)
ddbgClientVersion
= lens _ddbgClientVersion
(\ s a -> s{_ddbgClientVersion = a}) | 286 | ddbgClientVersion :: Lens' DebuggerDebuggeesBreakpointsGet (Maybe Text)
ddbgClientVersion
= lens _ddbgClientVersion
(\ s a -> s{_ddbgClientVersion = a}) | 160 | ddbgClientVersion
= lens _ddbgClientVersion
(\ s a -> s{_ddbgClientVersion = a}) | 88 | true | true | 0 | 9 | 38 | 49 | 26 | 23 | null | null |
rsasse/tamarin-prover | src/Web/Theory.hs | gpl-3.0 | isInterestingDiffMethod DiffAttack = True | 44 | isInterestingDiffMethod DiffAttack = True | 44 | isInterestingDiffMethod DiffAttack = True | 44 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
msakai/folkung | Haskell/Paradox/AnalysisTypes.hs | mit | getVars :: T s (STRef s (Map Symbol (TypeId s)))
getVars = MkT (\idfs preds funs vars fail ok -> ok vars) | 105 | getVars :: T s (STRef s (Map Symbol (TypeId s)))
getVars = MkT (\idfs preds funs vars fail ok -> ok vars) | 105 | getVars = MkT (\idfs preds funs vars fail ok -> ok vars) | 56 | false | true | 0 | 11 | 21 | 62 | 31 | 31 | null | null |
HackerFoo/peg | Peg/Constraints.hs | gpl-3.0 | float_int :: (Double -> Integer) -> Double -> Integer
float_int = id | 68 | float_int :: (Double -> Integer) -> Double -> Integer
float_int = id | 68 | float_int = id | 14 | false | true | 0 | 8 | 11 | 33 | 15 | 18 | null | null |
BarrelfishOS/barrelfish | tools/skate/SkateParser.hs | mit | fieldTypeFlagsRef p = do {
reserved "flag";
n <- qualifiedIdentiferLiteral p;
return (TFlags n p);
} | 112 | fieldTypeFlagsRef p = do {
reserved "flag";
n <- qualifiedIdentiferLiteral p;
return (TFlags n p);
} | 112 | fieldTypeFlagsRef p = do {
reserved "flag";
n <- qualifiedIdentiferLiteral p;
return (TFlags n p);
} | 112 | false | false | 0 | 9 | 27 | 44 | 21 | 23 | null | null |
binarin/learnopengl | src/LightingReflex.hs | bsd-3-clause | renderer :: Renderer RenderState GameState
renderer = Renderer initR renderR cleanupR | 85 | renderer :: Renderer RenderState GameState
renderer = Renderer initR renderR cleanupR | 85 | renderer = Renderer initR renderR cleanupR | 42 | false | true | 1 | 5 | 10 | 26 | 11 | 15 | null | null |
enolan/Idris-dev | src/Idris/ASTUtils.hs | bsd-3-clause | cg_usedpos :: Field CGInfo [(Int, [UsageReason])]
cg_usedpos = Field usedpos (\v cg -> cg{ usedpos = v }) | 105 | cg_usedpos :: Field CGInfo [(Int, [UsageReason])]
cg_usedpos = Field usedpos (\v cg -> cg{ usedpos = v }) | 105 | cg_usedpos = Field usedpos (\v cg -> cg{ usedpos = v }) | 55 | false | true | 0 | 9 | 17 | 51 | 29 | 22 | null | null |
facebookincubator/duckling | Duckling/Time/FR/Corpus.hs | bsd-3-clause | allExamples :: [Example]
allExamples = concat
[ examples (datetime (2013, 2, 12, 4, 30, 0) Second)
[ "maintenant"
, "tout de suite"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "aujourd'hui"
, "ce jour"
, "dans la journée"
... | 31,882 | allExamples :: [Example]
allExamples = concat
[ examples (datetime (2013, 2, 12, 4, 30, 0) Second)
[ "maintenant"
, "tout de suite"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "aujourd'hui"
, "ce jour"
, "dans la journée"
... | 31,882 | allExamples = concat
[ examples (datetime (2013, 2, 12, 4, 30, 0) Second)
[ "maintenant"
, "tout de suite"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "aujourd'hui"
, "ce jour"
, "dans la journée"
, "en ce moment"
... | 31,857 | false | true | 0 | 10 | 13,530 | 9,602 | 5,895 | 3,707 | null | null |
marcelosousa/poet | src/Util/Generic.hs | gpl-2.0 | fromBool :: Bool -> Int
fromBool False = 0 | 42 | fromBool :: Bool -> Int
fromBool False = 0 | 42 | fromBool False = 0 | 18 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
Erdwolf/autotool-bonn | src/Syntax/Transformer.hs | gpl-2.0 | removeLoops lang =
fst $ flip runState fresh $ do
(xs,ys) <- runWriterT (everywhereM (mkM removeLoop) lang)
return (xs++ys)
where
fresh = [ "Loop_" ++ show i | i <- [1..] ] -- Assuming no existing non-terminal contains digits.
removeLoop (Loop g) = do
x <- pop
tell [ (x, g... | 429 | removeLoops lang =
fst $ flip runState fresh $ do
(xs,ys) <- runWriterT (everywhereM (mkM removeLoop) lang)
return (xs++ys)
where
fresh = [ "Loop_" ++ show i | i <- [1..] ] -- Assuming no existing non-terminal contains digits.
removeLoop (Loop g) = do
x <- pop
tell [ (x, g... | 429 | removeLoops lang =
fst $ flip runState fresh $ do
(xs,ys) <- runWriterT (everywhereM (mkM removeLoop) lang)
return (xs++ys)
where
fresh = [ "Loop_" ++ show i | i <- [1..] ] -- Assuming no existing non-terminal contains digits.
removeLoop (Loop g) = do
x <- pop
tell [ (x, g... | 429 | false | false | 5 | 13 | 150 | 185 | 86 | 99 | null | null |
DigitalBrains1/clash-lt24 | UnitTest/LT24/Framebuffer/BouncyCommon.hs | bsd-2-clause | -- Radius of red center of the ball
innerRBall = 5 | 50 | innerRBall = 5 | 14 | innerRBall = 5 | 14 | true | false | 0 | 4 | 10 | 7 | 4 | 3 | null | null |
rvion/lamdu | Lamdu/GUI/ExpressionEdit/NomEdit.hs | gpl-3.0 | makeFromNom ::
MonadA m =>
Sugar.Nominal (Name m) m (ExprGuiT.SugarExpr m) ->
Sugar.Payload m ExprGuiT.Payload ->
ExprGuiM m (ExpressionGui m)
makeFromNom nom@(Sugar.Nominal _ val _) pl =
ExpressionGui.stdWrapParentExpr pl $ \myId ->
do
nameEdit <- nameGui "Unwrapper" nom nameId
... | 641 | makeFromNom ::
MonadA m =>
Sugar.Nominal (Name m) m (ExprGuiT.SugarExpr m) ->
Sugar.Payload m ExprGuiT.Payload ->
ExprGuiM m (ExpressionGui m)
makeFromNom nom@(Sugar.Nominal _ val _) pl =
ExpressionGui.stdWrapParentExpr pl $ \myId ->
do
nameEdit <- nameGui "Unwrapper" nom nameId
... | 641 | makeFromNom nom@(Sugar.Nominal _ val _) pl =
ExpressionGui.stdWrapParentExpr pl $ \myId ->
do
nameEdit <- nameGui "Unwrapper" nom nameId
valEdit <- ExprGuiM.makeSubexpression 11 val
symLabel <- ExpressionGui.grammarLabel "⇈" (Widget.toAnimId myId)
ExpressionGui.hboxSpaced [nameEd... | 482 | false | true | 2 | 13 | 138 | 217 | 104 | 113 | null | null |
np/ling | Ling/Norm.hs | bsd-3-clause | mkCaseViewBy :: Rel a -> MkCase a (CaseView a)
mkCaseViewBy rel t brs
| Con con <- t, Just rhs <- lookup con brs = NoCase rhs
| Just (_, s) <- theUniqBy (rel `on` snd) brs = NoCase s
| otherwise = SoCase t brs | 252 | mkCaseViewBy :: Rel a -> MkCase a (CaseView a)
mkCaseViewBy rel t brs
| Con con <- t, Just rhs <- lookup con brs = NoCase rhs
| Just (_, s) <- theUniqBy (rel `on` snd) brs = NoCase s
| otherwise = SoCase t brs | 252 | mkCaseViewBy rel t brs
| Con con <- t, Just rhs <- lookup con brs = NoCase rhs
| Just (_, s) <- theUniqBy (rel `on` snd) brs = NoCase s
| otherwise = SoCase t brs | 205 | false | true | 1 | 11 | 88 | 121 | 57 | 64 | null | null |
ecaustin/haskhol-core | src/HaskHOL/Core/Kernel/Terms.hs | bsd-2-clause | {-
HOL2P Term Primitives
-}
-- | Predicate for type abstraction terms.
isTyAbs :: HOLTerm -> Bool
isTyAbs TyAbsIn{} = True | 126 | isTyAbs :: HOLTerm -> Bool
isTyAbs TyAbsIn{} = True | 51 | isTyAbs TyAbsIn{} = True | 24 | true | true | 0 | 5 | 24 | 29 | 14 | 15 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | nvDrbdversion :: String
nvDrbdversion = "drbd-version" | 54 | nvDrbdversion :: String
nvDrbdversion = "drbd-version" | 54 | nvDrbdversion = "drbd-version" | 30 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
girving/duck | duck/Util.hs | bsd-3-clause | exit i = exitWith (ExitFailure i) | 33 | exit i = exitWith (ExitFailure i) | 33 | exit i = exitWith (ExitFailure i) | 33 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
wavewave/hoodle-core | src/Hoodle/GUI/Menu.hs | gpl-3.0 | color2Int ColorMagenta = 7 | 29 | color2Int ColorMagenta = 7 | 29 | color2Int ColorMagenta = 7 | 29 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
ekmett/concurrent | src/Concurrent/Capability/LocalArray.hs | bsd-2-clause | -- | Calling 'Control.Concurrent.setNumCapabilities' after this is built can cause you to crash when accessing it
-- and break invariants.
newLocalArray :: MonadPrimIO m => Int -> a -> m (LocalArray a)
newLocalArray n a = primIO $ do
cs <- getNumCapabilities
r <- newSmallArrayArray cs
forN_ 0 cs $ \i -> do
m ... | 508 | newLocalArray :: MonadPrimIO m => Int -> a -> m (LocalArray a)
newLocalArray n a = primIO $ do
cs <- getNumCapabilities
r <- newSmallArrayArray cs
forN_ 0 cs $ \i -> do
m <- newArray n a
writeMutableArraySmallArray r i m
LocalArray <$> unsafeFreezeSmallArrayArray r
-- | We could upgrade this to expand ... | 369 | newLocalArray n a = primIO $ do
cs <- getNumCapabilities
r <- newSmallArrayArray cs
forN_ 0 cs $ \i -> do
m <- newArray n a
writeMutableArraySmallArray r i m
LocalArray <$> unsafeFreezeSmallArrayArray r
-- | We could upgrade this to expand gracefully if we see an out of bounds capability. | 306 | true | true | 0 | 13 | 99 | 113 | 52 | 61 | null | null |
anton-dessiatov/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | insert :: Var -> DFFV ()
insert v = DFFV $ \ env (set, ids) ->
let keep_me = isLocalId v &&
not (v `elemVarSet` env) &&
not (v `elemVarSet` set)
in if keep_me
then ((extendVarSet set v, v:ids), ())
else ((set, ... | 338 | insert :: Var -> DFFV ()
insert v = DFFV $ \ env (set, ids) ->
let keep_me = isLocalId v &&
not (v `elemVarSet` env) &&
not (v `elemVarSet` set)
in if keep_me
then ((extendVarSet set v, v:ids), ())
else ((set, ... | 338 | insert v = DFFV $ \ env (set, ids) ->
let keep_me = isLocalId v &&
not (v `elemVarSet` env) &&
not (v `elemVarSet` set)
in if keep_me
then ((extendVarSet set v, v:ids), ())
else ((set, ids), ()) | 313 | false | true | 2 | 14 | 162 | 137 | 73 | 64 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.