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
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/InstallPlan.hs
gpl-3.0
-- | A 'ConfiguredPackage' is valid if the flag assignment is total and if -- in the configuration given by the flag assignment, all the package -- dependencies are satisfied by the specified packages. -- configuredPackageValid :: Platform -> CompilerId -> ConfiguredPackage -> Bool configuredPackageValid platform comp ...
378
configuredPackageValid :: Platform -> CompilerId -> ConfiguredPackage -> Bool configuredPackageValid platform comp pkg = null (configuredPackageProblems platform comp pkg)
173
configuredPackageValid platform comp pkg = null (configuredPackageProblems platform comp pkg)
95
true
true
0
7
55
53
26
27
null
null
RossMeikleham/Project-Euler-Haskell
33.hs
mit
isDigitCancelling :: Int -> Int -> Bool isDigitCancelling n d = d `mod` 10 /= 0 && n `mod` 10 == d `div` 10 && (n `div` 10) % (d `mod` 10) == n % d
166
isDigitCancelling :: Int -> Int -> Bool isDigitCancelling n d = d `mod` 10 /= 0 && n `mod` 10 == d `div` 10 && (n `div` 10) % (d `mod` 10) == n % d
166
isDigitCancelling n d = d `mod` 10 /= 0 && n `mod` 10 == d `div` 10 && (n `div` 10) % (d `mod` 10) == n % d
126
false
true
0
14
54
88
50
38
null
null
ice1000/OI-codes
codewars/101-200/convert-number-to-reversed-array-of-digits.hs
agpl-3.0
digitize :: Int -> [Int] digitize s |s < 10 = [s] |otherwise = mod s 10 : digitize (div s 10)
104
digitize :: Int -> [Int] digitize s |s < 10 = [s] |otherwise = mod s 10 : digitize (div s 10)
104
digitize s |s < 10 = [s] |otherwise = mod s 10 : digitize (div s 10)
79
false
true
0
9
32
63
30
33
null
null
apyrgio/snf-ganeti
src/Ganeti/Luxi.hs
bsd-2-clause
-- | Sends a message over a luxi transport. sendMsg :: Client -> String -> IO () sendMsg s buf = withTimeout luxiDefRwto "sending luxi message" $ do let encoded = UTF8L.fromString buf handle = socket s BL.hPut handle encoded B.hPut handle bEOM hFlush handle -- | Given a current buffer and the handle, it ...
447
sendMsg :: Client -> String -> IO () sendMsg s buf = withTimeout luxiDefRwto "sending luxi message" $ do let encoded = UTF8L.fromString buf handle = socket s BL.hPut handle encoded B.hPut handle bEOM hFlush handle -- | Given a current buffer and the handle, it will read from the -- network until we get a...
403
sendMsg s buf = withTimeout luxiDefRwto "sending luxi message" $ do let encoded = UTF8L.fromString buf handle = socket s BL.hPut handle encoded B.hPut handle bEOM hFlush handle -- | Given a current buffer and the handle, it will read from the -- network until we get a full message, and it will return tha...
366
true
true
0
13
93
95
43
52
null
null
spacekitteh/smcghc
libraries/base/Data/Maybe.hs
bsd-3-clause
maybeToList (Just x) = [x]
28
maybeToList (Just x) = [x]
28
maybeToList (Just x) = [x]
28
false
false
0
6
6
19
9
10
null
null
amnipar/hs-cvsu
examples/edgesegment.hs
bsd-3-clause
getFiles :: FilePath -> IO [FilePath] getFiles p = map (snd.splitFileName) <$> filter (\f -> takeExtension f == ".tif") <$> getDirectoryContents p
148
getFiles :: FilePath -> IO [FilePath] getFiles p = map (snd.splitFileName) <$> filter (\f -> takeExtension f == ".tif") <$> getDirectoryContents p
148
getFiles p = map (snd.splitFileName) <$> filter (\f -> takeExtension f == ".tif") <$> getDirectoryContents p
110
false
true
0
11
23
61
30
31
null
null
emaphis/Haskell-Practice
cis194/src/week01/Lyah02.hs
bsd-3-clause
lc2 = [x*y | x <- [2,5,10], y <- [8,10,11]]
44
lc2 = [x*y | x <- [2,5,10], y <- [8,10,11]]
44
lc2 = [x*y | x <- [2,5,10], y <- [8,10,11]]
44
false
false
1
9
10
51
27
24
null
null
brendanhay/gogol
gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/Documents/List.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pUploadProtocol :: Lens' ProjectsDatabasesDocumentsList (Maybe Text) pUploadProtocol = lens _pUploadProtocol (\ s a -> s{_pUploadProtocol = a})
213
pUploadProtocol :: Lens' ProjectsDatabasesDocumentsList (Maybe Text) pUploadProtocol = lens _pUploadProtocol (\ s a -> s{_pUploadProtocol = a})
151
pUploadProtocol = lens _pUploadProtocol (\ s a -> s{_pUploadProtocol = a})
82
true
true
0
9
33
46
25
21
null
null
ian-ross/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
configureCommand :: CommandUI ConfigFlags configureCommand = c { commandDefaultFlags = mempty , commandNotes = Just $ \pname -> (case commandNotes c of Nothing -> "" Just n -> n pname ++ "\n") ++ "Examples:\n" ++ " " ++ pname ++ " configure\n" ++ " Configure with defaults...
575
configureCommand :: CommandUI ConfigFlags configureCommand = c { commandDefaultFlags = mempty , commandNotes = Just $ \pname -> (case commandNotes c of Nothing -> "" Just n -> n pname ++ "\n") ++ "Examples:\n" ++ " " ++ pname ++ " configure\n" ++ " Configure with defaults...
575
configureCommand = c { commandDefaultFlags = mempty , commandNotes = Just $ \pname -> (case commandNotes c of Nothing -> "" Just n -> n pname ++ "\n") ++ "Examples:\n" ++ " " ++ pname ++ " configure\n" ++ " Configure with defaults;\n" ++ " " ++ pname ++ " configur...
533
false
true
1
24
156
128
63
65
null
null
adelbertc/nets-hs
src/Nets/Graph.hs
bsd-3-clause
ppAdj :: (Edge w -> String) -> Graph w -> String ppAdj f g = unlines $ fmap pp $ IM.toList $ adjList g where pp (u, nbors) = show u ++ " " ++ ppNbor f (S.toList nbors)
171
ppAdj :: (Edge w -> String) -> Graph w -> String ppAdj f g = unlines $ fmap pp $ IM.toList $ adjList g where pp (u, nbors) = show u ++ " " ++ ppNbor f (S.toList nbors)
171
ppAdj f g = unlines $ fmap pp $ IM.toList $ adjList g where pp (u, nbors) = show u ++ " " ++ ppNbor f (S.toList nbors)
122
false
true
6
9
42
107
48
59
null
null
pjones/xmonad-test
vendor/xmonad/src/XMonad/Core.hs
bsd-2-clause
-- | 'recompile force', recompile @~\/.xmonad\/xmonad.hs@ when any of the -- following apply: -- -- * force is 'True' -- -- * the xmonad executable does not exist -- -- * the xmonad executable is older than xmonad.hs or any file in -- ~\/.xmonad\/lib -- -- The -i flag is used to restrict recompila...
2,782
recompile :: MonadIO m => Bool -> m Bool recompile force = io $ do dir <- getXMonadDir let binn = "xmonad-"++arch++"-"++os bin = dir </> binn base = dir </> "xmonad" err = base ++ ".errors" src = base ++ ".hs" lib = dir </> "lib" libTs <- mapM getModTime . Prelude...
2,137
recompile force = io $ do dir <- getXMonadDir let binn = "xmonad-"++arch++"-"++os bin = dir </> binn base = dir </> "xmonad" err = base ++ ".errors" src = base ++ ".hs" lib = dir </> "lib" libTs <- mapM getModTime . Prelude.filter isSource =<< allFiles lib src...
2,096
true
true
2
22
808
636
331
305
null
null
amar47shah/summer-2015-haskell-class
Lab1.hs
mit
lifeLoss :: RollResult -> Int lifeLoss rr = case rr of SnakeEyes -> 2 OneRolled -> 1 Normal _ _ -> 0 Doubles _ -> 0
134
lifeLoss :: RollResult -> Int lifeLoss rr = case rr of SnakeEyes -> 2 OneRolled -> 1 Normal _ _ -> 0 Doubles _ -> 0
134
lifeLoss rr = case rr of SnakeEyes -> 2 OneRolled -> 1 Normal _ _ -> 0 Doubles _ -> 0
104
false
true
5
5
44
57
26
31
null
null
nedervold/context-free-grammar
src/Data/Graph/Inductive/ULGraph.hs
bsd-3-clause
-- | Creates a 'ULGraph' from an FGL -- 'Data.Graph.Inductive.Graph.Graph'. Throws an error if the nodes -- are not uniquely labeled. fromGraph :: (G.Graph gr, Ord n) => gr n e -> ULGraph gr n e fromGraph gr = fromMaybe err $ safeFromGraph gr where err = error "fromGraph: graph is not uniquely labeled" -- | Cr...
425
fromGraph :: (G.Graph gr, Ord n) => gr n e -> ULGraph gr n e fromGraph gr = fromMaybe err $ safeFromGraph gr where err = error "fromGraph: graph is not uniquely labeled" -- | Creates a 'ULGraph' from an FGL -- 'Data.Graph.Inductive.Graph.Graph' if the nodes are uniquely -- labeled.
291
fromGraph gr = fromMaybe err $ safeFromGraph gr where err = error "fromGraph: graph is not uniquely labeled" -- | Creates a 'ULGraph' from an FGL -- 'Data.Graph.Inductive.Graph.Graph' if the nodes are uniquely -- labeled.
230
true
true
1
8
79
81
39
42
null
null
keithodulaigh/Hets
CASL_DL/PredefinedCASLAxioms.hs
gpl-2.0
predefSign :: CASLSign predefSign = predefinedSign ()
53
predefSign :: CASLSign predefSign = predefinedSign ()
53
predefSign = predefinedSign ()
30
false
true
0
6
6
16
8
8
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Alert.hs
gpl-2.0
parseSourceLine :: String -> State SyntaxState SourceLine parseSourceLine = mkParseSourceLine (parseExpression Nothing)
119
parseSourceLine :: String -> State SyntaxState SourceLine parseSourceLine = mkParseSourceLine (parseExpression Nothing)
119
parseSourceLine = mkParseSourceLine (parseExpression Nothing)
61
false
true
0
7
11
29
14
15
null
null
wavewave/ttbar
lib/HEP/Physics/TTBar/Cuts.hs
gpl-3.0
cut_morethanzero_bjet :: PhyEventClassified -> Bool cut_morethanzero_bjet p = numbjet_PGS p >= 1
98
cut_morethanzero_bjet :: PhyEventClassified -> Bool cut_morethanzero_bjet p = numbjet_PGS p >= 1
98
cut_morethanzero_bjet p = numbjet_PGS p >= 1
46
false
true
0
6
13
25
12
13
null
null
lindenbaum/mediabus
src/Data/MediaBus/Media/SyncStream.hs
bsd-3-clause
setSequenceNumberAndTimestamp (MkStream (Start (MkFrameCtx i _t _s p))) (nextS, nextT) = (MkStream (Start (MkFrameCtx i nextT nextS p)), (nextS, nextT))
154
setSequenceNumberAndTimestamp (MkStream (Start (MkFrameCtx i _t _s p))) (nextS, nextT) = (MkStream (Start (MkFrameCtx i nextT nextS p)), (nextS, nextT))
154
setSequenceNumberAndTimestamp (MkStream (Start (MkFrameCtx i _t _s p))) (nextS, nextT) = (MkStream (Start (MkFrameCtx i nextT nextS p)), (nextS, nextT))
154
false
false
0
11
21
74
39
35
null
null
jwiegley/hnix
src/Nix/XML.hs
bsd-3-clause
paramsXML :: Params r -> [Content] paramsXML (Param name) = [Elem $ mkElem "varpat" "name" (Text.unpack name)]
110
paramsXML :: Params r -> [Content] paramsXML (Param name) = [Elem $ mkElem "varpat" "name" (Text.unpack name)]
110
paramsXML (Param name) = [Elem $ mkElem "varpat" "name" (Text.unpack name)]
75
false
true
0
11
16
58
27
31
null
null
brendanhay/gogol
gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs
mpl-2.0
-- | The word corresponding to this set of information. gcvvwicWord :: Lens' GoogleCloudVideointelligenceV1p2beta1_WordInfo (Maybe Text) gcvvwicWord = lens _gcvvwicWord (\ s a -> s{_gcvvwicWord = a})
201
gcvvwicWord :: Lens' GoogleCloudVideointelligenceV1p2beta1_WordInfo (Maybe Text) gcvvwicWord = lens _gcvvwicWord (\ s a -> s{_gcvvwicWord = a})
145
gcvvwicWord = lens _gcvvwicWord (\ s a -> s{_gcvvwicWord = a})
64
true
true
0
9
28
48
25
23
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Init/Licenses.hs
bsd-3-clause
apache20 :: License apache20 = unlines [ "" , " Apache License" , " Version 2.0, January 2004" , " http://www.apache.org/licenses/" , "" , " TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION" , "" ...
13,058
apache20 :: License apache20 = unlines [ "" , " Apache License" , " Version 2.0, January 2004" , " http://www.apache.org/licenses/" , "" , " TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION" , "" ...
13,058
apache20 = unlines [ "" , " Apache License" , " Version 2.0, January 2004" , " http://www.apache.org/licenses/" , "" , " TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION" , "" , " 1. Definiti...
13,038
false
true
0
6
3,737
620
411
209
null
null
lukexi/ghc-7.8-arm64
compiler/main/HscMain.hs
bsd-3-clause
ioMsgMaybe' :: IO (Messages, Maybe a) -> Hsc (Maybe a) ioMsgMaybe' ioA = do ((warns,_errs), mb_r) <- liftIO $ ioA logWarnings warns return mb_r -- ----------------------------------------------------------------------------- -- | Lookup things in the compiler's environment #ifdef GHCI
299
ioMsgMaybe' :: IO (Messages, Maybe a) -> Hsc (Maybe a) ioMsgMaybe' ioA = do ((warns,_errs), mb_r) <- liftIO $ ioA logWarnings warns return mb_r -- ----------------------------------------------------------------------------- -- | Lookup things in the compiler's environment #ifdef GHCI
299
ioMsgMaybe' ioA = do ((warns,_errs), mb_r) <- liftIO $ ioA logWarnings warns return mb_r -- ----------------------------------------------------------------------------- -- | Lookup things in the compiler's environment #ifdef GHCI
244
false
true
0
9
49
77
39
38
null
null
lowasser/TrieMap
Data/TrieMap/Utils.hs
bsd-3-clause
toVectorF :: (Vector v b, Data.Foldable.Foldable f) => (a -> b) -> (f a -> Int) -> f a -> v b toVectorF g = toVectorN (\ f -> Data.Foldable.foldr (f . g))
154
toVectorF :: (Vector v b, Data.Foldable.Foldable f) => (a -> b) -> (f a -> Int) -> f a -> v b toVectorF g = toVectorN (\ f -> Data.Foldable.foldr (f . g))
154
toVectorF g = toVectorN (\ f -> Data.Foldable.foldr (f . g))
60
false
true
0
11
32
98
49
49
null
null
Booster2/Booster2
Workflow_Precond/impl_nondisjoint/UMap.hs
bsd-3-clause
-- How many entries does the map have? size :: UMap k v -> Int size (UMap xs) = length xs
89
size :: UMap k v -> Int size (UMap xs) = length xs
50
size (UMap xs) = length xs
26
true
true
0
7
20
33
16
17
null
null
sdiehl/ghc
compiler/basicTypes/Var.hs
bsd-3-clause
isTyVarBinder :: TyCoVarBinder -> Bool isTyVarBinder (Bndr v _) = isTyVar v
75
isTyVarBinder :: TyCoVarBinder -> Bool isTyVarBinder (Bndr v _) = isTyVar v
75
isTyVarBinder (Bndr v _) = isTyVar v
36
false
true
0
7
11
29
14
15
null
null
geophf/1HaskellADay
exercises/HAD/Y2021/M03/D29/Solution.hs
mit
fullStop = "."
14
fullStop = "."
14
fullStop = "."
14
false
false
0
4
2
6
3
3
null
null
brendanhay/gogol
gogol-cloudidentity/gen/Network/Google/Resource/CloudIdentity/Groups/Memberships/SearchTransitiveGroups.hs
mpl-2.0
-- | Required. A CEL expression that MUST include member specification AND -- label(s). This is a \`required\` field. Users can search on label -- attributes of groups. CONTAINS match (\'in\') is supported on labels. -- Identity-mapped groups are uniquely identified by both a -- \`member_key_id\` and a \`member_key_nam...
611
gmstgQuery :: Lens' GroupsMembershipsSearchTransitiveGroups (Maybe Text) gmstgQuery = lens _gmstgQuery (\ s a -> s{_gmstgQuery = a})
134
gmstgQuery = lens _gmstgQuery (\ s a -> s{_gmstgQuery = a})
61
true
true
0
9
84
54
31
23
null
null
OttoAllmendinger/haskoin-script
testsuite/Units.hs
unlicense
testCanonicalSig5 = assertBool "Canonical Sig5" $ isCanonicalSig $ fromJust $ hexToBS $ stringToBS "3046022100876045be6f9eca28ff1ec606b833d0b87e70b2a630f5e3a496b110967a40f90a0221008fffd599910eefe00bc803c688c2eca1d2ba7f6b180620eaa03488e6585db6ba01"
257
testCanonicalSig5 = assertBool "Canonical Sig5" $ isCanonicalSig $ fromJust $ hexToBS $ stringToBS "3046022100876045be6f9eca28ff1ec606b833d0b87e70b2a630f5e3a496b110967a40f90a0221008fffd599910eefe00bc803c688c2eca1d2ba7f6b180620eaa03488e6585db6ba01"
257
testCanonicalSig5 = assertBool "Canonical Sig5" $ isCanonicalSig $ fromJust $ hexToBS $ stringToBS "3046022100876045be6f9eca28ff1ec606b833d0b87e70b2a630f5e3a496b110967a40f90a0221008fffd599910eefe00bc803c688c2eca1d2ba7f6b180620eaa03488e6585db6ba01"
257
false
false
0
9
23
28
13
15
null
null
ben-schulz/Idris-dev
src/Idris/Error.hs
bsd-3-clause
warnDisamb ist (PNoImplicits tm) = warnDisamb ist tm
52
warnDisamb ist (PNoImplicits tm) = warnDisamb ist tm
52
warnDisamb ist (PNoImplicits tm) = warnDisamb ist tm
52
false
false
0
7
7
22
10
12
null
null
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SugarScape/Run.hs
gpl-3.0
winTitle = "SugarScape"
23
winTitle = "SugarScape"
23
winTitle = "SugarScape"
23
false
false
0
4
2
6
3
3
null
null
marcellussiegburg/autotool
collection/src/Fun/Tiered/Untie.hs
gpl-2.0
tracked f action = do inform $ text "computer tieder type for" </> toDoc f t <- nested 2 action inform $ text "tiered type is" </> toDoc t return t
163
tracked f action = do inform $ text "computer tieder type for" </> toDoc f t <- nested 2 action inform $ text "tiered type is" </> toDoc t return t
163
tracked f action = do inform $ text "computer tieder type for" </> toDoc f t <- nested 2 action inform $ text "tiered type is" </> toDoc t return t
163
false
false
1
10
46
68
26
42
null
null
fpco/hlint
src/HSE/Util.hs
bsd-3-clause
replaceBranches x = ([], \[] -> x)
34
replaceBranches x = ([], \[] -> x)
34
replaceBranches x = ([], \[] -> x)
34
false
false
1
8
6
28
13
15
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
{- - Returns whether all of the resource harvesters on the vessel are deployed, - and sets the deployment state of all resource harvesters. - See <see cref="M:SpaceCenter.ResourceHarvester.Deployed" />. -} getControlResourceHarvesters :: KRPCHS.SpaceCenter.Control -> RPCContext (Bool) getControlResourceHarvesters t...
476
getControlResourceHarvesters :: KRPCHS.SpaceCenter.Control -> RPCContext (Bool) getControlResourceHarvesters thisArg = do let r = makeRequest "SpaceCenter" "Control_get_ResourceHarvesters" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
266
getControlResourceHarvesters thisArg = do let r = makeRequest "SpaceCenter" "Control_get_ResourceHarvesters" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
186
true
true
0
13
70
72
33
39
null
null
alisdair/H99P
src/Lists.hs
mit
length :: [a] -> Int length [] = 0
34
length :: [a] -> Int length [] = 0
34
length [] = 0
13
false
true
0
6
8
27
13
14
null
null
deech/stack
src/Stack/Ghci.hs
bsd-3-clause
wantedPackageComponents :: BuildOpts -> SimpleTarget -> Package -> Set NamedComponent wantedPackageComponents _ (STLocalComps cs) _ = cs
136
wantedPackageComponents :: BuildOpts -> SimpleTarget -> Package -> Set NamedComponent wantedPackageComponents _ (STLocalComps cs) _ = cs
136
wantedPackageComponents _ (STLocalComps cs) _ = cs
50
false
true
0
8
16
39
19
20
null
null
Erdwolf/autotool-bonn
src/Codec/Encryption/MD5Aux.hs
gpl-2.0
string_to_word32s ss = this:string_to_word32s ss' where (s, ss') = splitAt 4 ss this = foldr (\c w -> shiftL w 8 + (fromIntegral.ord) c) 0 s -- | Used to convert a list of 512 bools to 16 32bit words
209
string_to_word32s ss = this:string_to_word32s ss' where (s, ss') = splitAt 4 ss this = foldr (\c w -> shiftL w 8 + (fromIntegral.ord) c) 0 s -- | Used to convert a list of 512 bools to 16 32bit words
209
string_to_word32s ss = this:string_to_word32s ss' where (s, ss') = splitAt 4 ss this = foldr (\c w -> shiftL w 8 + (fromIntegral.ord) c) 0 s -- | Used to convert a list of 512 bools to 16 32bit words
209
false
false
1
11
49
75
38
37
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Objectivec.hs
gpl-2.0
withAttribute attr txt = do when (null txt) $ fail "Parser matched no text" updateState $ \st -> st { synStPrevChar = last txt , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) } return (attr, txt)
247
withAttribute attr txt = do when (null txt) $ fail "Parser matched no text" updateState $ \st -> st { synStPrevChar = last txt , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) } return (attr, txt)
247
withAttribute attr txt = do when (null txt) $ fail "Parser matched no text" updateState $ \st -> st { synStPrevChar = last txt , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) } return (attr, txt)
247
false
false
1
15
69
94
43
51
null
null
froozen/kademlia
test/Test.hs
bsd-3-clause
protocolChecks = testGroup "Network.Kademlia.Protocol" [ QC.testProperty "Protocol Serializing and Parsing works" parseCheck , QC.testProperty "Protocol messages are within the max UDP packet size" lengthCheck ]
243
protocolChecks = testGroup "Network.Kademlia.Protocol" [ QC.testProperty "Protocol Serializing and Parsing works" parseCheck , QC.testProperty "Protocol messages are within the max UDP packet size" lengthCheck ]
243
protocolChecks = testGroup "Network.Kademlia.Protocol" [ QC.testProperty "Protocol Serializing and Parsing works" parseCheck , QC.testProperty "Protocol messages are within the max UDP packet size" lengthCheck ]
243
false
false
0
8
56
31
15
16
null
null
Zoetermeer/latro
app/Main.hs
mit
parseBuf :: [Opt] -> SourceBuf -> GenericCompilerPass HumanReadable CompilerEnv (RawAst CompUnit) parseBuf opts buf = withExceptT (renderOutput opts) $ ExceptT . return $ syntaxRule path source where (path, source, syntaxRule) = case buf of SourceBufFile path source -> (path, source, parseTopLevel) ...
389
parseBuf :: [Opt] -> SourceBuf -> GenericCompilerPass HumanReadable CompilerEnv (RawAst CompUnit) parseBuf opts buf = withExceptT (renderOutput opts) $ ExceptT . return $ syntaxRule path source where (path, source, syntaxRule) = case buf of SourceBufFile path source -> (path, source, parseTopLevel) ...
389
parseBuf opts buf = withExceptT (renderOutput opts) $ ExceptT . return $ syntaxRule path source where (path, source, syntaxRule) = case buf of SourceBufFile path source -> (path, source, parseTopLevel) SourceBufRepl source -> ("<<repl>>", source, parseInteractive)
291
false
true
0
10
73
125
65
60
null
null
vrom911/Compiler
src/Compiler/Rum/Interpreter/Rummer.hs
mit
eval LogicOper{..} = do Number left <- eval l Number right <- eval r pure $ Number (logicOp lop left right)
119
eval LogicOper{..} = do Number left <- eval l Number right <- eval r pure $ Number (logicOp lop left right)
119
eval LogicOper{..} = do Number left <- eval l Number right <- eval r pure $ Number (logicOp lop left right)
119
false
false
0
10
32
61
26
35
null
null
forste/haReFork
refactorer/RefacAsPatterns.hs
bsd-3-clause
allDefined e t = applyTU (full_tdTU (constTU [] `adhocTU` inPNT)) e where inPNT (p@(PNT pname ty _)::PNT) = return [findPN pname t]
159
allDefined e t = applyTU (full_tdTU (constTU [] `adhocTU` inPNT)) e where inPNT (p@(PNT pname ty _)::PNT) = return [findPN pname t]
159
allDefined e t = applyTU (full_tdTU (constTU [] `adhocTU` inPNT)) e where inPNT (p@(PNT pname ty _)::PNT) = return [findPN pname t]
159
false
false
0
11
49
77
39
38
null
null
Persi/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkConditionalAndOrs _ (TC_Or id SingleBracket "||" _ _) = err id 2109 "You can't use || inside [..]. Use -o instead."
124
checkConditionalAndOrs _ (TC_Or id SingleBracket "||" _ _) = err id 2109 "You can't use || inside [..]. Use -o instead."
124
checkConditionalAndOrs _ (TC_Or id SingleBracket "||" _ _) = err id 2109 "You can't use || inside [..]. Use -o instead."
124
false
false
0
7
24
32
15
17
null
null
olsner/ghc
compiler/utils/ListSetOps.hs
bsd-3-clause
runs :: (a -> a -> Bool) -- Equality -> [a] -> [[a]] runs _ [] = []
82
runs :: (a -> a -> Bool) -- Equality -> [a] -> [[a]] runs _ [] = []
81
runs _ [] = []
18
false
true
0
10
32
55
28
27
null
null
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | The channel type of the order: \"purchaseOnGoogle\" or -- \"googleExpress\". ooChannelType :: Lens' Order (Maybe Text) ooChannelType = lens _ooChannelType (\ s a -> s{_ooChannelType = a})
200
ooChannelType :: Lens' Order (Maybe Text) ooChannelType = lens _ooChannelType (\ s a -> s{_ooChannelType = a})
118
ooChannelType = lens _ooChannelType (\ s a -> s{_ooChannelType = a})
76
true
true
0
8
36
50
26
24
null
null
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/Man.hs
gpl-2.0
inlineToMan opts (Superscript lst) = do contents <- inlineListToMan opts lst return $ char '^' <> contents <> char '^'
122
inlineToMan opts (Superscript lst) = do contents <- inlineListToMan opts lst return $ char '^' <> contents <> char '^'
122
inlineToMan opts (Superscript lst) = do contents <- inlineListToMan opts lst return $ char '^' <> contents <> char '^'
122
false
false
0
10
23
52
22
30
null
null
fpco/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
getInstalledPackages :: Verbosity -> PackageDBStack -> ProgramConfiguration -> IO PackageIndex getInstalledPackages verbosity packagedbs conf = do checkPackageDbEnvVar checkPackageDbStack packagedbs pkgss <- getInstalledPackages' verbosity packagedbs conf index <- toPackageIndex verbosity p...
880
getInstalledPackages :: Verbosity -> PackageDBStack -> ProgramConfiguration -> IO PackageIndex getInstalledPackages verbosity packagedbs conf = do checkPackageDbEnvVar checkPackageDbStack packagedbs pkgss <- getInstalledPackages' verbosity packagedbs conf index <- toPackageIndex verbosity p...
880
getInstalledPackages verbosity packagedbs conf = do checkPackageDbEnvVar checkPackageDbStack packagedbs pkgss <- getInstalledPackages' verbosity packagedbs conf index <- toPackageIndex verbosity pkgss conf return $! hackRtsPackage index where hackRtsPackage index = case PackageIndex.lookupPackage...
764
false
true
0
10
186
149
73
76
null
null
k-bx/riak-haskell-client
src/Network/Riak/Content.hs
apache-2.0
-- | Content encoded as @application/octet-stream@. binary :: L.ByteString -> Content binary bs = empty { value = bs , content_type = Just "application/octet-stream" }
203
binary :: L.ByteString -> Content binary bs = empty { value = bs , content_type = Just "application/octet-stream" }
151
binary bs = empty { value = bs , content_type = Just "application/octet-stream" }
117
true
true
0
8
60
44
22
22
null
null
yiannist/ganeti
src/Ganeti/UDSServer.hs
bsd-2-clause
pipeClient :: ConnectConfig -> IO (Client, Client) pipeClient conf = let newClient r w = do rf <- newIORef B.empty rh <- fdToHandle r wh <- fdToHandle w return Client { rsocket = rh, wsocket = wh , rbuf = rf, clientConfig = conf } in do (r1, w1) <- createPip...
428
pipeClient :: ConnectConfig -> IO (Client, Client) pipeClient conf = let newClient r w = do rf <- newIORef B.empty rh <- fdToHandle r wh <- fdToHandle w return Client { rsocket = rh, wsocket = wh , rbuf = rf, clientConfig = conf } in do (r1, w1) <- createPip...
428
pipeClient conf = let newClient r w = do rf <- newIORef B.empty rh <- fdToHandle r wh <- fdToHandle w return Client { rsocket = rh, wsocket = wh , rbuf = rf, clientConfig = conf } in do (r1, w1) <- createPipe (r2, w2) <- createPipe (,) <$> newClient ...
377
false
true
0
13
140
158
79
79
null
null
romanb/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/DeleteItem.hs
mpl-2.0
-- | 'DeleteItemResponse' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dirAttributes' @::@ 'HashMap' 'Text' 'AttributeValue' -- -- * 'dirConsumedCapacity' @::@ 'Maybe' 'ConsumedCapacity' -- -- * 'dirItemCollectionMetrics' @::@ 'Maybe' 'ItemCollectionMetrics' -- deleteItemResponse ...
512
deleteItemResponse :: DeleteItemResponse deleteItemResponse = DeleteItemResponse { _dirAttributes = mempty , _dirConsumedCapacity = Nothing , _dirItemCollectionMetrics = Nothing }
211
deleteItemResponse = DeleteItemResponse { _dirAttributes = mempty , _dirConsumedCapacity = Nothing , _dirItemCollectionMetrics = Nothing }
170
true
true
0
7
86
45
30
15
null
null
ku-fpg/scotty-crud
src/Web/Scotty/CRUD/SQL.hs
bsd-3-clause
sqlWhere :: Text -> (SortKey -> Bool) -> Table Row -> Table Row sqlWhere nm op tab = liftTable (filter f) tab where f row = case HashMap.lookup nm row of Just value -> op (SortKey value) Nothing -> False -----------------------------------------------------------------------------...
327
sqlWhere :: Text -> (SortKey -> Bool) -> Table Row -> Table Row sqlWhere nm op tab = liftTable (filter f) tab where f row = case HashMap.lookup nm row of Just value -> op (SortKey value) Nothing -> False -----------------------------------------------------------------------------...
327
sqlWhere nm op tab = liftTable (filter f) tab where f row = case HashMap.lookup nm row of Just value -> op (SortKey value) Nothing -> False ------------------------------------------------------------------------------------
263
false
true
1
10
79
110
49
61
null
null
ayberkt/Eva
src/Eval.hs
mit
eval :: LispVal -> LispVal eval val@(String _) = val
52
eval :: LispVal -> LispVal eval val@(String _) = val
52
eval val@(String _) = val
25
false
true
0
8
9
27
14
13
null
null
pgj/bead
src/Bead/Persistence/Relations.hs
bsd-3-clause
-- Returns all the submissions of the users for the groups that the -- user administrates submissionTables :: Username -> Persist [SubmissionTableInfo] submissionTables u = do groupKeys <- map fst <$> administratedGroups u groupTables <- mapM (groupSubmissionTableInfo) groupKeys return groupTables
305
submissionTables :: Username -> Persist [SubmissionTableInfo] submissionTables u = do groupKeys <- map fst <$> administratedGroups u groupTables <- mapM (groupSubmissionTableInfo) groupKeys return groupTables
215
submissionTables u = do groupKeys <- map fst <$> administratedGroups u groupTables <- mapM (groupSubmissionTableInfo) groupKeys return groupTables
153
true
true
0
9
46
64
30
34
null
null
mettekou/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
gtResult OrdLT = false_Expr
32
gtResult OrdLT = false_Expr
32
gtResult OrdLT = false_Expr
32
false
false
0
5
8
9
4
5
null
null
KarimxD/Evolverbetert
src/Parsing.hs
mit
maybeAppend :: Maybe a -> Maybe [a] -> Maybe [a] maybeAppend (Just x) (Just xs) = Just $ x : xs
95
maybeAppend :: Maybe a -> Maybe [a] -> Maybe [a] maybeAppend (Just x) (Just xs) = Just $ x : xs
95
maybeAppend (Just x) (Just xs) = Just $ x : xs
46
false
true
0
8
20
59
29
30
null
null
joashc/cryptodiner
network/DcServerIO.hs
gpl-3.0
listenForMessage (Just s) = liftIO fetch where fetch = do (handle, addr, portNum) <- accept s putStrLn $ show addr ++ " : " ++ show portNum ++ " connected." c <- hGetContents handle; case decodeServerMessage c of Left e -> putStrLn ("Error parsing message: " ++ e) >> fetch ...
340
listenForMessage (Just s) = liftIO fetch where fetch = do (handle, addr, portNum) <- accept s putStrLn $ show addr ++ " : " ++ show portNum ++ " connected." c <- hGetContents handle; case decodeServerMessage c of Left e -> putStrLn ("Error parsing message: " ++ e) >> fetch ...
340
listenForMessage (Just s) = liftIO fetch where fetch = do (handle, addr, portNum) <- accept s putStrLn $ show addr ++ " : " ++ show portNum ++ " connected." c <- hGetContents handle; case decodeServerMessage c of Left e -> putStrLn ("Error parsing message: " ++ e) >> fetch ...
340
false
false
0
13
101
126
58
68
null
null
barrucadu/cabal-info
cabal-info/Fields.hs
mit
getFlagField "name" = flagName'
31
getFlagField "name" = flagName'
31
getFlagField "name" = flagName'
31
false
false
0
4
3
10
4
6
null
null
ocean0yohsuke/Scheme
src/Scheme/Action/Command.hs
bsd-3-clause
-------------------------------------------------- -- Error -------------------------------------------------- throwEvalError :: EvalError -> Scm a throwEvalError err = do msp <- askMSP throwScmError $ EVALErr msp err
226
throwEvalError :: EvalError -> Scm a throwEvalError err = do msp <- askMSP throwScmError $ EVALErr msp err
114
throwEvalError err = do msp <- askMSP throwScmError $ EVALErr msp err
77
true
true
0
9
30
48
22
26
null
null
sandrolovnicki/lambda-calculus-interpreter
src/Helper.hs
mit
manualReduce :: Environment -> EvaluateOption -> Expression -> Int -> InputT IO () manualReduce env evop exp num = outputStrLn (boldMagenta ("#" <> show num <> ":") <> convertToNames False False (Variable (LambdaVar '.' 0)) env exp) >> ( getInputLine (boldYellow "Next step?" <> " [Y/n/f] (f: finish all remaining ...
676
manualReduce :: Environment -> EvaluateOption -> Expression -> Int -> InputT IO () manualReduce env evop exp num = outputStrLn (boldMagenta ("#" <> show num <> ":") <> convertToNames False False (Variable (LambdaVar '.' 0)) env exp) >> ( getInputLine (boldYellow "Next step?" <> " [Y/n/f] (f: finish all remaining ...
676
manualReduce env evop exp num = outputStrLn (boldMagenta ("#" <> show num <> ":") <> convertToNames False False (Variable (LambdaVar '.' 0)) env exp) >> ( getInputLine (boldYellow "Next step?" <> " [Y/n/f] (f: finish all remaining steps): ") >>= \case Just "n" -> outputStrLn $ showSummary ...
593
false
true
2
14
205
220
103
117
null
null
Undeterminant/config-home-gui
home/.xmonad/xmonad.hs
cc0-1.0
myKeySE4 QWERTY = xK_period
31
myKeySE4 QWERTY = xK_period
31
myKeySE4 QWERTY = xK_period
31
false
false
0
5
7
9
4
5
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
sappendName = varQual dATA_SEMIGROUP (fsLit "<>") sappendClassOpKey
81
sappendName = varQual dATA_SEMIGROUP (fsLit "<>") sappendClassOpKey
81
sappendName = varQual dATA_SEMIGROUP (fsLit "<>") sappendClassOpKey
81
false
false
0
7
20
19
9
10
null
null
FranklinChen/music-score
sketch/old/update/update4.hs
bsd-3-clause
y :: PitchT Float (Int, Bool) y = fmap swap $ mapPitch (int2float) x
68
y :: PitchT Float (Int, Bool) y = fmap swap $ mapPitch (int2float) x
68
y = fmap swap $ mapPitch (int2float) x
38
false
true
2
7
13
43
20
23
null
null
thchittenden/GeoChat
src/Chat/Types.hs
mit
getUsers :: ChatRoom -> IO [ChatUser] getUsers room = do sessions <- atomically $ readTMVar (sessions room) return . map getUser . Map.elems $ sessions
159
getUsers :: ChatRoom -> IO [ChatUser] getUsers room = do sessions <- atomically $ readTMVar (sessions room) return . map getUser . Map.elems $ sessions
159
getUsers room = do sessions <- atomically $ readTMVar (sessions room) return . map getUser . Map.elems $ sessions
121
false
true
0
11
32
69
31
38
null
null
hijarian/AFCALC
program/src/Model/CorrectionFunctionCoefficients.hs
cc0-1.0
theta3' param = theta3 (n_theta param) (qpar (tau param))
57
theta3' param = theta3 (n_theta param) (qpar (tau param))
57
theta3' param = theta3 (n_theta param) (qpar (tau param))
57
false
false
0
9
8
32
15
17
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/Id.hs
bsd-3-clause
isDFunId id = case Var.idDetails id of DFunId {} -> True _ -> False
123
isDFunId id = case Var.idDetails id of DFunId {} -> True _ -> False
123
isDFunId id = case Var.idDetails id of DFunId {} -> True _ -> False
123
false
false
1
8
69
38
16
22
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F20.hs
bsd-3-clause
-- glProgramLocalParameterI4uivNV ---------------------------------------------- glProgramLocalParameterI4uivNV :: MonadIO m => GLenum -- ^ @target@ of type [ProgramTarget](Graphics-GL-Groups.html#ProgramTarget). -> GLuint -- ^ @index@. -> Ptr GLuint -- ^ @params@ pointing to @4@ elements of type @GLuint@. -...
428
glProgramLocalParameterI4uivNV :: MonadIO m => GLenum -- ^ @target@ of type [ProgramTarget](Graphics-GL-Groups.html#ProgramTarget). -> GLuint -- ^ @index@. -> Ptr GLuint -- ^ @params@ pointing to @4@ elements of type @GLuint@. -> m () glProgramLocalParameterI4uivNV v1 v2 v3 = liftIO $ dyn221 ptr_glProgramLoca...
346
glProgramLocalParameterI4uivNV v1 v2 v3 = liftIO $ dyn221 ptr_glProgramLocalParameterI4uivNV v1 v2 v3
101
true
true
0
11
58
66
32
34
null
null
matthewbauer/eu4-parser
Generator.hs
gpl-3.0
genmapS :: [ClausewitzText.Value] -> Map String String genmapS = foldr' (union . genmap') empty where genmap' (ClausewitzText.Assignment n (ClausewitzText.List b)) = each n b genmap' _ = empty each n = foldr' (union . each' n) empty each' n (ClausewitzText.String b) = singleton b n each' _ _ = emp...
322
genmapS :: [ClausewitzText.Value] -> Map String String genmapS = foldr' (union . genmap') empty where genmap' (ClausewitzText.Assignment n (ClausewitzText.List b)) = each n b genmap' _ = empty each n = foldr' (union . each' n) empty each' n (ClausewitzText.String b) = singleton b n each' _ _ = emp...
322
genmapS = foldr' (union . genmap') empty where genmap' (ClausewitzText.Assignment n (ClausewitzText.List b)) = each n b genmap' _ = empty each n = foldr' (union . each' n) empty each' n (ClausewitzText.String b) = singleton b n each' _ _ = empty
267
false
true
4
10
71
132
66
66
null
null
agocorona/haste-perch
Haste/Perch.hs
gpl-3.0
map cont = nelem "map" `child` cont
36
map cont = nelem "map" `child` cont
36
map cont = nelem "map" `child` cont
36
false
false
0
6
7
18
9
9
null
null
RobinKrom/interactive-brokers
library/API/IB/Constant.hs
bsd-3-clause
ibTimeZoneMap :: Map String String ibTimeZoneMap = Map.fromList [ ("Eastern Standard Time (Victoria)","Australia/Melbourne") , ("Eastern Standard Time (Queensland)","Australia/Brisbane") ]
194
ibTimeZoneMap :: Map String String ibTimeZoneMap = Map.fromList [ ("Eastern Standard Time (Victoria)","Australia/Melbourne") , ("Eastern Standard Time (Queensland)","Australia/Brisbane") ]
194
ibTimeZoneMap = Map.fromList [ ("Eastern Standard Time (Victoria)","Australia/Melbourne") , ("Eastern Standard Time (Queensland)","Australia/Brisbane") ]
159
false
true
0
6
24
39
22
17
null
null
lukexi/ghc-7.8-arm64
compiler/utils/Encoding.hs
bsd-3-clause
encode_ch '\'' = "zq"
21
encode_ch '\'' = "zq"
21
encode_ch '\'' = "zq"
21
false
false
0
5
3
9
4
5
null
null
dblia/nosql-ganeti
test/hs/Test/Ganeti/Block/Drbd/Types.hs
gpl-2.0
prop_PerfIndicators :: Property prop_PerfIndicators = do ns <- natural nr <- natural dw <- natural dr <- natural al <- natural bm <- natural lc <- natural pe <- natural ua <- natural ap <- natural ep <- genMaybe natural wo <- genMaybe wOrderFlag oos <- genMaybe natural let expected = ...
1,125
prop_PerfIndicators :: Property prop_PerfIndicators = do ns <- natural nr <- natural dw <- natural dr <- natural al <- natural bm <- natural lc <- natural pe <- natural ua <- natural ap <- natural ep <- genMaybe natural wo <- genMaybe wOrderFlag oos <- genMaybe natural let expected = ...
1,125
prop_PerfIndicators = do ns <- natural nr <- natural dw <- natural dr <- natural al <- natural bm <- natural lc <- natural pe <- natural ua <- natural ap <- natural ep <- genMaybe natural wo <- genMaybe wOrderFlag oos <- genMaybe natural let expected = showJSON $ PerfIndica...
1,093
false
true
0
14
349
341
167
174
null
null
anton-dessiatov/stack
src/Stack/Build/Cache.hs
bsd-3-clause
writePrecompiledCache :: HasEnvConfig env => BaseConfigOpts -> PackageLocationIndex FilePath -> ConfigureOpts -> Set GhcPkgId -- ^ dependencies -> Installed -- ^ library -> Set Text -- ^ e...
1,410
writePrecompiledCache :: HasEnvConfig env => BaseConfigOpts -> PackageLocationIndex FilePath -> ConfigureOpts -> Set GhcPkgId -- ^ dependencies -> Installed -- ^ library -> Set Text -- ^ e...
1,410
writePrecompiledCache baseConfigOpts loc copts depIDs mghcPkgId exes = do mfile <- precompiledCacheFile loc copts depIDs forM_ mfile $ \file -> do ensureDir (parent file) ec <- view envConfigL let stackRootRelative = makeRelative (view stackRootL ec) mlibpath <- case mghcPkgId of ...
1,043
false
true
0
21
472
340
157
183
null
null
beni55/hermit
examples/fib-tuple/Fib.hs
bsd-2-clause
(S n') + n = S (n' + n)
23
(S n') + n = S (n' + n)
23
(S n') + n = S (n' + n)
23
false
false
0
7
8
28
13
15
null
null
beni55/haste-compiler
libraries/ghc-7.10/base/GHC/Event/PSQ.hs
bsd-3-clause
t `unsafePlay` Void = t
25
t `unsafePlay` Void = t
25
t `unsafePlay` Void = t
25
false
false
0
5
6
18
8
10
null
null
fmapfmapfmap/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/Types/Product.hs
mpl-2.0
-- | The Amazon S3 bucket to store the access logs in, for example, -- myawslogbucket.s3.amazonaws.com. slcBucket :: Lens' StreamingLoggingConfig Text slcBucket = lens _slcBucket (\ s a -> s{_slcBucket = a})
207
slcBucket :: Lens' StreamingLoggingConfig Text slcBucket = lens _slcBucket (\ s a -> s{_slcBucket = a})
103
slcBucket = lens _slcBucket (\ s a -> s{_slcBucket = a})
56
true
true
0
9
31
41
23
18
null
null
DaMSL/K3
src/Language/K3/Analysis/Data/BindingEnv.hs
apache-2.0
push :: BindingStackEnv a -> Identifier -> a -> BindingStackEnv a push env x v = pushWith env (><) x (Seq.singleton v)
118
push :: BindingStackEnv a -> Identifier -> a -> BindingStackEnv a push env x v = pushWith env (><) x (Seq.singleton v)
118
push env x v = pushWith env (><) x (Seq.singleton v)
52
false
true
0
9
21
63
28
35
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/Docx.hs
gpl-2.0
makeHeaderAnchor' (Header n (_, classes, kvs) ils) = do hdrIDMap <- gets docxAnchorMap let newIdent = uniqueIdent ils (M.elems hdrIDMap) modify $ \s -> s {docxAnchorMap = M.insert newIdent newIdent hdrIDMap} return $ Header n (newIdent, classes, kvs) ils
272
makeHeaderAnchor' (Header n (_, classes, kvs) ils) = do hdrIDMap <- gets docxAnchorMap let newIdent = uniqueIdent ils (M.elems hdrIDMap) modify $ \s -> s {docxAnchorMap = M.insert newIdent newIdent hdrIDMap} return $ Header n (newIdent, classes, kvs) ils
272
makeHeaderAnchor' (Header n (_, classes, kvs) ils) = do hdrIDMap <- gets docxAnchorMap let newIdent = uniqueIdent ils (M.elems hdrIDMap) modify $ \s -> s {docxAnchorMap = M.insert newIdent newIdent hdrIDMap} return $ Header n (newIdent, classes, kvs) ils
272
false
false
0
13
56
112
56
56
null
null
igrep/igrep-cashbook
hs/convert-to-cashbook2.hs
mit
isSaraly :: String -> Bool isSaraly name = "給料" `isInfixOf` name || "財形貯蓄" `isInfixOf` name
93
isSaraly :: String -> Bool isSaraly name = "給料" `isInfixOf` name || "財形貯蓄" `isInfixOf` name
93
isSaraly name = "給料" `isInfixOf` name || "財形貯蓄" `isInfixOf` name
66
false
true
0
7
16
34
19
15
null
null
ExNexu/Idris-dev
src/Idris/ParseData.hs
bsd-3-clause
checkDSL :: DSL -> IdrisParser () checkDSL dsl = return ()
58
checkDSL :: DSL -> IdrisParser () checkDSL dsl = return ()
58
checkDSL dsl = return ()
24
false
true
0
7
10
28
13
15
null
null
TomMD/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprInfixExp _ = text "<<Non-variable/constructor in infix context>>"
75
pprInfixExp _ = text "<<Non-variable/constructor in infix context>>"
75
pprInfixExp _ = text "<<Non-variable/constructor in infix context>>"
75
false
false
0
4
14
13
5
8
null
null
zoomhub/zoomhub
vendor/servant/servant-server/src/Servant/Server/Internal/Router.hs
mit
-- | Interpret a router as an application. runRouter :: Router () -> RoutingApplication runRouter r = runRouterEnv r ()
119
runRouter :: Router () -> RoutingApplication runRouter r = runRouterEnv r ()
76
runRouter r = runRouterEnv r ()
31
true
true
0
7
19
31
15
16
null
null
TomMD/cryptol
sbv/Data/SBV/Bridge/CVC4.hs
bsd-3-clause
-- | Current solver instance, pointing to cvc4. sbvCurrentSolver :: SMTConfig sbvCurrentSolver = cvc4
101
sbvCurrentSolver :: SMTConfig sbvCurrentSolver = cvc4
53
sbvCurrentSolver = cvc4
23
true
true
0
4
13
12
7
5
null
null
dsj36/dropray
src/Core/Scene.hs
gpl-3.0
intersect :: Scene -> Ray -> Maybe Intersection intersect (Scene agg _ _ _) = P.intersect agg
93
intersect :: Scene -> Ray -> Maybe Intersection intersect (Scene agg _ _ _) = P.intersect agg
93
intersect (Scene agg _ _ _) = P.intersect agg
45
false
true
0
10
16
46
21
25
null
null
sjakobi/flo
src/Development/Flo.hs
bsd-3-clause
-- | Wrap a string up in a digraph. digraph :: String -> String digraph x = "digraph G {\n" ++ x ++ "\n}"
105
digraph :: String -> String digraph x = "digraph G {\n" ++ x ++ "\n}"
69
digraph x = "digraph G {\n" ++ x ++ "\n}"
41
true
true
0
7
23
33
15
18
null
null
b0oh/bander-api
src/Api.hs
isc
runApi :: Config -> ConnectionPool -> IO () runApi config pool = do port <- liftIO (require config "port") runSpock (read port) spock' where spock' = spock spockConfig api spockConfig = defaultSpockCfg Nothing (PCPool pool) ()
240
runApi :: Config -> ConnectionPool -> IO () runApi config pool = do port <- liftIO (require config "port") runSpock (read port) spock' where spock' = spock spockConfig api spockConfig = defaultSpockCfg Nothing (PCPool pool) ()
240
runApi config pool = do port <- liftIO (require config "port") runSpock (read port) spock' where spock' = spock spockConfig api spockConfig = defaultSpockCfg Nothing (PCPool pool) ()
196
false
true
1
10
49
101
45
56
null
null
vTurbine/ghc
compiler/utils/FastString.hs
bsd-3-clause
headFS (FastString _ _ bs _) = inlinePerformIO $ BS.unsafeUseAsCString bs $ \ptr -> return (fst (utf8DecodeChar (castPtr ptr)))
138
headFS (FastString _ _ bs _) = inlinePerformIO $ BS.unsafeUseAsCString bs $ \ptr -> return (fst (utf8DecodeChar (castPtr ptr)))
138
headFS (FastString _ _ bs _) = inlinePerformIO $ BS.unsafeUseAsCString bs $ \ptr -> return (fst (utf8DecodeChar (castPtr ptr)))
138
false
false
0
13
29
60
29
31
null
null
adinapoli/Shelly.hs
examples/Pipe/Log.hs
bsd-3-clause
makeLog = unlessM (test_f logFile) (touchfile logFile)
68
makeLog = unlessM (test_f logFile) (touchfile logFile)
68
makeLog = unlessM (test_f logFile) (touchfile logFile)
68
false
false
1
7
20
28
11
17
null
null
kmilner/tamarin-prover
lib/theory/src/Theory/Constraint/System.hs
gpl-3.0
-- Further accessors -------------------- -- | Label to access the free substitution of the equation store. sSubst :: System :-> LNSubst sSubst = eqsSubst . sEqStore
166
sSubst :: System :-> LNSubst sSubst = eqsSubst . sEqStore
57
sSubst = eqsSubst . sEqStore
28
true
true
1
7
26
30
14
16
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_ASM_IDENTIFIER :: Int wxSTC_ASM_IDENTIFIER = 5
52
wxSTC_ASM_IDENTIFIER :: Int wxSTC_ASM_IDENTIFIER = 5
52
wxSTC_ASM_IDENTIFIER = 5
24
false
true
0
6
5
18
7
11
null
null
akamaus/gcodec
src/CNC/Declarative.hs
bsd-3-clause
-- mirrors around the Y axis mirrorY :: Path -> Path mirrorY = mapPath (\(x :+ y) -> (negate x :+ y))
101
mirrorY :: Path -> Path mirrorY = mapPath (\(x :+ y) -> (negate x :+ y))
72
mirrorY = mapPath (\(x :+ y) -> (negate x :+ y))
48
true
true
0
10
21
44
24
20
null
null
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs
mpl-2.0
-- | The exact result count for this query. sResultCountExact :: Lens' SearchResponse (Maybe Int64) sResultCountExact = lens _sResultCountExact (\ s a -> s{_sResultCountExact = a}) . mapping _Coerce
212
sResultCountExact :: Lens' SearchResponse (Maybe Int64) sResultCountExact = lens _sResultCountExact (\ s a -> s{_sResultCountExact = a}) . mapping _Coerce
168
sResultCountExact = lens _sResultCountExact (\ s a -> s{_sResultCountExact = a}) . mapping _Coerce
112
true
true
2
8
42
59
28
31
null
null
tjakway/ghcjvm
libraries/base/GHC/Conc/Sync.hs
bsd-3-clause
setNumCapabilities :: Int -> IO () setNumCapabilities i = c_setNumCapabilities (fromIntegral i)
95
setNumCapabilities :: Int -> IO () setNumCapabilities i = c_setNumCapabilities (fromIntegral i)
95
setNumCapabilities i = c_setNumCapabilities (fromIntegral i)
60
false
true
0
7
11
32
15
17
null
null
passy/attic-schedule
src/Main.hs
bsd-3-clause
optionsParser :: Parser Options optionsParser = Options <$> optPath "dest" 'd' "Destination (has to equal mount point in my case)" <*> optPath "src" 's' "Source directory" <*> optText "name" 'n' "Base identifier name"
265
optionsParser :: Parser Options optionsParser = Options <$> optPath "dest" 'd' "Destination (has to equal mount point in my case)" <*> optPath "src" 's' "Source directory" <*> optText "name" 'n' "Base identifier name"
265
optionsParser = Options <$> optPath "dest" 'd' "Destination (has to equal mount point in my case)" <*> optPath "src" 's' "Source directory" <*> optText "name" 'n' "Base identifier name"
233
false
true
0
8
80
47
22
25
null
null
ZjMNZHgG5jMXw/smallcaps
src/smallcaps/Text/SmallCaps/LaTeXParser.hs
bsd-3-clause
anyMath :: Parser u LaTeXElement anyMath = satisfy isMath
57
anyMath :: Parser u LaTeXElement anyMath = satisfy isMath
57
anyMath = satisfy isMath
24
false
true
0
5
8
19
9
10
null
null
urbanslug/ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
dsEvTypeable :: EvTypeable -> DsM CoreExpr dsEvTypeable ev = do tyCl <- dsLookupTyCon typeableClassName typeRepTc <- dsLookupTyCon typeRepTyConName let tyRepType = mkTyConApp typeRepTc [] (ty, rep) <- case ev of EvTypeableTyCon tc ks -> do ctr <- dsLookupGloba...
4,550
dsEvTypeable :: EvTypeable -> DsM CoreExpr dsEvTypeable ev = do tyCl <- dsLookupTyCon typeableClassName typeRepTc <- dsLookupTyCon typeRepTyConName let tyRepType = mkTyConApp typeRepTc [] (ty, rep) <- case ev of EvTypeableTyCon tc ks -> do ctr <- dsLookupGloba...
4,550
dsEvTypeable ev = do tyCl <- dsLookupTyCon typeableClassName typeRepTc <- dsLookupTyCon typeRepTyConName let tyRepType = mkTyConApp typeRepTc [] (ty, rep) <- case ev of EvTypeableTyCon tc ks -> do ctr <- dsLookupGlobalId mkPolyTyConAppName mkTyC...
4,507
false
true
0
24
1,757
1,124
526
598
null
null
ftomassetti/hplatetectonics
src/Plate.hs
apache-2.0
platePoints plate = M.keys $ plateElevation plate
49
platePoints plate = M.keys $ plateElevation plate
49
platePoints plate = M.keys $ plateElevation plate
49
false
false
3
5
6
22
8
14
null
null
agrafix/rocksdb-haskell
src/Database/RocksDB/MonadResource.hs
bsd-3-clause
-- | Read a value by key get :: MonadResource m => DB -> ReadOptions -> ByteString -> m (Maybe ByteString) get = Base.get
121
get :: MonadResource m => DB -> ReadOptions -> ByteString -> m (Maybe ByteString) get = Base.get
96
get = Base.get
14
true
true
0
12
23
48
22
26
null
null
jefflasslett/argproc
Options.hs
mit
printArgs :: Options -> IO () printArgs opts = do case optOption opts of Just s -> putStrLn $ "Option: " ++ s _ -> putStrLn "Option not given" case optArgument opts of Just s -> putStrLn $ "Argument: " ++ s _ -> putStrLn "Argument not given"
286
printArgs :: Options -> IO () printArgs opts = do case optOption opts of Just s -> putStrLn $ "Option: " ++ s _ -> putStrLn "Option not given" case optArgument opts of Just s -> putStrLn $ "Argument: " ++ s _ -> putStrLn "Argument not given"
286
printArgs opts = do case optOption opts of Just s -> putStrLn $ "Option: " ++ s _ -> putStrLn "Option not given" case optArgument opts of Just s -> putStrLn $ "Argument: " ++ s _ -> putStrLn "Argument not given"
256
false
true
0
11
92
95
43
52
null
null
steve-chavez/postgrest
src/PostgREST/Query/Statements.hs
mit
standardRow :: HD.Row ResultsWithCount standardRow = (,,,,,) <$> nullableColumn HD.int8 <*> column HD.int8 <*> arrayColumn HD.bytea <*> column HD.bytea <*> (fromMaybe (Right []) <$> nullableColumn decodeGucHeaders) <*> (fromMaybe (Right Nothing) <$> null...
347
standardRow :: HD.Row ResultsWithCount standardRow = (,,,,,) <$> nullableColumn HD.int8 <*> column HD.int8 <*> arrayColumn HD.bytea <*> column HD.bytea <*> (fromMaybe (Right []) <$> nullableColumn decodeGucHeaders) <*> (fromMaybe (Right Nothing) <$> null...
347
standardRow = (,,,,,) <$> nullableColumn HD.int8 <*> column HD.int8 <*> arrayColumn HD.bytea <*> column HD.bytea <*> (fromMaybe (Right []) <$> nullableColumn decodeGucHeaders) <*> (fromMaybe (Right Nothing) <$> nullableColumn decodeGucStatus)
308
false
true
0
12
98
107
53
54
null
null
grwlf/vsim
src/VSim/Data/Loc.hs
gpl-3.0
unknownLoc = Loc Nothing 0 0 0 "<unknown>"
42
unknownLoc = Loc Nothing 0 0 0 "<unknown>"
42
unknownLoc = Loc Nothing 0 0 0 "<unknown>"
42
false
false
1
5
7
23
8
15
null
null
ublubu/shapes
shapes-demo/src/Physics/Draw/Linear.hs
mit
aftranslate33 :: (Num a) => V2 a -> M33 a aftranslate33 (V2 x y) = V3 (V3 1 0 x) (V3 0 1 y) (V3 0 0 1)
102
aftranslate33 :: (Num a) => V2 a -> M33 a aftranslate33 (V2 x y) = V3 (V3 1 0 x) (V3 0 1 y) (V3 0 0 1)
102
aftranslate33 (V2 x y) = V3 (V3 1 0 x) (V3 0 1 y) (V3 0 0 1)
60
false
true
0
7
27
78
38
40
null
null
blancas/trex
src/Shape.hs
mit
interactive :: IO () interactive = do contents <- LB.getContents printShape $ getShape contents -- | Shows the shape of CSV files as number of rows and columns.
169
interactive :: IO () interactive = do contents <- LB.getContents printShape $ getShape contents -- | Shows the shape of CSV files as number of rows and columns.
169
interactive = do contents <- LB.getContents printShape $ getShape contents -- | Shows the shape of CSV files as number of rows and columns.
148
false
true
0
8
36
36
17
19
null
null