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
nh2/quickcheck
Test/QuickCheck/Gen.hs
bsd-3-clause
elements xs = (xs !!) `fmap` choose (0, length xs - 1)
54
elements xs = (xs !!) `fmap` choose (0, length xs - 1)
54
elements xs = (xs !!) `fmap` choose (0, length xs - 1)
54
false
false
1
9
11
41
20
21
null
null
wouwouwou/module_8
src/main/haskell/series2/exercise5.hs
apache-2.0
weakIncr :: (Ord a, Fractional a) => [a] -> Bool weakIncr = weakIncr' . reverse
79
weakIncr :: (Ord a, Fractional a) => [a] -> Bool weakIncr = weakIncr' . reverse
79
weakIncr = weakIncr' . reverse
30
false
true
0
7
14
37
20
17
null
null
glutamate/probably-base
Math/Probably/JAGS.hs
bsd-3-clause
ppDE (Uniform x y) = "dunif("++ppE x++", "++ppE y ++")"
55
ppDE (Uniform x y) = "dunif("++ppE x++", "++ppE y ++")"
55
ppDE (Uniform x y) = "dunif("++ppE x++", "++ppE y ++")"
55
false
false
0
9
9
39
18
21
null
null
NorfairKing/sus-depot
shared/shared/xmonad/xmonad.hs
gpl-2.0
myLogHook xmproc = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc , ppTitle = xmobarColor myTitleColor "" . shorten myTitleLength , ppCurrent = xmobarColor myCurrentWSColor "" . wrap myCurrentWSLeft myCurrentWSRight , ppVisible = xmobarColor myVisibleWSColor "" . wrap myVisibleWSLeft myVisi...
420
myLogHook xmproc = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc , ppTitle = xmobarColor myTitleColor "" . shorten myTitleLength , ppCurrent = xmobarColor myCurrentWSColor "" . wrap myCurrentWSLeft myCurrentWSRight , ppVisible = xmobarColor myVisibleWSColor "" . wrap myVisibleWSLeft myVisi...
420
myLogHook xmproc = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc , ppTitle = xmobarColor myTitleColor "" . shorten myTitleLength , ppCurrent = xmobarColor myCurrentWSColor "" . wrap myCurrentWSLeft myCurrentWSRight , ppVisible = xmobarColor myVisibleWSColor "" . wrap myVisibleWSLeft myVisi...
420
false
false
0
9
74
102
51
51
null
null
Jem777/deepthought
src/StdLib.hs
gpl-3.0
builtins = [ ("+", add), ("-", sub), ("neg", neg), ("*", mul), ("/", StdLib.div), ("abs", StdLib.abs), ("str", string), (":", listconstructor), ("print", printf), ("printStr", printStr) ]
235
builtins = [ ("+", add), ("-", sub), ("neg", neg), ("*", mul), ("/", StdLib.div), ("abs", StdLib.abs), ("str", string), (":", listconstructor), ("print", printf), ("printStr", printStr) ]
235
builtins = [ ("+", add), ("-", sub), ("neg", neg), ("*", mul), ("/", StdLib.div), ("abs", StdLib.abs), ("str", string), (":", listconstructor), ("print", printf), ("printStr", printStr) ]
235
false
false
0
7
71
100
65
35
null
null
conal/lambda-ccc
src/LambdaCCC/Unused/ReifyLambda.hs
bsd-3-clause
-- anytdER :: (MonadCatch m, Walker c g, ExtendPath c Crumb, Injection CoreExpr g) => -- Rewrite c m CoreExpr -> Rewrite c m g -- anytdER r = anytdR (promoteExprR r) tryRulesBU :: [String] -> RewriteH Core tryRulesBU = tryR . anybuER . rulesR
254
tryRulesBU :: [String] -> RewriteH Core tryRulesBU = tryR . anybuER . rulesR
76
tryRulesBU = tryR . anybuER . rulesR
36
true
true
0
6
56
32
18
14
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2007-Programming_in_Haskell-1st_Edition-Graham_Hutton/ch_12_9.hs
unlicense
------------------------------------------------------------------------------ -- 4 {- 0,1,1,2,3,5, 8 0,1,1,2,3, 5,8 1,2,3,4,8,12 -} fibs :: [Integer] fibs = 0 : 1 : [ x + y | (x,y) <- zip fibs (tail fibs) ]
213
fibs :: [Integer] fibs = 0 : 1 : [ x + y | (x,y) <- zip fibs (tail fibs) ]
74
fibs = 0 : 1 : [ x + y | (x,y) <- zip fibs (tail fibs) ]
56
true
true
0
11
36
57
32
25
null
null
MichielDerhaeg/stack
src/Stack/Types/Package.hs
bsd-3-clause
packageDefinedFlags :: Package -> Set FlagName packageDefinedFlags = M.keysSet . packageDefaultFlags
100
packageDefinedFlags :: Package -> Set FlagName packageDefinedFlags = M.keysSet . packageDefaultFlags
100
packageDefinedFlags = M.keysSet . packageDefaultFlags
53
false
true
0
6
10
24
12
12
null
null
randen/cabal
cabal-install/Main.hs
bsd-3-clause
checkAction :: Flag Verbosity -> [String] -> Action checkAction verbosityFlag extraArgs _globalFlags = do unless (null extraArgs) $ die $ "'check' doesn't take any extra arguments: " ++ unwords extraArgs allOk <- Check.check (fromFlag verbosityFlag) unless allOk exitFailure
284
checkAction :: Flag Verbosity -> [String] -> Action checkAction verbosityFlag extraArgs _globalFlags = do unless (null extraArgs) $ die $ "'check' doesn't take any extra arguments: " ++ unwords extraArgs allOk <- Check.check (fromFlag verbosityFlag) unless allOk exitFailure
284
checkAction verbosityFlag extraArgs _globalFlags = do unless (null extraArgs) $ die $ "'check' doesn't take any extra arguments: " ++ unwords extraArgs allOk <- Check.check (fromFlag verbosityFlag) unless allOk exitFailure
232
false
true
0
13
47
91
40
51
null
null
juhp/stack
test/integration/tests/mutable-deps/files/filepath-1.4.2.1/System/FilePath/Internal.hs
bsd-3-clause
joinPath :: [FilePath] -> FilePath -- Note that this definition on c:\\c:\\, join then split will give c:\\. joinPath = foldr combine ""
136
joinPath :: [FilePath] -> FilePath joinPath = foldr combine ""
62
joinPath = foldr combine ""
27
true
true
0
7
22
30
14
16
null
null
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeElasticLoadBalancers.hs
mpl-2.0
-- | A list of 'ElasticLoadBalancer' objects that describe the specified Elastic -- Load Balancing instances. delbrElasticLoadBalancers :: Lens' DescribeElasticLoadBalancersResponse [ElasticLoadBalancer] delbrElasticLoadBalancers = lens _delbrElasticLoadBalancers (\s a -> s { _delbrElasticLoadBalancers = a ...
342
delbrElasticLoadBalancers :: Lens' DescribeElasticLoadBalancersResponse [ElasticLoadBalancer] delbrElasticLoadBalancers = lens _delbrElasticLoadBalancers (\s a -> s { _delbrElasticLoadBalancers = a }) . _List
232
delbrElasticLoadBalancers = lens _delbrElasticLoadBalancers (\s a -> s { _delbrElasticLoadBalancers = a }) . _List
138
true
true
0
10
59
48
27
21
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types/Product.hs
mpl-2.0
-- | The status specifying why the bid responses were considered to have no -- applicable bids. brwbsrStatus :: Lens' BidResponseWithoutBidsStatusRow (Maybe BidResponseWithoutBidsStatusRowStatus) brwbsrStatus = lens _brwbsrStatus (\ s a -> s{_brwbsrStatus = a})
263
brwbsrStatus :: Lens' BidResponseWithoutBidsStatusRow (Maybe BidResponseWithoutBidsStatusRowStatus) brwbsrStatus = lens _brwbsrStatus (\ s a -> s{_brwbsrStatus = a})
167
brwbsrStatus = lens _brwbsrStatus (\ s a -> s{_brwbsrStatus = a})
67
true
true
1
9
35
53
26
27
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/BooleanFormula.hs
bsd-3-clause
simplify f (Or xs) = mkOr (map (simplify f) xs)
47
simplify f (Or xs) = mkOr (map (simplify f) xs)
47
simplify f (Or xs) = mkOr (map (simplify f) xs)
47
false
false
0
9
9
34
16
18
null
null
mcschroeder/ghc
compiler/main/DynFlags.hs
bsd-3-clause
optIntSuffixM :: (Maybe Int -> DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags) optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))
156
optIntSuffixM :: (Maybe Int -> DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags) optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))
156
optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))
53
false
true
0
10
35
68
32
36
null
null
newhoggy/monadic-regions
src/Test/SafeHandlesFMTest.hs
bsd-3-clause
test_copy fname_in fname_out = do hout <- newSHandle fname_out WriteMode (do newRgn (\(SubRegion liftSIO) -> do hin <- newSHandle fname_in ReadMode till (shIsEOF hin) (shGetLine hin >>= liftSIO . shPutStrLn hout)) shReport "Finished copying") `shCa...
456
test_copy fname_in fname_out = do hout <- newSHandle fname_out WriteMode (do newRgn (\(SubRegion liftSIO) -> do hin <- newSHandle fname_in ReadMode till (shIsEOF hin) (shGetLine hin >>= liftSIO . shPutStrLn hout)) shReport "Finished copying") `shCa...
456
test_copy fname_in fname_out = do hout <- newSHandle fname_out WriteMode (do newRgn (\(SubRegion liftSIO) -> do hin <- newSHandle fname_in ReadMode till (shIsEOF hin) (shGetLine hin >>= liftSIO . shPutStrLn hout)) shReport "Finished copying") `shCa...
456
false
false
0
20
141
150
70
80
null
null
omefire/students-teachers-pairing
src/Domain.hs
bsd-3-clause
-- Raw Tutors Data tutors_raw = [(1, "Joakim"), (2, "Bob"), (3, "Frieda"), (4, "Kseniya"), (5, "Maggie"), (6, "Jamal") ]
179
tutors_raw = [(1, "Joakim"), (2, "Bob"), (3, "Frieda"), (4, "Kseniya"), (5, "Maggie"), (6, "Jamal") ]
160
tutors_raw = [(1, "Joakim"), (2, "Bob"), (3, "Frieda"), (4, "Kseniya"), (5, "Maggie"), (6, "Jamal") ]
160
true
false
0
6
77
61
40
21
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Hl7V2Stores/Messages/Patch.hs
mpl-2.0
-- | V1 error format. pldshvsmpXgafv :: Lens' ProjectsLocationsDataSetsHl7V2StoresMessagesPatch (Maybe Xgafv) pldshvsmpXgafv = lens _pldshvsmpXgafv (\ s a -> s{_pldshvsmpXgafv = a})
189
pldshvsmpXgafv :: Lens' ProjectsLocationsDataSetsHl7V2StoresMessagesPatch (Maybe Xgafv) pldshvsmpXgafv = lens _pldshvsmpXgafv (\ s a -> s{_pldshvsmpXgafv = a})
167
pldshvsmpXgafv = lens _pldshvsmpXgafv (\ s a -> s{_pldshvsmpXgafv = a})
79
true
true
0
8
29
49
25
24
null
null
oinuar/doppler
samples/skeleton/Main.hs
mit
main :: IO () main = render ApplicationState { getNumberOfClicks = 0 }
82
main :: IO () main = render ApplicationState { getNumberOfClicks = 0 }
82
main = render ApplicationState { getNumberOfClicks = 0 }
68
false
true
0
7
24
36
16
20
null
null
yairchu/ad
src/Numeric/AD/Internal/Chain.hs
bsd-3-clause
dropCells n (Binary _ _ _ _ xs) = (dropCells $! n - 1) xs
57
dropCells n (Binary _ _ _ _ xs) = (dropCells $! n - 1) xs
57
dropCells n (Binary _ _ _ _ xs) = (dropCells $! n - 1) xs
57
false
false
0
8
14
41
19
22
null
null
input-output-hk/pos-haskell-prototype
lib/test/Test/Pos/Block/CborSpec.hs
mit
spec :: Spec spec = do describe "Block network types" $ modifyMaxSuccess (min 10) $ do binaryTest @Block.MsgGetHeaders binaryTest @Block.MsgGetBlocks binaryTest @Block.MsgHeaders binaryTest @Block.MsgBlock binaryTest @Block.MsgStream binary...
635
spec :: Spec spec = do describe "Block network types" $ modifyMaxSuccess (min 10) $ do binaryTest @Block.MsgGetHeaders binaryTest @Block.MsgGetBlocks binaryTest @Block.MsgHeaders binaryTest @Block.MsgBlock binaryTest @Block.MsgStream binary...
635
spec = do describe "Block network types" $ modifyMaxSuccess (min 10) $ do binaryTest @Block.MsgGetHeaders binaryTest @Block.MsgGetBlocks binaryTest @Block.MsgHeaders binaryTest @Block.MsgBlock binaryTest @Block.MsgStream binaryTest @Block.M...
622
false
true
0
21
236
160
67
93
null
null
AubreyEAnderson/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readArithmeticExpression = isOk readArithmeticExpression "((a?b:c))"
73
prop_readArithmeticExpression = isOk readArithmeticExpression "((a?b:c))"
73
prop_readArithmeticExpression = isOk readArithmeticExpression "((a?b:c))"
73
false
false
0
5
4
11
5
6
null
null
rueshyna/gogol
gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs
mpl-2.0
-- | The ID of the location. lId :: Lens' Location (Maybe Text) lId = lens _lId (\ s a -> s{_lId = a})
102
lId :: Lens' Location (Maybe Text) lId = lens _lId (\ s a -> s{_lId = a})
73
lId = lens _lId (\ s a -> s{_lId = a})
38
true
true
0
9
23
46
25
21
null
null
krystalcode/bloodhound
tests/tests.hs
bsd-3-clause
es12 :: ServerVersion es12 = ServerVersion 1 2 0
48
es12 :: ServerVersion es12 = ServerVersion 1 2 0
48
es12 = ServerVersion 1 2 0
26
false
true
0
5
8
18
9
9
null
null
cchalmers/lens
src/Control/Lens/Fold.hs
bsd-3-clause
------------------------------------------------------------------------------ -- Profunctors ------------------------------------------------------------------------------ -- | This allows you to 'Control.Traversable.traverse' the elements of a pretty much any 'LensLike' construction in the opposite order. -- -- Thi...
862
backwards :: (Profunctor p, Profunctor q) => Optical p q (Backwards f) s t a b -> Optical p q f s t a b backwards l f = forwards #. l (Backwards #. f)
150
backwards l f = forwards #. l (Backwards #. f)
46
true
true
0
9
126
96
53
43
null
null
magthe/hsini
tst/ReaderI.hs
bsd-3-clause
case_optLineParserAllowedChars3 = let expected = Right $ OptionL "foo@/foo-" "bar" actual = p2E optLineParser "optLine" "foo@/foo-=bar\n" in expected @=? actual
180
case_optLineParserAllowedChars3 = let expected = Right $ OptionL "foo@/foo-" "bar" actual = p2E optLineParser "optLine" "foo@/foo-=bar\n" in expected @=? actual
180
case_optLineParserAllowedChars3 = let expected = Right $ OptionL "foo@/foo-" "bar" actual = p2E optLineParser "optLine" "foo@/foo-=bar\n" in expected @=? actual
180
false
false
2
10
39
47
22
25
null
null
vimus/vimus
test/Vimus/Command/CompletionSpec.hs
mit
spec :: Spec spec = do describe "parseCommand" $ do it "parses a command" $ do parseCommand "add" `shouldBe` ("add", "") it "parses a command with arguments" $ do parseCommand "add some arguments" `shouldBe` ("add", "some arguments") it "ignores leading whitespace" $ do parseCommand " ...
3,060
spec :: Spec spec = do describe "parseCommand" $ do it "parses a command" $ do parseCommand "add" `shouldBe` ("add", "") it "parses a command with arguments" $ do parseCommand "add some arguments" `shouldBe` ("add", "some arguments") it "ignores leading whitespace" $ do parseCommand " ...
3,060
spec = do describe "parseCommand" $ do it "parses a command" $ do parseCommand "add" `shouldBe` ("add", "") it "parses a command with arguments" $ do parseCommand "add some arguments" `shouldBe` ("add", "some arguments") it "ignores leading whitespace" $ do parseCommand " add" `sho...
3,047
false
true
0
21
872
782
367
415
null
null
phischu/blob-detection
Main.hs
bsd-3-clause
blobmask :: (Num a,Floating a,Fractional a) => Blob a -> Mask a blobmask (Blob x y t) (i,j) = - t * (1/t^4) * (1 / (2*pi)) * (((x-i)^2 + (y-j)^2)/t^2 - 2) * exp ((-1/2) * ((x-i)^2 + (y-j)^2)/t^2)
195
blobmask :: (Num a,Floating a,Fractional a) => Blob a -> Mask a blobmask (Blob x y t) (i,j) = - t * (1/t^4) * (1 / (2*pi)) * (((x-i)^2 + (y-j)^2)/t^2 - 2) * exp ((-1/2) * ((x-i)^2 + (y-j)^2)/t^2)
195
blobmask (Blob x y t) (i,j) = - t * (1/t^4) * (1 / (2*pi)) * (((x-i)^2 + (y-j)^2)/t^2 - 2) * exp ((-1/2) * ((x-i)^2 + (y-j)^2)/t^2)
131
false
true
0
16
39
206
109
97
null
null
NicolasDP/hit
Data/Git/Storage/Object.hs
bsd-3-clause
objectIsDelta _ = False
37
objectIsDelta _ = False
37
objectIsDelta _ = False
37
false
false
0
5
17
9
4
5
null
null
hpacheco/jasminv
src/Language/Jasmin/TypeChecker.hs
gpl-3.0
tt_proc_ann_r p (EnsuresAnn isFree isLeak e) = withAnn (Just isLeak) $ do e' <- tt_bool e return $ EnsuresAnn isFree isLeak e'
134
tt_proc_ann_r p (EnsuresAnn isFree isLeak e) = withAnn (Just isLeak) $ do e' <- tt_bool e return $ EnsuresAnn isFree isLeak e'
134
tt_proc_ann_r p (EnsuresAnn isFree isLeak e) = withAnn (Just isLeak) $ do e' <- tt_bool e return $ EnsuresAnn isFree isLeak e'
134
false
false
0
9
29
58
26
32
null
null
nlander/bazaari
src/Bazaari/Http.hs
bsd-3-clause
marketplaceIds :: [MarketplaceId] marketplaceIds = [ "A2EUQ1WTGCTBG2" , "ATVPDKIKX0DER" , "A1AM78C64UM0Y8" ]
142
marketplaceIds :: [MarketplaceId] marketplaceIds = [ "A2EUQ1WTGCTBG2" , "ATVPDKIKX0DER" , "A1AM78C64UM0Y8" ]
142
marketplaceIds = [ "A2EUQ1WTGCTBG2" , "ATVPDKIKX0DER" , "A1AM78C64UM0Y8" ]
108
false
true
0
5
45
23
14
9
null
null
GaloisInc/saw-script
saw-core-sbv/src/Verifier/SAW/Simulator/SBV.hs
bsd-3-clause
selectV :: (SBool -> b -> b -> b) -> Natural -> (Natural -> b) -> SWord -> b selectV merger maxValue valueFn vx = case svAsInteger vx of Just i | i >= 0 -> valueFn (fromInteger i) | otherwise -> panic "selectV" ["expected nonnegative integer", show i] Nothing -> impl (intSizeOf vx) 0 where ...
524
selectV :: (SBool -> b -> b -> b) -> Natural -> (Natural -> b) -> SWord -> b selectV merger maxValue valueFn vx = case svAsInteger vx of Just i | i >= 0 -> valueFn (fromInteger i) | otherwise -> panic "selectV" ["expected nonnegative integer", show i] Nothing -> impl (intSizeOf vx) 0 where ...
524
selectV merger maxValue valueFn vx = case svAsInteger vx of Just i | i >= 0 -> valueFn (fromInteger i) | otherwise -> panic "selectV" ["expected nonnegative integer", show i] Nothing -> impl (intSizeOf vx) 0 where impl _ x | x > maxValue || x < 0 = valueFn maxValue impl 0 y = valueFn ...
447
false
true
4
11
142
258
119
139
null
null
christiaanb/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
specInfoRules :: SpecInfo -> [CoreRule] specInfoRules (SpecInfo rules _) = rules
80
specInfoRules :: SpecInfo -> [CoreRule] specInfoRules (SpecInfo rules _) = rules
80
specInfoRules (SpecInfo rules _) = rules
40
false
true
0
7
10
29
15
14
null
null
Jefffrey/Kopia
test/Kopia/FilesystemSpec.hs
gpl-3.0
withSandbox :: (Bridge -> IO ()) -> IO () withSandbox action = bracket setupSandbox dismantleSandbox (action . sandboxBridge)
153
withSandbox :: (Bridge -> IO ()) -> IO () withSandbox action = bracket setupSandbox dismantleSandbox (action . sandboxBridge)
153
withSandbox action = bracket setupSandbox dismantleSandbox (action . sandboxBridge)
111
false
true
0
10
45
56
25
31
null
null
sethfowler/pygmalion
indexers/Pygmalion/Index/Source.hs
bsd-3-clause
route loc s c k@C.Cursor_ParmDecl = visitReferences loc s k c >> visitDefinitions loc s k c
117
route loc s c k@C.Cursor_ParmDecl = visitReferences loc s k c >> visitDefinitions loc s k c
117
route loc s c k@C.Cursor_ParmDecl = visitReferences loc s k c >> visitDefinitions loc s k c
117
false
false
0
7
42
42
20
22
null
null
DFLY-Entertainment/mc-map
src/Game/Minecraft/Map/NBT.hs
gpl-3.0
tag 7 = do len <- int TAGByteArray <$> (replicateM . fromIntegral) len byte
95
tag 7 = do len <- int TAGByteArray <$> (replicateM . fromIntegral) len byte
95
tag 7 = do len <- int TAGByteArray <$> (replicateM . fromIntegral) len byte
95
false
false
0
10
33
35
16
19
null
null
spechub/Hets
OWL2/XMLConversion.hs
gpl-2.0
xmlAnnotation :: Annotation -> Element xmlAnnotation (Annotation al ap av) = makeElement annotationK $ map xmlAnnotation al ++ [mwNameIRI annotationPropertyK ap, case av of AnnValue iri -> xmlSubject iri AnnValLit l -> xmlLiteral l AnnAnInd iri -> xmlSubject iri]
295
xmlAnnotation :: Annotation -> Element xmlAnnotation (Annotation al ap av) = makeElement annotationK $ map xmlAnnotation al ++ [mwNameIRI annotationPropertyK ap, case av of AnnValue iri -> xmlSubject iri AnnValLit l -> xmlLiteral l AnnAnInd iri -> xmlSubject iri]
295
xmlAnnotation (Annotation al ap av) = makeElement annotationK $ map xmlAnnotation al ++ [mwNameIRI annotationPropertyK ap, case av of AnnValue iri -> xmlSubject iri AnnValLit l -> xmlLiteral l AnnAnInd iri -> xmlSubject iri]
256
false
true
2
11
70
97
44
53
null
null
d0kt0r0/estuary
client/src/Estuary/Help/Imagina.hs
gpl-3.0
referenceText "mechita" = "returns and empty Text"
50
referenceText "mechita" = "returns and empty Text"
50
referenceText "mechita" = "returns and empty Text"
50
false
false
1
5
6
13
4
9
null
null
Shou/Tombot
Main.hs
gpl-2.0
- }}} -- {{{ NOTES -- XXX -- - Use Aeson for configuration files -- - Look for patterns and repetitions and make generic functions. -- - Keeping file descriptors/handles/sockets -- - Ok, the basic approach is that fork() (the C call) doesn't close file -- descriptors. If you turn all the Handles into Syst...
6,059
verbosity :: Parser Int verbosity = option auto $ long "verbosity" <> short 'v' <> metavar "N" <> help "Bot verbosity level. 0 - 2." <> value 1 <> showDefault
218
verbosity = option auto $ long "verbosity" <> short 'v' <> metavar "N" <> help "Bot verbosity level. 0 - 2." <> value 1 <> showDefault
194
true
true
1
11
1,573
181
149
32
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Component/Tree/Common.hs
bsd-3-clause
-- TODO is this right module for the above function? -- | A method that implements the active-activable logic and applies the -- attributes correspondingly. defLiLeafNodeAttrF ∷ forall t r. Reflex t ⇒ ActiveState t ActNode r → Dynamic t A.Attr defLiLeafNodeAttrF ast = A.attrMap <$> defActivationAttrF ...
331
defLiLeafNodeAttrF ∷ forall t r. Reflex t ⇒ ActiveState t ActNode r → Dynamic t A.Attr defLiLeafNodeAttrF ast = A.attrMap <$> defActivationAttrF E.defLi ast
173
defLiLeafNodeAttrF ast = A.attrMap <$> defActivationAttrF E.defLi ast
69
true
true
0
10
66
65
32
33
null
null
skogsbaer/HTF
tests/TestHTF.hs
lgpl-2.1
test_assertThrowsIO2_OK = assertThrowsIO (fail "ERROR") (handleExc True)
72
test_assertThrowsIO2_OK = assertThrowsIO (fail "ERROR") (handleExc True)
72
test_assertThrowsIO2_OK = assertThrowsIO (fail "ERROR") (handleExc True)
72
false
false
0
7
6
23
11
12
null
null
grtlr/wyas
src/Wyas/Evaluator.hs
bsd-3-clause
symbolp, numberp, stringp, boolp, listp :: LispVal -> LispVal symbolp (Atom _) = Bool True
90
symbolp, numberp, stringp, boolp, listp :: LispVal -> LispVal symbolp (Atom _) = Bool True
90
symbolp (Atom _) = Bool True
28
false
true
4
6
14
44
21
23
null
null
AndreasPK/stack
src/Text/PrettyPrint/Leijen/Extended.hs
bsd-3-clause
colorFunctions :: Color -> (EndoAnsiDoc, EndoAnsiDoc, EndoAnsiDoc, EndoAnsiDoc) colorFunctions color = ( ansiAnn [SetColor Foreground Vivid color] , ansiAnn [SetColor Foreground Dull color] , ansiAnn [SetColor Background Vivid color] , ansiAnn [SetColor Background Dull color] )
298
colorFunctions :: Color -> (EndoAnsiDoc, EndoAnsiDoc, EndoAnsiDoc, EndoAnsiDoc) colorFunctions color = ( ansiAnn [SetColor Foreground Vivid color] , ansiAnn [SetColor Foreground Dull color] , ansiAnn [SetColor Background Vivid color] , ansiAnn [SetColor Background Dull color] )
298
colorFunctions color = ( ansiAnn [SetColor Foreground Vivid color] , ansiAnn [SetColor Foreground Dull color] , ansiAnn [SetColor Background Vivid color] , ansiAnn [SetColor Background Dull color] )
218
false
true
0
8
55
94
49
45
null
null
facebookincubator/duckling
Duckling/Numeral/FA/Rules.hs
bsd-3-clause
tensMap :: HashMap Text Integer tensMap = HashMap.fromList [ ( "بیست" , 20 ) , ( "سی" , 30 ) , ( "چهل" , 40 ) , ( "پنجاه" , 50 ) , ( "شصت" , 60 ) , ( "هفتاد" , 70 ) , ( "هشتاد" , 80 ) , ( "نود" , 90 ) , ( "صد" , 100 ) , ( "دویست" , 200 ) , ( "سیصد" , 300 ) , ( "سی صد" , 300 ) , ( ...
643
tensMap :: HashMap Text Integer tensMap = HashMap.fromList [ ( "بیست" , 20 ) , ( "سی" , 30 ) , ( "چهل" , 40 ) , ( "پنجاه" , 50 ) , ( "شصت" , 60 ) , ( "هفتاد" , 70 ) , ( "هشتاد" , 80 ) , ( "نود" , 90 ) , ( "صد" , 100 ) , ( "دویست" , 200 ) , ( "سیصد" , 300 ) , ( "سی صد" , 300 ) , ( ...
643
tensMap = HashMap.fromList [ ( "بیست" , 20 ) , ( "سی" , 30 ) , ( "چهل" , 40 ) , ( "پنجاه" , 50 ) , ( "شصت" , 60 ) , ( "هفتاد" , 70 ) , ( "هشتاد" , 80 ) , ( "نود" , 90 ) , ( "صد" , 100 ) , ( "دویست" , 200 ) , ( "سیصد" , 300 ) , ( "سی صد" , 300 ) , ( "چهارصد" , 400 ) , ( "چهار صد...
611
false
true
0
6
252
255
166
89
null
null
matthiasgoergens/redgrep
src/Red.hs
bsd-3-clause
n' (Alt a b) = (Left <$> n' a) <|> (Right <$> n' b)
51
n' (Alt a b) = (Left <$> n' a) <|> (Right <$> n' b)
51
n' (Alt a b) = (Left <$> n' a) <|> (Right <$> n' b)
51
false
false
0
8
13
42
20
22
null
null
facebookincubator/duckling
Duckling/TimeGrain/SV/Rules.hs
bsd-3-clause
rules :: [Rule] rules = map go grains where go (name, regexPattern, grain) = Rule { name = name , pattern = [regex regexPattern] , prod = \_ -> Just $ Token TimeGrain grain }
204
rules :: [Rule] rules = map go grains where go (name, regexPattern, grain) = Rule { name = name , pattern = [regex regexPattern] , prod = \_ -> Just $ Token TimeGrain grain }
204
rules = map go grains where go (name, regexPattern, grain) = Rule { name = name , pattern = [regex regexPattern] , prod = \_ -> Just $ Token TimeGrain grain }
188
false
true
0
9
64
78
44
34
null
null
lpeterse/binary-generic
src/Data/Binary/Generic/Extensions.hs
bsd-3-clause
getExtInt :: Typeable a => Get a -> Get a getExtInt = extGet (get :: Get Int ) . extGet (get :: Get Int8 ) . extGet (get :: Get Int16) . extGet (get :: Get ...
396
getExtInt :: Typeable a => Get a -> Get a getExtInt = extGet (get :: Get Int ) . extGet (get :: Get Int8 ) . extGet (get :: Get Int16) . extGet (get :: Get ...
396
getExtInt = extGet (get :: Get Int ) . extGet (get :: Get Int8 ) . extGet (get :: Get Int16) . extGet (get :: Get Int32) . extGet (get ...
347
false
true
0
11
248
104
51
53
null
null
AndrewRademacher/stack
src/Stack/Types/PackageIndex.hs
bsd-3-clause
indexNameText :: IndexName -> Text indexNameText = decodeUtf8 . unIndexName
75
indexNameText :: IndexName -> Text indexNameText = decodeUtf8 . unIndexName
75
indexNameText = decodeUtf8 . unIndexName
40
false
true
0
5
9
19
10
9
null
null
apyrgio/ganeti
src/Ganeti/JSON.hs
bsd-2-clause
fromJResultE _ (J.Ok x) = return x
34
fromJResultE _ (J.Ok x) = return x
34
fromJResultE _ (J.Ok x) = return x
34
false
false
0
8
6
22
10
12
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | Console as VNC server consVnc :: String consVnc = "vnc"
60
consVnc :: String consVnc = "vnc"
33
consVnc = "vnc"
15
true
true
0
4
11
12
7
5
null
null
pachopepe/mfxparser
src/Proof/Expr.hs
bsd-3-clause
group n es = as:group n bs where (as,bs) = splitAt n es
66
group n es = as:group n bs where (as,bs) = splitAt n es
66
group n es = as:group n bs where (as,bs) = splitAt n es
66
false
false
0
7
23
39
19
20
null
null
YoEight/machines
src/Data/Machine/Moore.hs
bsd-3-clause
-- | Construct a Moore machine from a state valuation and transition function unfoldMoore :: (s -> (b, a -> s)) -> s -> Moore a b unfoldMoore f = go where go s = case f s of (b, g) -> Moore b (go . g)
207
unfoldMoore :: (s -> (b, a -> s)) -> s -> Moore a b unfoldMoore f = go where go s = case f s of (b, g) -> Moore b (go . g)
129
unfoldMoore f = go where go s = case f s of (b, g) -> Moore b (go . g)
77
true
true
0
12
53
86
45
41
null
null
awto/chr2sql
CHR2/Target/PostgreSQL.hs
bsd-3-clause
showSqlType (SqlNumeric s prec) = concat [ "NUMERIC(", (show s), ",", (show prec), ")" ]
88
showSqlType (SqlNumeric s prec) = concat [ "NUMERIC(", (show s), ",", (show prec), ")" ]
88
showSqlType (SqlNumeric s prec) = concat [ "NUMERIC(", (show s), ",", (show prec), ")" ]
88
false
false
0
8
14
47
25
22
null
null
dancor/melang
src/Lang/De/Adj.hs
mit
adjEnding Dat _ Plur Strong = "en"
34
adjEnding Dat _ Plur Strong = "en"
34
adjEnding Dat _ Plur Strong = "en"
34
false
false
0
5
6
15
7
8
null
null
ghcjs/ghcjs
src/Gen2/Prim.hs
mit
genPrim _ _ Ctz8Op [r] [x] = PrimInline $ r |= app "h$ctz8" [x]
96
genPrim _ _ Ctz8Op [r] [x] = PrimInline $ r |= app "h$ctz8" [x]
96
genPrim _ _ Ctz8Op [r] [x] = PrimInline $ r |= app "h$ctz8" [x]
96
false
false
0
7
46
39
20
19
null
null
fmapfmapfmap/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/Types/Product.hs
mpl-2.0
-- | Undocumented member. ccConfigurationEndpoint :: Lens' CacheCluster (Maybe Endpoint) ccConfigurationEndpoint = lens _ccConfigurationEndpoint (\ s a -> s{_ccConfigurationEndpoint = a})
187
ccConfigurationEndpoint :: Lens' CacheCluster (Maybe Endpoint) ccConfigurationEndpoint = lens _ccConfigurationEndpoint (\ s a -> s{_ccConfigurationEndpoint = a})
161
ccConfigurationEndpoint = lens _ccConfigurationEndpoint (\ s a -> s{_ccConfigurationEndpoint = a})
98
true
true
0
9
20
46
25
21
null
null
mitchellwrosen/regex-applicative
Text/Regex/Applicative/Reference.hs
mit
runP :: P s a -> [s] -> Maybe a runP m s = case filter (null . snd) $ unP m s of (r, _) : _ -> Just r _ -> Nothing -- | 'reference' @r@ @s@ should give the same results as @s@ '=~' @r@. -- -- However, this is not very efficient implementation and is supposed to be -- used for testing only.
299
runP :: P s a -> [s] -> Maybe a runP m s = case filter (null . snd) $ unP m s of (r, _) : _ -> Just r _ -> Nothing -- | 'reference' @r@ @s@ should give the same results as @s@ '=~' @r@. -- -- However, this is not very efficient implementation and is supposed to be -- used for testing only.
299
runP m s = case filter (null . snd) $ unP m s of (r, _) : _ -> Just r _ -> Nothing -- | 'reference' @r@ @s@ should give the same results as @s@ '=~' @r@. -- -- However, this is not very efficient implementation and is supposed to be -- used for testing only.
267
false
true
0
9
75
92
46
46
null
null
mratkovic/PUH_project
src/Main.hs
mit
storeReviews2 :: IO [ReviewAssignment] -> IO () storeReviews2 xs = do ys <- xs forM ys $ \x -> databaseProviderReviewResults $ liftIO $ saveReview (Review x 3.0 "aaa") return ()
197
storeReviews2 :: IO [ReviewAssignment] -> IO () storeReviews2 xs = do ys <- xs forM ys $ \x -> databaseProviderReviewResults $ liftIO $ saveReview (Review x 3.0 "aaa") return ()
197
storeReviews2 xs = do ys <- xs forM ys $ \x -> databaseProviderReviewResults $ liftIO $ saveReview (Review x 3.0 "aaa") return ()
149
false
true
0
12
49
80
37
43
null
null
AndrewBrinker/scheme
src/Scheme/Eval.hs
mit
-- | Return everything but the first element of a list cdr :: [LispVal] -> ThrowsError LispVal cdr [List (_ : xs)] = return $ List xs
141
cdr :: [LispVal] -> ThrowsError LispVal cdr [List (_ : xs)] = return $ List xs
86
cdr [List (_ : xs)] = return $ List xs
46
true
true
0
11
34
49
24
25
null
null
nevrenato/Hets_Fork
CommonLogic/Analysis.hs
gpl-2.0
propsOfSentence (AS.Comment_sent _ s _) = propsOfSentence s
59
propsOfSentence (AS.Comment_sent _ s _) = propsOfSentence s
59
propsOfSentence (AS.Comment_sent _ s _) = propsOfSentence s
59
false
false
0
8
7
24
11
13
null
null
edsko/cabal
Cabal/src/Distribution/Simple/Utils.hs
bsd-3-clause
copyFiles :: Verbosity -> FilePath -> [(FilePath, FilePath)] -> IO () copyFiles = copyFilesWith copyFileVerbose
111
copyFiles :: Verbosity -> FilePath -> [(FilePath, FilePath)] -> IO () copyFiles = copyFilesWith copyFileVerbose
111
copyFiles = copyFilesWith copyFileVerbose
41
false
true
0
9
14
40
21
19
null
null
revnull/fixfile
src/Data/FixFile.hs
lgpl-3.0
cacheLookup :: Ptr f -> Cache f -> IO (Cache f, Maybe (f (Ptr f))) cacheLookup p c@(Cache _ oc nc) = do nval <- lookup nc p val <- maybe (lookup oc p) (return . Just) nval case (nval, val) of (Nothing, Just v) -> do c' <- cacheInsert p v c return (c', val) _ -> return...
329
cacheLookup :: Ptr f -> Cache f -> IO (Cache f, Maybe (f (Ptr f))) cacheLookup p c@(Cache _ oc nc) = do nval <- lookup nc p val <- maybe (lookup oc p) (return . Just) nval case (nval, val) of (Nothing, Just v) -> do c' <- cacheInsert p v c return (c', val) _ -> return...
329
cacheLookup p c@(Cache _ oc nc) = do nval <- lookup nc p val <- maybe (lookup oc p) (return . Just) nval case (nval, val) of (Nothing, Just v) -> do c' <- cacheInsert p v c return (c', val) _ -> return (c, val)
262
false
true
0
13
112
180
88
92
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/Util/GHC/HsTypes.hs
mit
viewHsTyVar _ = Nothing
63
viewHsTyVar _ = Nothing
63
viewHsTyVar _ = Nothing
63
false
false
0
5
43
9
4
5
null
null
HJvT/com
System/Win32/Com/Exception.hs
bsd-3-clause
vIEW_E_DRAW :: HRESULT vIEW_E_DRAW = word32ToInt32 (0x80040140 ::Word32)
72
vIEW_E_DRAW :: HRESULT vIEW_E_DRAW = word32ToInt32 (0x80040140 ::Word32)
72
vIEW_E_DRAW = word32ToInt32 (0x80040140 ::Word32)
49
false
true
0
6
7
26
12
14
null
null
xenog/rfc-1751
tests/Spec.hs
unlicense
badChecksumVectorsLC :: [String] badChecksumVectorsLC = [ "rash bush milk look bad a avid gaff bait rot pod love" , "tab bore dunk sure cove norm pry if joe myra gwen tent" , "born roll love bear agee iffy cuts mask mood fowl rome mit" ]
253
badChecksumVectorsLC :: [String] badChecksumVectorsLC = [ "rash bush milk look bad a avid gaff bait rot pod love" , "tab bore dunk sure cove norm pry if joe myra gwen tent" , "born roll love bear agee iffy cuts mask mood fowl rome mit" ]
253
badChecksumVectorsLC = [ "rash bush milk look bad a avid gaff bait rot pod love" , "tab bore dunk sure cove norm pry if joe myra gwen tent" , "born roll love bear agee iffy cuts mask mood fowl rome mit" ]
220
false
true
0
5
60
23
14
9
null
null
jaspervdj/lorem-markdownum
lib/LoremMarkdownum/Gen/Code.hs
bsd-3-clause
printComparisonOp SteO = printText "<="
39
printComparisonOp SteO = printText "<="
39
printComparisonOp SteO = printText "<="
39
false
false
0
5
4
12
5
7
null
null
veskoy/functional-programming-fmi
Project/TicTacToe.hs
gpl-3.0
checkWin :: Board -> Bool checkWin board = or $ [r, c, d] where r = hasWinningRow (getBoardRows board) c = hasWinningCol (getBoardCols board) d = hasWinningDiag (getBoardDiags board)
196
checkWin :: Board -> Bool checkWin board = or $ [r, c, d] where r = hasWinningRow (getBoardRows board) c = hasWinningCol (getBoardCols board) d = hasWinningDiag (getBoardDiags board)
196
checkWin board = or $ [r, c, d] where r = hasWinningRow (getBoardRows board) c = hasWinningCol (getBoardCols board) d = hasWinningDiag (getBoardDiags board)
170
false
true
3
7
42
85
39
46
null
null
GaloisInc/saw-script
saw-core-coq/src/Verifier/SAW/Translation/Coq/Term.hs
bsd-3-clause
flatTermFToExpr :: TermTranslationMonad m => FlatTermF Term -> m Coq.Term flatTermFToExpr tf = -- traceFTermF "flatTermFToExpr" tf $ case tf of Primitive pn -> translateIdent (primName pn) UnitValue -> pure (Coq.Var "tt") UnitType -> -- We need to explicitly tell Coq that we want uni...
5,833
flatTermFToExpr :: TermTranslationMonad m => FlatTermF Term -> m Coq.Term flatTermFToExpr tf = -- traceFTermF "flatTermFToExpr" tf $ case tf of Primitive pn -> translateIdent (primName pn) UnitValue -> pure (Coq.Var "tt") UnitType -> -- We need to explicitly tell Coq that we want uni...
5,833
flatTermFToExpr tf = -- traceFTermF "flatTermFToExpr" tf $ case tf of Primitive pn -> translateIdent (primName pn) UnitValue -> pure (Coq.Var "tt") UnitType -> -- We need to explicitly tell Coq that we want unit to be a Type, since -- all SAW core sorts are translated to Types ...
5,753
false
true
0
21
1,754
1,603
760
843
null
null
shockkolate/containers
Data/Tree.hs
bsd-3-clause
draw :: Tree String -> [String] draw (Node x ts0) = x : drawSubTrees ts0 where drawSubTrees [] = [] drawSubTrees [t] = "|" : shift "`- " " " (draw t) drawSubTrees (t:ts) = "|" : shift "+- " "| " (draw t) ++ drawSubTrees ts shift first other = zipWith (++) (first : repeat other) --...
359
draw :: Tree String -> [String] draw (Node x ts0) = x : drawSubTrees ts0 where drawSubTrees [] = [] drawSubTrees [t] = "|" : shift "`- " " " (draw t) drawSubTrees (t:ts) = "|" : shift "+- " "| " (draw t) ++ drawSubTrees ts shift first other = zipWith (++) (first : repeat other) --...
359
draw (Node x ts0) = x : drawSubTrees ts0 where drawSubTrees [] = [] drawSubTrees [t] = "|" : shift "`- " " " (draw t) drawSubTrees (t:ts) = "|" : shift "+- " "| " (draw t) ++ drawSubTrees ts shift first other = zipWith (++) (first : repeat other) -- | The elements of a tree in pre...
327
false
true
0
9
104
149
74
75
null
null
hephaestus-pl/hephaestus
alexandre/feature-modeling/src/FeatureModel/NewTypes/Types.hs
mit
-- NOTE: "subtrees" is "flatten" in the old version. flatten = T.flatten
73
flatten = T.flatten
20
flatten = T.flatten
20
true
false
0
5
12
9
5
4
null
null
haskellGardener/yusic
src/Yusic.hs
mit
toOctave As_Bb6 = 6
19
toOctave As_Bb6 = 6
19
toOctave As_Bb6 = 6
19
false
false
0
5
3
9
4
5
null
null
osa1/Idris-dev
src/Idris/Core/ProofState.hs
bsd-3-clause
updateProv ns (SourceTerm t) = SourceTerm $ updateSolvedTerm ns t
65
updateProv ns (SourceTerm t) = SourceTerm $ updateSolvedTerm ns t
65
updateProv ns (SourceTerm t) = SourceTerm $ updateSolvedTerm ns t
65
false
false
0
6
9
28
12
16
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT33.hs
gpl-3.0
rotate _ [] = []
16
rotate _ [] = []
16
rotate _ [] = []
16
false
false
0
6
4
19
8
11
null
null
apyrgio/ganeti
src/Ganeti/Query/Server.hs
bsd-2-clause
luxiExec :: LuxiConfig -> LuxiOp -> IO (Bool, GenericResult GanetiException JSValue) luxiExec (qlock, qstat, creader) args = do cfg <- creader result <- handleCallWrapper qlock qstat cfg args return (True, result)
231
luxiExec :: LuxiConfig -> LuxiOp -> IO (Bool, GenericResult GanetiException JSValue) luxiExec (qlock, qstat, creader) args = do cfg <- creader result <- handleCallWrapper qlock qstat cfg args return (True, result)
231
luxiExec (qlock, qstat, creader) args = do cfg <- creader result <- handleCallWrapper qlock qstat cfg args return (True, result)
134
false
true
0
9
48
82
41
41
null
null
FlashKorten/recogs
src/Recogs/Util/RandomList.hs
mit
-- Fair merge of random lists merge :: RandomList a -> RandomList a -> RandomList a merge rxs rys = do xs <- rxs ys <- rys merge' (length xs, xs) (length ys, ys) where merge' (0 , []) (_ , ys) = return ys merge' (_ , xs) (0 , []) = return xs merge' (nx, x:xs) (ny, y...
656
merge :: RandomList a -> RandomList a -> RandomList a merge rxs rys = do xs <- rxs ys <- rys merge' (length xs, xs) (length ys, ys) where merge' (0 , []) (_ , ys) = return ys merge' (_ , xs) (0 , []) = return xs merge' (nx, x:xs) (ny, y:ys) = do k <- getRand...
626
merge rxs rys = do xs <- rxs ys <- rys merge' (length xs, xs) (length ys, ys) where merge' (0 , []) (_ , ys) = return ys merge' (_ , xs) (0 , []) = return xs merge' (nx, x:xs) (ny, y:ys) = do k <- getRandomR (1, nx + ny) -- selection weighted by size ...
572
true
true
0
14
226
294
163
131
null
null
ndmitchell/shake
model/Model.hs
bsd-3-clause
-- Simple evaluation. -- Prove (mostly proved in the Test module with assertions): -- * assuming rule is a total order over the observable keys it doesn't crash -- * assuming rule returns keys that respect some partial ordering it terminates -- * prove Need always gets given the right key model0 :: (k -> Action k v) ->...
384
model0 :: (k -> Action k v) -> k -> v model0 rule = run where run = act run . rule
94
model0 rule = run where run = act run . rule
56
true
true
0
8
84
53
29
24
null
null
talanis85/mudblood
src/Mudblood/Mapper/Map.hs
gpl-3.0
getExitData :: Int -> String -> MapGraph -> Maybe ExitData getExitData r e m = case filter exitFilter (out m r) of [] -> Nothing ((a,b,label):_) -> Just label where exitFilter (a,b,label) = (exitKey label) == e
244
getExitData :: Int -> String -> MapGraph -> Maybe ExitData getExitData r e m = case filter exitFilter (out m r) of [] -> Nothing ((a,b,label):_) -> Just label where exitFilter (a,b,label) = (exitKey label) == e
244
getExitData r e m = case filter exitFilter (out m r) of [] -> Nothing ((a,b,label):_) -> Just label where exitFilter (a,b,label) = (exitKey label) == e
185
false
true
0
10
70
113
58
55
null
null
brendanhay/gogol
gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs
mpl-2.0
-- | The name of the user. uiDisplayName :: Lens' UserInfo (Maybe Text) uiDisplayName = lens _uiDisplayName (\ s a -> s{_uiDisplayName = a})
148
uiDisplayName :: Lens' UserInfo (Maybe Text) uiDisplayName = lens _uiDisplayName (\ s a -> s{_uiDisplayName = a})
121
uiDisplayName = lens _uiDisplayName (\ s a -> s{_uiDisplayName = a})
76
true
true
0
9
31
48
25
23
null
null
graninas/Haskell-Algorithms
Tests/HaskellSkbRii/Task3/Interpreter.hs
gpl-3.0
eval (SequenceResult r1 r2) = eval r1 >> eval r2
48
eval (SequenceResult r1 r2) = eval r1 >> eval r2
48
eval (SequenceResult r1 r2) = eval r1 >> eval r2
48
false
false
0
7
9
27
12
15
null
null
apyrgio/snf-ganeti
src/Ganeti/HTools/Cluster.hs
bsd-2-clause
-- | Tries to allocate an instance on one given node. allocateOnSingle :: Node.List -> Instance.Instance -> Ndx -> OpResult Node.AllocElement allocateOnSingle nl inst new_pdx = let p = Container.find new_pdx nl new_inst = Instance.setBoth inst new_pdx Node.noSecondary in do Instance.instM...
601
allocateOnSingle :: Node.List -> Instance.Instance -> Ndx -> OpResult Node.AllocElement allocateOnSingle nl inst new_pdx = let p = Container.find new_pdx nl new_inst = Instance.setBoth inst new_pdx Node.noSecondary in do Instance.instMatchesPolicy inst (Node.iPolicy p) (Node.exclStorage p...
547
allocateOnSingle nl inst new_pdx = let p = Container.find new_pdx nl new_inst = Instance.setBoth inst new_pdx Node.noSecondary in do Instance.instMatchesPolicy inst (Node.iPolicy p) (Node.exclStorage p) new_p <- Node.addPri p inst let new_nl = Container.add new_pdx new_p nl new_score = com...
442
true
true
0
13
131
164
80
84
null
null
5outh/BeFun
src/BefungeParser.hs
mit
parseBefungeInstructions :: String -> Torus Operation parseBefungeInstructions s = case (parse instrs "unknown" s) of Right ops -> Torus (mkZipper2DBounded 80 25 ops) 80 25 Left e -> error $ show e
204
parseBefungeInstructions :: String -> Torus Operation parseBefungeInstructions s = case (parse instrs "unknown" s) of Right ops -> Torus (mkZipper2DBounded 80 25 ops) 80 25 Left e -> error $ show e
204
parseBefungeInstructions s = case (parse instrs "unknown" s) of Right ops -> Torus (mkZipper2DBounded 80 25 ops) 80 25 Left e -> error $ show e
150
false
true
0
10
38
77
36
41
null
null
keithodulaigh/Hets
HolLight/HolLight2DG.hs
gpl-2.0
mergeTypesOps :: (Map.Map String Int, Map.Map String HolType) -> (Map.Map String Int, Map.Map String HolType) -> (Map.Map String Int, Map.Map String HolType) mergeTypesOps (ts1, ops1) (ts2, ops2) = (ts1 `Map.union` ts2, ops1 `Map.union` ops2)
277
mergeTypesOps :: (Map.Map String Int, Map.Map String HolType) -> (Map.Map String Int, Map.Map String HolType) -> (Map.Map String Int, Map.Map String HolType) mergeTypesOps (ts1, ops1) (ts2, ops2) = (ts1 `Map.union` ts2, ops1 `Map.union` ops2)
277
mergeTypesOps (ts1, ops1) (ts2, ops2) = (ts1 `Map.union` ts2, ops1 `Map.union` ops2)
85
false
true
2
7
68
124
64
60
null
null
sjakobi/stack
test/integration/lib/StackTest.hs
bsd-3-clause
stack :: [String] -> IO () stack args = do ec <- stack' args if ec == ExitSuccess then return () else error $ "Exited with exit code: " ++ show ec
170
stack :: [String] -> IO () stack args = do ec <- stack' args if ec == ExitSuccess then return () else error $ "Exited with exit code: " ++ show ec
170
stack args = do ec <- stack' args if ec == ExitSuccess then return () else error $ "Exited with exit code: " ++ show ec
143
false
true
0
10
55
72
33
39
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_SQL_USER4 :: Int wxSTC_SQL_USER4 = 22
43
wxSTC_SQL_USER4 :: Int wxSTC_SQL_USER4 = 22
43
wxSTC_SQL_USER4 = 22
20
false
true
0
6
5
18
7
11
null
null
bamboo/idris-cil
src/IRTS/Cil/FFI.hs
bsd-3-clause
assemblyNameAndTypeFrom t = error $ "unsupported assembly name for: " <> show t
79
assemblyNameAndTypeFrom t = error $ "unsupported assembly name for: " <> show t
79
assemblyNameAndTypeFrom t = error $ "unsupported assembly name for: " <> show t
79
false
false
0
6
12
20
9
11
null
null
vollmerm/shallow-fission
Data/Array/Accelerate/Fission.hs
bsd-3-clause
_matchSlice --- ????? :: forall sh sh'. (Slice sh, Slice sh') => sh -> sh' -> Maybe (sh :=: sh') _matchSlice _ _ | Just REFL <- matchTupleType (eltType (undefined::sh)) (eltType (undefined::sh')) = gcast REFL | otherwise = Nothing
279
_matchSlice --- ????? :: forall sh sh'. (Slice sh, Slice sh') => sh -> sh' -> Maybe (sh :=: sh') _matchSlice _ _ | Just REFL <- matchTupleType (eltType (undefined::sh)) (eltType (undefined::sh')) = gcast REFL | otherwise = Nothing
279
_matchSlice _ _ | Just REFL <- matchTupleType (eltType (undefined::sh)) (eltType (undefined::sh')) = gcast REFL | otherwise = Nothing
174
false
true
0
12
87
117
58
59
null
null
smaccm/capDL-tool
CapDL/PrintIsabelle.hs
bsd-2-clause
printSimps :: ObjMap Word -> Doc printSimps ms = text "lemmas ids = " $+$ vcat (map obj_ids obj_list) $+$ text "" $+$ text "lemmas cap_defs = " $+$ vcat (map caps objs_with_caps) $+$ text "" $+$ text "lemmas obj_defs = " $+$ vcat (map objs obj_list) $+$ text "" $+$ lemma' "objects" (map objects obj...
728
printSimps :: ObjMap Word -> Doc printSimps ms = text "lemmas ids = " $+$ vcat (map obj_ids obj_list) $+$ text "" $+$ text "lemmas cap_defs = " $+$ vcat (map caps objs_with_caps) $+$ text "" $+$ text "lemmas obj_defs = " $+$ vcat (map objs obj_list) $+$ text "" $+$ lemma' "objects" (map objects obj...
728
printSimps ms = text "lemmas ids = " $+$ vcat (map obj_ids obj_list) $+$ text "" $+$ text "lemmas cap_defs = " $+$ vcat (map caps objs_with_caps) $+$ text "" $+$ text "lemmas obj_defs = " $+$ vcat (map objs obj_list) $+$ text "" $+$ lemma' "objects" (map objects obj_list) ("by (auto simp: objects_d...
695
false
true
5
16
194
279
137
142
null
null
sjoerdvisscher/icfp2011
src/Core.hs
bsd-3-clause
emptyBoard :: Board emptyBoard = Board { zombieMode = False, applications = 0, proponent = emptyPlayer, opponent = emptyPlayer } where emptyPlayer = V.replicate 256 initialSlot
182
emptyBoard :: Board emptyBoard = Board { zombieMode = False, applications = 0, proponent = emptyPlayer, opponent = emptyPlayer } where emptyPlayer = V.replicate 256 initialSlot
182
emptyBoard = Board { zombieMode = False, applications = 0, proponent = emptyPlayer, opponent = emptyPlayer } where emptyPlayer = V.replicate 256 initialSlot
162
false
true
1
6
31
64
32
32
null
null
snoyberg/bytevector
bench/Copy/StorableConduit.hs
mit
fromStorableVector :: V.Vector Word8 -> S.ByteString fromStorableVector v = PS fptr offset idx where (fptr, offset, idx) = V.unsafeToForeignPtr v
155
fromStorableVector :: V.Vector Word8 -> S.ByteString fromStorableVector v = PS fptr offset idx where (fptr, offset, idx) = V.unsafeToForeignPtr v
155
fromStorableVector v = PS fptr offset idx where (fptr, offset, idx) = V.unsafeToForeignPtr v
102
false
true
0
8
29
62
28
34
null
null
xmonad/xmonad-contrib
XMonad/Layout/Decoration.hs
bsd-3-clause
createDecos _ _ _ _ _ [] = return []
36
createDecos _ _ _ _ _ [] = return []
36
createDecos _ _ _ _ _ [] = return []
36
false
false
0
6
9
26
12
14
null
null
stschiff/rarecoal
src-rarecoal/Mcmc.hs
gpl-3.0
reportPosteriorStats :: [String] -> [MCMCstate] -> Handle -> IO (V.Vector Double) reportPosteriorStats paramNames states h = do let dim = V.length $ mcmcCurrentPoint (head states) allScores = map mcmcCurrentValue states nrBurninCycles = computeBurninCycles allScores points = map mcmcCurrentP...
1,378
reportPosteriorStats :: [String] -> [MCMCstate] -> Handle -> IO (V.Vector Double) reportPosteriorStats paramNames states h = do let dim = V.length $ mcmcCurrentPoint (head states) allScores = map mcmcCurrentValue states nrBurninCycles = computeBurninCycles allScores points = map mcmcCurrentP...
1,378
reportPosteriorStats paramNames states h = do let dim = V.length $ mcmcCurrentPoint (head states) allScores = map mcmcCurrentValue states nrBurninCycles = computeBurninCycles allScores points = map mcmcCurrentPoint . drop nrBurninCycles $ states scores = drop nrBurninCycles allScores...
1,296
false
true
0
16
316
452
228
224
null
null
petercommand/HayooBot
src/HayooBot/Msg.hs
gpl-2.0
responseMsg :: Msg -> IO () responseMsg msg = do return ()
60
responseMsg :: Msg -> IO () responseMsg msg = do return ()
60
responseMsg msg = do return ()
32
false
true
0
8
13
31
14
17
null
null
markus1189/xmonad-contrib-710
XMonad/Actions/TagWindows.hs
bsd-3-clause
delTag :: String -> Window -> X () delTag s w = do tags <- getTags w setTags (filter (/= s) tags) w -- | remove all tags
129
delTag :: String -> Window -> X () delTag s w = do tags <- getTags w setTags (filter (/= s) tags) w -- | remove all tags
129
delTag s w = do tags <- getTags w setTags (filter (/= s) tags) w -- | remove all tags
94
false
true
0
11
36
65
30
35
null
null
alexander-at-github/eta
compiler/ETA/Core/TrieMap.hs
bsd-3-clause
xtFreeVar :: Var -> XT a -> VarEnv a -> VarEnv a xtFreeVar v f m = alterVarEnv f m v
84
xtFreeVar :: Var -> XT a -> VarEnv a -> VarEnv a xtFreeVar v f m = alterVarEnv f m v
84
xtFreeVar v f m = alterVarEnv f m v
35
false
true
0
9
20
50
22
28
null
null
erochest/neatline-mocks
src/NeatlineMock/Generate.hs
apache-2.0
randomRecord :: Int -> Int -> Day -> Integer -> GenIO -> IO NeatlineRecord randomRecord ownerId exhibitId center dateRange g = do let (from, to) = (addDays (-dateRange) center, addDays dateRange center) now <- getCurrentTime start' <- randomDate from to g let title = T.pack $ "record ...
1,170
randomRecord :: Int -> Int -> Day -> Integer -> GenIO -> IO NeatlineRecord randomRecord ownerId exhibitId center dateRange g = do let (from, to) = (addDays (-dateRange) center, addDays dateRange center) now <- getCurrentTime start' <- randomDate from to g let title = T.pack $ "record ...
1,170
randomRecord ownerId exhibitId center dateRange g = do let (from, to) = (addDays (-dateRange) center, addDays dateRange center) now <- getCurrentTime start' <- randomDate from to g let title = T.pack $ "record " ++ formatTime defaultTimeLocale "%Y-%m-%d" start' nullIsland = "POI...
1,095
false
true
13
13
396
333
168
165
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
maxEnergy ZergInfestedTerran = 0
32
maxEnergy ZergInfestedTerran = 0
32
maxEnergy ZergInfestedTerran = 0
32
false
false
0
5
3
9
4
5
null
null
CDSoft/pp
src/Preprocessor.hs
gpl-3.0
-- deprecated prints a warning on stderr when a deprecated macro is executed deprecated :: Macro -> String -> Macro deprecated (Macro name aliases _ impl) new = Macro name aliases docstring impl' where impl' env args = do let file = fromMaybe "-" $ currentFile env hPutStrLn stder...
527
deprecated :: Macro -> String -> Macro deprecated (Macro name aliases _ impl) new = Macro name aliases docstring impl' where impl' env args = do let file = fromMaybe "-" $ currentFile env hPutStrLn stderr $ "WARNING: " ++ file ++ ": \"" ++ name ++ "\" is deprecated. Please consid...
450
deprecated (Macro name aliases _ impl) new = Macro name aliases docstring impl' where impl' env args = do let file = fromMaybe "-" $ currentFile env hPutStrLn stderr $ "WARNING: " ++ file ++ ": \"" ++ name ++ "\" is deprecated. Please consider using \"" ++ new ++ "\" instead." ...
411
true
true
3
14
141
152
68
84
null
null
codygman/Frames
src/Frames/InCore.hs
bsd-3-clause
inCoreSoA :: forall m rs. (PrimMonad m, RecVec rs) => P.Producer (Record rs) m () -> m (Int, V.Rec ((->) Int) rs) inCoreSoA xs = do mvs <- allocRec (Proxy :: Proxy rs) let feed (!i, !sz, !mvs') row | i == sz = growRec (Proxy::Proxy rs) mvs' >>= flip feed row . (i, sz*2...
641
inCoreSoA :: forall m rs. (PrimMonad m, RecVec rs) => P.Producer (Record rs) m () -> m (Int, V.Rec ((->) Int) rs) inCoreSoA xs = do mvs <- allocRec (Proxy :: Proxy rs) let feed (!i, !sz, !mvs') row | i == sz = growRec (Proxy::Proxy rs) mvs' >>= flip feed row . (i, sz*2...
641
inCoreSoA xs = do mvs <- allocRec (Proxy :: Proxy rs) let feed (!i, !sz, !mvs') row | i == sz = growRec (Proxy::Proxy rs) mvs' >>= flip feed row . (i, sz*2,) | otherwise = do writeRec (Proxy::Proxy rs) i mvs' row return (i+1, sz, mvs') ...
517
false
true
0
15
223
321
162
159
null
null
PhDP/webpage-hakyll
files/chaos.hs
mit
fde r x n = x' : fde r x' (n - 1)
33
fde r x n = x' : fde r x' (n - 1)
33
fde r x n = x' : fde r x' (n - 1)
33
false
false
0
8
12
31
15
16
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
parseMarkdown :: MarkdownParser Pandoc parseMarkdown = do -- markdown allows raw HTML updateState $ \state -> state { stateOptions = let oldOpts = stateOptions state in oldOpts{ readerParseRaw = True } } optional titleBlock blocks <- parseBlocks st <- getState let meta = ...
412
parseMarkdown :: MarkdownParser Pandoc parseMarkdown = do -- markdown allows raw HTML updateState $ \state -> state { stateOptions = let oldOpts = stateOptions state in oldOpts{ readerParseRaw = True } } optional titleBlock blocks <- parseBlocks st <- getState let meta = ...
412
parseMarkdown = do -- markdown allows raw HTML updateState $ \state -> state { stateOptions = let oldOpts = stateOptions state in oldOpts{ readerParseRaw = True } } optional titleBlock blocks <- parseBlocks st <- getState let meta = runF (stateMeta' st) st let Pandoc _ ...
373
false
true
1
16
113
139
63
76
null
null
sfultong/stand-in-language
src/SIL/Parser.hs
apache-2.0
languageDef = Token.LanguageDef { Token.commentStart = "{-" , Token.commentEnd = "-}" , Token.commentLine = "--" , Token.nestedComments = True , Token.identStart = letter , Token.identLetter = alphaNum <|> oneOf "_'" , Token.opStart = Token.opLetter languageDef , Token.opLetter ...
539
languageDef = Token.LanguageDef { Token.commentStart = "{-" , Token.commentEnd = "-}" , Token.commentLine = "--" , Token.nestedComments = True , Token.identStart = letter , Token.identLetter = alphaNum <|> oneOf "_'" , Token.opStart = Token.opLetter languageDef , Token.opLetter ...
539
languageDef = Token.LanguageDef { Token.commentStart = "{-" , Token.commentEnd = "-}" , Token.commentLine = "--" , Token.nestedComments = True , Token.identStart = letter , Token.identLetter = alphaNum <|> oneOf "_'" , Token.opStart = Token.opLetter languageDef , Token.opLetter ...
539
false
false
0
9
117
159
95
64
null
null