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
inirudebwoy/bumper
src/Bumper.hs
gpl-2.0
bumper :: Bumper bumper = Bumper {current_version = def &= help "The current version of the software package before bumping." &= typ "VERSION", suffix = def &= help "Suffix to be added, e.g., alpha, rc-2" &= typ "SUFFIX", build = def &= help "Build number to be added, e.g., b42, f7a8051" &=...
442
bumper :: Bumper bumper = Bumper {current_version = def &= help "The current version of the software package before bumping." &= typ "VERSION", suffix = def &= help "Suffix to be added, e.g., alpha, rc-2" &= typ "SUFFIX", build = def &= help "Build number to be added, e.g., b42, f7a8051" &=...
442
bumper = Bumper {current_version = def &= help "The current version of the software package before bumping." &= typ "VERSION", suffix = def &= help "Suffix to be added, e.g., alpha, rc-2" &= typ "SUFFIX", build = def &= help "Build number to be added, e.g., b42, f7a8051" &= typ "BUILD", ...
425
false
true
0
9
129
110
56
54
null
null
themoritz/cabal
Cabal/Distribution/Simple/Compiler.hs
bsd-3-clause
-- | Does this compiler support Haskell program coverage? coverageSupported :: Compiler -> Bool coverageSupported comp = case compilerFlavor comp of GHC -> True GHCJS -> True _ -> False -- | Does this compiler support profiling?
249
coverageSupported :: Compiler -> Bool coverageSupported comp = case compilerFlavor comp of GHC -> True GHCJS -> True _ -> False -- | Does this compiler support profiling?
191
coverageSupported comp = case compilerFlavor comp of GHC -> True GHCJS -> True _ -> False -- | Does this compiler support profiling?
153
true
true
4
6
57
48
23
25
null
null
k-bx/type-level-sets
TySet.hs
bsd-2-clause
plugin :: Plugin plugin = defaultPlugin { tcPlugin = Just . thePlugin }
71
plugin :: Plugin plugin = defaultPlugin { tcPlugin = Just . thePlugin }
71
plugin = defaultPlugin { tcPlugin = Just . thePlugin }
54
false
true
0
8
12
30
14
16
null
null
f-me/snap-core
test/suite/Snap/Util/FileServe/Tests.hs
bsd-3-clause
expect302 :: ByteString -> IO Response -> IO () expect302 p m = do r <- m assertBool "expected 302" (rspStatus r == 302) assertEqual "redir location" (Just p) (getHeader "location" r) ------------------------------------------------------------------------------
308
expect302 :: ByteString -> IO Response -> IO () expect302 p m = do r <- m assertBool "expected 302" (rspStatus r == 302) assertEqual "redir location" (Just p) (getHeader "location" r) ------------------------------------------------------------------------------
308
expect302 p m = do r <- m assertBool "expected 302" (rspStatus r == 302) assertEqual "redir location" (Just p) (getHeader "location" r) ------------------------------------------------------------------------------
260
false
true
0
10
78
82
38
44
null
null
AndreasPK/stack
src/Stack/Solver.hs
bsd-3-clause
checkResolverSpec :: (StackM env m, HasConfig env, HasGHCVariant env) => [C.GenericPackageDescription] -> Maybe (Map PackageName (Map FlagName Bool)) -> Resolver -> m BuildPlanCheck checkResolverSpec gpds flags resolver = do case resolver of ResolverSnapshot name -> checkSnapBuildPlan gpds...
776
checkResolverSpec :: (StackM env m, HasConfig env, HasGHCVariant env) => [C.GenericPackageDescription] -> Maybe (Map PackageName (Map FlagName Bool)) -> Resolver -> m BuildPlanCheck checkResolverSpec gpds flags resolver = do case resolver of ResolverSnapshot name -> checkSnapBuildPlan gpds...
776
checkResolverSpec gpds flags resolver = do case resolver of ResolverSnapshot name -> checkSnapBuildPlan gpds flags name ResolverCompiler {} -> return $ BuildPlanCheckPartial Map.empty Map.empty -- TODO support custom resolver for stack init ResolverCustom {} -> return $ BuildPlanCheckPartial...
574
false
true
0
13
151
159
78
81
null
null
jameysharp/lotos
LOTOS/Trace.hs
gpl-2.0
traceBehavior (Interleaving b1 b2) = (synchronizeTrace (const False) `on` traceBehavior) b1 b2
94
traceBehavior (Interleaving b1 b2) = (synchronizeTrace (const False) `on` traceBehavior) b1 b2
94
traceBehavior (Interleaving b1 b2) = (synchronizeTrace (const False) `on` traceBehavior) b1 b2
94
false
false
0
10
11
40
20
20
null
null
nfjinjing/bamboo-plugin-photo
src/Bamboo/Plugin/Photo/View.hs
bsd-3-clause
id :: String -> HtmlAttr id = identifier
40
id :: String -> HtmlAttr id = identifier
40
id = identifier
15
false
true
0
7
7
22
9
13
null
null
na4zagin3/uhim-dict
src/Language/UHIM/Japanese/Verb.hs
gpl-3.0
stemRepresentive StemW = "ワ"
28
stemRepresentive StemW = "ワ"
28
stemRepresentive StemW = "ワ"
28
false
false
0
5
3
9
4
5
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QKeySequence.hs
bsd-2-clause
eMoveToNextChar :: StandardKey eMoveToNextChar = ieStandardKey $ 30
69
eMoveToNextChar :: StandardKey eMoveToNextChar = ieStandardKey $ 30
69
eMoveToNextChar = ieStandardKey $ 30
38
false
true
0
6
9
18
8
10
null
null
seckcoder/vector
Data/Vector/Storable/Mutable.hs
bsd-3-clause
unsafeSwap = G.unsafeSwap
25
unsafeSwap = G.unsafeSwap
25
unsafeSwap = G.unsafeSwap
25
false
false
1
6
2
12
4
8
null
null
spechub/Hets
Propositional/AS_BASIC_Propositional.der.hs
gpl-2.0
printBasicItems :: BASIC_ITEMS -> Doc printBasicItems (Axiom_items xs) = vcat $ map (addBullet . pretty) xs
107
printBasicItems :: BASIC_ITEMS -> Doc printBasicItems (Axiom_items xs) = vcat $ map (addBullet . pretty) xs
107
printBasicItems (Axiom_items xs) = vcat $ map (addBullet . pretty) xs
69
false
true
0
8
15
44
21
23
null
null
luigy/stack
src/test/Network/HTTP/Download/VerifiedSpec.hs
bsd-3-clause
isWrongContentLength _ = False
30
isWrongContentLength _ = False
30
isWrongContentLength _ = False
30
false
false
0
4
3
10
4
6
null
null
caryoscelus/folivora-ge
demos/snake/World.hs
gpl-3.0
removeTail :: Int -> SnakeTable -> SnakeTable removeTail m = fmap (remC m) where remC :: Int -> SnakeTile -> SnakeTile remC m (TileSnake n) | n >= m = TileEmpty remC _ x = x
201
removeTail :: Int -> SnakeTable -> SnakeTable removeTail m = fmap (remC m) where remC :: Int -> SnakeTile -> SnakeTile remC m (TileSnake n) | n >= m = TileEmpty remC _ x = x
201
removeTail m = fmap (remC m) where remC :: Int -> SnakeTile -> SnakeTile remC m (TileSnake n) | n >= m = TileEmpty remC _ x = x
155
false
true
0
10
63
82
40
42
null
null
spacekitteh/smcghc
compiler/main/DynFlags.hs
bsd-3-clause
tablesNextToCode :: DynFlags -> Bool tablesNextToCode dflags = mkTablesNextToCode (platformUnregisterised (targetPlatform dflags))
134
tablesNextToCode :: DynFlags -> Bool tablesNextToCode dflags = mkTablesNextToCode (platformUnregisterised (targetPlatform dflags))
134
tablesNextToCode dflags = mkTablesNextToCode (platformUnregisterised (targetPlatform dflags))
97
false
true
0
9
15
38
17
21
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/UI/Sprite.hs
mit
spriteGetRotation :: (Parent Sprite a, Pointer p a, MonadIO m) => p -- ^ Pointer to Sprite or child -> m Float spriteGetRotation p = liftIO $ do let ptr = parentPointer p realToFrac <$> [C.exp| float { $(Sprite* ptr)->GetRotation() } |] -- | Return texture.
266
spriteGetRotation :: (Parent Sprite a, Pointer p a, MonadIO m) => p -- ^ Pointer to Sprite or child -> m Float spriteGetRotation p = liftIO $ do let ptr = parentPointer p realToFrac <$> [C.exp| float { $(Sprite* ptr)->GetRotation() } |] -- | Return texture.
266
spriteGetRotation p = liftIO $ do let ptr = parentPointer p realToFrac <$> [C.exp| float { $(Sprite* ptr)->GetRotation() } |] -- | Return texture.
151
false
true
0
11
54
78
40
38
null
null
phischu/fragnix
tests/packages/scotty/Data.Aeson.TH.hs
bsd-3-clause
-- | Like uncurryType, except on a kind level. uncurryKind :: Kind -> NonEmpty Kind uncurryKind = snd . uncurryTy
113
uncurryKind :: Kind -> NonEmpty Kind uncurryKind = snd . uncurryTy
66
uncurryKind = snd . uncurryTy
29
true
true
0
7
19
29
13
16
null
null
ezyang/ghc
compiler/cmm/PprC.hs
bsd-3-clause
pprExpr1 e@(CmmReg _reg) = pprExpr e
37
pprExpr1 e@(CmmReg _reg) = pprExpr e
37
pprExpr1 e@(CmmReg _reg) = pprExpr e
37
false
false
0
8
6
21
10
11
null
null
sfultong/stand-in-language
src/SIL.hs
apache-2.0
ite :: IExpr -> IExpr -> IExpr -> IExpr ite i t e = setenv (pair (gate i) (pair e t))
85
ite :: IExpr -> IExpr -> IExpr -> IExpr ite i t e = setenv (pair (gate i) (pair e t))
85
ite i t e = setenv (pair (gate i) (pair e t))
45
false
true
0
9
20
55
27
28
null
null
miguel-negrao/iCalendar
Text/ICalendar/Printer.hs
bsd-3-clause
printVJournal :: VJournal -> ContentPrinter () printVJournal VJournal {..} = do line "BEGIN:VJOURNAL" printProperty vjDTStamp printProperty vjUID printProperty vjClass printProperty vjCreated printProperty vjDescription printProperty vjDTStart printProperty vjLastMod printProperty vj...
788
printVJournal :: VJournal -> ContentPrinter () printVJournal VJournal {..} = do line "BEGIN:VJOURNAL" printProperty vjDTStamp printProperty vjUID printProperty vjClass printProperty vjCreated printProperty vjDescription printProperty vjDTStart printProperty vjLastMod printProperty vj...
788
printVJournal VJournal {..} = do line "BEGIN:VJOURNAL" printProperty vjDTStamp printProperty vjUID printProperty vjClass printProperty vjCreated printProperty vjDescription printProperty vjDTStart printProperty vjLastMod printProperty vjOrganizer printProperty vjSeq printProp...
741
false
true
0
7
166
185
66
119
null
null
mrkkrp/playing-with-servant
src/Authentication.hs
bsd-3-clause
-- | The context that will be made available to request handlers. We supply -- the "cookie-auth"-tagged request handler defined above, so that the -- 'HasServer' instance of 'AuthProtect' can extract the handler and run it -- on the request. genAuthServerContext :: Context (AuthHandler Request Account ': '[]) genAuthS...
362
genAuthServerContext :: Context (AuthHandler Request Account ': '[]) genAuthServerContext = authHandler :. EmptyContext
119
genAuthServerContext = authHandler :. EmptyContext
50
true
true
0
9
53
40
22
18
null
null
joshcough/L5-Haskell
src/L/L3/Linearize.hs
mit
compileD (VD v) dest = return $ [dest <~ compileVRHS v]
71
compileD (VD v) dest = return $ [dest <~ compileVRHS v]
71
compileD (VD v) dest = return $ [dest <~ compileVRHS v]
71
false
false
1
9
26
35
15
20
null
null
glguy/ssh-hans
src/Network/SSH/LoadKeys.hs
bsd-3-clause
showRsaKeyPair :: ServerCredential -> Maybe String showRsaKeyPair cred | "ssh-rsa" <- nameOf cred , (pub', priv') <- namedThing cred , SshPubRsa e n <- pub' , PrivateRsa priv <- priv' = Just $ show ("ssh-rsa" :: String, e, n, priv) | otherwise = Nothing
275
showRsaKeyPair :: ServerCredential -> Maybe String showRsaKeyPair cred | "ssh-rsa" <- nameOf cred , (pub', priv') <- namedThing cred , SshPubRsa e n <- pub' , PrivateRsa priv <- priv' = Just $ show ("ssh-rsa" :: String, e, n, priv) | otherwise = Nothing
275
showRsaKeyPair cred | "ssh-rsa" <- nameOf cred , (pub', priv') <- namedThing cred , SshPubRsa e n <- pub' , PrivateRsa priv <- priv' = Just $ show ("ssh-rsa" :: String, e, n, priv) | otherwise = Nothing
224
false
true
2
9
65
113
53
60
null
null
Thell/pandoc
src/Text/Pandoc/Writers/LaTeX.hs
gpl-2.0
inlineToLaTeX (RawInline f str) | f == Format "latex" || f == Format "tex" = return $ text str | otherwise = return empty
159
inlineToLaTeX (RawInline f str) | f == Format "latex" || f == Format "tex" = return $ text str | otherwise = return empty
159
inlineToLaTeX (RawInline f str) | f == Format "latex" || f == Format "tex" = return $ text str | otherwise = return empty
159
false
false
1
11
61
58
26
32
null
null
kawu/dawg-ord
src/Data/DAWG/Gen/HashMap.hs
bsd-2-clause
-- | Lookup element in the map. lookup :: Hash a => a -> HashMap a b -> Maybe b lookup x (HashMap _ m) = I.lookup (hash x) m >>= find x
135
lookup :: Hash a => a -> HashMap a b -> Maybe b lookup x (HashMap _ m) = I.lookup (hash x) m >>= find x
103
lookup x (HashMap _ m) = I.lookup (hash x) m >>= find x
55
true
true
0
11
32
73
33
40
null
null
antarestrader/sapphire
Boot/ParseArgs.hs
gpl-3.0
runFiles (file : files) = do load file runFiles files
57
runFiles (file : files) = do load file runFiles files
57
runFiles (file : files) = do load file runFiles files
57
false
false
0
7
13
29
12
17
null
null
ribag/ganeti-experiments
src/Ganeti/DataCollectors/InstStatus.hs
gpl-2.0
-- | Try to get the reason trail for an instance. In case it is not possible, -- log the failure and return an empty list instead. getReasonTrail :: String -> IO ReasonTrail getReasonTrail instanceName = do fileName <- getInstReasonFilename instanceName content <- try $ readFile fileName case content of Left ...
785
getReasonTrail :: String -> IO ReasonTrail getReasonTrail instanceName = do fileName <- getInstReasonFilename instanceName content <- try $ readFile fileName case content of Left e -> do logWarning $ "Unable to open the reason trail for instance " ++ instanceName ++ " expected at " ++ fi...
654
getReasonTrail instanceName = do fileName <- getInstReasonFilename instanceName content <- try $ readFile fileName case content of Left e -> do logWarning $ "Unable to open the reason trail for instance " ++ instanceName ++ " expected at " ++ fileName ++ ": " ++ show (e :: IOException) ...
611
true
true
0
17
212
170
78
92
null
null
anchor/ceilometer-common
tests/SampleData.hs
bsd-3-clause
flavorSP0 = siphashID flavorID0
33
flavorSP0 = siphashID flavorID0
33
flavorSP0 = siphashID flavorID0
33
false
false
1
5
5
13
4
9
null
null
FranklinChen/hugs98-plus-Sep2006
packages/base/Data/ByteString/Lazy/Char8.hs
bsd-3-clause
-- | /O(n)/ map Char functions, provided with the index at each position mapIndexed :: (Int -> Char -> Char) -> ByteString -> ByteString mapIndexed f = L.mapIndexed (\i w -> c2w (f i (w2c w)))
192
mapIndexed :: (Int -> Char -> Char) -> ByteString -> ByteString mapIndexed f = L.mapIndexed (\i w -> c2w (f i (w2c w)))
119
mapIndexed f = L.mapIndexed (\i w -> c2w (f i (w2c w)))
55
true
true
0
12
35
66
34
32
null
null
karamellpelle/grid
source/Game/Helpers.hs
gpl-3.0
fileRunWorldEmpty :: MEnv' FilePath fileRunWorldEmpty = io $ fileDynamicData "players/empty/Run/world"
107
fileRunWorldEmpty :: MEnv' FilePath fileRunWorldEmpty = io $ fileDynamicData "players/empty/Run/world"
107
fileRunWorldEmpty = io $ fileDynamicData "players/empty/Run/world"
71
false
true
0
6
14
21
10
11
null
null
BartMassey/genuine-sieve
PQ.hs
mit
insert :: Word64 -> [Word64] -> M.Map Word64 [[Word64]] -> M.Map Word64 [[Word64]] insert k x q = case M.lookup k q of Nothing -> M.insert k [x] q Just xs -> M.insert k (x : xs) q
209
insert :: Word64 -> [Word64] -> M.Map Word64 [[Word64]] -> M.Map Word64 [[Word64]] insert k x q = case M.lookup k q of Nothing -> M.insert k [x] q Just xs -> M.insert k (x : xs) q
209
insert k x q = case M.lookup k q of Nothing -> M.insert k [x] q Just xs -> M.insert k (x : xs) q
106
false
true
0
11
67
117
58
59
null
null
jvmap/Forms-compose
src/Graphics/UI/FormsCompose.hs
bsd-3-clause
gtkButtonLayoutWithSecondary Vertical = _layoutInButtonBox Gtk.vButtonBoxNew
78
gtkButtonLayoutWithSecondary Vertical = _layoutInButtonBox Gtk.vButtonBoxNew
78
gtkButtonLayoutWithSecondary Vertical = _layoutInButtonBox Gtk.vButtonBoxNew
78
false
false
0
6
6
14
6
8
null
null
phylake/avm3
vm/execute.hs
mit
r_f {-0x57-} (dops, aops, NewActivation:bops, ss, reg, cp, iid) = do po dops aops$ NewActivation:bops obj <- H.new r_f (VmRt_Activation obj:dops, NewActivation:aops, bops, ss, reg, cp, iid)
195
r_f {-0x57-} (dops, aops, NewActivation:bops, ss, reg, cp, iid) = do po dops aops$ NewActivation:bops obj <- H.new r_f (VmRt_Activation obj:dops, NewActivation:aops, bops, ss, reg, cp, iid)
195
r_f {-0x57-} (dops, aops, NewActivation:bops, ss, reg, cp, iid) = do po dops aops$ NewActivation:bops obj <- H.new r_f (VmRt_Activation obj:dops, NewActivation:aops, bops, ss, reg, cp, iid)
195
false
false
0
10
32
98
53
45
null
null
benmos/HLevy
src/Parser.hs
bsd-3-clause
pInitialExpr :: UUP Expr pInitialExpr = pApp <|> pInitialApp <|> pLetExpr <|> pIfExpr <|> pFunExpr <|> pRecExpr where pLetExpr = Let <$> (pSymbol "let" *> pIdentifier) <*> (pSymbol "=" *>...
896
pInitialExpr :: UUP Expr pInitialExpr = pApp <|> pInitialApp <|> pLetExpr <|> pIfExpr <|> pFunExpr <|> pRecExpr where pLetExpr = Let <$> (pSymbol "let" *> pIdentifier) <*> (pSymbol "=" *>...
896
pInitialExpr = pApp <|> pInitialApp <|> pLetExpr <|> pIfExpr <|> pFunExpr <|> pRecExpr where pLetExpr = Let <$> (pSymbol "let" *> pIdentifier) <*> (pSymbol "=" *> pExpr) <*> ...
871
false
true
0
12
452
224
114
110
null
null
mettekou/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
unariseAlts rho (MultiValAlt _) bndr alts | isUnboxedSumBndr bndr = do (rho_sum_bndrs, scrt_bndrs@(tag_bndr : real_bndrs)) <- unariseConArgBinder rho bndr alts' <- unariseSumAlts rho_sum_bndrs (map StgVarArg real_bndrs) alts let inner_case = StgCase (StgApp tag_bndr []) tag_bndr tagAltTy alts' ...
441
unariseAlts rho (MultiValAlt _) bndr alts | isUnboxedSumBndr bndr = do (rho_sum_bndrs, scrt_bndrs@(tag_bndr : real_bndrs)) <- unariseConArgBinder rho bndr alts' <- unariseSumAlts rho_sum_bndrs (map StgVarArg real_bndrs) alts let inner_case = StgCase (StgApp tag_bndr []) tag_bndr tagAltTy alts' ...
441
unariseAlts rho (MultiValAlt _) bndr alts | isUnboxedSumBndr bndr = do (rho_sum_bndrs, scrt_bndrs@(tag_bndr : real_bndrs)) <- unariseConArgBinder rho bndr alts' <- unariseSumAlts rho_sum_bndrs (map StgVarArg real_bndrs) alts let inner_case = StgCase (StgApp tag_bndr []) tag_bndr tagAltTy alts' ...
441
false
false
0
15
105
143
69
74
null
null
svenssonjoel/ObsidianGFX
Examples.hs
bsd-3-clause
scatterGlobal :: Distrib (Pull (Exp Word32)) -- where to scatter -- -> Exp Word32 -- output size -> Word32 -- block size -> Distrib (Pull a) -- the elements to scatter -> GlobPush a scatterGlobal indices bs elems = GlobPush bs $ \wf -> F...
588
scatterGlobal :: Distrib (Pull (Exp Word32)) -- where to scatter -- -> Exp Word32 -- output size -> Word32 -- block size -> Distrib (Pull a) -- the elements to scatter -> GlobPush a scatterGlobal indices bs elems = GlobPush bs $ \wf -> Fo...
587
scatterGlobal indices bs elems = GlobPush bs $ \wf -> ForAllBlocks $ \bid -> ForAll bs $ \tid -> let inArr = getBlock indices bid inix = inArr ! tid bid' = inix `div` fromIntegral bs tid' = inix `mod` fromIntegral bs e = (getBlock elems bid) ! tid in wf e...
330
false
true
6
12
228
181
89
92
null
null
PipocaQuemada/ermine
src/Ermine/Interpreter.hs
bsd-2-clause
allocClosure :: (Applicative m, PrimMonad m) => Env m -> PreClosure -> MachineState m -> m (Address m) allocClosure le cc ms = Address <$> (buildClosure le cc ms >>= newMutVar)
180
allocClosure :: (Applicative m, PrimMonad m) => Env m -> PreClosure -> MachineState m -> m (Address m) allocClosure le cc ms = Address <$> (buildClosure le cc ms >>= newMutVar)
180
allocClosure le cc ms = Address <$> (buildClosure le cc ms >>= newMutVar)
73
false
true
0
11
34
82
39
43
null
null
romanb/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/Types.hs
mpl-2.0
dDiskStatus :: Lens' Disk (Maybe Text) dDiskStatus = lens _dDiskStatus (\s a -> s { _dDiskStatus = a })
103
dDiskStatus :: Lens' Disk (Maybe Text) dDiskStatus = lens _dDiskStatus (\s a -> s { _dDiskStatus = a })
103
dDiskStatus = lens _dDiskStatus (\s a -> s { _dDiskStatus = a })
64
false
true
0
9
18
45
24
21
null
null
nagyf/wyas
src/Evaluator.hs
mit
cons [x, DottedList xs xlast] = return $ DottedList (x : xs) xlast
66
cons [x, DottedList xs xlast] = return $ DottedList (x : xs) xlast
66
cons [x, DottedList xs xlast] = return $ DottedList (x : xs) xlast
66
false
false
0
8
12
37
18
19
null
null
haskell-distributed/distributed-process-registry
src/Control/Distributed/Process/Registry.hs
bsd-3-clause
foldNames :: forall b k v . Keyable k => Registry k v -> b -> (b -> (k, ProcessId) -> Process b) -> Process b foldNames pid acc fn = do self <- getSelfPid -- TODO: monitor @pid@ and die if necessary!!! cast pid $ (self, QueryDirectNames) -- Although we incur the cost of s...
660
foldNames :: forall b k v . Keyable k => Registry k v -> b -> (b -> (k, ProcessId) -> Process b) -> Process b foldNames pid acc fn = do self <- getSelfPid -- TODO: monitor @pid@ and die if necessary!!! cast pid $ (self, QueryDirectNames) -- Although we incur the cost of s...
660
foldNames pid acc fn = do self <- getSelfPid -- TODO: monitor @pid@ and die if necessary!!! cast pid $ (self, QueryDirectNames) -- Although we incur the cost of scanning our mailbox here (which we could -- avoid by spawning an intermediary perhaps), the message is delivered to -- us without any copying or s...
510
false
true
0
14
165
151
75
76
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/0-geoff/misc/src/X_2019_04_07.hs
unlicense
cataL _ b [] = b
22
cataL _ b [] = b
22
cataL _ b [] = b
22
false
false
0
6
11
15
7
8
null
null
copland/cmdargs
System/Console/CmdArgs/Implicit/Reader.hs
bsd-3-clause
reader_ _ = Nothing
19
reader_ _ = Nothing
19
reader_ _ = Nothing
19
false
false
0
5
3
9
4
5
null
null
abdulrahimnizamani/OccamStar
LogicAgentOld.hs
gpl-2.0
valid (Neg (x :& y)) = valid (Neg x :| Neg y)
45
valid (Neg (x :& y)) = valid (Neg x :| Neg y)
45
valid (Neg (x :& y)) = valid (Neg x :| Neg y)
45
false
false
0
9
11
38
18
20
null
null
jgoerzen/missingpy
testsrc/BZip2test.hs
gpl-2.0
f' mf fn exp = TestLabel fn $ TestCase $ handlePy exc2ioerror $ do bzf <- openBz2 ("testsrc/bz2files/" ++ fn) ReadMode 9 c <- vGetContents bzf mf exp c vClose bzf
259
f' mf fn exp = TestLabel fn $ TestCase $ handlePy exc2ioerror $ do bzf <- openBz2 ("testsrc/bz2files/" ++ fn) ReadMode 9 c <- vGetContents bzf mf exp c vClose bzf
259
f' mf fn exp = TestLabel fn $ TestCase $ handlePy exc2ioerror $ do bzf <- openBz2 ("testsrc/bz2files/" ++ fn) ReadMode 9 c <- vGetContents bzf mf exp c vClose bzf
259
false
false
1
12
127
82
33
49
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2InstanceBlockDeviceMapping.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html#cfn-ec2-blockdev-mapping-nodevice ecibdmNoDevice :: Lens' EC2InstanceBlockDeviceMapping (Maybe EC2InstanceNoDevice) ecibdmNoDevice = lens _eC2InstanceBlockDeviceMappingNoDevice (\s a -> s { _eC2InstanceBlockDevic...
343
ecibdmNoDevice :: Lens' EC2InstanceBlockDeviceMapping (Maybe EC2InstanceNoDevice) ecibdmNoDevice = lens _eC2InstanceBlockDeviceMappingNoDevice (\s a -> s { _eC2InstanceBlockDeviceMappingNoDevice = a })
201
ecibdmNoDevice = lens _eC2InstanceBlockDeviceMappingNoDevice (\s a -> s { _eC2InstanceBlockDeviceMappingNoDevice = a })
119
true
true
1
9
21
51
25
26
null
null
clarissalittler/pi-calculus
Tin.hs
mit
interpStmt :: Stmt -> Interp () interpStmt (SExp e) = interpExp e >> return ()
78
interpStmt :: Stmt -> Interp () interpStmt (SExp e) = interpExp e >> return ()
78
interpStmt (SExp e) = interpExp e >> return ()
46
false
true
0
9
14
45
20
25
null
null
lukaramu/yarn
src/Game/Yarn/ParseYarn.hs
mit
lIdentifier = char '$' *> (many1 (noneOf " \t\n\r\f\v\xa0~;\\" <|> lEscaped ";\\") <?> "valid identifier name") <* spaces
141
lIdentifier = char '$' *> (many1 (noneOf " \t\n\r\f\v\xa0~;\\" <|> lEscaped ";\\") <?> "valid identifier name") <* spaces
141
lIdentifier = char '$' *> (many1 (noneOf " \t\n\r\f\v\xa0~;\\" <|> lEscaped ";\\") <?> "valid identifier name") <* spaces
141
false
false
5
10
37
48
21
27
null
null
quickdudley/hypermine
World/Geometry.hs
agpl-3.0
axis a l = let x = sqrt ((cosh l)^2 - 1) in case a of X -> hyperPoint x 0 0 Y -> hyperPoint 0 x 0 Z -> hyperPoint 0 0 x
135
axis a l = let x = sqrt ((cosh l)^2 - 1) in case a of X -> hyperPoint x 0 0 Y -> hyperPoint 0 x 0 Z -> hyperPoint 0 0 x
135
axis a l = let x = sqrt ((cosh l)^2 - 1) in case a of X -> hyperPoint x 0 0 Y -> hyperPoint 0 x 0 Z -> hyperPoint 0 0 x
135
false
false
0
14
49
85
40
45
null
null
UWNetworksLab/arrakis
hake/RuleDefs.hs
mit
makeCxxDepend :: Options -> String -> String -> String -> String -> [ RuleToken ] makeCxxDepend opts phase src obj depfile | optArch opts == "x86_64" = X86_64.makeCxxDepend opts phase src obj depfile | otherwise = [ ErrorMsg ("no C++ dependency generator for " ++ (optArch opts)) ]
297
makeCxxDepend :: Options -> String -> String -> String -> String -> [ RuleToken ] makeCxxDepend opts phase src obj depfile | optArch opts == "x86_64" = X86_64.makeCxxDepend opts phase src obj depfile | otherwise = [ ErrorMsg ("no C++ dependency generator for " ++ (optArch opts)) ]
297
makeCxxDepend opts phase src obj depfile | optArch opts == "x86_64" = X86_64.makeCxxDepend opts phase src obj depfile | otherwise = [ ErrorMsg ("no C++ dependency generator for " ++ (optArch opts)) ]
215
false
true
0
11
63
99
48
51
null
null
olsner/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pprTcTyVarDetails (MetaTv { mtv_info = info, mtv_tclvl = tclvl }) = pp_info <> colon <> ppr tclvl where pp_info = case info of TauTv -> text "tau" SigTv -> text "sig" FlatMetaTv -> text "fuv" {- *********************************************************...
736
pprTcTyVarDetails (MetaTv { mtv_info = info, mtv_tclvl = tclvl }) = pp_info <> colon <> ppr tclvl where pp_info = case info of TauTv -> text "tau" SigTv -> text "sig" FlatMetaTv -> text "fuv" {- *********************************************************...
736
pprTcTyVarDetails (MetaTv { mtv_info = info, mtv_tclvl = tclvl }) = pp_info <> colon <> ppr tclvl where pp_info = case info of TauTv -> text "tau" SigTv -> text "sig" FlatMetaTv -> text "fuv" {- *********************************************************...
736
false
false
0
9
283
81
42
39
null
null
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Parsing.hs
gpl-2.0
smartPunctuation :: GenParser Char ParserState Inline -> GenParser Char ParserState Inline smartPunctuation inlineParser = do failUnlessSmart choice [ quoted inlineParser, apostrophe, dash, ellipses ]
221
smartPunctuation :: GenParser Char ParserState Inline -> GenParser Char ParserState Inline smartPunctuation inlineParser = do failUnlessSmart choice [ quoted inlineParser, apostrophe, dash, ellipses ]
221
smartPunctuation inlineParser = do failUnlessSmart choice [ quoted inlineParser, apostrophe, dash, ellipses ]
113
false
true
0
9
44
56
27
29
null
null
alexander-at-github/eta
compiler/ETA/StgSyn/StgLint.hs
bsd-3-clause
{- Checks for (a) *some* type errors (b) locally-defined variables used but not defined Note: unless -dverbose-stg is on, display of lint errors will result in "panic: bOGUS_LVs". WARNING: ~~~~~~~~ This module has suffered bit-rot; it is likely to yield lint errors for Stg code that is currently per...
1,572
lintStgBindings :: String -> [StgBinding] -> [StgBinding] lintStgBindings whodunnit binds = {-# SCC "StgLint" #-} case (initL (lint_binds binds)) of Nothing -> binds Just msg -> pprPanic "" (vcat [ ptext (sLit "*** Stg Lint ErrMsgs: in") <+> text ...
772
lintStgBindings whodunnit binds = {-# SCC "StgLint" #-} case (initL (lint_binds binds)) of Nothing -> binds Just msg -> pprPanic "" (vcat [ ptext (sLit "*** Stg Lint ErrMsgs: in") <+> text whodunnit <+> ptext (sLit "***"), ...
714
true
true
0
16
537
223
106
117
null
null
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Internal/Heap.hs
gpl-3.0
merge (Empty) h = h
19
merge (Empty) h = h
19
merge (Empty) h = h
19
false
false
0
6
4
14
7
7
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
pSelfClosing :: (String -> Bool) -> ([Attribute String] -> Bool) -> TagParser (Tag String) pSelfClosing f g = do open <- pSatisfy (tagOpen f g) optional $ pSatisfy (tagClose f) return open
207
pSelfClosing :: (String -> Bool) -> ([Attribute String] -> Bool) -> TagParser (Tag String) pSelfClosing f g = do open <- pSatisfy (tagOpen f g) optional $ pSatisfy (tagClose f) return open
207
pSelfClosing f g = do open <- pSatisfy (tagOpen f g) optional $ pSatisfy (tagClose f) return open
103
false
true
0
11
50
98
45
53
null
null
tphyahoo/haskoin
haskoin-wallet/Network/Haskoin/Wallet/Server/Handler.hs
unlicense
getAddrTxsR :: (MonadLogger m, MonadBaseControl IO m, MonadIO m) => KeyRingName -> AccountName -> KeyIndex -> AddressType -> PageRequest -> Handler m (Maybe Value) getAddrTxsR keyRingName name index addrType page = do $(logInfo) $ format $ unlines [ "GetAddrTxsR" ...
1,363
getAddrTxsR :: (MonadLogger m, MonadBaseControl IO m, MonadIO m) => KeyRingName -> AccountName -> KeyIndex -> AddressType -> PageRequest -> Handler m (Maybe Value) getAddrTxsR keyRingName name index addrType page = do $(logInfo) $ format $ unlines [ "GetAddrTxsR" ...
1,363
getAddrTxsR keyRingName name index addrType page = do $(logInfo) $ format $ unlines [ "GetAddrTxsR" , " KeyRing name : " ++ unpack keyRingName , " Account name : " ++ unpack name , " Address index: " ++ show index , " Address type : " ++ show addrType , " Page nu...
1,163
false
true
0
15
416
437
221
216
null
null
CulpaBS/wbBach
src/Futhark/Pass/ExplicitAllocations.hs
bsd-3-clause
summaryForBindage t@(Array bt shape u) BindVar = do (_, m) <- allocForArray t DefaultSpace return $ directIndexFunction bt shape u m t
138
summaryForBindage t@(Array bt shape u) BindVar = do (_, m) <- allocForArray t DefaultSpace return $ directIndexFunction bt shape u m t
138
summaryForBindage t@(Array bt shape u) BindVar = do (_, m) <- allocForArray t DefaultSpace return $ directIndexFunction bt shape u m t
138
false
false
0
8
25
60
29
31
null
null
roberth/uu-helium
test/correct/UnaryMinus.hs
gpl-3.0
g (-5.0) = "dit klopt"
22
g (-5.0) = "dit klopt"
22
g (-5.0) = "dit klopt"
22
false
false
0
6
4
15
7
8
null
null
uduki/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
qCast_QRadialGradient :: Object a -> IO (QRadialGradient ()) qCast_QRadialGradient _qobj = return (objectCast _qobj)
118
qCast_QRadialGradient :: Object a -> IO (QRadialGradient ()) qCast_QRadialGradient _qobj = return (objectCast _qobj)
118
qCast_QRadialGradient _qobj = return (objectCast _qobj)
57
false
true
0
9
15
41
19
22
null
null
mindreader/iron-tracker
Weight/Formulas.hs
bsd-3-clause
sameorlessweight xs = -- trace ("max weight:" ++ textToString (show (maximum weights)) ++ " head weights:" ++ textToString (show (head weights))) $ maximum weights <= head weights avg weights >= head weights where weights = fmap weight xs maxweights = maximum weights avg [] = error "Weight/Formulas.hs:...
408
sameorlessweight xs = -- trace ("max weight:" ++ textToString (show (maximum weights)) ++ " head weights:" ++ textToString (show (head weights))) $ maximum weights <= head weights avg weights >= head weights where weights = fmap weight xs maxweights = maximum weights avg [] = error "Weight/Formulas.hs:...
408
sameorlessweight xs = -- trace ("max weight:" ++ textToString (show (maximum weights)) ++ " head weights:" ++ textToString (show (head weights))) $ maximum weights <= head weights avg weights >= head weights where weights = fmap weight xs maxweights = maximum weights avg [] = error "Weight/Formulas.hs:...
408
false
false
0
8
84
78
36
42
null
null
Chouffe/hlisp
src/Evaluator.hs
bsd-3-clause
load :: String -> IOThrowsError [Expr] load filename = (liftIO $ readFile filename) >>= liftThrows . readExprList
113
load :: String -> IOThrowsError [Expr] load filename = (liftIO $ readFile filename) >>= liftThrows . readExprList
113
load filename = (liftIO $ readFile filename) >>= liftThrows . readExprList
74
false
true
0
9
16
42
21
21
null
null
urbanslug/ghc
testsuite/tests/rename/should_compile/timing003.hs
bsd-3-clause
a498 = []
9
a498 = []
9
a498 = []
9
false
false
1
6
2
12
4
8
null
null
mbakke/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
wconfdGroup :: String wconfdGroup = Runtime.daemonGroup (DaemonGroup GanetiWConfd)
82
wconfdGroup :: String wconfdGroup = Runtime.daemonGroup (DaemonGroup GanetiWConfd)
82
wconfdGroup = Runtime.daemonGroup (DaemonGroup GanetiWConfd)
60
false
true
0
7
7
22
11
11
null
null
MarcusVoelker/LParse
src/Text/LParse/Metaparser.hs
mit
combine (Just rs) = cfexParser rs
33
combine (Just rs) = cfexParser rs
33
combine (Just rs) = cfexParser rs
33
false
false
0
6
5
19
8
11
null
null
formrre/yi
yi-core/src/Yi/Core.hs
gpl-2.0
withSyntax :: (Show x, YiAction a x) => (forall syntax. Mode syntax -> syntax -> a) -> YiM () withSyntax f = do b <- gets currentBuffer act <- withGivenBuffer b $ withSyntaxB f runAction $ makeAction act
239
withSyntax :: (Show x, YiAction a x) => (forall syntax. Mode syntax -> syntax -> a) -> YiM () withSyntax f = do b <- gets currentBuffer act <- withGivenBuffer b $ withSyntaxB f runAction $ makeAction act
239
withSyntax f = do b <- gets currentBuffer act <- withGivenBuffer b $ withSyntaxB f runAction $ makeAction act
145
false
true
0
10
73
96
45
51
null
null
fhsjaagshs/niagra
src/Data/Niagra/Properties/Box.hs
mit
verticalAlign :: (Monad m) => Builder -> NiagraT m () verticalAlign = declaration "vertical-align"
98
verticalAlign :: (Monad m) => Builder -> NiagraT m () verticalAlign = declaration "vertical-align"
98
verticalAlign = declaration "vertical-align"
44
false
true
0
8
13
34
17
17
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/max_6.hs
mit
maxOrdering :: Ordering -> Ordering -> Ordering maxOrdering x y = max2 x y
78
maxOrdering :: Ordering -> Ordering -> Ordering maxOrdering x y = max2 x y
78
maxOrdering x y = max2 x y
26
false
true
0
6
17
29
14
15
null
null
ulricha/dsh
src/Database/DSH/Tests/CombinatorTests.hs
bsd-3-clause
prop_append_nest :: (BackendVector b, VectorLang v) => ([[Integer]], [[Integer]]) -> DSHProperty (v TExpr TExpr) b prop_append_nest = makePropEq (uncurryQ (Q.append)) (\(a,b) -> a ++ b)
185
prop_append_nest :: (BackendVector b, VectorLang v) => ([[Integer]], [[Integer]]) -> DSHProperty (v TExpr TExpr) b prop_append_nest = makePropEq (uncurryQ (Q.append)) (\(a,b) -> a ++ b)
185
prop_append_nest = makePropEq (uncurryQ (Q.append)) (\(a,b) -> a ++ b)
70
false
true
0
10
24
100
54
46
null
null
mstksg/ghc-typelits-natnormalise
tests/Tests.hs
bsd-2-clause
tests :: TestTree tests = testGroup "ghc-typelits-natnormalise" [ testGroup "Basic functionality" [ testCase "show (head (1:>2:>3:>Nil))" $ show (head (1:>2:>3:>Nil)) @?= "1" , testCase "show (tail (1:>2:>3:>Nil))" $ show (tail (1:>2:>3:>Nil)) @?= "<2,3>" , testCase "show (init (1:...
1,343
tests :: TestTree tests = testGroup "ghc-typelits-natnormalise" [ testGroup "Basic functionality" [ testCase "show (head (1:>2:>3:>Nil))" $ show (head (1:>2:>3:>Nil)) @?= "1" , testCase "show (tail (1:>2:>3:>Nil))" $ show (tail (1:>2:>3:>Nil)) @?= "<2,3>" , testCase "show (init (1:...
1,343
tests = testGroup "ghc-typelits-natnormalise" [ testGroup "Basic functionality" [ testCase "show (head (1:>2:>3:>Nil))" $ show (head (1:>2:>3:>Nil)) @?= "1" , testCase "show (tail (1:>2:>3:>Nil))" $ show (tail (1:>2:>3:>Nil)) @?= "<2,3>" , testCase "show (init (1:>2:>3:>Nil))" $ ...
1,325
false
true
0
26
291
480
243
237
null
null
blamario/grampa
grammatical-parsers/test/Test.hs
bsd-2-clause
results = either (const []) id
30
results = either (const []) id
30
results = either (const []) id
30
false
false
1
7
5
24
9
15
null
null
aochagavia/CompilerConstruction
mf/src/StronglyLiveVariables.hs
apache-2.0
gen (RefAssign' _ _ val) = freeVarsI val
40
gen (RefAssign' _ _ val) = freeVarsI val
40
gen (RefAssign' _ _ val) = freeVarsI val
40
false
false
0
7
7
22
10
12
null
null
rueshyna/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
tvdptdpEndHour :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32) tvdptdpEndHour = lens _tvdptdpEndHour (\ s a -> s{_tvdptdpEndHour = a}) . mapping _Coerce
179
tvdptdpEndHour :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32) tvdptdpEndHour = lens _tvdptdpEndHour (\ s a -> s{_tvdptdpEndHour = a}) . mapping _Coerce
179
tvdptdpEndHour = lens _tvdptdpEndHour (\ s a -> s{_tvdptdpEndHour = a}) . mapping _Coerce
103
false
true
2
8
33
58
27
31
null
null
DATX02-17-26/DATX02-17-26
Test/Norm/IfElseEmptyTest.hs
gpl-2.0
allTests :: TestTree allTests = normTestsDir "Norm.IfElseEmpty" "ifelse_empty" [normalizers]
92
allTests :: TestTree allTests = normTestsDir "Norm.IfElseEmpty" "ifelse_empty" [normalizers]
92
allTests = normTestsDir "Norm.IfElseEmpty" "ifelse_empty" [normalizers]
71
false
true
0
6
8
27
12
15
null
null
tjakway/ghcjvm
compiler/main/DriverPhases.hs
bsd-3-clause
eqPhase LlvmOpt LlvmOpt = True
37
eqPhase LlvmOpt LlvmOpt = True
37
eqPhase LlvmOpt LlvmOpt = True
37
false
false
0
4
11
13
5
8
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxAUI_BUTTON_STATE_PRESSED :: Int wxAUI_BUTTON_STATE_PRESSED = 4
64
wxAUI_BUTTON_STATE_PRESSED :: Int wxAUI_BUTTON_STATE_PRESSED = 4
64
wxAUI_BUTTON_STATE_PRESSED = 4
30
false
true
0
4
5
11
6
5
null
null
michalkonecny/polypaver
src/PolyPaver/Input/TPTP.hs
bsd-3-clause
include :: Parser (Maybe a) include = traceRule ("include") $ do (_, original) <- withConsumed includeAux trace ("Warning: ignoring " ++ original) $ return Nothing where includeAux = do string "include" m_parens term m_dot return Nothing
301
include :: Parser (Maybe a) include = traceRule ("include") $ do (_, original) <- withConsumed includeAux trace ("Warning: ignoring " ++ original) $ return Nothing where includeAux = do string "include" m_parens term m_dot return Nothing
301
include = traceRule ("include") $ do (_, original) <- withConsumed includeAux trace ("Warning: ignoring " ++ original) $ return Nothing where includeAux = do string "include" m_parens term m_dot return Nothing
273
false
true
5
8
99
79
37
42
null
null
hirokai/PaperServer
Settings.hs
bsd-2-clause
asset :: Asset -> Text asset BootStrap = "/static/js/lib/bootstrap.min.js"
74
asset :: Asset -> Text asset BootStrap = "/static/js/lib/bootstrap.min.js"
74
asset BootStrap = "/static/js/lib/bootstrap.min.js"
51
false
true
0
7
8
24
10
14
null
null
paulbarbu/ePseudocode
src/EPseudocode/Parser.hs
bsd-3-clause
eParse :: Parser Stmt -> String -> Error [Stmt] eParse p input = case parse (whiteSpace *> many1 p <* eof) "" input of Left err -> Left $ show err Right program -> Right program
181
eParse :: Parser Stmt -> String -> Error [Stmt] eParse p input = case parse (whiteSpace *> many1 p <* eof) "" input of Left err -> Left $ show err Right program -> Right program
181
eParse p input = case parse (whiteSpace *> many1 p <* eof) "" input of Left err -> Left $ show err Right program -> Right program
133
false
true
0
10
39
86
40
46
null
null
XinhuaZhang/PetaVisionHaskell
Classifier/LibLinear/Bindings.hs
gpl-3.0
c'L2R_L2LOSS_SVC = 2
20
c'L2R_L2LOSS_SVC = 2
20
c'L2R_L2LOSS_SVC = 2
20
false
false
0
4
2
6
3
3
null
null
ulricha/dsh
src/Database/DSH/Compiler.hs
bsd-3-clause
-------------------------------------------------------------------------------- runQ :: forall a b v. (VectorLang v, BackendVector b, QA a) => BackendCodeGen (v TExpr TExpr) b -> BackendConn b -> Q a -> IO a runQ codeGen conn (Q q) = do let ty = reify (undefined :: Rep a) let comprehension...
608
runQ :: forall a b v. (VectorLang v, BackendVector b, QA a) => BackendCodeGen (v TExpr TExpr) b -> BackendConn b -> Q a -> IO a runQ codeGen conn (Q q) = do let ty = reify (undefined :: Rep a) let comprehensions = toComprehensions q let vectorPlan = compileOptQ optBU comprehensions l...
526
runQ codeGen conn (Q q) = do let ty = reify (undefined :: Rep a) let comprehensions = toComprehensions q let vectorPlan = compileOptQ optBU comprehensions let backendCode = codeGen vectorPlan frExp <$> execQueryBundle conn backendCode ty -------------------------------------------------------------...
378
true
true
2
10
117
151
76
75
null
null
ezyang/ghc
compiler/utils/UniqMap.hs
bsd-3-clause
addToUniqMap_C :: Uniquable k => (a -> a -> a) -> UniqMap k a -> k -> a -> UniqMap k a addToUniqMap_C f (UniqMap m) k v = UniqMap $ addToUFM_C (liftC f) m k (k, v)
242
addToUniqMap_C :: Uniquable k => (a -> a -> a) -> UniqMap k a -> k -> a -> UniqMap k a addToUniqMap_C f (UniqMap m) k v = UniqMap $ addToUFM_C (liftC f) m k (k, v)
242
addToUniqMap_C f (UniqMap m) k v = UniqMap $ addToUFM_C (liftC f) m k (k, v)
80
false
true
0
13
116
102
48
54
null
null
mgsloan/compconfig
env/src/Misc.hs
mit
notify :: String -> Xio () notify msg = do homeDir <- view envHomeDir logInfo $ "XMonad notify: " <> fromString msg syncSpawn "notify-send" ["-i", homeDir </> "env/xmonad.png", "XMonad", msg]
197
notify :: String -> Xio () notify msg = do homeDir <- view envHomeDir logInfo $ "XMonad notify: " <> fromString msg syncSpawn "notify-send" ["-i", homeDir </> "env/xmonad.png", "XMonad", msg]
197
notify msg = do homeDir <- view envHomeDir logInfo $ "XMonad notify: " <> fromString msg syncSpawn "notify-send" ["-i", homeDir </> "env/xmonad.png", "XMonad", msg]
170
false
true
0
9
35
71
34
37
null
null
abailly/hsgames
acquire/src/Acquire/Net/Server.hs
apache-2.0
interpretClientCommand :: HasCallStack => Handle -> ReaderT Server IO (Maybe Result) interpretClientCommand handle = do ln <- liftIO $ receive handle trace ("received command from: " ++ show handle ++ ", " ++ show ln) either (const $ return Nothing) (handleCommand handle) ln
281
interpretClientCommand :: HasCallStack => Handle -> ReaderT Server IO (Maybe Result) interpretClientCommand handle = do ln <- liftIO $ receive handle trace ("received command from: " ++ show handle ++ ", " ++ show ln) either (const $ return Nothing) (handleCommand handle) ln
281
interpretClientCommand handle = do ln <- liftIO $ receive handle trace ("received command from: " ++ show handle ++ ", " ++ show ln) either (const $ return Nothing) (handleCommand handle) ln
196
false
true
0
12
48
103
47
56
null
null
fredyr/copilot-libraries
src/Copilot/Library/RegExp.hs
bsd-3-clause
opOr :: GenParser Char () ( RegExp t -> RegExp t -> RegExp t ) opOr = char '|' >> return ROr
104
opOr :: GenParser Char () ( RegExp t -> RegExp t -> RegExp t ) opOr = char '|' >> return ROr
104
opOr = char '|' >> return ROr
35
false
true
0
9
33
50
23
27
null
null
bennofs/cabal2nix
src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs
bsd-3-clause
toNixName (PackageName n) = fromString n
41
toNixName (PackageName n) = fromString n
41
toNixName (PackageName n) = fromString n
41
false
false
0
6
6
19
8
11
null
null
DavidAlphaFox/ghc
compiler/basicTypes/Name.hs
bsd-3-clause
isDataConName :: Name -> Bool isDataConName name = isDataOcc (nameOccName name)
79
isDataConName :: Name -> Bool isDataConName name = isDataOcc (nameOccName name)
79
isDataConName name = isDataOcc (nameOccName name)
49
false
true
0
7
10
27
13
14
null
null
tweag/distributed-process
src/Control/Distributed/Process/Internal/Closure/TH.hs
bsd-3-clause
-- | Literal string as an expression stringE :: String -> Q Exp stringE = litE . stringL
88
stringE :: String -> Q Exp stringE = litE . stringL
51
stringE = litE . stringL
24
true
true
0
6
17
23
12
11
null
null
PipocaQuemada/ermine
src/Ermine/Parser/Resolver.hs
bsd-2-clause
mapKeys :: (Eq k, Hashable k) => (k -> k) -> HashMap k a -> HashMap k a mapKeys f m = HM.foldrWithKey g m m where g k v m' = let k' = f k in if k == k' then m' else HM.delete k $ HM.insert k' v m' -- The following few functions extracted to the top level because -- maybe they should live in Ermine.Syntax.Module. --...
548
mapKeys :: (Eq k, Hashable k) => (k -> k) -> HashMap k a -> HashMap k a mapKeys f m = HM.foldrWithKey g m m where g k v m' = let k' = f k in if k == k' then m' else HM.delete k $ HM.insert k' v m' -- The following few functions extracted to the top level because -- maybe they should live in Ermine.Syntax.Module. --...
548
mapKeys f m = HM.foldrWithKey g m m where g k v m' = let k' = f k in if k == k' then m' else HM.delete k $ HM.insert k' v m' -- The following few functions extracted to the top level because -- maybe they should live in Ermine.Syntax.Module. -- | To get Globals for for all Terms in a Module: -- * Create Globals fr...
476
false
true
0
12
118
133
67
66
null
null
syunta/Scheme-hs
src/Evaluator.hs
mit
-- variable eval (SSymbol x) = do env <- get let val = lookupEnv x env case val of Nothing -> throwError $ "Unbound variable -- " ++ x Just v -> return v -- quotation
181
eval (SSymbol x) = do env <- get let val = lookupEnv x env case val of Nothing -> throwError $ "Unbound variable -- " ++ x Just v -> return v -- quotation
169
eval (SSymbol x) = do env <- get let val = lookupEnv x env case val of Nothing -> throwError $ "Unbound variable -- " ++ x Just v -> return v -- quotation
169
true
false
0
11
50
72
33
39
null
null
beni55/HTTP
Network/Stream.hs
bsd-3-clause
failWith :: ConnError -> Result a failWith x = Left x
53
failWith :: ConnError -> Result a failWith x = Left x
53
failWith x = Left x
19
false
true
0
6
10
24
11
13
null
null
AlexanderPankiv/ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- | Get the 'CoAxiom' from a 'TyThing' if it is a coercion axiom thing. Panics otherwise tyThingCoAxiom :: TyThing -> CoAxiom Branched tyThingCoAxiom (ACoAxiom ax) = ax
169
tyThingCoAxiom :: TyThing -> CoAxiom Branched tyThingCoAxiom (ACoAxiom ax) = ax
79
tyThingCoAxiom (ACoAxiom ax) = ax
33
true
true
0
7
27
28
14
14
null
null
brendanhay/gogol
gogol-games/gen/Network/Google/Games/Types/Product.hs
mpl-2.0
-- | An object to represent Play Game experience information for the player. pExperienceInfo :: Lens' Player (Maybe PlayerExperienceInfo) pExperienceInfo = lens _pExperienceInfo (\ s a -> s{_pExperienceInfo = a})
220
pExperienceInfo :: Lens' Player (Maybe PlayerExperienceInfo) pExperienceInfo = lens _pExperienceInfo (\ s a -> s{_pExperienceInfo = a})
143
pExperienceInfo = lens _pExperienceInfo (\ s a -> s{_pExperienceInfo = a})
82
true
true
0
9
37
48
25
23
null
null
flyrry/phonypony
src/DumbBot/Goal.hs
mit
-- if there is currently no path to desired destination -- then return max possible distance otherwise just return -- the actual distance to the given goal position goalDistance :: BoardMap -> Goal -> Int goalDistance boardMap (Goal _ pos) = let path = boardMap pos in maybe 9999 distance path
301
goalDistance :: BoardMap -> Goal -> Int goalDistance boardMap (Goal _ pos) = let path = boardMap pos in maybe 9999 distance path
136
goalDistance boardMap (Goal _ pos) = let path = boardMap pos in maybe 9999 distance path
96
true
true
0
9
58
56
28
28
null
null
TomMD/ghc
compiler/types/TyCon.hs
bsd-3-clause
-- | Test if the 'TyCon' is algebraic but abstract (invisible data constructors) isAbstractTyCon :: TyCon -> Bool isAbstractTyCon (AlgTyCon { algTcRhs = AbstractTyCon {} }) = True
179
isAbstractTyCon :: TyCon -> Bool isAbstractTyCon (AlgTyCon { algTcRhs = AbstractTyCon {} }) = True
98
isAbstractTyCon (AlgTyCon { algTcRhs = AbstractTyCon {} }) = True
65
true
true
0
9
27
40
20
20
null
null
holdenlee/notebook
src/Utilities.hs
mit
debugSummary f x = trace (show (f x)) x
39
debugSummary f x = trace (show (f x)) x
39
debugSummary f x = trace (show (f x)) x
39
false
false
0
9
8
28
13
15
null
null
brendanhay/gogol
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
mpl-2.0
mlAddtional :: Lens' ModelLabels (HashMap Text Text) mlAddtional = lens _mlAddtional (\ s a -> s{_mlAddtional = a}) . _Coerce
133
mlAddtional :: Lens' ModelLabels (HashMap Text Text) mlAddtional = lens _mlAddtional (\ s a -> s{_mlAddtional = a}) . _Coerce
133
mlAddtional = lens _mlAddtional (\ s a -> s{_mlAddtional = a}) . _Coerce
80
false
true
0
10
27
53
27
26
null
null
kowey/GenI
src/NLP/GenI.hs
gpl-2.0
lemmaSentenceString :: GeniSuccess -> Text lemmaSentenceString = T.unwords . map lpLemma . grLemmaSentence
106
lemmaSentenceString :: GeniSuccess -> Text lemmaSentenceString = T.unwords . map lpLemma . grLemmaSentence
106
lemmaSentenceString = T.unwords . map lpLemma . grLemmaSentence
63
false
true
0
7
12
35
15
20
null
null
GaloisInc/halvm-ghc
libraries/base/GHC/Conc/IO.hs
bsd-3-clause
-- | Block the current thread until data can be written to the -- given file descriptor (GHC only). -- -- This will throw an 'IOError' if the file descriptor was closed -- while this thread was blocked. To safely close a file descriptor -- that has been used with 'threadWaitWrite', use 'closeFdWith'. threadWaitWrite :...
560
threadWaitWrite :: Fd -> IO () threadWaitWrite fd #ifndef mingw32_HOST_OS | threaded = Event.threadWaitWrite fd #endif | otherwise = IO $ \s -> case fromIntegral fd of { I# fd# -> case waitWrite# fd# s of { s' -> (# s', () #) }}
257
threadWaitWrite fd #ifndef mingw32_HOST_OS | threaded = Event.threadWaitWrite fd #endif | otherwise = IO $ \s -> case fromIntegral fd of { I# fd# -> case waitWrite# fd# s of { s' -> (# s', () #) }}
226
true
true
1
14
126
100
54
46
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- FIXME: perhaps rename to 'validXenCommands' for consistency with -- other constants knownXenCommands :: FrozenSet String knownXenCommands = ConstantUtils.mkSet [xenCmdXl, xenCmdXm]
183
knownXenCommands :: FrozenSet String knownXenCommands = ConstantUtils.mkSet [xenCmdXl, xenCmdXm]
96
knownXenCommands = ConstantUtils.mkSet [xenCmdXl, xenCmdXm]
59
true
true
1
6
20
30
15
15
null
null
TomMD/cryptol
src/Cryptol/Transform/MonoValues.hs
bsd-3-clause
-- to generate names newName :: M QName newName = do n <- sets $ \s -> (s, s + 1) seq n $ return (QName Nothing (NewName MonoValues n))
144
newName :: M QName newName = do n <- sets $ \s -> (s, s + 1) seq n $ return (QName Nothing (NewName MonoValues n))
122
newName = do n <- sets $ \s -> (s, s + 1) seq n $ return (QName Nothing (NewName MonoValues n))
103
true
true
0
12
38
70
35
35
null
null
sapek/optparse-applicative
Options/Applicative/Builder.hs
bsd-3-clause
disambiguate :: PrefsMod disambiguate = PrefsMod $ \p -> p { prefDisambiguate = True }
86
disambiguate :: PrefsMod disambiguate = PrefsMod $ \p -> p { prefDisambiguate = True }
86
disambiguate = PrefsMod $ \p -> p { prefDisambiguate = True }
61
false
true
2
7
14
39
18
21
null
null
duplode/stack
src/Stack/Options.hs
bsd-3-clause
dotOptsParser :: Parser DotOpts dotOptsParser = DotOpts <$> includeExternal <*> includeBase <*> depthLimit <*> fmap (maybe Set.empty Set.fromList . fmap splitNames) prunedPkgs where includeExternal = boolFlags False "external" ...
1,440
dotOptsParser :: Parser DotOpts dotOptsParser = DotOpts <$> includeExternal <*> includeBase <*> depthLimit <*> fmap (maybe Set.empty Set.fromList . fmap splitNames) prunedPkgs where includeExternal = boolFlags False "external" ...
1,440
dotOptsParser = DotOpts <$> includeExternal <*> includeBase <*> depthLimit <*> fmap (maybe Set.empty Set.fromList . fmap splitNames) prunedPkgs where includeExternal = boolFlags False "external" "in...
1,408
false
true
14
12
742
254
117
137
null
null