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
alonho/bottle
src/Graphics/UI/Bottle/Widgets/TextEdit.hs
gpl-3.0
tillEndOfWord :: String -> String tillEndOfWord xs = spaces ++ nonSpaces where spaces = takeWhile isSpace xs nonSpaces = takeWhile (not . isSpace) . dropWhile isSpace $ xs
181
tillEndOfWord :: String -> String tillEndOfWord xs = spaces ++ nonSpaces where spaces = takeWhile isSpace xs nonSpaces = takeWhile (not . isSpace) . dropWhile isSpace $ xs
181
tillEndOfWord xs = spaces ++ nonSpaces where spaces = takeWhile isSpace xs nonSpaces = takeWhile (not . isSpace) . dropWhile isSpace $ xs
147
false
true
1
9
37
61
30
31
null
null
lfairy/hircine
bots/Utils.hs
apache-2.0
showCrateNameVersion :: Crate -> Text showCrateNameVersion p = crateName p <> " " <> crateVersion p
99
showCrateNameVersion :: Crate -> Text showCrateNameVersion p = crateName p <> " " <> crateVersion p
99
showCrateNameVersion p = crateName p <> " " <> crateVersion p
61
false
true
0
7
15
32
15
17
null
null
svoisen/HWordNet
NLP/WordNet/Util.hs
bsd-3-clause
openFileEx fp (BinaryMode md) = openBinaryFile fp md
52
openFileEx fp (BinaryMode md) = openBinaryFile fp md
52
openFileEx fp (BinaryMode md) = openBinaryFile fp md
52
false
false
0
6
7
24
10
14
null
null
phischu/fragnix
tests/packages/scotty/Network.HTTP.Types.Header.hs
bsd-3-clause
renderByteRangeBuilder (ByteRangeSuffix suffix) = Blaze.fromChar '-' `mappend` Blaze.fromShow suffix
100
renderByteRangeBuilder (ByteRangeSuffix suffix) = Blaze.fromChar '-' `mappend` Blaze.fromShow suffix
100
renderByteRangeBuilder (ByteRangeSuffix suffix) = Blaze.fromChar '-' `mappend` Blaze.fromShow suffix
100
false
false
0
7
8
31
15
16
null
null
unisonweb/platform
parser-typechecker/src/Unison/Runtime/ANF/Serialize.hs
mit
putLit :: MonadPut m => Lit -> m () putLit (I i) = putTag IT *> putInt i
72
putLit :: MonadPut m => Lit -> m () putLit (I i) = putTag IT *> putInt i
72
putLit (I i) = putTag IT *> putInt i
36
false
true
0
8
17
46
21
25
null
null
shayan-najd/HsParser
OutputableInstances.hs
gpl-3.0
pprGRHSs :: (OutputableBndr idR, Outputable body) => HsMatchContext idL -> GRHSs idR body -> SDoc pprGRHSs ctxt (GRHSs grhss (L _ binds)) = vcat (map (pprGRHS ctxt . unLoc) grhss) $$ ppUnless (isEmptyLocalBinds binds) (text "where" $$ nest 4 (pprBinds binds))
277
pprGRHSs :: (OutputableBndr idR, Outputable body) => HsMatchContext idL -> GRHSs idR body -> SDoc pprGRHSs ctxt (GRHSs grhss (L _ binds)) = vcat (map (pprGRHS ctxt . unLoc) grhss) $$ ppUnless (isEmptyLocalBinds binds) (text "where" $$ nest 4 (pprBinds binds))
277
pprGRHSs ctxt (GRHSs grhss (L _ binds)) = vcat (map (pprGRHS ctxt . unLoc) grhss) $$ ppUnless (isEmptyLocalBinds binds) (text "where" $$ nest 4 (pprBinds binds))
170
false
true
2
10
58
128
59
69
null
null
input-output-hk/pos-haskell-prototype
chain/src/Pos/Chain/Ssc/Base.hs
mit
-- | Compute difference of two 'CommitmentsMap's. diffCommMap :: CommitmentsMap -> CommitmentsMap -> CommitmentsMap diffCommMap (getCommitmentsMap -> a) (getCommitmentsMap -> b) = mkCommitmentsMapUnsafe $ a `HM.difference` b
228
diffCommMap :: CommitmentsMap -> CommitmentsMap -> CommitmentsMap diffCommMap (getCommitmentsMap -> a) (getCommitmentsMap -> b) = mkCommitmentsMapUnsafe $ a `HM.difference` b
178
diffCommMap (getCommitmentsMap -> a) (getCommitmentsMap -> b) = mkCommitmentsMapUnsafe $ a `HM.difference` b
112
true
true
0
7
30
51
28
23
null
null
jystic/hsimport
lib/HsImport/ImportPos.hs
bsd-3-clause
-- | Returns the position where the import declaration for the -- new import should be put into the list of import declarations. findImportPos :: HS.ImportDecl -> [HS.ImportDecl] -> Maybe ImportPos findImportPos newImport imports = After <$> bestMatchingImport name imports where HS.ModuleName name = HS.importModule newImport -- | Returns all import declarations having the same module name.
405
findImportPos :: HS.ImportDecl -> [HS.ImportDecl] -> Maybe ImportPos findImportPos newImport imports = After <$> bestMatchingImport name imports where HS.ModuleName name = HS.importModule newImport -- | Returns all import declarations having the same module name.
274
findImportPos newImport imports = After <$> bestMatchingImport name imports where HS.ModuleName name = HS.importModule newImport -- | Returns all import declarations having the same module name.
205
true
true
0
8
69
69
33
36
null
null
FranklinChen/musicxml2
src/Data/Music/MusicXml/Simple.hs
bsd-3-clause
beginCresc, endCresc, beginDim, endDim :: Music beginCresc = Music $ [MusicDirection $ Crescendo Start]
110
beginCresc, endCresc, beginDim, endDim :: Music beginCresc = Music $ [MusicDirection $ Crescendo Start]
109
beginCresc = Music $ [MusicDirection $ Crescendo Start]
61
false
true
0
8
20
31
19
12
null
null
ml9951/ghc
testsuite/tests/ado/ado001.hs
bsd-3-clause
test3 :: M () test3 = do x1 <- a x2 <- b x3 <- const g x2 x4 <- e return () `const` (x1,x2,x3,x4) -- (a ; (b | g)) | c -- or -- ((a | b); g) | c
155
test3 :: M () test3 = do x1 <- a x2 <- b x3 <- const g x2 x4 <- e return () `const` (x1,x2,x3,x4) -- (a ; (b | g)) | c -- or -- ((a | b); g) | c
155
test3 = do x1 <- a x2 <- b x3 <- const g x2 x4 <- e return () `const` (x1,x2,x3,x4) -- (a ; (b | g)) | c -- or -- ((a | b); g) | c
141
false
true
1
9
52
82
40
42
null
null
batterseapower/supercompilation-by-evaluation
Core/Syntax.hs
bsd-3-clause
letRec :: [(Var, Term)] -> Term -> Term letRec [] e = e
56
letRec :: [(Var, Term)] -> Term -> Term letRec [] e = e
56
letRec [] e = e
16
false
true
0
9
13
41
20
21
null
null
phischu/fragnix
tests/packages/scotty/Data.ByteString.hs
bsd-3-clause
-- | 'dropWhile' @p xs@ returns the suffix remaining after 'takeWhile' @p xs@. dropWhile :: (Word8 -> Bool) -> ByteString -> ByteString dropWhile f ps = unsafeDrop (findIndexOrEnd (not . f) ps) ps
196
dropWhile :: (Word8 -> Bool) -> ByteString -> ByteString dropWhile f ps = unsafeDrop (findIndexOrEnd (not . f) ps) ps
117
dropWhile f ps = unsafeDrop (findIndexOrEnd (not . f) ps) ps
60
true
true
0
9
32
58
28
30
null
null
sternenseemann/large-hashable
test/Data/LargeHashable/Tests/TH.hs
bsd-3-clause
-- | Simple sanity check for TH derived instances for newtypes. test_newtypeTHHashSane :: IO () test_newtypeTHHashSane = assertNotEqual (largeHash md5HashAlgorithm (Fool True)) (largeHash md5HashAlgorithm (Fool False))
258
test_newtypeTHHashSane :: IO () test_newtypeTHHashSane = assertNotEqual (largeHash md5HashAlgorithm (Fool True)) (largeHash md5HashAlgorithm (Fool False))
194
test_newtypeTHHashSane = assertNotEqual (largeHash md5HashAlgorithm (Fool True)) (largeHash md5HashAlgorithm (Fool False))
162
true
true
0
9
65
50
25
25
null
null
haru2036/nagato
Text/Nagato/NagatoIO.hs
apache-2.0
writeToFileCounts :: String -> [(String, Map String Int)] -> IO() writeToFileCounts filePath classes = do let bytes = Data.Serialize.encode classes Data.ByteString.writeFile filePath bytes
192
writeToFileCounts :: String -> [(String, Map String Int)] -> IO() writeToFileCounts filePath classes = do let bytes = Data.Serialize.encode classes Data.ByteString.writeFile filePath bytes
192
writeToFileCounts filePath classes = do let bytes = Data.Serialize.encode classes Data.ByteString.writeFile filePath bytes
126
false
true
0
11
26
69
34
35
null
null
olsner/ghc
testsuite/tests/typecheck/should_compile/Vta1.hs
bsd-3-clause
boo2 :: forall (a :: * -> *) . Proxy a -> Bool boo2 _ = False
61
boo2 :: forall (a :: * -> *) . Proxy a -> Bool boo2 _ = False
61
boo2 _ = False
14
false
true
0
8
16
40
20
20
null
null
timjs/spl-compiler
src/Data/MultiMap.hs
bsd-3-clause
union :: (Ord k, Ord a) => MultiMap k a -> MultiMap k a -> MultiMap k a (MultiMap l) `union` (MultiMap r) | Map.null l = MultiMap r | Map.null r = MultiMap l | Map.size r == 1 = enter k s (MultiMap l) | otherwise = error "union not yet implemented for big MultiMaps" where (k,s) = Map.elemAt 0 r
327
union :: (Ord k, Ord a) => MultiMap k a -> MultiMap k a -> MultiMap k a (MultiMap l) `union` (MultiMap r) | Map.null l = MultiMap r | Map.null r = MultiMap l | Map.size r == 1 = enter k s (MultiMap l) | otherwise = error "union not yet implemented for big MultiMaps" where (k,s) = Map.elemAt 0 r
327
(MultiMap l) `union` (MultiMap r) | Map.null l = MultiMap r | Map.null r = MultiMap l | Map.size r == 1 = enter k s (MultiMap l) | otherwise = error "union not yet implemented for big MultiMaps" where (k,s) = Map.elemAt 0 r
255
false
true
2
10
94
166
78
88
null
null
BerndSchwarzenbacher/cis194-solutions
03-rec-poly/Golf.hs
mit
localMaxima _ = []
18
localMaxima _ = []
18
localMaxima _ = []
18
false
false
0
5
3
12
5
7
null
null
spatial-reasoning/zeno
src/Benchmark.hs
bsd-2-clause
showAnswer (Just (Just True)) = " + "
38
showAnswer (Just (Just True)) = " + "
38
showAnswer (Just (Just True)) = " + "
38
false
false
0
8
8
22
10
12
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/Dwarf/Constants.hs
bsd-3-clause
-- | Dwarf native types dW_ATE_address, dW_ATE_boolean, dW_ATE_float, dW_ATE_signed, dW_ATE_signed_char, dW_ATE_unsigned, dW_ATE_unsigned_char :: Word dW_ATE_address = 1
177
dW_ATE_address, dW_ATE_boolean, dW_ATE_float, dW_ATE_signed, dW_ATE_signed_char, dW_ATE_unsigned, dW_ATE_unsigned_char :: Word dW_ATE_address = 1
153
dW_ATE_address = 1
24
true
true
3
5
24
32
19
13
null
null
kaoskorobase/mescaline
lib/mescaline-database/Mescaline/Analysis.hs
gpl-3.0
importPaths :: (Analyser a) => a -> Maybe Int -> FilePath -> [FilePath] -> IO () importPaths a np dbFile ps = DB.withDatabase dbFile $ do -- files <- liftIO $ findFiles (fileExtensions a) ps -- FIXME: Avoid computing the source file hash twice. -- files' <- filterM (\p -> do { sf <- SourceFile.newLocal p ; fmap not $ Table.isStored c sf }) files liftIO (mapFiles (maybe GHC.numCapabilities id np) a =<< findFiles (fileExtensions a) ps) >>= mapM_ (\(p, e) -> either (\s -> liftIO $ logError "Database" (p ++ ": " ++ s)) insertAnalysis e)
608
importPaths :: (Analyser a) => a -> Maybe Int -> FilePath -> [FilePath] -> IO () importPaths a np dbFile ps = DB.withDatabase dbFile $ do -- files <- liftIO $ findFiles (fileExtensions a) ps -- FIXME: Avoid computing the source file hash twice. -- files' <- filterM (\p -> do { sf <- SourceFile.newLocal p ; fmap not $ Table.isStored c sf }) files liftIO (mapFiles (maybe GHC.numCapabilities id np) a =<< findFiles (fileExtensions a) ps) >>= mapM_ (\(p, e) -> either (\s -> liftIO $ logError "Database" (p ++ ": " ++ s)) insertAnalysis e)
608
importPaths a np dbFile ps = DB.withDatabase dbFile $ do -- files <- liftIO $ findFiles (fileExtensions a) ps -- FIXME: Avoid computing the source file hash twice. -- files' <- filterM (\p -> do { sf <- SourceFile.newLocal p ; fmap not $ Table.isStored c sf }) files liftIO (mapFiles (maybe GHC.numCapabilities id np) a =<< findFiles (fileExtensions a) ps) >>= mapM_ (\(p, e) -> either (\s -> liftIO $ logError "Database" (p ++ ": " ++ s)) insertAnalysis e)
527
false
true
2
15
166
167
85
82
null
null
nomeata/codeworld
codeworld-server/src/Util.hs
apache-2.0
nameToProjectId :: Text -> ProjectId nameToProjectId = ProjectId . hashToId "S" . T.encodeUtf8
94
nameToProjectId :: Text -> ProjectId nameToProjectId = ProjectId . hashToId "S" . T.encodeUtf8
94
nameToProjectId = ProjectId . hashToId "S" . T.encodeUtf8
57
false
true
1
7
12
36
15
21
null
null
quchen/prettyprinter
prettyprinter-compat-ansi-wl-pprint/src/Text/PrettyPrint/ANSI/Leijen.hs
bsd-2-clause
displayIO :: Handle -> SimpleDoc -> IO () displayIO = NewT.renderIO
67
displayIO :: Handle -> SimpleDoc -> IO () displayIO = NewT.renderIO
67
displayIO = NewT.renderIO
25
false
true
0
9
10
32
14
18
null
null
bjpop/berp
libs/src/Berp/Compile/PrimName.hs
bsd-3-clause
for :: Exp for = prim "for"
27
for :: Exp for = prim "for"
27
for = prim "for"
16
false
true
0
6
6
21
8
13
null
null
tty/joy-of-coding
src/Proplists.hs
bsd-3-clause
testList :: Proplist testList = [("a",Int 1), ("b", Str "Foo")]
63
testList :: Proplist testList = [("a",Int 1), ("b", Str "Foo")]
63
testList = [("a",Int 1), ("b", Str "Foo")]
42
false
true
0
8
9
42
21
21
null
null
bergey/plots
src/Plots/Types/Smooth.hs
bsd-3-clause
simpleLinear :: (Ord n, Floating n, Enum n) => [(n , n)] -> (n, n) simpleLinear xs = (m, b) where r = correlation xs (sx, sy) = stdDevOfPoints xs (mx, my) = meanOfPoints xs m = r * sy / sx b = my - m * mx
318
simpleLinear :: (Ord n, Floating n, Enum n) => [(n , n)] -> (n, n) simpleLinear xs = (m, b) where r = correlation xs (sx, sy) = stdDevOfPoints xs (mx, my) = meanOfPoints xs m = r * sy / sx b = my - m * mx
318
simpleLinear xs = (m, b) where r = correlation xs (sx, sy) = stdDevOfPoints xs (mx, my) = meanOfPoints xs m = r * sy / sx b = my - m * mx
251
false
true
0
8
162
126
69
57
null
null
chrisdone/path
src/Path/Internal/Include.hs
bsd-3-clause
-- | Helper function: check if the filepath has any parent directories in it. -- This handles the logic of checking for different path separators on Windows. hasParentDir :: FilePath -> Bool hasParentDir filepath' = (filepath' == "..") || ("/.." `L.isSuffixOf` filepath) || ("/../" `L.isInfixOf` filepath) || ("../" `L.isPrefixOf` filepath) where filepath = case FilePath.pathSeparator of '/' -> filepath' x -> map (\y -> if x == y then '/' else y) filepath' -- | Same as 'show . Path.toFilePath'. -- -- The following property holds: -- -- @x == y ≡ show x == show y@
628
hasParentDir :: FilePath -> Bool hasParentDir filepath' = (filepath' == "..") || ("/.." `L.isSuffixOf` filepath) || ("/../" `L.isInfixOf` filepath) || ("../" `L.isPrefixOf` filepath) where filepath = case FilePath.pathSeparator of '/' -> filepath' x -> map (\y -> if x == y then '/' else y) filepath' -- | Same as 'show . Path.toFilePath'. -- -- The following property holds: -- -- @x == y ≡ show x == show y@
470
hasParentDir filepath' = (filepath' == "..") || ("/.." `L.isSuffixOf` filepath) || ("/../" `L.isInfixOf` filepath) || ("../" `L.isPrefixOf` filepath) where filepath = case FilePath.pathSeparator of '/' -> filepath' x -> map (\y -> if x == y then '/' else y) filepath' -- | Same as 'show . Path.toFilePath'. -- -- The following property holds: -- -- @x == y ≡ show x == show y@
437
true
true
2
13
157
143
77
66
null
null
andyarvanitis/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCTrans n t) f = return f { ibc_transforms = (n, t) : ibc_transforms f }
80
ibc i (IBCTrans n t) f = return f { ibc_transforms = (n, t) : ibc_transforms f }
80
ibc i (IBCTrans n t) f = return f { ibc_transforms = (n, t) : ibc_transforms f }
80
false
false
1
9
17
51
23
28
null
null
kawu/crf-chain1-constrained
src/Data/CRF/Chain1/Constrained/Dataset/Codec.hs
bsd-2-clause
-- | Encode the labeled sentence with the given codec. Substitute the -- default label for any label not present in the codec. encodeSentL :: (Ord a, Ord b) => Codec a b -> SentL a b -> (Xs, Ys) encodeSentL codec = C.evalCodec codec . encodeSentL'Cn
250
encodeSentL :: (Ord a, Ord b) => Codec a b -> SentL a b -> (Xs, Ys) encodeSentL codec = C.evalCodec codec . encodeSentL'Cn
122
encodeSentL codec = C.evalCodec codec . encodeSentL'Cn
54
true
true
0
8
47
64
33
31
null
null
brendanhay/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | The granular status of this ad in specific contexts. A context here -- relates to where something ultimately serves (for example, a physical -- location, a platform, an HTTPS vs HTTP request, or the type of auction). -- Read-only. This field should not be set in requests. See the examples in -- the Creatives guide for more details. cServingRestrictions :: Lens' Creative [CreativeServingRestrictionsItem] cServingRestrictions = lens _cServingRestrictions (\ s a -> s{_cServingRestrictions = a}) . _Default . _Coerce
542
cServingRestrictions :: Lens' Creative [CreativeServingRestrictionsItem] cServingRestrictions = lens _cServingRestrictions (\ s a -> s{_cServingRestrictions = a}) . _Default . _Coerce
203
cServingRestrictions = lens _cServingRestrictions (\ s a -> s{_cServingRestrictions = a}) . _Default . _Coerce
130
true
true
3
8
99
63
32
31
null
null
JPMoresmau/haddock
haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
bsd-2-clause
ppLContextNoArrow = ppContextNoArrow . unLoc
44
ppLContextNoArrow = ppContextNoArrow . unLoc
44
ppLContextNoArrow = ppContextNoArrow . unLoc
44
false
false
0
5
4
10
5
5
null
null
sdiehl/ts
src/Query.hs
mit
vexpr (EOp Lt ETime (ETimestamp x)) = ICmp (< ts2int x)
55
vexpr (EOp Lt ETime (ETimestamp x)) = ICmp (< ts2int x)
55
vexpr (EOp Lt ETime (ETimestamp x)) = ICmp (< ts2int x)
55
false
false
0
8
10
36
17
19
null
null
bergey/diagrams-opengl
src/Graphics/Rendering/Util.hs
bsd-3-clause
vSrc, fSrc :: BS.ByteString -- TH arguments need to be literal strings, or defined in another module -- In real code, the latter would be better to avoid platform-dependent '/' vSrc = $(embedFile $ "src/Graphics/Rendering/util.v.glsl")
235
vSrc, fSrc :: BS.ByteString vSrc = $(embedFile $ "src/Graphics/Rendering/util.v.glsl")
86
vSrc = $(embedFile $ "src/Graphics/Rendering/util.v.glsl")
58
true
true
2
8
34
36
16
20
null
null
Persi/shellcheck
ShellCheck/Parser.hs
gpl-3.0
readIoFile = called "redirection" $ do id <- getNextId op <- readIoFileOp spacing file <- readFilename return $ T_FdRedirect id "" $ T_IoFile id op file
172
readIoFile = called "redirection" $ do id <- getNextId op <- readIoFileOp spacing file <- readFilename return $ T_FdRedirect id "" $ T_IoFile id op file
172
readIoFile = called "redirection" $ do id <- getNextId op <- readIoFileOp spacing file <- readFilename return $ T_FdRedirect id "" $ T_IoFile id op file
172
false
false
1
11
45
64
26
38
null
null
hepek/MPEG-TS
Codec/Video/MpegTS.hs
gpl-3.0
esTag 17 = STD_descriptor
26
esTag 17 = STD_descriptor
26
esTag 17 = STD_descriptor
26
false
false
0
5
4
9
4
5
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
newStablePtr_RDR :: RdrName newStablePtr_RDR = nameRdrName newStablePtrName
82
newStablePtr_RDR :: RdrName newStablePtr_RDR = nameRdrName newStablePtrName
82
newStablePtr_RDR = nameRdrName newStablePtrName
54
false
true
0
5
13
14
7
7
null
null
TorosFanny/kaleidoscope
src/chapter7/Emit.hs
mit
false = zero
12
false = zero
12
false = zero
12
false
false
1
5
2
10
3
7
null
null
jvilar/hrows
src/Listing.hs
gpl-2.0
globalInterval :: Getter ColIndices (Int, Int) globalInterval = to $ view globalIndex &&& view globalEnd
104
globalInterval :: Getter ColIndices (Int, Int) globalInterval = to $ view globalIndex &&& view globalEnd
104
globalInterval = to $ view globalIndex &&& view globalEnd
57
false
true
3
6
14
41
18
23
null
null
siddhanathan/ghc
testsuite/tests/safeHaskell/unsafeLibs/GoodImport02.hs
bsd-3-clause
main :: IO () main = putStrLn $ "X is: " ++ show f
50
main :: IO () main = putStrLn $ "X is: " ++ show f
50
main = putStrLn $ "X is: " ++ show f
36
false
true
4
7
13
34
14
20
null
null
pparkkin/eta
compiler/ETA/Main/SysTools.hs
bsd-3-clause
runUnlit :: DynFlags -> [Option] -> IO () runUnlit dflags args = do let prog = pgm_L dflags opts = getOpts dflags opt_L runSomething dflags "Literate pre-processor" prog (map Option opts ++ args)
220
runUnlit :: DynFlags -> [Option] -> IO () runUnlit dflags args = do let prog = pgm_L dflags opts = getOpts dflags opt_L runSomething dflags "Literate pre-processor" prog (map Option opts ++ args)
220
runUnlit dflags args = do let prog = pgm_L dflags opts = getOpts dflags opt_L runSomething dflags "Literate pre-processor" prog (map Option opts ++ args)
178
false
true
0
10
57
78
37
41
null
null
expipiplus1/vulkan
openxr/src/OpenXR/Core10/Input.hs
bsd-3-clause
withActionSet :: forall io r . MonadIO io => Instance -> ActionSetCreateInfo -> (io ActionSet -> (ActionSet -> io ()) -> r) -> r withActionSet instance' createInfo b = b (createActionSet instance' createInfo) (\(o0) -> destroyActionSet o0)
245
withActionSet :: forall io r . MonadIO io => Instance -> ActionSetCreateInfo -> (io ActionSet -> (ActionSet -> io ()) -> r) -> r withActionSet instance' createInfo b = b (createActionSet instance' createInfo) (\(o0) -> destroyActionSet o0)
245
withActionSet instance' createInfo b = b (createActionSet instance' createInfo) (\(o0) -> destroyActionSet o0)
116
false
true
0
16
42
96
49
47
null
null
vTurbine/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pickyEqType :: TcType -> TcType -> Bool -- Check when two types _look_ the same, _including_ synonyms. -- So (pickyEqType String [Char]) returns False -- This ignores kinds and coercions, because this is used only for printing. pickyEqType ty1 ty2 = isNothing $ tc_eq_type (const Nothing) ty1 ty2
302
pickyEqType :: TcType -> TcType -> Bool pickyEqType ty1 ty2 = isNothing $ tc_eq_type (const Nothing) ty1 ty2
114
pickyEqType ty1 ty2 = isNothing $ tc_eq_type (const Nothing) ty1 ty2
74
true
true
2
8
53
51
24
27
null
null
tfausak/exercism-solutions
haskell/scrabble-score/scrabble-score_test.hs
mit
main :: IO () main = void $ runTestTT $ TestList [ TestList scrabbleTests ]
82
main :: IO () main = void $ runTestTT $ TestList [ TestList scrabbleTests ]
82
main = void $ runTestTT $ TestList [ TestList scrabbleTests ]
68
false
true
0
8
21
33
16
17
null
null
abuiles/turbinado-blog
tmp/dependencies/hsx-0.4.5/src/HSX/Transform.hs
bsd-3-clause
tr2pat :: a -> a -> (b -> b -> c) -> (a -> Tr b) -> Tr c tr2pat p1 p2 f tr = do q1 <- tr p1 q2 <- tr p2 return $ f q1 q2
166
tr2pat :: a -> a -> (b -> b -> c) -> (a -> Tr b) -> Tr c tr2pat p1 p2 f tr = do q1 <- tr p1 q2 <- tr p2 return $ f q1 q2
166
tr2pat p1 p2 f tr = do q1 <- tr p1 q2 <- tr p2 return $ f q1 q2
109
false
true
0
12
84
97
44
53
null
null
sw1nn/dotfiles
.xmonad/xmonad.hs
epl-1.0
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [ ((modm .|. shiftMask, xK_Return ), spawn $ myTerminal) , ((modm, xK_p ), spawn "yeganesh_run") , ((modm .|. shiftMask, xK_p ), spawn "gmrun") , ((modm, xK_grave ), scratchpadSpawnActionTerminal $ myScratchpadTerminal) , ((modm, xK_a ), focusUrgent) , ((modm .|. shiftMask, xK_c ), kill) , ((modm, xK_space ), sendMessage NextLayout) , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) , ((modm, xK_n ), refresh) , ((modm, xK_Tab ), windows W.focusDown) , ((modm, xK_j ), windows W.focusDown) , ((modm, xK_k ), windows W.focusUp) , ((0, xK_Pause ), spawn "lock-screen") , ((modm, xK_m ), windows W.focusMaster) , ((modm, xK_Return ), windows W.swapMaster) , ((modm .|. shiftMask, xK_j ), windows W.swapDown) , ((modm .|. shiftMask, xK_k ), windows W.swapUp) , ((modm, xK_h ), sendMessage Shrink) , ((modm, xK_l ), sendMessage Expand) , ((modm, xK_t ), withFocused $ windows . W.sink) , ((modm .|. controlMask, xK_t ), spawn "thunar") , ((modm, xK_comma ), sendMessage (IncMasterN 1)) , ((modm, xK_period ), sendMessage (IncMasterN (-1))) , ((modm, xK_a ), spawn "volume-ctl toggle-control") , ((modm, xK_b ), sendMessage ToggleStruts) , ((modm .|. shiftMask, xK_g ), promptSearch defaultXPConfig google) , ((modm .|. controlMask, xK_g ), selectSearch google) , ((modm, xK_q ), spawn "xmonad --recompile; xmonad --restart") , ((0, xK_F4 ), spawn "volume-ctl mute") , ((modm, xK_F4 ), spawn "google-hangout-ctl toggle-mute") , ((0, xK_F5 ), spawn "volume-ctl volume-down") , ((0, xK_F6 ), spawn "volume-ctl volume-up") , ((0, xF86XK_AudioLowerVolume), spawn "volume-ctl volume-down") , ((0, xF86XK_AudioRaiseVolume), spawn "volume-ctl volume-up") , ((0, xK_F7 ), spawn "spotify-ctl prev") , ((0, xK_F8 ), spawn "spotify-ctl toggle-pause") , ((0, xK_F9 ), spawn "spotify-ctl next") , ((modm .|. shiftMask, xK_equal ), spawn "browser http://plus.google.com") , ((modm .|. shiftMask, xK_s ), spawn "sleep 0.2; scrot -s -e 'mv $f ~/screenshots/'") , ((modm .|. shiftMask .|. controlMask, xK_s ), spawn "sleep 0.2; scrot -e 'mv $f ~/screenshots/'") ] ++ [((m .|. modm, k), windows $ f i) | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] ++ [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_w, xK_r, xK_e] [0..] , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
3,280
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [ ((modm .|. shiftMask, xK_Return ), spawn $ myTerminal) , ((modm, xK_p ), spawn "yeganesh_run") , ((modm .|. shiftMask, xK_p ), spawn "gmrun") , ((modm, xK_grave ), scratchpadSpawnActionTerminal $ myScratchpadTerminal) , ((modm, xK_a ), focusUrgent) , ((modm .|. shiftMask, xK_c ), kill) , ((modm, xK_space ), sendMessage NextLayout) , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) , ((modm, xK_n ), refresh) , ((modm, xK_Tab ), windows W.focusDown) , ((modm, xK_j ), windows W.focusDown) , ((modm, xK_k ), windows W.focusUp) , ((0, xK_Pause ), spawn "lock-screen") , ((modm, xK_m ), windows W.focusMaster) , ((modm, xK_Return ), windows W.swapMaster) , ((modm .|. shiftMask, xK_j ), windows W.swapDown) , ((modm .|. shiftMask, xK_k ), windows W.swapUp) , ((modm, xK_h ), sendMessage Shrink) , ((modm, xK_l ), sendMessage Expand) , ((modm, xK_t ), withFocused $ windows . W.sink) , ((modm .|. controlMask, xK_t ), spawn "thunar") , ((modm, xK_comma ), sendMessage (IncMasterN 1)) , ((modm, xK_period ), sendMessage (IncMasterN (-1))) , ((modm, xK_a ), spawn "volume-ctl toggle-control") , ((modm, xK_b ), sendMessage ToggleStruts) , ((modm .|. shiftMask, xK_g ), promptSearch defaultXPConfig google) , ((modm .|. controlMask, xK_g ), selectSearch google) , ((modm, xK_q ), spawn "xmonad --recompile; xmonad --restart") , ((0, xK_F4 ), spawn "volume-ctl mute") , ((modm, xK_F4 ), spawn "google-hangout-ctl toggle-mute") , ((0, xK_F5 ), spawn "volume-ctl volume-down") , ((0, xK_F6 ), spawn "volume-ctl volume-up") , ((0, xF86XK_AudioLowerVolume), spawn "volume-ctl volume-down") , ((0, xF86XK_AudioRaiseVolume), spawn "volume-ctl volume-up") , ((0, xK_F7 ), spawn "spotify-ctl prev") , ((0, xK_F8 ), spawn "spotify-ctl toggle-pause") , ((0, xK_F9 ), spawn "spotify-ctl next") , ((modm .|. shiftMask, xK_equal ), spawn "browser http://plus.google.com") , ((modm .|. shiftMask, xK_s ), spawn "sleep 0.2; scrot -s -e 'mv $f ~/screenshots/'") , ((modm .|. shiftMask .|. controlMask, xK_s ), spawn "sleep 0.2; scrot -e 'mv $f ~/screenshots/'") ] ++ [((m .|. modm, k), windows $ f i) | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] ++ [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_w, xK_r, xK_e] [0..] , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
3,280
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [ ((modm .|. shiftMask, xK_Return ), spawn $ myTerminal) , ((modm, xK_p ), spawn "yeganesh_run") , ((modm .|. shiftMask, xK_p ), spawn "gmrun") , ((modm, xK_grave ), scratchpadSpawnActionTerminal $ myScratchpadTerminal) , ((modm, xK_a ), focusUrgent) , ((modm .|. shiftMask, xK_c ), kill) , ((modm, xK_space ), sendMessage NextLayout) , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) , ((modm, xK_n ), refresh) , ((modm, xK_Tab ), windows W.focusDown) , ((modm, xK_j ), windows W.focusDown) , ((modm, xK_k ), windows W.focusUp) , ((0, xK_Pause ), spawn "lock-screen") , ((modm, xK_m ), windows W.focusMaster) , ((modm, xK_Return ), windows W.swapMaster) , ((modm .|. shiftMask, xK_j ), windows W.swapDown) , ((modm .|. shiftMask, xK_k ), windows W.swapUp) , ((modm, xK_h ), sendMessage Shrink) , ((modm, xK_l ), sendMessage Expand) , ((modm, xK_t ), withFocused $ windows . W.sink) , ((modm .|. controlMask, xK_t ), spawn "thunar") , ((modm, xK_comma ), sendMessage (IncMasterN 1)) , ((modm, xK_period ), sendMessage (IncMasterN (-1))) , ((modm, xK_a ), spawn "volume-ctl toggle-control") , ((modm, xK_b ), sendMessage ToggleStruts) , ((modm .|. shiftMask, xK_g ), promptSearch defaultXPConfig google) , ((modm .|. controlMask, xK_g ), selectSearch google) , ((modm, xK_q ), spawn "xmonad --recompile; xmonad --restart") , ((0, xK_F4 ), spawn "volume-ctl mute") , ((modm, xK_F4 ), spawn "google-hangout-ctl toggle-mute") , ((0, xK_F5 ), spawn "volume-ctl volume-down") , ((0, xK_F6 ), spawn "volume-ctl volume-up") , ((0, xF86XK_AudioLowerVolume), spawn "volume-ctl volume-down") , ((0, xF86XK_AudioRaiseVolume), spawn "volume-ctl volume-up") , ((0, xK_F7 ), spawn "spotify-ctl prev") , ((0, xK_F8 ), spawn "spotify-ctl toggle-pause") , ((0, xK_F9 ), spawn "spotify-ctl next") , ((modm .|. shiftMask, xK_equal ), spawn "browser http://plus.google.com") , ((modm .|. shiftMask, xK_s ), spawn "sleep 0.2; scrot -s -e 'mv $f ~/screenshots/'") , ((modm .|. shiftMask .|. controlMask, xK_s ), spawn "sleep 0.2; scrot -e 'mv $f ~/screenshots/'") ] ++ [((m .|. modm, k), windows $ f i) | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] ++ [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_w, xK_r, xK_e] [0..] , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
3,280
false
false
0
14
1,201
1,051
626
425
null
null
alfpark/bond
compiler/tests/Tests/Codegen.hs
mit
verifyFiles :: Options -> FilePath -> [TestTree] verifyFiles options baseName = map (verify (typeMapping options) "") (templates options) <> extra options where verify = verifyFile options baseName fieldMapping Cs {..} = if readonly_properties then ReadOnlyProperties else if fields then PublicFields else Properties typeMapping Cpp {..} = maybe cppTypeMapping cppCustomAllocTypeMapping allocator typeMapping Cs {} = csTypeMapping templates Cpp {..} = [ reflection_h , types_cpp , types_h header enum_header allocator ] templates Cs {..} = [ types_cs Class $ fieldMapping options ] extra Cs {} = [ testGroup "collection interfaces" $ map (verify csCollectionInterfacesTypeMapping "collection-interfaces") (templates options) ] extra Cpp {..} = [ testGroup "custom allocator" $ map (verify (cppCustomAllocTypeMapping "arena") "allocator") (templates $ options { allocator = Just "arena" }) | isNothing allocator ]
1,132
verifyFiles :: Options -> FilePath -> [TestTree] verifyFiles options baseName = map (verify (typeMapping options) "") (templates options) <> extra options where verify = verifyFile options baseName fieldMapping Cs {..} = if readonly_properties then ReadOnlyProperties else if fields then PublicFields else Properties typeMapping Cpp {..} = maybe cppTypeMapping cppCustomAllocTypeMapping allocator typeMapping Cs {} = csTypeMapping templates Cpp {..} = [ reflection_h , types_cpp , types_h header enum_header allocator ] templates Cs {..} = [ types_cs Class $ fieldMapping options ] extra Cs {} = [ testGroup "collection interfaces" $ map (verify csCollectionInterfacesTypeMapping "collection-interfaces") (templates options) ] extra Cpp {..} = [ testGroup "custom allocator" $ map (verify (cppCustomAllocTypeMapping "arena") "allocator") (templates $ options { allocator = Just "arena" }) | isNothing allocator ]
1,132
verifyFiles options baseName = map (verify (typeMapping options) "") (templates options) <> extra options where verify = verifyFile options baseName fieldMapping Cs {..} = if readonly_properties then ReadOnlyProperties else if fields then PublicFields else Properties typeMapping Cpp {..} = maybe cppTypeMapping cppCustomAllocTypeMapping allocator typeMapping Cs {} = csTypeMapping templates Cpp {..} = [ reflection_h , types_cpp , types_h header enum_header allocator ] templates Cs {..} = [ types_cs Class $ fieldMapping options ] extra Cs {} = [ testGroup "collection interfaces" $ map (verify csCollectionInterfacesTypeMapping "collection-interfaces") (templates options) ] extra Cpp {..} = [ testGroup "custom allocator" $ map (verify (cppCustomAllocTypeMapping "arena") "allocator") (templates $ options { allocator = Just "arena" }) | isNothing allocator ]
1,083
false
true
7
16
342
294
152
142
null
null
ezyang/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
zipTyEnv :: [TyVar] -> [Type] -> TvSubstEnv zipTyEnv tyvars tys = ASSERT( all (not . isCoercionTy) tys ) mkVarEnv (zipEqual "zipTyEnv" tyvars tys)
152
zipTyEnv :: [TyVar] -> [Type] -> TvSubstEnv zipTyEnv tyvars tys = ASSERT( all (not . isCoercionTy) tys ) mkVarEnv (zipEqual "zipTyEnv" tyvars tys)
152
zipTyEnv tyvars tys = ASSERT( all (not . isCoercionTy) tys ) mkVarEnv (zipEqual "zipTyEnv" tyvars tys)
108
false
true
0
8
28
70
33
37
null
null
tjakway/ghcjvm
compiler/prelude/PrimOp.hs
bsd-3-clause
-- Some PrimOps need not return a manifest primitive or algebraic value -- (i.e. they might return a polymorphic value). These PrimOps *must* -- be out of line, or the code generator won't work. getPrimOpResultInfo :: PrimOp -> PrimOpResultInfo getPrimOpResultInfo op = case (primOpInfo op) of Dyadic _ ty -> ReturnsPrim (typePrimRep ty) Monadic _ ty -> ReturnsPrim (typePrimRep ty) Compare _ _ -> ReturnsPrim (tyConPrimRep intPrimTyCon) GenPrimOp _ _ _ ty | isPrimTyCon tc -> ReturnsPrim (tyConPrimRep tc) | otherwise -> ReturnsAlg tc where tc = tyConAppTyCon ty -- All primops return a tycon-app result -- The tycon can be an unboxed tuple, though, which -- gives rise to a ReturnAlg {- We do not currently make use of whether primops are commutable. We used to try to move constants to the right hand side for strength reduction. -} {- commutableOp :: PrimOp -> Bool #include "primop-commutable.hs-incl" -} -- Utils:
1,176
getPrimOpResultInfo :: PrimOp -> PrimOpResultInfo getPrimOpResultInfo op = case (primOpInfo op) of Dyadic _ ty -> ReturnsPrim (typePrimRep ty) Monadic _ ty -> ReturnsPrim (typePrimRep ty) Compare _ _ -> ReturnsPrim (tyConPrimRep intPrimTyCon) GenPrimOp _ _ _ ty | isPrimTyCon tc -> ReturnsPrim (tyConPrimRep tc) | otherwise -> ReturnsAlg tc where tc = tyConAppTyCon ty -- All primops return a tycon-app result -- The tycon can be an unboxed tuple, though, which -- gives rise to a ReturnAlg {- We do not currently make use of whether primops are commutable. We used to try to move constants to the right hand side for strength reduction. -} {- commutableOp :: PrimOp -> Bool #include "primop-commutable.hs-incl" -} -- Utils:
979
getPrimOpResultInfo op = case (primOpInfo op) of Dyadic _ ty -> ReturnsPrim (typePrimRep ty) Monadic _ ty -> ReturnsPrim (typePrimRep ty) Compare _ _ -> ReturnsPrim (tyConPrimRep intPrimTyCon) GenPrimOp _ _ _ ty | isPrimTyCon tc -> ReturnsPrim (tyConPrimRep tc) | otherwise -> ReturnsAlg tc where tc = tyConAppTyCon ty -- All primops return a tycon-app result -- The tycon can be an unboxed tuple, though, which -- gives rise to a ReturnAlg {- We do not currently make use of whether primops are commutable. We used to try to move constants to the right hand side for strength reduction. -} {- commutableOp :: PrimOp -> Bool #include "primop-commutable.hs-incl" -} -- Utils:
929
true
true
0
11
407
152
74
78
null
null
khajavi/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
nonindentSpaces :: GenParser Char ParserState [Char] nonindentSpaces = do state <- getState let tabStop = stateTabStop state sps <- many (char ' ') if length sps < tabStop then return sps else unexpected "indented line"
238
nonindentSpaces :: GenParser Char ParserState [Char] nonindentSpaces = do state <- getState let tabStop = stateTabStop state sps <- many (char ' ') if length sps < tabStop then return sps else unexpected "indented line"
238
nonindentSpaces = do state <- getState let tabStop = stateTabStop state sps <- many (char ' ') if length sps < tabStop then return sps else unexpected "indented line"
185
false
true
1
11
53
84
37
47
null
null
qpliu/esolang
flower/hs/Parse.hs
gpl-3.0
checkSend :: Definition -> [ParseError] checkSend (Definition _ _ _ _ body) = reverse (foldl checkS [] body) where checkS errors (IfStatement _ ifBlocks) = foldl checkIfBlock errors ifBlocks checkS errors (SendStatement position _ expressions symbols) | length symbols == sum (map outputCount expressions) = errors | otherwise = newErrorMessage (Message "Number of outputs does not match number of values") position:errors checkS errors _ = errors checkIfBlock errors (IfBlock _ _ body) = foldl checkS errors body -- make sure each branch sends to the same outputs -- make sure each output is sent to exactly once
644
checkSend :: Definition -> [ParseError] checkSend (Definition _ _ _ _ body) = reverse (foldl checkS [] body) where checkS errors (IfStatement _ ifBlocks) = foldl checkIfBlock errors ifBlocks checkS errors (SendStatement position _ expressions symbols) | length symbols == sum (map outputCount expressions) = errors | otherwise = newErrorMessage (Message "Number of outputs does not match number of values") position:errors checkS errors _ = errors checkIfBlock errors (IfBlock _ _ body) = foldl checkS errors body -- make sure each branch sends to the same outputs -- make sure each output is sent to exactly once
644
checkSend (Definition _ _ _ _ body) = reverse (foldl checkS [] body) where checkS errors (IfStatement _ ifBlocks) = foldl checkIfBlock errors ifBlocks checkS errors (SendStatement position _ expressions symbols) | length symbols == sum (map outputCount expressions) = errors | otherwise = newErrorMessage (Message "Number of outputs does not match number of values") position:errors checkS errors _ = errors checkIfBlock errors (IfBlock _ _ body) = foldl checkS errors body -- make sure each branch sends to the same outputs -- make sure each output is sent to exactly once
604
false
true
0
11
127
187
90
97
null
null
r-raymond/purple-muon
src/Client/Frames.hs
gpl-3.0
fpsFormat :: FOR.Format r (PTY.FlType -> r) fpsFormat = "Fps : " FOR.% FOR.fixed 1
82
fpsFormat :: FOR.Format r (PTY.FlType -> r) fpsFormat = "Fps : " FOR.% FOR.fixed 1
82
fpsFormat = "Fps : " FOR.% FOR.fixed 1
38
false
true
0
8
14
38
19
19
null
null
quchen/prettyprinter
prettyprinter-compat-ansi-wl-pprint/src/Text/PrettyPrint/ANSI/Leijen.hs
bsd-2-clause
dullyellow = New.annotate (NewT.colorDull NewT.Yellow)
59
dullyellow = New.annotate (NewT.colorDull NewT.Yellow)
59
dullyellow = New.annotate (NewT.colorDull NewT.Yellow)
59
false
false
1
8
9
24
10
14
null
null
fehu/itesm-ga
src/GeneticAlgorithm.hs
mit
unwrapAssessed (Assessed l) = l
31
unwrapAssessed (Assessed l) = l
31
unwrapAssessed (Assessed l) = l
31
false
false
0
7
4
15
7
8
null
null
nevrenato/Hets_Fork
HasCASL/DataAna.hs
gpl-2.0
mkPredAppl :: DataPat -> Term -> Term mkPredAppl dp t = mkApplTerm (QualVar $ mkPredVar dp) [t]
95
mkPredAppl :: DataPat -> Term -> Term mkPredAppl dp t = mkApplTerm (QualVar $ mkPredVar dp) [t]
95
mkPredAppl dp t = mkApplTerm (QualVar $ mkPredVar dp) [t]
57
false
true
0
8
16
48
22
26
null
null
caiorss/Functional-Programming
haskell/rwh/ch05/SimpleJSON1.hs
unlicense
isNull _ = False
20
isNull _ = False
20
isNull _ = False
20
false
false
0
4
7
10
4
6
null
null
tjakway/ghcjvm
utils/genprimopcode/Syntax.hs
bsd-3-clause
is_primtype :: Entry -> Bool is_primtype (PrimTypeSpec {}) = True
65
is_primtype :: Entry -> Bool is_primtype (PrimTypeSpec {}) = True
65
is_primtype (PrimTypeSpec {}) = True
36
false
true
0
6
9
30
14
16
null
null
snoyberg/ghc
compiler/utils/UniqSet.hs
bsd-3-clause
uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool uniqSetAll = allUFM
66
uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool uniqSetAll = allUFM
66
uniqSetAll = allUFM
19
false
true
0
8
12
36
16
20
null
null
ezyang/ghc
compiler/iface/IfaceEnv.hs
bsd-3-clause
mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater mkNameCacheUpdater = do { hsc_env <- getTopEnv ; return (NCU (updNameCacheIO hsc_env)) }
162
mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater mkNameCacheUpdater = do { hsc_env <- getTopEnv ; return (NCU (updNameCacheIO hsc_env)) }
162
mkNameCacheUpdater = do { hsc_env <- getTopEnv ; return (NCU (updNameCacheIO hsc_env)) }
112
false
true
0
11
42
46
23
23
null
null
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Quit.hs
gpl-2.0
action :: Bool -> Bool -> Bool -> YiM () action False False False = quitWindowE
79
action :: Bool -> Bool -> Bool -> YiM () action False False False = quitWindowE
79
action False False False = quitWindowE
38
false
true
0
10
15
40
18
22
null
null
jimsnow/glome
GlomeTrace/Data/Glome/Triangle.hs
gpl-2.0
transform_trianglenorm :: TriangleNorm t m -> [Xfm] -> SolidItem t m transform_trianglenorm (TriangleNorm p1 p2 p3 n1 n2 n3) xfms = SolidItem $ TriangleNorm (xfm_point (compose xfms) p1) (xfm_point (compose xfms) p2) (xfm_point (compose xfms) p3) (vnorm $ xfm_vec (compose xfms) n1) (vnorm $ xfm_vec (compose xfms) n2) (vnorm $ xfm_vec (compose xfms) n3)
485
transform_trianglenorm :: TriangleNorm t m -> [Xfm] -> SolidItem t m transform_trianglenorm (TriangleNorm p1 p2 p3 n1 n2 n3) xfms = SolidItem $ TriangleNorm (xfm_point (compose xfms) p1) (xfm_point (compose xfms) p2) (xfm_point (compose xfms) p3) (vnorm $ xfm_vec (compose xfms) n1) (vnorm $ xfm_vec (compose xfms) n2) (vnorm $ xfm_vec (compose xfms) n3)
485
transform_trianglenorm (TriangleNorm p1 p2 p3 n1 n2 n3) xfms = SolidItem $ TriangleNorm (xfm_point (compose xfms) p1) (xfm_point (compose xfms) p2) (xfm_point (compose xfms) p3) (vnorm $ xfm_vec (compose xfms) n1) (vnorm $ xfm_vec (compose xfms) n2) (vnorm $ xfm_vec (compose xfms) n3)
416
false
true
2
10
184
167
82
85
null
null
DigitalBrains1/clash-lt24
LT24/Timing.hs
bsd-2-clause
wResetH = ticks tResetH
23
wResetH = ticks tResetH
23
wResetH = ticks tResetH
23
false
false
0
5
3
9
4
5
null
null
taylor1791/adventofcode
2015/test/Test/Day10.hs
bsd-2-clause
part2 :: TestTree part2 = testGroup "Part 2" [p2Puzzle]
55
part2 :: TestTree part2 = testGroup "Part 2" [p2Puzzle]
55
part2 = testGroup "Part 2" [p2Puzzle]
37
false
true
0
6
8
19
10
9
null
null
HIPERFIT/futhark
src/Language/Futhark/TypeChecker/Terms.hs
isc
checkExp (ArrayLit all_es _ loc) = -- Construct the result type and unify all elements with it. We -- only create a type variable for empty arrays; otherwise we use -- the type of the first element. This significantly cuts down on -- the number of type variables generated for pathologically large -- multidimensional array literals. case all_es of [] -> do et <- newTypeVar loc "t" t <- arrayOfM loc et (ShapeDecl [ConstDim 0]) Unique pure $ ArrayLit [] (Info t) loc e : es -> do e' <- checkExp e et <- expType e' es' <- mapM (unifies "type of first array element" (toStruct et) <=< checkExp) es et' <- normTypeFully et t <- arrayOfM loc et' (ShapeDecl [ConstDim $ length all_es]) Unique pure $ ArrayLit (e' : es') (Info t) loc
804
checkExp (ArrayLit all_es _ loc) = -- Construct the result type and unify all elements with it. We -- only create a type variable for empty arrays; otherwise we use -- the type of the first element. This significantly cuts down on -- the number of type variables generated for pathologically large -- multidimensional array literals. case all_es of [] -> do et <- newTypeVar loc "t" t <- arrayOfM loc et (ShapeDecl [ConstDim 0]) Unique pure $ ArrayLit [] (Info t) loc e : es -> do e' <- checkExp e et <- expType e' es' <- mapM (unifies "type of first array element" (toStruct et) <=< checkExp) es et' <- normTypeFully et t <- arrayOfM loc et' (ShapeDecl [ConstDim $ length all_es]) Unique pure $ ArrayLit (e' : es') (Info t) loc
804
checkExp (ArrayLit all_es _ loc) = -- Construct the result type and unify all elements with it. We -- only create a type variable for empty arrays; otherwise we use -- the type of the first element. This significantly cuts down on -- the number of type variables generated for pathologically large -- multidimensional array literals. case all_es of [] -> do et <- newTypeVar loc "t" t <- arrayOfM loc et (ShapeDecl [ConstDim 0]) Unique pure $ ArrayLit [] (Info t) loc e : es -> do e' <- checkExp e et <- expType e' es' <- mapM (unifies "type of first array element" (toStruct et) <=< checkExp) es et' <- normTypeFully et t <- arrayOfM loc et' (ShapeDecl [ConstDim $ length all_es]) Unique pure $ ArrayLit (e' : es') (Info t) loc
804
false
false
0
16
209
228
107
121
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/FourTwoTwoPixels.hs
bsd-3-clause
gl_422 :: GLenum gl_422 = 0x80CC
32
gl_422 :: GLenum gl_422 = 0x80CC
32
gl_422 = 0x80CC
15
false
true
0
4
5
11
6
5
null
null
hellok/PetaBricks
scripts/oldtuner2/src/GP/GrammarParser.hs
mit
parsePrimitiveType :: Parser Type parsePrimitiveType = do name <- identifier return $ PrimitiveType name
128
parsePrimitiveType :: Parser Type parsePrimitiveType = do name <- identifier return $ PrimitiveType name
128
parsePrimitiveType = do name <- identifier return $ PrimitiveType name
94
false
true
1
9
37
35
14
21
null
null
vincenthz/hs-foundation
basement/Basement/UArray/Base.hs
bsd-3-clause
unsafeWrite (MUArray start _ (MUArrayAddr fptr)) i v = withFinalPtr fptr $ \(Ptr addr) -> primAddrWrite addr (start+i) v
120
unsafeWrite (MUArray start _ (MUArrayAddr fptr)) i v = withFinalPtr fptr $ \(Ptr addr) -> primAddrWrite addr (start+i) v
120
unsafeWrite (MUArray start _ (MUArrayAddr fptr)) i v = withFinalPtr fptr $ \(Ptr addr) -> primAddrWrite addr (start+i) v
120
false
false
0
9
18
61
30
31
null
null
mstksg/hledger
hledger-ui/Hledger/UI/TransactionScreen.hs
gpl-3.0
rsSelect _ scr = scr
20
rsSelect _ scr = scr
20
rsSelect _ scr = scr
20
false
false
1
5
4
12
5
7
null
null
bitemyapp/ganeti
src/Ganeti/Confd/Server.hs
bsd-2-clause
buildResponse cdata (ConfdRequest { confdRqType = ReqNodePipByInstPip , confdRqQuery = DictQuery query}) = let (cfg, linkipmap) = cdata link = fromMaybe (getDefaultNicLink cfg) (confdReqQLink query) in case confdReqQIp query of Just ip -> return $ getNodePipByInstanceIp cfg linkipmap link ip Nothing -> return (ReplyStatusOk, J.showJSON $ map (getNodePipByInstanceIp cfg linkipmap link) (confdReqQIpList query), clusterSerial . configCluster $ fst cdata)
619
buildResponse cdata (ConfdRequest { confdRqType = ReqNodePipByInstPip , confdRqQuery = DictQuery query}) = let (cfg, linkipmap) = cdata link = fromMaybe (getDefaultNicLink cfg) (confdReqQLink query) in case confdReqQIp query of Just ip -> return $ getNodePipByInstanceIp cfg linkipmap link ip Nothing -> return (ReplyStatusOk, J.showJSON $ map (getNodePipByInstanceIp cfg linkipmap link) (confdReqQIpList query), clusterSerial . configCluster $ fst cdata)
619
buildResponse cdata (ConfdRequest { confdRqType = ReqNodePipByInstPip , confdRqQuery = DictQuery query}) = let (cfg, linkipmap) = cdata link = fromMaybe (getDefaultNicLink cfg) (confdReqQLink query) in case confdReqQIp query of Just ip -> return $ getNodePipByInstanceIp cfg linkipmap link ip Nothing -> return (ReplyStatusOk, J.showJSON $ map (getNodePipByInstanceIp cfg linkipmap link) (confdReqQIpList query), clusterSerial . configCluster $ fst cdata)
619
false
false
0
15
222
157
78
79
null
null
tolysz/hs-tls
core/Network/TLS/Struct.hs
bsd-3-clause
typeOfHandshake (ServerHelloDone) = HandshakeType_ServerHelloDone
76
typeOfHandshake (ServerHelloDone) = HandshakeType_ServerHelloDone
76
typeOfHandshake (ServerHelloDone) = HandshakeType_ServerHelloDone
76
false
false
0
6
14
12
6
6
null
null
acowley/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pprUserTypeCtxt (ConArgCtxt c) = ptext (sLit "the type of the constructor") <+> quotes (ppr c)
97
pprUserTypeCtxt (ConArgCtxt c) = ptext (sLit "the type of the constructor") <+> quotes (ppr c)
97
pprUserTypeCtxt (ConArgCtxt c) = ptext (sLit "the type of the constructor") <+> quotes (ppr c)
97
false
false
0
8
17
38
17
21
null
null
z0isch/aoc2016
src/Day10.hs
bsd-3-clause
instructionParser :: Parser Instruction instructionParser = try takeParser <|> giveParser where botParser = string "bot " *> (Bot <$> natural) outputParser = string "output " *> (Output <$> natural) chipHolderParser = try botParser <|> outputParser takeParser = TakeVal <$> (string "value " *> ((,) <$> natural <*> (string "goes to " *> chipHolderParser))) giveParser = (\c1 _ c2 _ c3 -> GiveVal c1 (c2,c3)) <$> botParser <*> string "gives low to " <*> chipHolderParser <*> string "and high to " <*> chipHolderParser
539
instructionParser :: Parser Instruction instructionParser = try takeParser <|> giveParser where botParser = string "bot " *> (Bot <$> natural) outputParser = string "output " *> (Output <$> natural) chipHolderParser = try botParser <|> outputParser takeParser = TakeVal <$> (string "value " *> ((,) <$> natural <*> (string "goes to " *> chipHolderParser))) giveParser = (\c1 _ c2 _ c3 -> GiveVal c1 (c2,c3)) <$> botParser <*> string "gives low to " <*> chipHolderParser <*> string "and high to " <*> chipHolderParser
539
instructionParser = try takeParser <|> giveParser where botParser = string "bot " *> (Bot <$> natural) outputParser = string "output " *> (Output <$> natural) chipHolderParser = try botParser <|> outputParser takeParser = TakeVal <$> (string "value " *> ((,) <$> natural <*> (string "goes to " *> chipHolderParser))) giveParser = (\c1 _ c2 _ c3 -> GiveVal c1 (c2,c3)) <$> botParser <*> string "gives low to " <*> chipHolderParser <*> string "and high to " <*> chipHolderParser
499
false
true
0
13
104
175
90
85
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/Data/Sequence.hs
bsd-3-clause
reverseNode f (Node3 s a b c) = Node3 s (f c) (f b) (f a)
57
reverseNode f (Node3 s a b c) = Node3 s (f c) (f b) (f a)
57
reverseNode f (Node3 s a b c) = Node3 s (f c) (f b) (f a)
57
false
false
0
7
15
52
24
28
null
null
DaMSL/K3
src/Language/K3/Parser/SQL.hs
apache-2.0
planNodeChains (PSubquery _ qcl) = queryClosureChains qcl
57
planNodeChains (PSubquery _ qcl) = queryClosureChains qcl
57
planNodeChains (PSubquery _ qcl) = queryClosureChains qcl
57
false
false
0
7
6
20
9
11
null
null
gafiatulin/codewars
src/4 kyu/RPN.hs
mit
calc :: String -> Double calc "" = 0
36
calc :: String -> Double calc "" = 0
36
calc "" = 0
11
false
true
0
5
8
18
9
9
null
null
whittle/linkedin-api
Network/API/LinkedIn.hs
mit
getResponse :: ( QueryResponsePair q r , Query q , L.Response r ) => Token -> q -> IO r getResponse token query = (sendRequest token $ mkRequest query) >>= parseResponse
244
getResponse :: ( QueryResponsePair q r , Query q , L.Response r ) => Token -> q -> IO r getResponse token query = (sendRequest token $ mkRequest query) >>= parseResponse
244
getResponse token query = (sendRequest token $ mkRequest query) >>= parseResponse
81
false
true
0
9
105
74
35
39
null
null
ivan-m/unordered-graphs
src/Data/Graph/Unordered/Internal.hs
mit
edges :: Graph et n nl el -> [Edge] edges = HM.keys . edgeMap
61
edges :: Graph et n nl el -> [Edge] edges = HM.keys . edgeMap
61
edges = HM.keys . edgeMap
25
false
true
0
6
13
33
17
16
null
null
spechub/Hets
CASL/CCC/FreeTypes.hs
gpl-2.0
{- check if leading symbols are new (not in the image of morphism), if not, return it as proof obligation -} getDefsForOld :: GetRange f => Sign f e -> [FORMULA f] -> [FORMULA f] getDefsForOld sig axioms = let oldOpMap = opMap sig oldPredMap = predMap sig in filter (\ f -> case leadingSym f of Just (Left (Qual_op_name ident ot _)) | MapSet.member ident (toOpType ot) oldOpMap -> True Just (Right (Qual_pred_name ident pt _)) | MapSet.member ident (toPredType pt) oldPredMap -> True _ -> False) axioms
583
getDefsForOld :: GetRange f => Sign f e -> [FORMULA f] -> [FORMULA f] getDefsForOld sig axioms = let oldOpMap = opMap sig oldPredMap = predMap sig in filter (\ f -> case leadingSym f of Just (Left (Qual_op_name ident ot _)) | MapSet.member ident (toOpType ot) oldOpMap -> True Just (Right (Qual_pred_name ident pt _)) | MapSet.member ident (toPredType pt) oldPredMap -> True _ -> False) axioms
464
getDefsForOld sig axioms = let oldOpMap = opMap sig oldPredMap = predMap sig in filter (\ f -> case leadingSym f of Just (Left (Qual_op_name ident ot _)) | MapSet.member ident (toOpType ot) oldOpMap -> True Just (Right (Qual_pred_name ident pt _)) | MapSet.member ident (toPredType pt) oldPredMap -> True _ -> False) axioms
392
true
true
0
18
169
191
89
102
null
null
kawu/concraft
src/NLP/Concraft/DAGSeg.hs
bsd-2-clause
disambPath :: (Ord t) => [(EdgeID, S.Set t)] -> Anno t Double -> Anno t Bool disambPath path = DAG.mapE doit where pathMap = M.fromList path doit edgeID m = M.fromList $ do let onPath = maybe S.empty id $ M.lookup edgeID pathMap x <- M.keys m return (x, S.member x onPath) -- | Determine max probabilities corresponding to individual tags w.r.t. the -- disambiguation model.
406
disambPath :: (Ord t) => [(EdgeID, S.Set t)] -> Anno t Double -> Anno t Bool disambPath path = DAG.mapE doit where pathMap = M.fromList path doit edgeID m = M.fromList $ do let onPath = maybe S.empty id $ M.lookup edgeID pathMap x <- M.keys m return (x, S.member x onPath) -- | Determine max probabilities corresponding to individual tags w.r.t. the -- disambiguation model.
406
disambPath path = DAG.mapE doit where pathMap = M.fromList path doit edgeID m = M.fromList $ do let onPath = maybe S.empty id $ M.lookup edgeID pathMap x <- M.keys m return (x, S.member x onPath) -- | Determine max probabilities corresponding to individual tags w.r.t. the -- disambiguation model.
329
false
true
2
14
97
161
73
88
null
null
grumply/Ef
tests/Ef/Pipes.hs
bsd-3-clause
yield :: Monad m => a -> Producer' a m () yield a = send (Respond a id)
71
yield :: Monad m => a -> Producer' a m () yield a = send (Respond a id)
71
yield a = send (Respond a id)
29
false
true
0
9
17
49
22
27
null
null
A1kmm/declarative-fieldml-prototype
src/Data/FieldML/InitialModel.hs
bsd-3-clause
dfSubsetFrom = L2DomainFunctionID 1
39
dfSubsetFrom = L2DomainFunctionID 1
39
dfSubsetFrom = L2DomainFunctionID 1
39
false
false
0
5
7
9
4
5
null
null
GRACeFUL-project/GRACe
RestAPI/Main.hs
bsd-3-clause
loadLibraries :: FilePath -> IO Libraries loadLibraries dir = do fs <- listDirectory dir >>= return . filter (\l -> takeExtension l == ".hs") libs <- withCurrentDirectory dir $ mapM (runInterpreter . loadLib) fs mapM (\l -> putStrLn $ "Found library: " ++ l) [ libraryId l | Right l <- libs ] return $ M.fromList [(libraryId l, l) | Right l <- libs] where loadLib :: String -> Interpreter Library loadLib lib = do loadModules [lib] setTopLevelModules [takeWhile (/='.') lib] interpret "library" (as :: Library) -- HTML rep
550
loadLibraries :: FilePath -> IO Libraries loadLibraries dir = do fs <- listDirectory dir >>= return . filter (\l -> takeExtension l == ".hs") libs <- withCurrentDirectory dir $ mapM (runInterpreter . loadLib) fs mapM (\l -> putStrLn $ "Found library: " ++ l) [ libraryId l | Right l <- libs ] return $ M.fromList [(libraryId l, l) | Right l <- libs] where loadLib :: String -> Interpreter Library loadLib lib = do loadModules [lib] setTopLevelModules [takeWhile (/='.') lib] interpret "library" (as :: Library) -- HTML rep
550
loadLibraries dir = do fs <- listDirectory dir >>= return . filter (\l -> takeExtension l == ".hs") libs <- withCurrentDirectory dir $ mapM (runInterpreter . loadLib) fs mapM (\l -> putStrLn $ "Found library: " ++ l) [ libraryId l | Right l <- libs ] return $ M.fromList [(libraryId l, l) | Right l <- libs] where loadLib :: String -> Interpreter Library loadLib lib = do loadModules [lib] setTopLevelModules [takeWhile (/='.') lib] interpret "library" (as :: Library) -- HTML rep
508
false
true
0
13
116
224
108
116
null
null
tjakway/ghcjvm
compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
bsd-3-clause
- | Clean out unneeded spill\/reloads from this top level thing. cleanSpills :: Instruction instr => Platform -> LiveCmmDecl statics instr -> LiveCmmDecl statics instr cleanSpills platform cmm = evalState (cleanSpin platform 0 cmm) initCleanS
284
cleanSpills :: Instruction instr => Platform -> LiveCmmDecl statics instr -> LiveCmmDecl statics instr cleanSpills platform cmm = evalState (cleanSpin platform 0 cmm) initCleanS
217
cleanSpills platform cmm = evalState (cleanSpin platform 0 cmm) initCleanS
82
true
true
2
10
76
65
32
33
null
null
sgillespie/ghc
testsuite/tests/typecheck/should_run/Defer01.hs
bsd-3-clause
d :: a -> a d = 1
17
d :: a -> a d = 1
17
d = 1
5
false
true
0
7
7
22
9
13
null
null
michaxm/packman
Test/Main.hs
bsd-3-clause
packAndPrint o = trySerialize o >> putStrLn "Serialized"
56
packAndPrint o = trySerialize o >> putStrLn "Serialized"
56
packAndPrint o = trySerialize o >> putStrLn "Serialized"
56
false
false
0
6
7
19
8
11
null
null
kadena-io/pact
src/Pact/Types/Names.hs
bsd-3-clause
qualifiedNameParser :: (TokenParsing m, Monad m) => Info -> m QualifiedName qualifiedNameParser i = do a <- ident style b <- dot *> ident style c <- optional (dot *> ident style) case c of Nothing -> return (QualifiedName (ModuleName a Nothing) b i) <?> "qualified name" Just c' -> return (QualifiedName (ModuleName b (Just . NamespaceName $ a)) c' i) <?> "namespaced qualified name"
399
qualifiedNameParser :: (TokenParsing m, Monad m) => Info -> m QualifiedName qualifiedNameParser i = do a <- ident style b <- dot *> ident style c <- optional (dot *> ident style) case c of Nothing -> return (QualifiedName (ModuleName a Nothing) b i) <?> "qualified name" Just c' -> return (QualifiedName (ModuleName b (Just . NamespaceName $ a)) c' i) <?> "namespaced qualified name"
399
qualifiedNameParser i = do a <- ident style b <- dot *> ident style c <- optional (dot *> ident style) case c of Nothing -> return (QualifiedName (ModuleName a Nothing) b i) <?> "qualified name" Just c' -> return (QualifiedName (ModuleName b (Just . NamespaceName $ a)) c' i) <?> "namespaced qualified name"
323
false
true
0
19
80
169
78
91
null
null
cabrera/elerea
FRP/Elerea/Legacy/Internal.hs
bsd-3-clause
{-| A helper function to wrap any value in a 'Maybe' depending on a boolean condition. -} toMaybe :: Bool -> a -> Maybe a toMaybe c v = if c then Just v else Nothing
166
toMaybe :: Bool -> a -> Maybe a toMaybe c v = if c then Just v else Nothing
75
toMaybe c v = if c then Just v else Nothing
43
true
true
0
8
36
44
21
23
null
null
olsner/ghc
compiler/prelude/PrelInfo.hs
bsd-3-clause
{- ************************************************************************ * * Export lists for pseudo-modules (GHC.Prim) * * ************************************************************************ GHC.Prim "exports" all the primops and primitive types, some wired-in Ids. -} ghcPrimExports :: [IfaceExport] ghcPrimExports = map (avail . idName) ghcPrimIds ++ map (avail . idName . primOpId) allThePrimOps ++ [ AvailTC n [n] [] | tc <- funTyCon : primTyCons, let n = tyConName tc ]
646
ghcPrimExports :: [IfaceExport] ghcPrimExports = map (avail . idName) ghcPrimIds ++ map (avail . idName . primOpId) allThePrimOps ++ [ AvailTC n [n] [] | tc <- funTyCon : primTyCons, let n = tyConName tc ]
216
ghcPrimExports = map (avail . idName) ghcPrimIds ++ map (avail . idName . primOpId) allThePrimOps ++ [ AvailTC n [n] [] | tc <- funTyCon : primTyCons, let n = tyConName tc ]
184
true
true
0
12
222
100
48
52
null
null
bruno-cadorette/Baeta-Compiler
src/Parser/Base.hs
gpl-3.0
-- |Helper startWithLowerCase :: Parser String startWithLowerCase = liftA2 (:) lowerChar $ many alphaNumChar
108
startWithLowerCase :: Parser String startWithLowerCase = liftA2 (:) lowerChar $ many alphaNumChar
97
startWithLowerCase = liftA2 (:) lowerChar $ many alphaNumChar
61
true
true
0
6
13
29
15
14
null
null
liangcun/ConceptsOfSpatialInformation
extras/CoreConceptsHs Backup/NetworkImpl.hs
apache-2.0
mkGraph :: [NetworkImpl.Node] -> [NetworkImpl.Edge] -> CCGraph mkGraph nodes ledges = Data.Graph.Inductive.Graph.mkGraph (map label nodes) ledges where label :: NetworkImpl.Node -> LNode () label node = (node, ())
218
mkGraph :: [NetworkImpl.Node] -> [NetworkImpl.Edge] -> CCGraph mkGraph nodes ledges = Data.Graph.Inductive.Graph.mkGraph (map label nodes) ledges where label :: NetworkImpl.Node -> LNode () label node = (node, ())
218
mkGraph nodes ledges = Data.Graph.Inductive.Graph.mkGraph (map label nodes) ledges where label :: NetworkImpl.Node -> LNode () label node = (node, ())
155
false
true
5
8
32
101
50
51
null
null
snoyberg/hackage-server
MirrorClient.hs
bsd-3-clause
helpDescrStr :: String helpDescrStr = unlines [ "The hackage-mirror client copies packages from one hackage server to another." , "By default it copies over all packages that exist on the source but not on" , "the destination server. You can also select just specific packages to mirror." , "It is also possible to run the mirror in a continuous mode, giving you" , "nearly-live mirroring.\n" ]
406
helpDescrStr :: String helpDescrStr = unlines [ "The hackage-mirror client copies packages from one hackage server to another." , "By default it copies over all packages that exist on the source but not on" , "the destination server. You can also select just specific packages to mirror." , "It is also possible to run the mirror in a continuous mode, giving you" , "nearly-live mirroring.\n" ]
406
helpDescrStr = unlines [ "The hackage-mirror client copies packages from one hackage server to another." , "By default it copies over all packages that exist on the source but not on" , "the destination server. You can also select just specific packages to mirror." , "It is also possible to run the mirror in a continuous mode, giving you" , "nearly-live mirroring.\n" ]
383
false
true
0
6
77
35
18
17
null
null
shlevy/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
mkHsOpTy :: LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass mkHsOpTy ty1 op ty2 = HsOpTy ty1 op ty2
117
mkHsOpTy :: LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass mkHsOpTy ty1 op ty2 = HsOpTy ty1 op ty2
117
mkHsOpTy ty1 op ty2 = HsOpTy ty1 op ty2
39
false
true
0
9
22
55
25
30
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Coverage.hs
bsd-3-clause
getFileName :: TM FastString getFileName = fileName `liftM` getEnv
66
getFileName :: TM FastString getFileName = fileName `liftM` getEnv
66
getFileName = fileName `liftM` getEnv
37
false
true
0
5
8
20
11
9
null
null
bordaigorl/jamesbound
src/Language/PiCalc/Dot.hs
gpl-2.0
stdToDotWith' par i (StdNF stdp) = graphElemsToDot par nodes edges where nodes = [ (unique n, Left $ show $ pretty n) | (StdFactor _ ns) <- MSet.distinctElems stdp, n <- Set.elems ns ] ++ map (\(a,(b,_))->(a,b)) procNodes procNodes = zipWith (\a b->(b, a)) [ (Right $ show $ prettyShort 1 p, Set.elems ns) | (StdFactor p ns) <- MSet.elems stdp ] [i, i+1..] edges = [(unique n,a,()) | (a, (_, ns)) <- procNodes, n <- ns] -- BEWARE: undirected graphs only accept INCREASING edges i.e. (a,b,_) where a <= b -- here we are ok because id for seq proc get calculated from first free.
639
stdToDotWith' par i (StdNF stdp) = graphElemsToDot par nodes edges where nodes = [ (unique n, Left $ show $ pretty n) | (StdFactor _ ns) <- MSet.distinctElems stdp, n <- Set.elems ns ] ++ map (\(a,(b,_))->(a,b)) procNodes procNodes = zipWith (\a b->(b, a)) [ (Right $ show $ prettyShort 1 p, Set.elems ns) | (StdFactor p ns) <- MSet.elems stdp ] [i, i+1..] edges = [(unique n,a,()) | (a, (_, ns)) <- procNodes, n <- ns] -- BEWARE: undirected graphs only accept INCREASING edges i.e. (a,b,_) where a <= b -- here we are ok because id for seq proc get calculated from first free.
639
stdToDotWith' par i (StdNF stdp) = graphElemsToDot par nodes edges where nodes = [ (unique n, Left $ show $ pretty n) | (StdFactor _ ns) <- MSet.distinctElems stdp, n <- Set.elems ns ] ++ map (\(a,(b,_))->(a,b)) procNodes procNodes = zipWith (\a b->(b, a)) [ (Right $ show $ prettyShort 1 p, Set.elems ns) | (StdFactor p ns) <- MSet.elems stdp ] [i, i+1..] edges = [(unique n,a,()) | (a, (_, ns)) <- procNodes, n <- ns] -- BEWARE: undirected graphs only accept INCREASING edges i.e. (a,b,_) where a <= b -- here we are ok because id for seq proc get calculated from first free.
639
false
false
5
10
167
281
142
139
null
null
rehno-lindeque/poet
src/haskell/OSIX/SemanticDB.hs
gpl-3.0
c_SEMANTICID_STRING :: SemanticId c_SEMANTICID_INVALID = 0xffffffff
71
c_SEMANTICID_STRING :: SemanticId c_SEMANTICID_INVALID = 0xffffffff
70
c_SEMANTICID_INVALID = 0xffffffff
34
false
true
0
4
9
11
6
5
null
null
rueshyna/gogol
gogol-replicapool/gen/Network/Google/Resource/ReplicaPool/InstanceGroupManagers/SetInstanceTemplate.hs
mpl-2.0
-- | Creates a value of 'InstanceGroupManagersSetInstanceTemplate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'igmsitProject' -- -- * 'igmsitInstanceGroupManager' -- -- * 'igmsitZone' -- -- * 'igmsitPayload' instanceGroupManagersSetInstanceTemplate :: Text -- ^ 'igmsitProject' -> Text -- ^ 'igmsitInstanceGroupManager' -> Text -- ^ 'igmsitZone' -> InstanceGroupManagersSetInstanceTemplateRequest -- ^ 'igmsitPayload' -> InstanceGroupManagersSetInstanceTemplate instanceGroupManagersSetInstanceTemplate pIgmsitProject_ pIgmsitInstanceGroupManager_ pIgmsitZone_ pIgmsitPayload_ = InstanceGroupManagersSetInstanceTemplate' { _igmsitProject = pIgmsitProject_ , _igmsitInstanceGroupManager = pIgmsitInstanceGroupManager_ , _igmsitZone = pIgmsitZone_ , _igmsitPayload = pIgmsitPayload_ }
916
instanceGroupManagersSetInstanceTemplate :: Text -- ^ 'igmsitProject' -> Text -- ^ 'igmsitInstanceGroupManager' -> Text -- ^ 'igmsitZone' -> InstanceGroupManagersSetInstanceTemplateRequest -- ^ 'igmsitPayload' -> InstanceGroupManagersSetInstanceTemplate instanceGroupManagersSetInstanceTemplate pIgmsitProject_ pIgmsitInstanceGroupManager_ pIgmsitZone_ pIgmsitPayload_ = InstanceGroupManagersSetInstanceTemplate' { _igmsitProject = pIgmsitProject_ , _igmsitInstanceGroupManager = pIgmsitInstanceGroupManager_ , _igmsitZone = pIgmsitZone_ , _igmsitPayload = pIgmsitPayload_ }
618
instanceGroupManagersSetInstanceTemplate pIgmsitProject_ pIgmsitInstanceGroupManager_ pIgmsitZone_ pIgmsitPayload_ = InstanceGroupManagersSetInstanceTemplate' { _igmsitProject = pIgmsitProject_ , _igmsitInstanceGroupManager = pIgmsitInstanceGroupManager_ , _igmsitZone = pIgmsitZone_ , _igmsitPayload = pIgmsitPayload_ }
344
true
true
0
10
136
86
52
34
null
null
osa1/sequent-core
src/Language/SequentCore/Arity.hs
bsd-3-clause
arityApp :: ArityType -> CheapFlag -> ArityType -- Processing (fun arg) where at is the ArityType of fun, -- Knock off an argument and behave like 'let' arityApp (ABot 0) _ = ABot 0
190
arityApp :: ArityType -> CheapFlag -> ArityType arityApp (ABot 0) _ = ABot 0
85
arityApp (ABot 0) _ = ABot 0
37
true
true
0
7
42
35
18
17
null
null
futurice/pulmurice-client
src/Main.hs
mit
signup :: String -> Text -> Text -> IO () signup endPointHost teamName email = do resMsg <- sendMessage endPointHost $ SignupReqMsg teamName email case resMsg of SignupResMsg -> putStrLn "signup received, we will send a verification email shortly." _ -> handleRest resMsg
294
signup :: String -> Text -> Text -> IO () signup endPointHost teamName email = do resMsg <- sendMessage endPointHost $ SignupReqMsg teamName email case resMsg of SignupResMsg -> putStrLn "signup received, we will send a verification email shortly." _ -> handleRest resMsg
294
signup endPointHost teamName email = do resMsg <- sendMessage endPointHost $ SignupReqMsg teamName email case resMsg of SignupResMsg -> putStrLn "signup received, we will send a verification email shortly." _ -> handleRest resMsg
252
false
true
0
10
65
79
36
43
null
null
simhu/cubical
Eval.hs
mit
fstSVal, sndSVal :: Val -> Val fstSVal (VSPair a b) = a
58
fstSVal, sndSVal :: Val -> Val fstSVal (VSPair a b) = a
58
fstSVal (VSPair a b) = a
27
false
true
2
9
14
38
16
22
null
null
hemio-ev/libghc-acme
src/Network/ACME/HTTPS/Internal.hs
lgpl-3.0
cragStateSetNonce :: Maybe AcmeJwsNonce -> CragT () cragStateSetNonce n = modify (\s -> s {cragStateNonce = n})
111
cragStateSetNonce :: Maybe AcmeJwsNonce -> CragT () cragStateSetNonce n = modify (\s -> s {cragStateNonce = n})
111
cragStateSetNonce n = modify (\s -> s {cragStateNonce = n})
59
false
true
0
9
16
45
23
22
null
null
rudymatela/llcheck
src/Test/LeanCheck/Utils/Types.hs
bsd-3-clause
oA :: (Int -> Int -> Int) -> (A -> A -> A); oA = oNewtype mkA unA
68
oA :: (Int -> Int -> Int) -> (A -> A -> A) oA = oNewtype mkA unA
66
oA = oNewtype mkA unA
23
false
true
0
8
20
46
24
22
null
null
michiexile/hplex
pershom/src/Math/Misc/Matrix.hs
bsd-3-clause
numRows :: Matrix v a -> Int numRows (C m _ _) = m
50
numRows :: Matrix v a -> Int numRows (C m _ _) = m
50
numRows (C m _ _) = m
21
false
true
0
9
13
39
17
22
null
null