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
karamellpelle/grid
source/Game/Values/Plain.hs
gpl-3.0
valueLevelPuzzleDotSlices :: UInt valueLevelPuzzleDotSlices = 16
68
valueLevelPuzzleDotSlices :: UInt valueLevelPuzzleDotSlices = 16
68
valueLevelPuzzleDotSlices = 16
34
false
true
0
4
9
11
6
5
null
null
svenssonjoel/GCDObsidian
Obsidian/GCDObsidian/Printing.hs
bsd-3-clause
------------------------------------------------------------------------------ -- Print Code printCode :: Show a => Program a -> IO () printCode c = putStrLn$ printProgram c
175
printCode :: Show a => Program a -> IO () printCode c = putStrLn$ printProgram c
80
printCode c = putStrLn$ printProgram c
38
true
true
0
8
21
42
20
22
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F08.hs
bsd-3-clause
-- glFogCoorddEXT -------------------------------------------------------------- -- | The vector equivalent of this command is 'glFogCoorddvEXT'. This command is an alias for 'glFogCoordd'. glFogCoorddEXT :: MonadIO m => GLdouble -- ^ @coord@ of type @CoordD@. -> m () glFogCoorddEXT v1 = liftIO $ dyn84 ptr_glFog...
332
glFogCoorddEXT :: MonadIO m => GLdouble -- ^ @coord@ of type @CoordD@. -> m () glFogCoorddEXT v1 = liftIO $ dyn84 ptr_glFogCoorddEXT v1
141
glFogCoorddEXT v1 = liftIO $ dyn84 ptr_glFogCoorddEXT v1
56
true
true
2
9
49
48
22
26
null
null
fmapfmapfmap/amazonka
amazonka-route53/gen/Network/AWS/Route53/Types/Product.hs
mpl-2.0
-- | Creates a value of 'AliasTarget' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'atHostedZoneId' -- -- * 'atDNSName' -- -- * 'atEvaluateTargetHealth' aliasTarget :: Text -- ^ 'atHostedZoneId' -> Text -- ^ 'atDNSName' ...
584
aliasTarget :: Text -- ^ 'atHostedZoneId' -> Text -- ^ 'atDNSName' -> Bool -- ^ 'atEvaluateTargetHealth' -> AliasTarget aliasTarget pHostedZoneId_ pDNSName_ pEvaluateTargetHealth_ = AliasTarget' { _atHostedZoneId = pHostedZoneId_ , _atDNSName = pDNSName_ , _atEvaluateTargetHealth = pEval...
343
aliasTarget pHostedZoneId_ pDNSName_ pEvaluateTargetHealth_ = AliasTarget' { _atHostedZoneId = pHostedZoneId_ , _atDNSName = pDNSName_ , _atEvaluateTargetHealth = pEvaluateTargetHealth_ }
207
true
true
0
7
114
62
40
22
null
null
ytakano/tsukuyomi
tests/json/json_haskell.hs
bsd-3-clause
parse_member = do key <- parse_string _ <- parse_separator ':' val <- parse_value return $ (key, val)
121
parse_member = do key <- parse_string _ <- parse_separator ':' val <- parse_value return $ (key, val)
121
parse_member = do key <- parse_string _ <- parse_separator ':' val <- parse_value return $ (key, val)
121
false
false
0
8
36
43
20
23
null
null
dylanmc/cryptol
cryptol/REPL/Monad.hs
bsd-3-clause
checkProver :: EnvVal -> Maybe String checkProver val = case val of EnvString s | s `elem` ["cvc4", "yices", "z3"] -> Nothing | otherwise -> Just "prover must be cvc4, yices, or z3" _ -> Just "unable to parse a value for prover" -- Environment Utilities ------------------------------...
345
checkProver :: EnvVal -> Maybe String checkProver val = case val of EnvString s | s `elem` ["cvc4", "yices", "z3"] -> Nothing | otherwise -> Just "prover must be cvc4, yices, or z3" _ -> Just "unable to parse a value for prover" -- Environment Utilities ------------------------------...
345
checkProver val = case val of EnvString s | s `elem` ["cvc4", "yices", "z3"] -> Nothing | otherwise -> Just "prover must be cvc4, yices, or z3" _ -> Just "unable to parse a value for prover" -- Environment Utilities -------------------------------------------------------
307
false
true
0
12
82
77
38
39
null
null
alopatindev/math
statistics/average.hs
gpl-3.0
mean :: [Double] -> Double mean xs = sum xs / length' xs
56
mean :: [Double] -> Double mean xs = sum xs / length' xs
56
mean xs = sum xs / length' xs
29
false
true
0
6
12
31
15
16
null
null
mtolly/rail
src/Language/Rail/Run.hs
gpl-3.0
-- | Runs a piece of code. Does not create a new scope. run :: (Monad m) => Flow () Result Command -> Rail m () run g = case g of x :>> c -> gets executor >>= ($ x) >> run c Branch () x y -> popBool >>= \b -> run $ if b then y else x Continue c -> absurd c End e -> case e of Return -> r...
470
run :: (Monad m) => Flow () Result Command -> Rail m () run g = case g of x :>> c -> gets executor >>= ($ x) >> run c Branch () x y -> popBool >>= \b -> run $ if b then y else x Continue c -> absurd c End e -> case e of Return -> return () Boom -> popStr >>= crash Internal...
414
run g = case g of x :>> c -> gets executor >>= ($ x) >> run c Branch () x y -> popBool >>= \b -> run $ if b then y else x Continue c -> absurd c End e -> case e of Return -> return () Boom -> popStr >>= crash Internal s -> crash s -- | Runs a function, which creates a new...
358
true
true
0
12
149
175
85
90
null
null
miniBill/entangle
src/lib/EntangleMonad.hs
mit
transformGate :: String -> [QubitId] -> [QubitId] -> EntangleMonad () transformGate name qs cs = EntangleMonad res where res bs ms = Right $ GateNode name qs cs $ LeafNode (bs, ms, ())
188
transformGate :: String -> [QubitId] -> [QubitId] -> EntangleMonad () transformGate name qs cs = EntangleMonad res where res bs ms = Right $ GateNode name qs cs $ LeafNode (bs, ms, ())
188
transformGate name qs cs = EntangleMonad res where res bs ms = Right $ GateNode name qs cs $ LeafNode (bs, ms, ())
118
false
true
0
10
36
85
43
42
null
null
ezyang/ghc
compiler/codeGen/CgUtils.hs
bsd-3-clause
baseRegOffset dflags (YmmReg 2) = oFFSET_StgRegTable_rYMM2 dflags
74
baseRegOffset dflags (YmmReg 2) = oFFSET_StgRegTable_rYMM2 dflags
74
baseRegOffset dflags (YmmReg 2) = oFFSET_StgRegTable_rYMM2 dflags
74
false
false
0
7
15
20
9
11
null
null
ezyang/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
pprParendCo co = getPprStyle $ \ sty -> pprParendIfaceCoercion (tidyToIfaceCoSty co sty)
88
pprParendCo co = getPprStyle $ \ sty -> pprParendIfaceCoercion (tidyToIfaceCoSty co sty)
88
pprParendCo co = getPprStyle $ \ sty -> pprParendIfaceCoercion (tidyToIfaceCoSty co sty)
88
false
false
3
8
11
33
14
19
null
null
zlizta/PiSigma
src/Language/PiSigma/Syntax.hs
bsd-3-clause
-- | Smart constructor for Pi. pi :: Loc -> Name -> Type -> Type -> Type pi l n t = pis' [(l, n, t)]
100
pi :: Loc -> Name -> Type -> Type -> Type pi l n t = pis' [(l, n, t)]
69
pi l n t = pis' [(l, n, t)]
27
true
true
0
8
25
55
28
27
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Subnetworks/ExpandIPCIdRRange.hs
mpl-2.0
-- | Multipart request metadata. seicirrPayload :: Lens' SubnetworksExpandIPCIdRRange SubnetworksExpandIPCIdRRangeRequest seicirrPayload = lens _seicirrPayload (\ s a -> s{_seicirrPayload = a})
201
seicirrPayload :: Lens' SubnetworksExpandIPCIdRRange SubnetworksExpandIPCIdRRangeRequest seicirrPayload = lens _seicirrPayload (\ s a -> s{_seicirrPayload = a})
168
seicirrPayload = lens _seicirrPayload (\ s a -> s{_seicirrPayload = a})
79
true
true
0
9
28
42
22
20
null
null
luoyetx/LearnCode
euler/p012.hs
bsd-3-clause
primeFactor n = factor n primes where factor n (p:ps) | p*p > n = [n] | n `mod` p == 0 = p : factor (n `div` p) (p:ps) | otherwise = factor n ps
213
primeFactor n = factor n primes where factor n (p:ps) | p*p > n = [n] | n `mod` p == 0 = p : factor (n `div` p) (p:ps) | otherwise = factor n ps
213
primeFactor n = factor n primes where factor n (p:ps) | p*p > n = [n] | n `mod` p == 0 = p : factor (n `div` p) (p:ps) | otherwise = factor n ps
213
false
false
0
9
104
108
54
54
null
null
asvyazin/my-books.purs
server/my-books/CouchAuthProxy/Main.hs
mpl-2.0
tryGetAdminAuth :: IO (Maybe (ByteString, ByteString)) tryGetAdminAuth = runMaybeT $ do username <- MaybeT $ lookupEnv "COUCHDB_ADMIN_USERNAME" password <- MaybeT $ lookupEnv "COUCHDB_ADMIN_PASSWORD" return (pack username, pack password)
243
tryGetAdminAuth :: IO (Maybe (ByteString, ByteString)) tryGetAdminAuth = runMaybeT $ do username <- MaybeT $ lookupEnv "COUCHDB_ADMIN_USERNAME" password <- MaybeT $ lookupEnv "COUCHDB_ADMIN_PASSWORD" return (pack username, pack password)
243
tryGetAdminAuth = runMaybeT $ do username <- MaybeT $ lookupEnv "COUCHDB_ADMIN_USERNAME" password <- MaybeT $ lookupEnv "COUCHDB_ADMIN_PASSWORD" return (pack username, pack password)
188
false
true
0
10
33
76
36
40
null
null
kmels/tersus
Tersus/Auth.hs
bsd-2-clause
io = liftIO
11
io = liftIO
11
io = liftIO
11
false
false
1
5
2
10
3
7
null
null
cauterize-tools/cauterize
src/Cauterize/Dynamic/Common.hs
bsd-3-clause
isUnion _ = False
17
isUnion _ = False
17
isUnion _ = False
17
false
false
0
5
3
9
4
5
null
null
vzaccaria/bddtool
src/Paper/Paper.hs
bsd-3-clause
-- -- For use in documents you have 4 variables with the following labels s1 = (unit 4 True)
92
s1 = (unit 4 True)
18
s1 = (unit 4 True)
18
true
false
1
7
18
19
8
11
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Unicode.hs
bsd-3-clause
toLower c = chr (fromIntegral (towlower (fromIntegral (ord c))))
64
toLower c = chr (fromIntegral (towlower (fromIntegral (ord c))))
64
toLower c = chr (fromIntegral (towlower (fromIntegral (ord c))))
64
false
false
1
13
8
40
17
23
null
null
nevrenato/Hets_Fork
CspCASL/Morphism.hs
gpl-2.0
mapRenaming :: CspCASLMorphism -> RENAMING -> RENAMING mapRenaming mor (Renaming rm) = Renaming $ map (mapRename mor) rm
120
mapRenaming :: CspCASLMorphism -> RENAMING -> RENAMING mapRenaming mor (Renaming rm) = Renaming $ map (mapRename mor) rm
120
mapRenaming mor (Renaming rm) = Renaming $ map (mapRename mor) rm
65
false
true
0
8
17
50
23
27
null
null
feuerbach/music
Melody/GameOfThrones.hs
mit
bass = runMelodyM $ do -------------- stave "1 bass" $ do bass_pat_cg -------------- stave "2 bass" $ do bass_pat_cc -------------- stave "3 bass" $ do bass_stave_3 -------------- stave "4 bass" $ do bass_pat_gd -------------- stave "5 bass" $ do...
1,844
bass = runMelodyM $ do -------------- stave "1 bass" $ do bass_pat_cg -------------- stave "2 bass" $ do bass_pat_cc -------------- stave "3 bass" $ do bass_stave_3 -------------- stave "4 bass" $ do bass_pat_gd -------------- stave "5 bass" $ do...
1,844
bass = runMelodyM $ do -------------- stave "1 bass" $ do bass_pat_cg -------------- stave "2 bass" $ do bass_pat_cc -------------- stave "3 bass" $ do bass_stave_3 -------------- stave "4 bass" $ do bass_pat_gd -------------- stave "5 bass" $ do...
1,844
false
false
1
15
739
614
263
351
null
null
davnils/while-lang-parser
Language/While/Parser.hs
bsd-3-clause
-- | Table of supported arithmetic operations. arithmeticOperation = [ [binaryOp "*" Amul AssocLeft] , [binaryOp "+" Aadd AssocLeft, binaryOp "-" Asub AssocLeft , binaryOp "/" Adiv AssocLeft ] ]
200
arithmeticOperation = [ [binaryOp "*" Amul AssocLeft] , [binaryOp "+" Aadd AssocLeft, binaryOp "-" Asub AssocLeft , binaryOp "/" Adiv AssocLeft ] ]
153
arithmeticOperation = [ [binaryOp "*" Amul AssocLeft] , [binaryOp "+" Aadd AssocLeft, binaryOp "-" Asub AssocLeft , binaryOp "/" Adiv AssocLeft ] ]
153
true
false
0
7
35
53
28
25
null
null
rgrempel/frelm.org
src/Database/Migrate.hs
mit
dropIdFieldFromPackage :: MigrationCommand dropIdFieldFromPackage = MigrationScript "drop-id-field-from-package" $ encodeUtf8 [text| ALTER TABLE package DROP COLUMN id; |]
223
dropIdFieldFromPackage :: MigrationCommand dropIdFieldFromPackage = MigrationScript "drop-id-field-from-package" $ encodeUtf8 [text| ALTER TABLE package DROP COLUMN id; |]
223
dropIdFieldFromPackage = MigrationScript "drop-id-field-from-package" $ encodeUtf8 [text| ALTER TABLE package DROP COLUMN id; |]
180
false
true
0
6
68
25
14
11
null
null
gsdlab/clafer
src/Language/Clafer/Generator/Html.hs
mit
printExp (ECard _ exp') indent irMap html comments = "# " ++ printExp exp' indent irMap html comments
111
printExp (ECard _ exp') indent irMap html comments = "# " ++ printExp exp' indent irMap html comments
111
printExp (ECard _ exp') indent irMap html comments = "# " ++ printExp exp' indent irMap html comments
111
false
false
0
7
27
40
19
21
null
null
nevrenato/HetsAlloy
OWL2/OWL22CommonLogic.hs
gpl-2.0
failMsg :: Pretty a => a -> Result b failMsg a = fail $ "cannot translate " ++ showDoc a "\n"
93
failMsg :: Pretty a => a -> Result b failMsg a = fail $ "cannot translate " ++ showDoc a "\n"
93
failMsg a = fail $ "cannot translate " ++ showDoc a "\n"
56
false
true
0
7
20
41
19
22
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Options/Util.hs
gpl-2.0
addDefaultHelp dval (RawAbsPathArg s l mkF _ mkV unV a h) | [dval] == map mkV (unV dval) = absPathArg s l mkF a (h++" [DEFAULT]") | otherwise = absPathArg s l mkF a h
170
addDefaultHelp dval (RawAbsPathArg s l mkF _ mkV unV a h) | [dval] == map mkV (unV dval) = absPathArg s l mkF a (h++" [DEFAULT]") | otherwise = absPathArg s l mkF a h
170
addDefaultHelp dval (RawAbsPathArg s l mkF _ mkV unV a h) | [dval] == map mkV (unV dval) = absPathArg s l mkF a (h++" [DEFAULT]") | otherwise = absPathArg s l mkF a h
170
false
false
1
11
38
91
44
47
null
null
rrnewton/stack
src/Stack/Build/Cache.hs
bsd-3-clause
-- | Try to load a cache. tryGetCache :: (MonadIO m, BinarySchema a) => (Path Abs Dir -> m (Path Abs File)) -> Path Abs Dir -> m (Maybe a) tryGetCache get' dir = get' dir >>= decodeFileOrFailDeep . toFilePath
244
tryGetCache :: (MonadIO m, BinarySchema a) => (Path Abs Dir -> m (Path Abs File)) -> Path Abs Dir -> m (Maybe a) tryGetCache get' dir = get' dir >>= decodeFileOrFailDeep . toFilePath
218
tryGetCache get' dir = get' dir >>= decodeFileOrFailDeep . toFilePath
69
true
true
0
11
75
88
43
45
null
null
thoughtpolice/salt
tests/Properties.hs
mit
prop_sign_verify :: KeyPair SigningKey -> ByteString -> Bool prop_sign_verify (pk,sk) xs = let s = Sign.sign sk xs d = Sign.verify pk s in maybe False (== xs) d
174
prop_sign_verify :: KeyPair SigningKey -> ByteString -> Bool prop_sign_verify (pk,sk) xs = let s = Sign.sign sk xs d = Sign.verify pk s in maybe False (== xs) d
174
prop_sign_verify (pk,sk) xs = let s = Sign.sign sk xs d = Sign.verify pk s in maybe False (== xs) d
113
false
true
0
10
42
74
37
37
null
null
divipp/lgtk
lgtkdemo/LGtk/Demos/Main.hs
bsd-3-clause
inCanvasExample = do t <- newRef $ iterate (Node Leaf) Leaf !! 5 i <- newRef (0 :: Int) j <- newRef 0 s <- newRef "x" s' <- newRef "y" let x = vertically [ horizontally [ vertically [ horizontally [ label $ fmap (\i -> show ...
930
inCanvasExample = do t <- newRef $ iterate (Node Leaf) Leaf !! 5 i <- newRef (0 :: Int) j <- newRef 0 s <- newRef "x" s' <- newRef "y" let x = vertically [ horizontally [ vertically [ horizontally [ label $ fmap (\i -> show ...
930
inCanvasExample = do t <- newRef $ iterate (Node Leaf) Leaf !! 5 i <- newRef (0 :: Int) j <- newRef 0 s <- newRef "x" s' <- newRef "y" let x = vertically [ horizontally [ vertically [ horizontally [ label $ fmap (\i -> show ...
930
false
false
0
24
517
275
134
141
null
null
sourcewave/pg-schema-diff
Trigger.hs
unlicense
mkdbt (a:b:c:d:e:f:g:_) = DbTrigger (gs a) (gs b) (gs c) (mktt (gi d)) (gb e) (gs f) (gs g)
91
mkdbt (a:b:c:d:e:f:g:_) = DbTrigger (gs a) (gs b) (gs c) (mktt (gi d)) (gb e) (gs f) (gs g)
91
mkdbt (a:b:c:d:e:f:g:_) = DbTrigger (gs a) (gs b) (gs c) (mktt (gi d)) (gb e) (gs f) (gs g)
91
false
false
0
12
18
104
51
53
null
null
scvalex/daemons
src/Control/Pipe/Serialize.hs
gpl-3.0
serializer :: (Serialize a, Monad m) => Pipe a ByteString m () serializer = forever $ do x <- await yield (encode x)
124
serializer :: (Serialize a, Monad m) => Pipe a ByteString m () serializer = forever $ do x <- await yield (encode x)
124
serializer = forever $ do x <- await yield (encode x)
61
false
true
0
10
30
60
29
31
null
null
SAdams601/HaRe
old/testing/duplication/WhereIn2_AstOut.hs
bsd-3-clause
anotherFoo :: Int -> Int anotherFoo x = x + 3
47
anotherFoo :: Int -> Int anotherFoo x = x + 3
45
anotherFoo x = x + 3
20
false
true
0
5
12
22
11
11
null
null
andorp/grin
grin/src/AbstractInterpretation/LiveVariable/CodeGenBase.hs
bsd-3-clause
getReg :: Name -> CG IR.Reg getReg name = do regMap <- gets _sRegisterMap case Map.lookup name regMap of Nothing -> error $ "unknown variable " ++ unpackName name Just reg -> pure reg
198
getReg :: Name -> CG IR.Reg getReg name = do regMap <- gets _sRegisterMap case Map.lookup name regMap of Nothing -> error $ "unknown variable " ++ unpackName name Just reg -> pure reg
198
getReg name = do regMap <- gets _sRegisterMap case Map.lookup name regMap of Nothing -> error $ "unknown variable " ++ unpackName name Just reg -> pure reg
170
false
true
0
11
48
76
34
42
null
null
ruud-v-a/blog
src/Main.hs
gpl-3.0
-- Copy over bitmap images, render svg images, so they can reference -- subsetted fonts. Svgs should be rendered with the font context of their post. writeImage :: Template.Context -> FilePath -> IO () writeImage ctx fname = let inFile = "images/compressed" </> fname outFile = "out/images" </> fname copyB...
658
writeImage :: Template.Context -> FilePath -> IO () writeImage ctx fname = let inFile = "images/compressed" </> fname outFile = "out/images" </> fname copyBitmap = copyFile inFile outFile renderSvg = do template <- Template.parse <$> readFile inFile writeFile outFile (Template.apply templa...
508
writeImage ctx fname = let inFile = "images/compressed" </> fname outFile = "out/images" </> fname copyBitmap = copyFile inFile outFile renderSvg = do template <- Template.parse <$> readFile inFile writeFile outFile (Template.apply template ctx) compressFile outFile in do if "....
456
true
true
0
14
137
135
66
69
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
ioDataConName = conName gHC_TYPES (fsLit "IO") ioDataConKey
69
ioDataConName = conName gHC_TYPES (fsLit "IO") ioDataConKey
69
ioDataConName = conName gHC_TYPES (fsLit "IO") ioDataConKey
69
false
false
0
7
16
19
9
10
null
null
brendanhay/gogol
gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GoogleCloudVideointelligenceV1_ExplicitContentAnnotation' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gcvvecacFrames' -- -- * 'gcvvecacVersion' googleCloudVideointelligenceV1_ExplicitContentAnnotation ...
558
googleCloudVideointelligenceV1_ExplicitContentAnnotation :: GoogleCloudVideointelligenceV1_ExplicitContentAnnotation googleCloudVideointelligenceV1_ExplicitContentAnnotation = GoogleCloudVideointelligenceV1_ExplicitContentAnnotation' {_gcvvecacFrames = Nothing, _gcvvecacVersion = Nothing}
299
googleCloudVideointelligenceV1_ExplicitContentAnnotation = GoogleCloudVideointelligenceV1_ExplicitContentAnnotation' {_gcvvecacFrames = Nothing, _gcvvecacVersion = Nothing}
178
true
true
0
6
59
32
22
10
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Get.hs
mpl-2.0
-- | The ID of the enterprise. mcugEnterpriseId :: Lens' ManagedConfigurationsforUserGet Text mcugEnterpriseId = lens _mcugEnterpriseId (\ s a -> s{_mcugEnterpriseId = a})
179
mcugEnterpriseId :: Lens' ManagedConfigurationsforUserGet Text mcugEnterpriseId = lens _mcugEnterpriseId (\ s a -> s{_mcugEnterpriseId = a})
148
mcugEnterpriseId = lens _mcugEnterpriseId (\ s a -> s{_mcugEnterpriseId = a})
85
true
true
0
9
30
42
22
20
null
null
el-devo/SAT
SAT.hs
bsd-3-clause
swapWatches :: State -> ClauseIndex -> State swapWatches s ci = s { watch1 = M.insert ci (find ci w2) w1, watch2 = M.insert ci (find ci w1) w2 } where w1 = watch1 s w2 = watch2 s find = M.findWithDefault (error "swapWatches: Watch did not exist for clause")
275
swapWatches :: State -> ClauseIndex -> State swapWatches s ci = s { watch1 = M.insert ci (find ci w2) w1, watch2 = M.insert ci (find ci w1) w2 } where w1 = watch1 s w2 = watch2 s find = M.findWithDefault (error "swapWatches: Watch did not exist for clause")
275
swapWatches s ci = s { watch1 = M.insert ci (find ci w2) w1, watch2 = M.insert ci (find ci w1) w2 } where w1 = watch1 s w2 = watch2 s find = M.findWithDefault (error "swapWatches: Watch did not exist for clause")
230
false
true
0
9
67
107
54
53
null
null
YoEight/rakhana
Data/Rakhana/Tape.hs
bsd-3-clause
driveModifySeek :: Monad m => (Integer -> Integer) -> Drive m () driveModifySeek k = do i <- driveGetSeek driveSeek $ k i --------------------------------------------------------------------------------
216
driveModifySeek :: Monad m => (Integer -> Integer) -> Drive m () driveModifySeek k = do i <- driveGetSeek driveSeek $ k i --------------------------------------------------------------------------------
216
driveModifySeek k = do i <- driveGetSeek driveSeek $ k i --------------------------------------------------------------------------------
151
false
true
0
8
37
57
27
30
null
null
NightRa/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
cname :: Name -> String cname n = "_idris_" ++ concatMap cchar (showCG n) where cchar x | isAlpha x || isDigit x = [x] | otherwise = "_" ++ show (fromEnum x) ++ "_"
182
cname :: Name -> String cname n = "_idris_" ++ concatMap cchar (showCG n) where cchar x | isAlpha x || isDigit x = [x] | otherwise = "_" ++ show (fromEnum x) ++ "_"
182
cname n = "_idris_" ++ concatMap cchar (showCG n) where cchar x | isAlpha x || isDigit x = [x] | otherwise = "_" ++ show (fromEnum x) ++ "_"
158
false
true
0
10
52
88
41
47
null
null
uuhan/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
mapPTermFC f g (PUnifyLog t) = PUnifyLog (mapPTermFC f g t)
76
mapPTermFC f g (PUnifyLog t) = PUnifyLog (mapPTermFC f g t)
76
mapPTermFC f g (PUnifyLog t) = PUnifyLog (mapPTermFC f g t)
76
false
false
0
7
27
32
15
17
null
null
rvion/ride
jetpack/src/Data/ByteString/AsBs.hs
bsd-3-clause
-- bs_spanEnd :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString) bs_spanEnd = I.spanEnd
97
bs_spanEnd = I.spanEnd
22
bs_spanEnd = I.spanEnd
22
true
false
0
5
13
9
5
4
null
null
ml9951/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
sndIdKey = mkPreludeMiscIdUnique 42
56
sndIdKey = mkPreludeMiscIdUnique 42
56
sndIdKey = mkPreludeMiscIdUnique 42
56
false
false
0
5
24
9
4
5
null
null
cutsea110/aop
src/NonEmptyList.hs
bsd-3-clause
idL = fixL idL
14
idL = fixL idL
14
idL = fixL idL
14
false
false
0
5
3
9
4
5
null
null
markwright/antlrc-examples
src/tapl/fulluntyped/Semantic.hs
bsd-3-clause
saFloatV token = do -- read the FloatV floating point value from the token text into n t <- tokenGetText token n <- readIO t -- obtain the source code line and charPosition from the token l <- tokenGetLine token c <- tokenGetCharPositionInLine token -- return the term, which is TmFloat ...
560
saFloatV token = do -- read the FloatV floating point value from the token text into n t <- tokenGetText token n <- readIO t -- obtain the source code line and charPosition from the token l <- tokenGetLine token c <- tokenGetCharPositionInLine token -- return the term, which is TmFloat ...
560
saFloatV token = do -- read the FloatV floating point value from the token text into n t <- tokenGetText token n <- readIO t -- obtain the source code line and charPosition from the token l <- tokenGetLine token c <- tokenGetCharPositionInLine token -- return the term, which is TmFloat ...
560
false
false
0
17
203
140
63
77
null
null
energyflowanalysis/efa-2.1
test/EFA/Test/EquationSystem/Given.hs
bsd-3-clause
fullGiven :: EquationSystem s fullGiven = foldMap getEquation $ (XIdx.power sec0 node0 node2 .= 34 / 3) : (XIdx.power sec0 node1 node2 .= 25 / 4) : (XIdx.power sec0 node2 node0 .= 17 / 2) : (XIdx.power sec0 node2 node1 .= 25 / 2) : (XIdx.power sec0 node2 node3 .= 4 / 1) : (XIdx.power sec0 node3 node2 ...
4,756
fullGiven :: EquationSystem s fullGiven = foldMap getEquation $ (XIdx.power sec0 node0 node2 .= 34 / 3) : (XIdx.power sec0 node1 node2 .= 25 / 4) : (XIdx.power sec0 node2 node0 .= 17 / 2) : (XIdx.power sec0 node2 node1 .= 25 / 2) : (XIdx.power sec0 node2 node3 .= 4 / 1) : (XIdx.power sec0 node3 node2 ...
4,756
fullGiven = foldMap getEquation $ (XIdx.power sec0 node0 node2 .= 34 / 3) : (XIdx.power sec0 node1 node2 .= 25 / 4) : (XIdx.power sec0 node2 node0 .= 17 / 2) : (XIdx.power sec0 node2 node1 .= 25 / 2) : (XIdx.power sec0 node2 node3 .= 4 / 1) : (XIdx.power sec0 node3 node2 .= 16 / 1) : (XIdx.power se...
4,726
false
true
6
71
1,299
2,596
1,294
1,302
null
null
quyse/flaw
flaw-font/Flaw/Graphics/Font/Script.hs
mit
fontScriptMahajani :: FontScript fontScriptMahajani = fontScript "Mahj"
96
fontScriptMahajani :: FontScript fontScriptMahajani = fontScript "Mahj"
96
fontScriptMahajani = fontScript "Mahj"
51
false
true
0
5
31
14
7
7
null
null
byorgey/Idris-dev
src/Idris/Completion.hs
bsd-3-clause
completeWith :: [String] -> String -> [Completion] completeWith ns n = if uniqueExists then [simpleCompletion n] else map simpleCompletion prefixMatches where prefixMatches = filter (isPrefixOf n) ns uniqueExists = [n] == prefixMatches
289
completeWith :: [String] -> String -> [Completion] completeWith ns n = if uniqueExists then [simpleCompletion n] else map simpleCompletion prefixMatches where prefixMatches = filter (isPrefixOf n) ns uniqueExists = [n] == prefixMatches
289
completeWith ns n = if uniqueExists then [simpleCompletion n] else map simpleCompletion prefixMatches where prefixMatches = filter (isPrefixOf n) ns uniqueExists = [n] == prefixMatches
238
false
true
0
7
85
85
43
42
null
null
gelisam/hawk
tests/System/Console/Hawk/PreludeTests.hs
apache-2.0
-- | A helper for specifying which arguments to pass to Hawk. -- Simplifies testing. testBuilder :: FilePath -> FilePath -> [String] -> String -> FilePath -> IO () testBuilder preludeBase preludeBasename flags expr inputBasename = processArgs args where args = preludeArgs preludeBasename ++ flags ...
748
testBuilder :: FilePath -> FilePath -> [String] -> String -> FilePath -> IO () testBuilder preludeBase preludeBasename flags expr inputBasename = processArgs args where args = preludeArgs preludeBasename ++ flags ++ [expr] ++ inputArgs inputBasename preludePath f = preludeBase <...
661
testBuilder preludeBase preludeBasename flags expr inputBasename = processArgs args where args = preludeArgs preludeBasename ++ flags ++ [expr] ++ inputArgs inputBasename preludePath f = preludeBase </> f inputPath f = "tests" </> "inputs" </> f preludeArgs f = ["-c...
582
true
true
0
11
182
157
81
76
null
null
snape/LooplessFunctionalAlgorithms
LooplessKoda.hs
apache-2.0
(mxt,mtx) `ox` (myt,mty) = (mxt `o` myt,mty `o` mtx)
54
(mxt,mtx) `ox` (myt,mty) = (mxt `o` myt,mty `o` mtx)
54
(mxt,mtx) `ox` (myt,mty) = (mxt `o` myt,mty `o` mtx)
54
false
false
0
6
10
44
27
17
null
null
cartazio/omega
mosaic/CircularFinal.hs
bsd-3-clause
av5 = aliases $ (va' "abc" `Ar` va' "def") `Ar` va' "be"
73
av5 = aliases $ (va' "abc" `Ar` va' "def") `Ar` va' "be"
73
av5 = aliases $ (va' "abc" `Ar` va' "def") `Ar` va' "be"
73
false
false
0
9
28
34
18
16
null
null
zoomhub/zoomhub
src/ZoomHub/API.hs
mit
restInvalidRequest :: Maybe String -> Handler Content restInvalidRequest maybeURL = case maybeURL of Nothing -> throwError . API.error400 $ apiMissingIdOrURLMessage Just _ -> throwError . API.error400 $ invalidURLErrorMessage -- Web: Explore: Recent
254
restInvalidRequest :: Maybe String -> Handler Content restInvalidRequest maybeURL = case maybeURL of Nothing -> throwError . API.error400 $ apiMissingIdOrURLMessage Just _ -> throwError . API.error400 $ invalidURLErrorMessage -- Web: Explore: Recent
254
restInvalidRequest maybeURL = case maybeURL of Nothing -> throwError . API.error400 $ apiMissingIdOrURLMessage Just _ -> throwError . API.error400 $ invalidURLErrorMessage -- Web: Explore: Recent
200
false
true
5
7
36
64
30
34
null
null
ryzhyk/cocoon
cocoon/Parse.hs
apache-2.0
econd = (fmap uncurry (ECond nopos <$ reserved "case")) <*> (braces $ (,) <$> (many $ (,) <$> expr <* colon <*> expr <* semi) <*> (reserved "default" *> colon *> expr <* semi))
225
econd = (fmap uncurry (ECond nopos <$ reserved "case")) <*> (braces $ (,) <$> (many $ (,) <$> expr <* colon <*> expr <* semi) <*> (reserved "default" *> colon *> expr <* semi))
225
econd = (fmap uncurry (ECond nopos <$ reserved "case")) <*> (braces $ (,) <$> (many $ (,) <$> expr <* colon <*> expr <* semi) <*> (reserved "default" *> colon *> expr <* semi))
225
false
false
4
15
82
100
50
50
null
null
typelead/epm
Cabal/Distribution/Simple/ETA.hs
bsd-3-clause
installExe :: Verbosity -> LocalBuildInfo -> InstallDirs FilePath -- ^Where to copy the files to -> FilePath -- ^Build location -> (FilePath, FilePath) -- ^Executable (prefix,suffix) -> PackageDescription -> Executable -...
1,053
installExe :: Verbosity -> LocalBuildInfo -> InstallDirs FilePath -- ^Where to copy the files to -> FilePath -- ^Build location -> (FilePath, FilePath) -- ^Executable (prefix,suffix) -> PackageDescription -> Executable -...
1,053
installExe verbosity lbi installDirs buildPref (progprefix, progsuffix) _pkg exe = do --print ("installExe", targetDir, dynlibTargetDir, builtDir) let binDir = bindir installDirs toDir x = binDir </> x buildDir = buildPref </> exeName exe fromDir x = buildDir </> x exeNameExt ext ...
725
false
true
0
13
328
231
115
116
null
null
ollef/Grempa
examples/Ex4StateLex.hs
bsd-3-clause
lexToks ('\\' :as) = Lambda : lexToks as
51
lexToks ('\\' :as) = Lambda : lexToks as
51
lexToks ('\\' :as) = Lambda : lexToks as
51
false
false
0
6
18
24
11
13
null
null
atwupack/LearnOpenGL
src/LOGL/Model.hs
bsd-3-clause
drawModel :: (MonadReader m, EnvType m ~ AppContext, MonadIO m) => Model -> String -> m () drawModel model shader = mapM_ (\x -> drawMesh x shader) (meshes model)
162
drawModel :: (MonadReader m, EnvType m ~ AppContext, MonadIO m) => Model -> String -> m () drawModel model shader = mapM_ (\x -> drawMesh x shader) (meshes model)
162
drawModel model shader = mapM_ (\x -> drawMesh x shader) (meshes model)
71
false
true
0
9
28
79
39
40
null
null
sw17ch/Z-ARCHIVED-hscauterize
Data/Cauterize/Parser.hs
bsd-3-clause
parseVersion :: Parser CauterizeVersion parseVersion = liftM CauterizeVersion quoted
84
parseVersion :: Parser CauterizeVersion parseVersion = liftM CauterizeVersion quoted
84
parseVersion = liftM CauterizeVersion quoted
44
false
true
0
5
8
19
9
10
null
null
edwardwas/comonadUI
example/Main.hs
isc
main = runSDLUI (snd . pos) (lmap gameActionInputs <$> totalUI startGameState) where startGameState = GameState { _currentTetromino = Tetromino { _centerPeice = pure 0 , _firstPeice = V2 1 0 , _secondPeice = V2 0 1 , _thirdPeice...
695
main = runSDLUI (snd . pos) (lmap gameActionInputs <$> totalUI startGameState) where startGameState = GameState { _currentTetromino = Tetromino { _centerPeice = pure 0 , _firstPeice = V2 1 0 , _secondPeice = V2 0 1 , _thirdPeice...
695
main = runSDLUI (snd . pos) (lmap gameActionInputs <$> totalUI startGameState) where startGameState = GameState { _currentTetromino = Tetromino { _centerPeice = pure 0 , _firstPeice = V2 1 0 , _secondPeice = V2 0 1 , _thirdPeice...
695
false
false
0
13
344
184
102
82
null
null
tjakway/ghcjvm
compiler/main/TidyPgm.hs
bsd-3-clause
cafRefsE p (Lit lit) = cafRefsL p lit
47
cafRefsE p (Lit lit) = cafRefsL p lit
47
cafRefsE p (Lit lit) = cafRefsL p lit
47
false
false
0
7
17
22
10
12
null
null
mikegehard/haskellBookExercises
chapter10/BuiltInFunctions.hs
mit
myOr :: [Bool] -> Bool myOr = foldr (||) False
50
myOr :: [Bool] -> Bool myOr = foldr (||) False
46
myOr = foldr (||) False
23
false
true
0
6
13
25
14
11
null
null
djeik/goto
libgoto/Language/GoLite/Weeder/Types.hs
mit
-- | Decreases the level of for-loop nesting by one. decForLevel :: WeederState -> WeederState decForLevel s = s { forLevel = forLevel s - 1 }
142
decForLevel :: WeederState -> WeederState decForLevel s = s { forLevel = forLevel s - 1 }
89
decForLevel s = s { forLevel = forLevel s - 1 }
47
true
true
0
8
26
34
18
16
null
null
input-output-hk/pos-haskell-prototype
wallet/test/unit/Test/Spec/CoinSelection.hs
mit
feeWasPayed :: ExpenseRegulation -> Core.Utxo -> NonEmpty Core.TxOut -> Core.TxAux -> Property feeWasPayed SenderPaysFee originalUtxo originalOutputs tx = let txOutputs = Core._txOutputs . Core.taTx $ tx in failIf ( "original utxo balance is greater or equal "...
701
feeWasPayed :: ExpenseRegulation -> Core.Utxo -> NonEmpty Core.TxOut -> Core.TxAux -> Property feeWasPayed SenderPaysFee originalUtxo originalOutputs tx = let txOutputs = Core._txOutputs . Core.taTx $ tx in failIf ( "original utxo balance is greater or equal "...
701
feeWasPayed SenderPaysFee originalUtxo originalOutputs tx = let txOutputs = Core._txOutputs . Core.taTx $ tx in failIf ( "original utxo balance is greater or equal " <> "the balance reconstructed with the change outputs, " <> "which means the fee was not payed by the ...
558
false
true
0
11
253
136
64
72
null
null
spaceships/garbled-circuits
src/Crypto/GarbledCircuits/TruthTable.hs
apache-2.0
boolean (Or _ _) = True
24
boolean (Or _ _) = True
24
boolean (Or _ _) = True
24
false
false
0
7
6
17
8
9
null
null
acowley/ghc
compiler/utils/Outputable.hs
bsd-3-clause
showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String -- Allows caller to specify the PrintUnqualified to use showSDocForUser dflags unqual doc = renderWithStyle dflags doc (mkUserStyle unqual AllTheWay)
216
showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String showSDocForUser dflags unqual doc = renderWithStyle dflags doc (mkUserStyle unqual AllTheWay)
160
showSDocForUser dflags unqual doc = renderWithStyle dflags doc (mkUserStyle unqual AllTheWay)
94
true
true
0
7
29
46
23
23
null
null
vito/atomo
src/Atomo/Pretty.hs
bsd-3-clause
headlessKeywords' _ _ _ = empty
31
headlessKeywords' _ _ _ = empty
31
headlessKeywords' _ _ _ = empty
31
false
false
0
5
5
13
6
7
null
null
ice1000/OI-codes
codewars/101-200/last-digit-of-a-large-number.hs
agpl-3.0
fastContAppendOp f e a k | mod k 2 == 1 = f a (fastContAppendOp f e a (k - 1)) | otherwise = fastContAppendOp f e (f a a) (div k 2)
139
fastContAppendOp f e a k | mod k 2 == 1 = f a (fastContAppendOp f e a (k - 1)) | otherwise = fastContAppendOp f e (f a a) (div k 2)
139
fastContAppendOp f e a k | mod k 2 == 1 = f a (fastContAppendOp f e a (k - 1)) | otherwise = fastContAppendOp f e (f a a) (div k 2)
139
false
false
0
9
40
100
43
57
null
null
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/PPoly/Type.hs
bsd-3-clause
liftCheb2PPolyCN :: (Cheb -> CN Cheb) -> (PPoly -> CN PPoly) liftCheb2PPolyCN f (PPoly ps dom) = fmap (\ps2 -> PPoly ps2 dom) (sequence (map (domify f) ps)) where domify :: (Cheb -> CN Cheb) -> (DyadicInterval, Cheb) -> CN (DyadicInterval, Cheb) domify g (i, p) = fmap (i,) (g p) {-lift2PPoly :: (Poly ...
460
liftCheb2PPolyCN :: (Cheb -> CN Cheb) -> (PPoly -> CN PPoly) liftCheb2PPolyCN f (PPoly ps dom) = fmap (\ps2 -> PPoly ps2 dom) (sequence (map (domify f) ps)) where domify :: (Cheb -> CN Cheb) -> (DyadicInterval, Cheb) -> CN (DyadicInterval, Cheb) domify g (i, p) = fmap (i,) (g p) {-lift2PPoly :: (Poly ...
460
liftCheb2PPolyCN f (PPoly ps dom) = fmap (\ps2 -> PPoly ps2 dom) (sequence (map (domify f) ps)) where domify :: (Cheb -> CN Cheb) -> (DyadicInterval, Cheb) -> CN (DyadicInterval, Cheb) domify g (i, p) = fmap (i,) (g p) {-lift2PPoly :: (Poly MPBall -> Poly MPBall) -> (PPoly -> PPoly) lift2PPoly f (PPol...
399
false
true
0
11
98
160
83
77
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeInstanceStatus.hs
mpl-2.0
-- | The maximum number of paginated instance items per response. The call also -- returns a token that you can specify in a subsequent call to get the next set -- of results. If the value is greater than 1000, we return only 1000 items. -- -- Default: 1000 disMaxResults :: Lens' DescribeInstanceStatus (Maybe Int) disM...
386
disMaxResults :: Lens' DescribeInstanceStatus (Maybe Int) disMaxResults = lens _disMaxResults (\s a -> s { _disMaxResults = a })
128
disMaxResults = lens _disMaxResults (\s a -> s { _disMaxResults = a })
70
true
true
0
9
68
50
29
21
null
null
stephenjbarr/gradebot
Gradebot.hs
mit
showIC :: IndivCode -> String showIC ic = str where l1 = " CODE DESCR: " ++ ic_code ic l2 = " TITLE: " ++ ic_title ic l3 = " TEXT: " ++ ic_text ic l4 = " POINTS: " ++ show (ic_points ic) l5 = " QNUM: " ++ show (ic_qnum ic) str = unline...
342
showIC :: IndivCode -> String showIC ic = str where l1 = " CODE DESCR: " ++ ic_code ic l2 = " TITLE: " ++ ic_title ic l3 = " TEXT: " ++ ic_text ic l4 = " POINTS: " ++ show (ic_points ic) l5 = " QNUM: " ++ show (ic_qnum ic) str = unline...
342
showIC ic = str where l1 = " CODE DESCR: " ++ ic_code ic l2 = " TITLE: " ++ ic_title ic l3 = " TEXT: " ++ ic_text ic l4 = " POINTS: " ++ show (ic_points ic) l5 = " QNUM: " ++ show (ic_qnum ic) str = unlines [l1, l2, l3, l4, l5]
312
false
true
0
8
145
116
60
56
null
null
victorgan/intolerable-bot
src/Bot.hs
bsd-3-clause
subredditLastSettings :: Username -> Password -> ReplyText -> RefreshTime -> [Username] -> Maybe (NaiveBayes Bool Text) -> Bool -> SubredditName -> ConcreteSettings subredditLastSettings u p r t b n x s = ConcreteSettings u p s r t b n x
237
subredditLastSettings :: Username -> Password -> ReplyText -> RefreshTime -> [Username] -> Maybe (NaiveBayes Bool Text) -> Bool -> SubredditName -> ConcreteSettings subredditLastSettings u p r t b n x s = ConcreteSettings u p s r t b n x
237
subredditLastSettings u p r t b n x s = ConcreteSettings u p s r t b n x
72
false
true
0
13
40
91
45
46
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo IndexOffAddrOp_Int = mkGenPrimOp (fsLit "indexIntOffAddr#") [] [addrPrimTy, intPrimTy] (intPrimTy)
110
primOpInfo IndexOffAddrOp_Int = mkGenPrimOp (fsLit "indexIntOffAddr#") [] [addrPrimTy, intPrimTy] (intPrimTy)
110
primOpInfo IndexOffAddrOp_Int = mkGenPrimOp (fsLit "indexIntOffAddr#") [] [addrPrimTy, intPrimTy] (intPrimTy)
110
false
false
0
7
10
35
18
17
null
null
weshack/thelist
TheList/Handler/Home.hs
gpl-3.0
postHomeR :: Handler Html postHomeR = do ((result, formWidget), formEnctype) <- runFormPost sampleForm let handlerName = "postHomeR" :: Text submission = case result of FormSuccess res -> Just res _ -> Nothing defaultLayout $ do aDomId <- newIdent setTitle "W...
370
postHomeR :: Handler Html postHomeR = do ((result, formWidget), formEnctype) <- runFormPost sampleForm let handlerName = "postHomeR" :: Text submission = case result of FormSuccess res -> Just res _ -> Nothing defaultLayout $ do aDomId <- newIdent setTitle "W...
370
postHomeR = do ((result, formWidget), formEnctype) <- runFormPost sampleForm let handlerName = "postHomeR" :: Text submission = case result of FormSuccess res -> Just res _ -> Nothing defaultLayout $ do aDomId <- newIdent setTitle "Welcome To Yesod!" ...
344
false
true
0
13
112
105
50
55
null
null
yalpul/CENG242
H99/54-60/p56.hs
gpl-3.0
p56 :: Tree Char -> Bool p56 t = symmetric t t where symmetric Empty Empty = True symmetric (Branch _ l1 r1) (Branch _ l2 r2) = symmetric l1 r2 && symmetric r1 l2 symmetric _ _ = False
208
p56 :: Tree Char -> Bool p56 t = symmetric t t where symmetric Empty Empty = True symmetric (Branch _ l1 r1) (Branch _ l2 r2) = symmetric l1 r2 && symmetric r1 l2 symmetric _ _ = False
208
p56 t = symmetric t t where symmetric Empty Empty = True symmetric (Branch _ l1 r1) (Branch _ l2 r2) = symmetric l1 r2 && symmetric r1 l2 symmetric _ _ = False
183
false
true
1
7
63
105
46
59
null
null
jgm/texmath
src/Text/TeXMath/Writers/OMML.hs
gpl-2.0
defaultTo :: TextType -> [Element] -> [Element] defaultTo tt [] = setProps tt
77
defaultTo :: TextType -> [Element] -> [Element] defaultTo tt [] = setProps tt
77
defaultTo tt [] = setProps tt
29
false
true
0
7
12
35
18
17
null
null
frantisekfarka/ghc-dsi
compiler/main/DynFlags.hs
bsd-3-clause
addOptP f = alterSettings (\s -> s { sOpt_P = f : sOpt_P s})
64
addOptP f = alterSettings (\s -> s { sOpt_P = f : sOpt_P s})
64
addOptP f = alterSettings (\s -> s { sOpt_P = f : sOpt_P s})
64
false
false
0
11
17
35
18
17
null
null
seL4/capDL-tool
CapDL/PrintC.hs
bsd-2-clause
-- IRQ, cdt and obj map not required showObjectFields _ _ (IODevice _ _ _) _ _ _ = ".type = CDL_IODevice,"
110
showObjectFields _ _ (IODevice _ _ _) _ _ _ = ".type = CDL_IODevice,"
73
showObjectFields _ _ (IODevice _ _ _) _ _ _ = ".type = CDL_IODevice,"
73
true
false
0
7
25
30
15
15
null
null
dormouse/blog
source/haskell/haskell_learn/haskell_99_question_1_10.hs
gpl-2.0
myButLast [x] = error "list too short!"
39
myButLast [x] = error "list too short!"
39
myButLast [x] = error "list too short!"
39
false
false
0
6
6
15
7
8
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs
mpl-2.0
ecvAddtional :: Lens' EnvironmentCustomValues (HashMap Text Text) ecvAddtional = lens _ecvAddtional (\ s a -> s{_ecvAddtional = a}) . _Coerce
149
ecvAddtional :: Lens' EnvironmentCustomValues (HashMap Text Text) ecvAddtional = lens _ecvAddtional (\ s a -> s{_ecvAddtional = a}) . _Coerce
149
ecvAddtional = lens _ecvAddtional (\ s a -> s{_ecvAddtional = a}) . _Coerce
83
false
true
1
9
27
55
27
28
null
null
gaborhermann/marvin
test-suite/Marvin/API/Preprocess/FeatureScalingSpec.hs
apache-2.0
Right original = fromList [19,9,4,10,23]
42
Right original = fromList [19,9,4,10,23]
42
Right original = fromList [19,9,4,10,23]
42
false
false
1
5
6
30
15
15
null
null
twittner/wai-routing
test/Tests/Wai/Util.hs
mpl-2.0
request :: ByteString -> Request request p = defaultRequest { rawPathInfo = p }
79
request :: ByteString -> Request request p = defaultRequest { rawPathInfo = p }
79
request p = defaultRequest { rawPathInfo = p }
46
false
true
0
7
13
32
15
17
null
null
kostmo/atom-ghc-mod-testcases
stack-multi-package/my-package-b/src/LibB4.hs
apache-2.0
myConstant6 :: String myConstant6 = "hello"
43
myConstant6 :: String myConstant6 = "hello"
43
myConstant6 = "hello"
21
false
true
0
6
5
18
7
11
null
null
davidzhulijun/TAM
RegisterMachine/Models/CM1.hs
bsd-3-clause
-- Counter Machine without ACC prog1 :: ListMem (Lang Int) prog1 = fillMem [INC 2, DEC 2, INC 3, INC 1, INC 0, DEC 2, DEC 1, INC 0, INC 2, JZ 2 10, Halt]
153
prog1 :: ListMem (Lang Int) prog1 = fillMem [INC 2, DEC 2, INC 3, INC 1, INC 0, DEC 2, DEC 1, INC 0, INC 2, JZ 2 10, Halt]
122
prog1 = fillMem [INC 2, DEC 2, INC 3, INC 1, INC 0, DEC 2, DEC 1, INC 0, INC 2, JZ 2 10, Halt]
94
true
true
0
7
34
89
45
44
null
null
bertdouglas/euler-haskell
001-050/49a.hs
mit
dsplit :: Int -> [Int] dsplit n = dsplit' n [] where dsplit' n s | n > 0 = dsplit' rest (first:s) | otherwise = s where first = mod n 10 rest = div n 10
203
dsplit :: Int -> [Int] dsplit n = dsplit' n [] where dsplit' n s | n > 0 = dsplit' rest (first:s) | otherwise = s where first = mod n 10 rest = div n 10
203
dsplit n = dsplit' n [] where dsplit' n s | n > 0 = dsplit' rest (first:s) | otherwise = s where first = mod n 10 rest = div n 10
180
false
true
2
8
88
116
48
68
null
null
lukemaurer/sequent-core
src/Language/SequentCore/FloatOut/SetLevels.hs
bsd-3-clause
extendCaseBndrEnv env _ _ = env
31
extendCaseBndrEnv env _ _ = env
31
extendCaseBndrEnv env _ _ = env
31
false
false
0
5
5
13
6
7
null
null
theHawke/real-dcpu
dcpu-asm/dcpu-asm.hs
gpl-2.0
spOpcode :: Token -> Maybe Word8 spOpcode = flip lookup [("JSR",1),("INT",8),("IAG",9),("IAS",10),("RFI",11),("IAQ",12),("HWN",16),("HWQ",17),("HWI",18)]
153
spOpcode :: Token -> Maybe Word8 spOpcode = flip lookup [("JSR",1),("INT",8),("IAG",9),("IAS",10),("RFI",11),("IAQ",12),("HWN",16),("HWQ",17),("HWI",18)]
153
spOpcode = flip lookup [("JSR",1),("INT",8),("IAG",9),("IAS",10),("RFI",11),("IAQ",12),("HWN",16),("HWQ",17),("HWI",18)]
120
false
true
0
7
10
109
66
43
null
null
antalsz/hs-to-coq
examples/graph/graph/Data/Graph/Inductive/Internal/Queue.hs
mit
queuePutList :: [a] -> Queue a -> Queue a queuePutList xs q = foldl' (flip queuePut) q xs
89
queuePutList :: [a] -> Queue a -> Queue a queuePutList xs q = foldl' (flip queuePut) q xs
89
queuePutList xs q = foldl' (flip queuePut) q xs
47
false
true
0
8
17
50
23
27
null
null
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/Util/Lex.hs
bsd-3-clause
akeParser :: Parser a -> String -> a makeParser = genParser whiteSpace
71
makeParser :: Parser a -> String -> a makeParser = genParser whiteSpace
71
makeParser = genParser whiteSpace
33
false
true
0
6
12
25
12
13
null
null
kmilner/tamarin-prover
lib/term/src/Term/Builtin/Convenience.hs
gpl-3.0
p8 = pubTerm "p8"
18
p8 = pubTerm "p8"
18
p8 = pubTerm "p8"
18
false
false
1
5
4
12
4
8
null
null
plow-technologies/cabal
cabal-install/Distribution/Client/FetchUtils.hs
bsd-3-clause
-- | Generate the URI of the tarball for a given package. -- packageURI :: RemoteRepo -> PackageId -> URI packageURI repo pkgid | isOldHackageURI (remoteRepoURI repo) = (remoteRepoURI repo) { uriPath = FilePath.Posix.joinPath [uriPath (remoteRepoURI repo) ,display (packageName pkgid) ,display...
382
packageURI :: RemoteRepo -> PackageId -> URI packageURI repo pkgid | isOldHackageURI (remoteRepoURI repo) = (remoteRepoURI repo) { uriPath = FilePath.Posix.joinPath [uriPath (remoteRepoURI repo) ,display (packageName pkgid) ,display (packageVersion pkgid) ,display pkgid <.> "tar.gz"] ...
321
packageURI repo pkgid | isOldHackageURI (remoteRepoURI repo) = (remoteRepoURI repo) { uriPath = FilePath.Posix.joinPath [uriPath (remoteRepoURI repo) ,display (packageName pkgid) ,display (packageVersion pkgid) ,display pkgid <.> "tar.gz"] }
276
true
true
0
12
82
107
54
53
null
null
ezyang/ghc
testsuite/tests/perf/compiler/Naperian.hs
bsd-3-clause
fromList :: forall n a. KnownNat n => [a] -> Maybe (Vector n a) fromList xs = case (Prelude.length xs == sz) of False -> Nothing True -> Just (Vector $ Vector.fromList xs) where sz = fromIntegral (natVal' (proxy# :: Proxy# n)) :: Int
240
fromList :: forall n a. KnownNat n => [a] -> Maybe (Vector n a) fromList xs = case (Prelude.length xs == sz) of False -> Nothing True -> Just (Vector $ Vector.fromList xs) where sz = fromIntegral (natVal' (proxy# :: Proxy# n)) :: Int
240
fromList xs = case (Prelude.length xs == sz) of False -> Nothing True -> Just (Vector $ Vector.fromList xs) where sz = fromIntegral (natVal' (proxy# :: Proxy# n)) :: Int
176
false
true
0
12
50
117
59
58
null
null
cirquit/Personal-Repository
Haskell/Playground/AdventOfCode/advent-coding/src/Day11.hs
mit
increasingStraight' :: String -> Bool increasingStraight' [a,b,c] = [a,b,c] `isInfixOf` ['a'..'z']
101
increasingStraight' :: String -> Bool increasingStraight' [a,b,c] = [a,b,c] `isInfixOf` ['a'..'z']
101
increasingStraight' [a,b,c] = [a,b,c] `isInfixOf` ['a'..'z']
63
false
true
0
6
13
47
28
19
null
null
nomeata/darcs-mirror-arbtt
src/Stats.hs
gpl-2.0
fastFiltersHeuristic :: [Filter] -> [Filter] fastFiltersHeuristic filters = fastFilters ++ slowFilters where (fastFilters, slowFilters) = partition isFast filters isFast (GeneralCond _) = True isFast _ = False
223
fastFiltersHeuristic :: [Filter] -> [Filter] fastFiltersHeuristic filters = fastFilters ++ slowFilters where (fastFilters, slowFilters) = partition isFast filters isFast (GeneralCond _) = True isFast _ = False
223
fastFiltersHeuristic filters = fastFilters ++ slowFilters where (fastFilters, slowFilters) = partition isFast filters isFast (GeneralCond _) = True isFast _ = False
178
false
true
0
6
40
76
37
39
null
null
fmapfmapfmap/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types/Product.hs
mpl-2.0
-- | For container instances, the Amazon ECS cluster\'s ARN. iEcsClusterARN :: Lens' Instance (Maybe Text) iEcsClusterARN = lens _iEcsClusterARN (\ s a -> s{_iEcsClusterARN = a})
178
iEcsClusterARN :: Lens' Instance (Maybe Text) iEcsClusterARN = lens _iEcsClusterARN (\ s a -> s{_iEcsClusterARN = a})
117
iEcsClusterARN = lens _iEcsClusterARN (\ s a -> s{_iEcsClusterARN = a})
71
true
true
0
9
26
46
25
21
null
null
byorgey/Idris-dev
src/RTS/CodegenC.hs
bsd-3-clause
cdefs :: [(Name, (Int, PreC))] -> String cdefs xs = concatMap (\ (n, (i, c)) -> proto n) xs ++ "\n" ++ concatMap (\ (n, (i, c)) -> codegenC n i c) xs
160
cdefs :: [(Name, (Int, PreC))] -> String cdefs xs = concatMap (\ (n, (i, c)) -> proto n) xs ++ "\n" ++ concatMap (\ (n, (i, c)) -> codegenC n i c) xs
160
cdefs xs = concatMap (\ (n, (i, c)) -> proto n) xs ++ "\n" ++ concatMap (\ (n, (i, c)) -> codegenC n i c) xs
119
false
true
0
11
43
108
58
50
null
null
conal/hermit
src/HERMIT/Core.hs
bsd-2-clause
-- | Syntactic Equality of case alternatives. altSyntaxEq :: CoreAlt -> CoreAlt -> Bool altSyntaxEq (c1,vs1,e1) (c2,vs2,e2) = c1 == c2 && vs1 == vs2 && exprSyntaxEq e1 e2
170
altSyntaxEq :: CoreAlt -> CoreAlt -> Bool altSyntaxEq (c1,vs1,e1) (c2,vs2,e2) = c1 == c2 && vs1 == vs2 && exprSyntaxEq e1 e2
124
altSyntaxEq (c1,vs1,e1) (c2,vs2,e2) = c1 == c2 && vs1 == vs2 && exprSyntaxEq e1 e2
82
true
true
0
9
28
69
36
33
null
null
dcspaul/uPuppet
Src/uPuppet.hs
mit
-- evaluate evaluate :: CState -> AST -> IO (Either Errors String) evaluate st ast = case (format (sOpts st)) of AST_FORMAT -> return $ Right $ showAST st ast otherwise -> do catalogOrError <- evalPuppet st ast case catalogOrError of Right catalog -> render st catalog Left errs -> return $ L...
345
evaluate :: CState -> AST -> IO (Either Errors String) evaluate st ast = case (format (sOpts st)) of AST_FORMAT -> return $ Right $ showAST st ast otherwise -> do catalogOrError <- evalPuppet st ast case catalogOrError of Right catalog -> render st catalog Left errs -> return $ Left errs -- ...
329
evaluate st ast = case (format (sOpts st)) of AST_FORMAT -> return $ Right $ showAST st ast otherwise -> do catalogOrError <- evalPuppet st ast case catalogOrError of Right catalog -> render st catalog Left errs -> return $ Left errs -- render
274
true
true
29
9
90
134
70
64
null
null
bernstein/pixelparty
src/PixelParty/Shader.hs
bsd-3-clause
withGLStringLen :: String -> (GLStringLen -> IO a) -> IO a withGLStringLen s act = withCAStringLen s $ \(p,len) -> act (castPtr p, fromIntegral len)
151
withGLStringLen :: String -> (GLStringLen -> IO a) -> IO a withGLStringLen s act = withCAStringLen s $ \(p,len) -> act (castPtr p, fromIntegral len)
151
withGLStringLen s act = withCAStringLen s $ \(p,len) -> act (castPtr p, fromIntegral len)
92
false
true
0
9
27
75
36
39
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Dependency/Modular/Tree.hs
bsd-3-clause
inn (DoneF x ) = Done x
43
inn (DoneF x ) = Done x
43
inn (DoneF x ) = Done x
43
false
false
0
6
26
19
8
11
null
null
stevezhee/ed
app/Main.hs
bsd-3-clause
f = mkLT "I" [mkLT "am" [], mkLT "fine" []]
43
f = mkLT "I" [mkLT "am" [], mkLT "fine" []]
43
f = mkLT "I" [mkLT "am" [], mkLT "fine" []]
43
false
false
1
8
9
34
15
19
null
null
bfops/Chess
src/Game/SceneGraph.hs
mit
rotate3DY :: Double -- θ -> Transformation rotate3DY !θ = AffineTransform $ (4><4) [ c, 0, -s, 0 , 0, 1, 0, 0 , -s, 0, c, 0 , 0, 0, 0, 1 ] where c = cos θ s = sin θ...
373
rotate3DY :: Double -- θ -> Transformation rotate3DY !θ = AffineTransform $ (4><4) [ c, 0, -s, 0 , 0, 1, 0, 0 , -s, 0, c, 0 , 0, 0, 0, 1 ] where c = cos θ s = sin θ...
373
rotate3DY !θ = AffineTransform $ (4><4) [ c, 0, -s, 0 , 0, 1, 0, 0 , -s, 0, c, 0 , 0, 0, 0, 1 ] where c = cos θ s = sin θ -- | Rotates θ radians clockwise around the Y axis.
320
false
true
1
8
209
106
61
45
null
null