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
wouwouwou/2017_module_8
src/haskell/PP-project-2017/lib/sprockell-2017/src/Sprockell/Simulation.hs
apache-2.0
-- ==================================================================================================== -- Sprockell Test -- ==================================================================================================== sprockellSim :: InstructionMem -> SprockellState -> [Reply] ...
413
sprockellSim :: InstructionMem -> SprockellState -> [Reply] -> [(Instruction, SprockellState, Request)] sprockellSim instrs s [] = []
185
sprockellSim instrs s [] = []
33
true
true
0
9
77
52
30
22
null
null
BeautifulDestinations/fb
src/Facebook/Object/Marketing/AdAccount.hs
bsd-3-clause
unIoNumber_ :: IoNumber_ -> Text unIoNumber_ (IoNumber_ x) = x
62
unIoNumber_ :: IoNumber_ -> Text unIoNumber_ (IoNumber_ x) = x
62
unIoNumber_ (IoNumber_ x) = x
29
false
true
0
9
9
30
13
17
null
null
ezyang/ghc
compiler/llvmGen/LlvmCodeGen/Regs.hs
bsd-3-clause
-- | Get the correct TBAA metadata information for this register type getTBAA :: GlobalReg -> Unique getTBAA BaseReg = baseN
133
getTBAA :: GlobalReg -> Unique getTBAA BaseReg = baseN
63
getTBAA BaseReg = baseN
32
true
true
0
5
29
19
10
9
null
null
orclev/octarine-sapient-walnut
src/WorkQueue.hs
bsd-3-clause
coerce :: (Num a, Ord a, Real a, Fractional b, Num b) => a -> b coerce = fromRational . toRational
98
coerce :: (Num a, Ord a, Real a, Fractional b, Num b) => a -> b coerce = fromRational . toRational
98
coerce = fromRational . toRational
34
false
true
1
8
20
60
28
32
null
null
cauterize-tools/cauterize
src/Cauterize/Schema/Parser.hs
bsd-3-clause
componentsToSchema :: [Component] -> Schema componentsToSchema = foldl go defaultSchema where go s (Name n) = s { schemaName = n } go s (Version v) = s { schemaVersion = v } go s (TypeDef t) = let ts = schemaTypes s in s { schemaTypes = t:ts }
281
componentsToSchema :: [Component] -> Schema componentsToSchema = foldl go defaultSchema where go s (Name n) = s { schemaName = n } go s (Version v) = s { schemaVersion = v } go s (TypeDef t) = let ts = schemaTypes s in s { schemaTypes = t:ts }
281
componentsToSchema = foldl go defaultSchema where go s (Name n) = s { schemaName = n } go s (Version v) = s { schemaVersion = v } go s (TypeDef t) = let ts = schemaTypes s in s { schemaTypes = t:ts }
237
false
true
0
9
87
116
60
56
null
null
ezyang/ghc
testsuite/tests/simplCore/should_compile/T13410.hs
bsd-3-clause
gunstream s = gnew (newunstream s)
34
gunstream s = gnew (newunstream s)
34
gunstream s = gnew (newunstream s)
34
false
false
0
7
5
18
8
10
null
null
bgamari/dtree
src/Data/DIntMap.hs
bsd-3-clause
maxBreadth :: Int maxBreadth = 1024
35
maxBreadth :: Int maxBreadth = 1024
35
maxBreadth = 1024
17
false
true
0
6
5
18
7
11
null
null
antonpetkoff/learning
haskell/fmi-fp/trees.hs
gpl-3.0
isEmpty :: Tree a -> Bool isEmpty Empty = True
46
isEmpty :: Tree a -> Bool isEmpty Empty = True
46
isEmpty Empty = True
20
false
true
0
6
9
21
10
11
null
null
ndmitchell/nsis
src/Development/NSIS/Plugins/WinMessages.hs
bsd-3-clause
lb_GETCOUNT = 0x018B
32
lb_GETCOUNT = 0x018B
32
lb_GETCOUNT = 0x018B
32
false
false
0
4
14
6
3
3
null
null
Raynes/Hricket
src/Player.hs
bsd-3-clause
card :: Player -> Card card (Player _ c) = c
44
card :: Player -> Card card (Player _ c) = c
44
card (Player _ c) = c
21
false
true
0
9
10
32
14
18
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
-- | lsize :: Pattern Double -> ControlPattern lsize = pF "lsize"
66
lsize :: Pattern Double -> ControlPattern lsize = pF "lsize"
60
lsize = pF "lsize"
18
true
true
0
7
12
29
12
17
null
null
vwwv/easy-bitcoin
Network/EasyBitcoin/Transaction.hs
bsd-3-clause
-- | The prism successes when the scriptSig is either empty, partially or full signed escrow-multisig. escrowSignatures ::(BlockNetwork net) => Prism' ScriptSig ([TxSignature],Maybe (RedeemScript net)) escrowSignatures = prism fromEscrow toEscrow
246
escrowSignatures ::(BlockNetwork net) => Prism' ScriptSig ([TxSignature],Maybe (RedeemScript net)) escrowSignatures = prism fromEscrow toEscrow
143
escrowSignatures = prism fromEscrow toEscrow
44
true
true
0
11
29
56
27
29
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
-- Polymorphic in binder type -- There is one call at a non-Id binder type, in SetLevels expr_ok :: (PrimOp -> Bool) -> Expr b -> Bool expr_ok _ (Lit _) = True
167
expr_ok :: (PrimOp -> Bool) -> Expr b -> Bool expr_ok _ (Lit _) = True
75
expr_ok _ (Lit _) = True
29
true
true
0
10
40
48
23
25
null
null
jasonzoladz/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
-- | Point to an array field with an embedded object and give a deeper query into the embedded object. -- Use with 'nestEq'. (->.) :: forall record emb typ. PersistEntity emb => EntityField record [emb] -> EntityField emb typ -> NestedField record typ (->.) = LastEmbFld
271
(->.) :: forall record emb typ. PersistEntity emb => EntityField record [emb] -> EntityField emb typ -> NestedField record typ (->.) = LastEmbFld
146
(->.) = LastEmbFld
19
true
true
0
9
47
57
32
25
null
null
teodorlu/haskell-hardt-og-godt
source/functions.hs
mit
add = (+)
9
add = (+)
9
add = (+)
9
false
false
1
5
2
12
5
7
null
null
spacekitteh/smcghc
ghc/Main.hs
bsd-3-clause
showGhcUsage :: DynFlags -> IO () showGhcUsage = showUsage False
64
showGhcUsage :: DynFlags -> IO () showGhcUsage = showUsage False
64
showGhcUsage = showUsage False
30
false
true
0
7
9
23
11
12
null
null
phischu/fragnix
builtins/ghc-prim/GHC.PrimopWrappers.hs
bsd-3-clause
getApStackVal# :: a -> Int# -> (# Int#,b #) getApStackVal# a1 a2 = (GHC.Prim.getApStackVal#) a1 a2
98
getApStackVal# :: a -> Int# -> (# Int#,b #) getApStackVal# a1 a2 = (GHC.Prim.getApStackVal#) a1 a2
98
getApStackVal# a1 a2 = (GHC.Prim.getApStackVal#) a1 a2
54
false
true
0
7
15
40
21
19
null
null
olsner/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
addTickLHsExprNever :: LHsExpr Id -> TM (LHsExpr Id) addTickLHsExprNever (L pos e0) = do e1 <- addTickHsExpr e0 return $ L pos e1 -- general heuristic: expressions which do not denote values are good -- break points
224
addTickLHsExprNever :: LHsExpr Id -> TM (LHsExpr Id) addTickLHsExprNever (L pos e0) = do e1 <- addTickHsExpr e0 return $ L pos e1 -- general heuristic: expressions which do not denote values are good -- break points
224
addTickLHsExprNever (L pos e0) = do e1 <- addTickHsExpr e0 return $ L pos e1 -- general heuristic: expressions which do not denote values are good -- break points
171
false
true
0
8
45
62
29
33
null
null
morae/SortNet
Visualize.hs
gpl-2.0
nextNode :: State Node Node nextNode = do old <- get put (old + 1) return old
83
nextNode :: State Node Node nextNode = do old <- get put (old + 1) return old
83
nextNode = do old <- get put (old + 1) return old
55
false
true
0
9
22
42
19
23
null
null
ilyasergey/GHC-XAppFix
compiler/main/DynFlags.hs
bsd-3-clause
enableGlasgowExts :: DynP () enableGlasgowExts = do setDynFlag Opt_PrintExplicitForalls mapM_ setExtensionFlag glasgowExtsFlags
150
enableGlasgowExts :: DynP () enableGlasgowExts = do setDynFlag Opt_PrintExplicitForalls mapM_ setExtensionFlag glasgowExtsFlags
150
enableGlasgowExts = do setDynFlag Opt_PrintExplicitForalls mapM_ setExtensionFlag glasgowExtsFlags
121
false
true
0
7
34
30
13
17
null
null
uriba/biolab-analysis
Biolab/Analysis/GrowthRate.hs
bsd-3-clause
windowSize = 6
14
windowSize = 6
14
windowSize = 6
14
false
false
0
4
2
6
3
3
null
null
alexander-at-github/eta
compiler/ETA/Rename/RnBinds.hs
bsd-3-clause
rnMatch :: Outputable (body RdrName) => HsMatchContext Name -> (Located (body RdrName) -> RnM (Located (body Name), FreeVars)) -> LMatch RdrName (Located (body RdrName)) -> RnM (LMatch Name (Located (body Name)), FreeVars) rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
303
rnMatch :: Outputable (body RdrName) => HsMatchContext Name -> (Located (body RdrName) -> RnM (Located (body Name), FreeVars)) -> LMatch RdrName (Located (body RdrName)) -> RnM (LMatch Name (Located (body Name)), FreeVars) rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
303
rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
56
false
true
0
15
63
132
64
68
null
null
jaspervdj/patat
lib/Patat/Presentation/Instruction.hs
gpl-2.0
goBlocks (ModifyLast f) xs | null xs = xs -- Shouldn't happen unless instructions are malformed. | otherwise = modifyLast (goBlock f) xs
147
goBlocks (ModifyLast f) xs | null xs = xs -- Shouldn't happen unless instructions are malformed. | otherwise = modifyLast (goBlock f) xs
147
goBlocks (ModifyLast f) xs | null xs = xs -- Shouldn't happen unless instructions are malformed. | otherwise = modifyLast (goBlock f) xs
147
false
false
0
8
33
53
23
30
null
null
mumuki/mulang
src/Language/Mulang/Ast/Visitor.hs
gpl-3.0
extractSingleExpression (Implement e) = Just (e, \e -> (Implement e))
80
extractSingleExpression (Implement e) = Just (e, \e -> (Implement e))
80
extractSingleExpression (Implement e) = Just (e, \e -> (Implement e))
80
false
false
0
9
20
35
18
17
null
null
urbanslug/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ res WriteByteArrayOp_Float args = doWriteByteArrayOp Nothing f32 res args
102
emitPrimOp _ res WriteByteArrayOp_Float args = doWriteByteArrayOp Nothing f32 res args
102
emitPrimOp _ res WriteByteArrayOp_Float args = doWriteByteArrayOp Nothing f32 res args
102
false
false
1
5
26
26
11
15
null
null
jstolarek/ghc
libraries/base/Data/STRef/Lazy.hs
bsd-3-clause
modifySTRef r f = strictToLazyST (ST.modifySTRef r f)
53
modifySTRef r f = strictToLazyST (ST.modifySTRef r f)
53
modifySTRef r f = strictToLazyST (ST.modifySTRef r f)
53
false
false
0
8
7
24
11
13
null
null
iu-parfunc/containers
Data/Set/Base.hs
bsd-3-clause
minView x = Just (deleteFindMin x)
34
minView x = Just (deleteFindMin x)
34
minView x = Just (deleteFindMin x)
34
false
false
1
7
5
21
8
13
null
null
martinra/smallcheck
src/Test/SmallCheck/Series.hs
bsd-3-clause
alts2 :: (CoSerial m a, CoSerial m b) => Series m c -> Series m (a -> b -> Maybe c) alts2 rs = do rs <- fixDepth rs decDepthChecked (pure $ \_ _ -> Nothing) $ (\f x y -> f x >>= ($ y)) <$> (coseriesP . coseriesP $ rs)
243
alts2 :: (CoSerial m a, CoSerial m b) => Series m c -> Series m (a -> b -> Maybe c) alts2 rs = do rs <- fixDepth rs decDepthChecked (pure $ \_ _ -> Nothing) $ (\f x y -> f x >>= ($ y)) <$> (coseriesP . coseriesP $ rs)
243
alts2 rs = do rs <- fixDepth rs decDepthChecked (pure $ \_ _ -> Nothing) $ (\f x y -> f x >>= ($ y)) <$> (coseriesP . coseriesP $ rs)
155
false
true
0
12
77
137
68
69
null
null
JamesSullivan1/Minisculus
src/MinisculusCodeGenerator.hs
mit
generateCodeStmt n (A_Input (A_Identifier v)) = ("READ "++ v ++"\n",n)
74
generateCodeStmt n (A_Input (A_Identifier v)) = ("READ "++ v ++"\n",n)
74
generateCodeStmt n (A_Input (A_Identifier v)) = ("READ "++ v ++"\n",n)
74
false
false
0
9
13
37
19
18
null
null
ghc-android/ghc
compiler/nativeGen/RegAlloc/Linear/Main.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Linear sweep to allocate registers -- | Do register allocation on some basic blocks. -- But be careful to allocate a block in an SCC only if it has -- an entry in the block map or it is the first block. -- linearRegAlloc :...
1,611
linearRegAlloc :: (Outputable instr, Instruction instr) => DynFlags -> [BlockId] -- ^ entry points -> BlockMap RegSet -- ^ live regs on entry to each basic block -> [SCC (LiveBasicBlock instr)] -- ^ instructions annotated with "deaths" -> UniqS...
1,314
linearRegAlloc dflags entry_ids block_live sccs = case platformArch platform of ArchX86 -> go $ (frInitFreeRegs platform :: X86.FreeRegs) ArchX86_64 -> go $ (frInitFreeRegs platform :: X86_64.FreeRegs) ArchSPARC -> go $ (frInitFreeRegs platform :: SPARC.FreeRegs) ArchPPC ...
948
true
true
1
13
399
314
158
156
null
null
mortberg/cubicaltt
Connections.hs
mit
-- TODO: add some checks transposeSystemAndList :: System [a] -> [b] -> [(System a,b)] transposeSystemAndList _ [] = []
125
transposeSystemAndList :: System [a] -> [b] -> [(System a,b)] transposeSystemAndList _ [] = []
100
transposeSystemAndList _ [] = []
38
true
true
0
9
24
50
27
23
null
null
mbg/system-f-with-kind-polymorphism
Interpreter.hs
mit
reduceBNF expr = expr
28
reduceBNF expr = expr
28
reduceBNF expr = expr
28
false
false
0
5
10
9
4
5
null
null
DavidAlphaFox/darcs
src/Darcs/Util/DateMatcher.hs
gpl-2.0
now :: IO CalendarTime now = getClockTime >>= toCalendarTime
60
now :: IO CalendarTime now = getClockTime >>= toCalendarTime
60
now = getClockTime >>= toCalendarTime
37
false
true
1
6
8
22
9
13
null
null
arnizamani/aiw
Instances.hs
gpl-2.0
axFirst (Axiom (_,_,_,x,_,_)) = x
35
axFirst (Axiom (_,_,_,x,_,_)) = x
35
axFirst (Axiom (_,_,_,x,_,_)) = x
35
false
false
0
7
6
34
19
15
null
null
ozgurakgun/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
unitCon = sUN "MkUnit"
23
unitCon = sUN "MkUnit"
23
unitCon = sUN "MkUnit"
23
false
false
1
5
4
12
4
8
null
null
aktowns/pdfkiths
Cocoa/pdfkit.hs
mit
documentURL :: PDFDocument -> IO (TyNSURL Id) documentURL doc = toNSURL $ doc $<- "documentURL"
95
documentURL :: PDFDocument -> IO (TyNSURL Id) documentURL doc = toNSURL $ doc $<- "documentURL"
95
documentURL doc = toNSURL $ doc $<- "documentURL"
49
false
true
0
8
14
35
17
18
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLTextAreaElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement.placeholder Mozilla HTMLTextAreaElement.placeholder documentation> setPlaceholder :: (MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m () setPlaceholder self val = liftDOM (self ^. jss "placeholder" (toJSVal val))
320
setPlaceholder :: (MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m () setPlaceholder self val = liftDOM (self ^. jss "placeholder" (toJSVal val))
177
setPlaceholder self val = liftDOM (self ^. jss "placeholder" (toJSVal val))
77
true
true
0
9
47
66
33
33
null
null
ambiata/mismi
mismi-core/src/Mismi/Control.hs
bsd-3-clause
rawRunAWS :: Env -> AWS a -> IO a rawRunAWS e = runResourceT . A.runAWS e
75
rawRunAWS :: Env -> AWS a -> IO a rawRunAWS e = runResourceT . A.runAWS e
75
rawRunAWS e = runResourceT . A.runAWS e
41
false
true
0
7
17
37
17
20
null
null
psandahl/big-engine
src/BigE/Internal/GLResources.hs
mit
deleteVertexArray :: MonadIO m => VertexArray -> m () deleteVertexArray (VertexArray vao) = delName GL.glDeleteVertexArrays vao
127
deleteVertexArray :: MonadIO m => VertexArray -> m () deleteVertexArray (VertexArray vao) = delName GL.glDeleteVertexArrays vao
127
deleteVertexArray (VertexArray vao) = delName GL.glDeleteVertexArrays vao
73
false
true
0
8
15
43
20
23
null
null
danoctavian/utp
src/Network/UTP.hs
mit
if' c a b = if c then a else b
30
if' c a b = if c then a else b
30
if' c a b = if c then a else b
30
false
false
0
5
10
21
11
10
null
null
mumuki/mulang
src/Language/Mulang/Parsers/C.hs
gpl-3.0
muExpression (CVar i _) = Reference $ muIdent i
85
muExpression (CVar i _) = Reference $ muIdent i
85
muExpression (CVar i _) = Reference $ muIdent i
85
false
false
0
7
46
24
11
13
null
null
jgonsior/haskellCourse
ex5.hs
gpl-3.0
combineContentWithHandle :: FilePath -> String -> IO () combineContentWithHandle inputDirectory outputFile = do files <- getDirectoryContents inputDirectory let correctedFilePath = map ((inputDirectory ++ "/") ++ ) (filter (/= "..") (filter (/= ".") files)) withFile outputFile WriteMode $ \handl...
538
combineContentWithHandle :: FilePath -> String -> IO () combineContentWithHandle inputDirectory outputFile = do files <- getDirectoryContents inputDirectory let correctedFilePath = map ((inputDirectory ++ "/") ++ ) (filter (/= "..") (filter (/= ".") files)) withFile outputFile WriteMode $ \handl...
538
combineContentWithHandle inputDirectory outputFile = do files <- getDirectoryContents inputDirectory let correctedFilePath = map ((inputDirectory ++ "/") ++ ) (filter (/= "..") (filter (/= ".") files)) withFile outputFile WriteMode $ \handle -> forM_ correctedFilePath $ \element -> do ...
482
false
true
0
15
116
144
70
74
null
null
xenog/haskoin
test/bitcoin/Network/Haskoin/Network/Units.hs
unlicense
bloomFilter :: Word32 -> ByteString -> Assertion bloomFilter n x = do assertBool "Bloom filter doesn't contain vector 1" $ bloomContains f1 v1 assertBool "Bloom filter contains something it should not" $ not $ bloomContains f1 v2 assertBool "Bloom filter doesn't contain vector 3" $ bloomContains f3 ...
940
bloomFilter :: Word32 -> ByteString -> Assertion bloomFilter n x = do assertBool "Bloom filter doesn't contain vector 1" $ bloomContains f1 v1 assertBool "Bloom filter contains something it should not" $ not $ bloomContains f1 v2 assertBool "Bloom filter doesn't contain vector 3" $ bloomContains f3 ...
940
bloomFilter n x = do assertBool "Bloom filter doesn't contain vector 1" $ bloomContains f1 v1 assertBool "Bloom filter contains something it should not" $ not $ bloomContains f1 v2 assertBool "Bloom filter doesn't contain vector 3" $ bloomContains f3 v3 assertBool "Bloom filter doesn't contain v...
891
false
true
0
9
196
214
98
116
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
javaDataConKey, jstringDataConKey :: Unique javaDataConKey = mkPreludeDataConUnique 38
89
javaDataConKey, jstringDataConKey :: Unique javaDataConKey = mkPreludeDataConUnique 38
89
javaDataConKey = mkPreludeDataConUnique 38
45
false
true
0
5
10
16
9
7
null
null
cpennington/adventofcode
src/Advent/Day1.hs
bsd-3-clause
value _ = 0
11
value _ = 0
11
value _ = 0
11
false
false
0
5
3
9
4
5
null
null
asayers/attendancebot
src/Attendance/TimeSheet.hs
mit
markHoliday :: Day -> TimeSheet -> TimeSheet markHoliday day = over tsCalendar $ markException day "On holiday" NotExpected
123
markHoliday :: Day -> TimeSheet -> TimeSheet markHoliday day = over tsCalendar $ markException day "On holiday" NotExpected
123
markHoliday day = over tsCalendar $ markException day "On holiday" NotExpected
78
false
true
0
8
17
41
18
23
null
null
Numberartificial/workflow
haskell-first-principles/haskell-from-first-principles-master/03/03.08.02-textTransforms.hs
mit
addExclamation text = (++) text "!"
35
addExclamation text = (++) text "!"
35
addExclamation text = (++) text "!"
35
false
false
0
5
5
16
8
8
null
null
noteed/concepted
Concepted/Syntax/Parser.hs
bsd-3-clause
pDouble :: P Double pDouble = do a <- many1 digit b <- option "0" (char '.' >> many1 digit) hspaces return . read $ a ++ "." ++ b
137
pDouble :: P Double pDouble = do a <- many1 digit b <- option "0" (char '.' >> many1 digit) hspaces return . read $ a ++ "." ++ b
137
pDouble = do a <- many1 digit b <- option "0" (char '.' >> many1 digit) hspaces return . read $ a ++ "." ++ b
117
false
true
0
11
37
77
33
44
null
null
agocorona/MFlow
Demos/sum.hs
bsd-3-clause
sumIt= do ask $ p << "Sum of three numbers" ++> wlink () << p << "press here to go" n1 <- ask $ p << "give me the first number" ++> getInt Nothing n2 <- ask $ p << "give me the second number" ++> getInt Nothing n3 <- ask $ p << "give a third number" ++> getInt Nothing ask $ p << ("the result is " ++ sh...
372
sumIt= do ask $ p << "Sum of three numbers" ++> wlink () << p << "press here to go" n1 <- ask $ p << "give me the first number" ++> getInt Nothing n2 <- ask $ p << "give me the second number" ++> getInt Nothing n3 <- ask $ p << "give a third number" ++> getInt Nothing ask $ p << ("the result is " ++ sh...
372
sumIt= do ask $ p << "Sum of three numbers" ++> wlink () << p << "press here to go" n1 <- ask $ p << "give me the first number" ++> getInt Nothing n2 <- ask $ p << "give me the second number" ++> getInt Nothing n3 <- ask $ p << "give a third number" ++> getInt Nothing ask $ p << ("the result is " ++ sh...
372
false
false
1
16
100
154
70
84
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/SubmitAsOperation.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). prjsaoUploadType :: Lens' ProjectsRegionsJobsSubmitAsOperation (Maybe Text) prjsaoUploadType = lens _prjsaoUploadType (\ s a -> s{_prjsaoUploadType = a})
232
prjsaoUploadType :: Lens' ProjectsRegionsJobsSubmitAsOperation (Maybe Text) prjsaoUploadType = lens _prjsaoUploadType (\ s a -> s{_prjsaoUploadType = a})
161
prjsaoUploadType = lens _prjsaoUploadType (\ s a -> s{_prjsaoUploadType = a})
85
true
true
0
9
34
48
25
23
null
null
mbudde/jana
src/Jana/Eval.hs
bsd-3-clause
evalStmt (Local assign1 stmts assign2@(_, Ident _ pos, _) _) = do checkIdentAndType assign1 assign2 createBinding assign1 evalStmts stmts assertBinding assign2 where createBinding (typ, id, expr) = do val <- evalModularExpr expr checkType typ val bindVar id val ...
810
evalStmt (Local assign1 stmts assign2@(_, Ident _ pos, _) _) = do checkIdentAndType assign1 assign2 createBinding assign1 evalStmts stmts assertBinding assign2 where createBinding (typ, id, expr) = do val <- evalModularExpr expr checkType typ val bindVar id val ...
810
evalStmt (Local assign1 stmts assign2@(_, Ident _ pos, _) _) = do checkIdentAndType assign1 assign2 createBinding assign1 evalStmts stmts assertBinding assign2 where createBinding (typ, id, expr) = do val <- evalModularExpr expr checkType typ val bindVar id val ...
810
false
false
2
12
286
287
137
150
null
null
rodrigogribeiro/mptc
src/Tc/TcExp.hs
bsd-3-clause
tcExp x = unsupportedExpErrMsg x
32
tcExp x = unsupportedExpErrMsg x
32
tcExp x = unsupportedExpErrMsg x
32
false
false
1
5
4
15
5
10
null
null
d12frosted/hakyll
src/Hakyll/Web/Feed.hs
bsd-3-clause
renderRss :: FeedConfiguration -- ^ Feed configuration -> Context String -- ^ Item context -> [Item String] -- ^ Feed items -> Compiler (Item String) -- ^ Resulting feed renderRss config context = renderFeed "templates/rss.xml" "templates/rss-item.xml" config ...
376
renderRss :: FeedConfiguration -- ^ Feed configuration -> Context String -- ^ Item context -> [Item String] -- ^ Feed items -> Compiler (Item String) renderRss config context = renderFeed "templates/rss.xml" "templates/rss-item.xml" config (makeItemContext ...
355
renderRss config context = renderFeed "templates/rss.xml" "templates/rss-item.xml" config (makeItemContext "%a, %d %b %Y %H:%M:%S UT" context)
150
true
true
0
10
108
69
34
35
null
null
felixsch/ircbot
src/Module/Scheme/Builtin.hs
gpl-2.0
schemeLet x = invalidArguments "let" 2 (length x)
51
schemeLet x = invalidArguments "let" 2 (length x)
51
schemeLet x = invalidArguments "let" 2 (length x)
51
false
false
1
7
9
25
10
15
null
null
GaloisInc/halvm-ghc
compiler/utils/Util.hs
bsd-3-clause
abstractConstr :: String -> Constr abstractConstr n = mkConstr (abstractDataType n) ("{abstract:"++n++"}") [] Prefix
116
abstractConstr :: String -> Constr abstractConstr n = mkConstr (abstractDataType n) ("{abstract:"++n++"}") [] Prefix
116
abstractConstr n = mkConstr (abstractDataType n) ("{abstract:"++n++"}") [] Prefix
81
false
true
0
8
13
49
24
25
null
null
rpglover64/Haskell-Turtle-Library
src/Turtle/Options.hs
bsd-3-clause
-- | Parse a `Text` value as a flag-based option optText :: ArgName -> ShortName -> Optional HelpMessage -> Parser Text optText = opt Just
138
optText :: ArgName -> ShortName -> Optional HelpMessage -> Parser Text optText = opt Just
89
optText = opt Just
18
true
true
0
9
24
39
17
22
null
null
Deewiant/haschoo
Haschoo/Evaluator/Standard/Equivalence.hs
bsd-3-clause
scmEqv (ScmVector a) (ScmVector b) = ptrEq a b
54
scmEqv (ScmVector a) (ScmVector b) = ptrEq a b
54
scmEqv (ScmVector a) (ScmVector b) = ptrEq a b
54
false
false
0
6
16
30
13
17
null
null
iblumenfeld/cryptol
src/Cryptol/Parser/LexerUtils.hs
bsd-3-clause
startComment :: Bool -> Action startComment isDoc _ p txt s = (Nothing, InComment d p stack chunks) where (d,stack,chunks) = case s of Normal -> (isDoc, [], [txt]) InComment doc q qs cs -> (doc, q : qs, txt : cs) _ ...
380
startComment :: Bool -> Action startComment isDoc _ p txt s = (Nothing, InComment d p stack chunks) where (d,stack,chunks) = case s of Normal -> (isDoc, [], [txt]) InComment doc q qs cs -> (doc, q : qs, txt : cs) _ ...
380
startComment isDoc _ p txt s = (Nothing, InComment d p stack chunks) where (d,stack,chunks) = case s of Normal -> (isDoc, [], [txt]) InComment doc q qs cs -> (doc, q : qs, txt : cs) _ -> panic "[Lexer] ...
349
false
true
0
9
167
128
69
59
null
null
phischu/fragnix
builtins/base/Foreign.C.Error.hs
bsd-3-clause
throwErrnoPathIf_ :: (a -> Bool) -> String -> FilePath -> IO a -> IO () throwErrnoPathIf_ pred loc path f = void $ throwErrnoPathIf pred loc path f
148
throwErrnoPathIf_ :: (a -> Bool) -> String -> FilePath -> IO a -> IO () throwErrnoPathIf_ pred loc path f = void $ throwErrnoPathIf pred loc path f
148
throwErrnoPathIf_ pred loc path f = void $ throwErrnoPathIf pred loc path f
76
false
true
0
10
28
64
31
33
null
null
david-christiansen/barcodes-code128
src/Graphics/Barcode/Code128.hs
mit
-- In state A, switch to C if there's a run of at least 6 digits in the middle encode' StateA (u:v:w:x:y:z:rest) | Just c1 <- inC u v , Just c2 <- inC w x , Just c3 <- inC y z = ([toC, c1, c2, c3] ++) <$> encode' Stat...
327
encode' StateA (u:v:w:x:y:z:rest) | Just c1 <- inC u v , Just c2 <- inC w x , Just c3 <- inC y z = ([toC, c1, c2, c3] ++) <$> encode' StateC rest
248
encode' StateA (u:v:w:x:y:z:rest) | Just c1 <- inC u v , Just c2 <- inC w x , Just c3 <- inC y z = ([toC, c1, c2, c3] ++) <$> encode' StateC rest
248
true
false
0
11
155
116
56
60
null
null
koengit/cyphy
src/CyphyUtils.hs
mit
dRefStream ((t0, r0):(t1, r1):refs) | t0 <= 0 = let absr = r0 + r1 in absr : dRefStream ((t1 - ?h, absr):refs) | otherwise = r0 : dRefStream ((t0 - ?h, r0):(t1, r1):refs)
174
dRefStream ((t0, r0):(t1, r1):refs) | t0 <= 0 = let absr = r0 + r1 in absr : dRefStream ((t1 - ?h, absr):refs) | otherwise = r0 : dRefStream ((t0 - ?h, r0):(t1, r1):refs)
174
dRefStream ((t0, r0):(t1, r1):refs) | t0 <= 0 = let absr = r0 + r1 in absr : dRefStream ((t1 - ?h, absr):refs) | otherwise = r0 : dRefStream ((t0 - ?h, r0):(t1, r1):refs)
174
false
false
1
13
37
122
65
57
null
null
bitc/omegagb
src/Cpu.hs
gpl-2.0
mctiCB 0x9D = (RES Bit3 L, 8)
29
mctiCB 0x9D = (RES Bit3 L, 8)
29
mctiCB 0x9D = (RES Bit3 L, 8)
29
false
false
1
6
6
23
10
13
null
null
mstksg/hledger
hledger-lib/Hledger/Read/CsvReader.hs
gpl-3.0
tests_Hledger_Read_CsvReader = TestList (test_parser)
53
tests_Hledger_Read_CsvReader = TestList (test_parser)
53
tests_Hledger_Read_CsvReader = TestList (test_parser)
53
false
false
1
6
3
15
6
9
null
null
flashcurd/HaskellVirtualMachine
src/Main.hs
lgpl-3.0
pop (x:xs) = (x, xs)
20
pop (x:xs) = (x, xs)
20
pop (x:xs) = (x, xs)
20
false
false
0
6
4
23
12
11
null
null
gnn/Hets
CSL/InteractiveTests.hs
gpl-2.0
mlTestEnv :: Pretty a => String -> ML a -> IO a mlTestEnv s act = do let mN = if null s then Nothing else Just s eRes <- runLink (Just "/tmp/mi.txt") 2 mN act case eRes of Left eid -> putStrLn ("Error " ++ show eid) >> error "ml-test" Right res -> putStrLn ("OK: " ++ show (pretty res)) >> return res
314
mlTestEnv :: Pretty a => String -> ML a -> IO a mlTestEnv s act = do let mN = if null s then Nothing else Just s eRes <- runLink (Just "/tmp/mi.txt") 2 mN act case eRes of Left eid -> putStrLn ("Error " ++ show eid) >> error "ml-test" Right res -> putStrLn ("OK: " ++ show (pretty res)) >> return res
314
mlTestEnv s act = do let mN = if null s then Nothing else Just s eRes <- runLink (Just "/tmp/mi.txt") 2 mN act case eRes of Left eid -> putStrLn ("Error " ++ show eid) >> error "ml-test" Right res -> putStrLn ("OK: " ++ show (pretty res)) >> return res
266
false
true
2
15
77
151
70
81
null
null
GetShopTV/swagger2
test/Data/Swagger/CommonTestTypes.hs
bsd-3-clause
point5SchemaJSON :: Value point5SchemaJSON = [aesonQQ| { "type": "object", "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" }, "u": { "type": "number", "format": "double" }, "v"...
414
point5SchemaJSON :: Value point5SchemaJSON = [aesonQQ| { "type": "object", "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" }, "u": { "type": "number", "format": "double" }, "v"...
414
point5SchemaJSON = [aesonQQ| { "type": "object", "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" }, "u": { "type": "number", "format": "double" }, "v": { "type": "number", "for...
388
false
true
0
6
98
22
11
11
null
null
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Delete.hs
mpl-2.0
-- | Creates a value of 'NotificationsDelete' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ndCustomer' -- -- * 'ndNotificationId' notificationsDelete :: Text -- ^ 'ndCustomer' -> Text -- ^ 'ndNotificationId' -> Notifica...
494
notificationsDelete :: Text -- ^ 'ndCustomer' -> Text -- ^ 'ndNotificationId' -> NotificationsDelete notificationsDelete pNdCustomer_ pNdNotificationId_ = NotificationsDelete' { _ndCustomer = pNdCustomer_ , _ndNotificationId = pNdNotificationId_ }
275
notificationsDelete pNdCustomer_ pNdNotificationId_ = NotificationsDelete' { _ndCustomer = pNdCustomer_ , _ndNotificationId = pNdNotificationId_ }
162
true
true
0
6
92
47
30
17
null
null
cchalmers/lens
src/Control/Lens/Wrapped.hs
bsd-3-clause
_Unwrapped :: Rewrapping s t => Iso (Unwrapped t) (Unwrapped s) t s _Unwrapped = from _Wrapped
94
_Unwrapped :: Rewrapping s t => Iso (Unwrapped t) (Unwrapped s) t s _Unwrapped = from _Wrapped
94
_Unwrapped = from _Wrapped
26
false
true
0
9
16
50
22
28
null
null
arne-schroppe/dash
src/Language/Dash/Asm/DataAssembler.hs
mit
atomizeString :: String -> ConstAtomization () atomizeString str = do let numChunks = numStringChunksForString str let nullString = str ++ "\0" -- fill rest of string with zeroes let adjustedString = nullString ++ replicate (bytesPerVMWord - (length nullString `rem` bytesPerVMWord)) '\0' let chunks = ...
525
atomizeString :: String -> ConstAtomization () atomizeString str = do let numChunks = numStringChunksForString str let nullString = str ++ "\0" -- fill rest of string with zeroes let adjustedString = nullString ++ replicate (bytesPerVMWord - (length nullString `rem` bytesPerVMWord)) '\0' let chunks = ...
525
atomizeString str = do let numChunks = numStringChunksForString str let nullString = str ++ "\0" -- fill rest of string with zeroes let adjustedString = nullString ++ replicate (bytesPerVMWord - (length nullString `rem` bytesPerVMWord)) '\0' let chunks = chunksOf bytesPerVMWord adjustedString let en...
478
false
true
1
12
98
168
85
83
null
null
fxmy/haskell-book-exercise
src/Wat.hs
gpl-3.0
concat' :: List (List a) -> List a concat' = fold append Nil
62
concat' :: List (List a) -> List a concat' = fold append Nil
60
concat' = fold append Nil
25
false
true
0
9
14
38
16
22
null
null
kishoredbn/barrelfish
tools/mackerel/BitFieldDriver.hs
mit
register_length r | RT.is_array r = C.constint (reg_len (RT.name r)) (RT.num_elements r) | otherwise = ""
114
register_length r | RT.is_array r = C.constint (reg_len (RT.name r)) (RT.num_elements r) | otherwise = ""
114
register_length r | RT.is_array r = C.constint (reg_len (RT.name r)) (RT.num_elements r) | otherwise = ""
114
false
false
1
11
24
57
26
31
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/PixelRectangles/Minmax.hs
bsd-3-clause
-------------------------------------------------------------------------------- resetMinmax :: IO () resetMinmax = glResetMinmax (marshalMinmaxTarget Minmax)
159
resetMinmax :: IO () resetMinmax = glResetMinmax (marshalMinmaxTarget Minmax)
77
resetMinmax = glResetMinmax (marshalMinmaxTarget Minmax)
56
true
true
0
7
10
26
13
13
null
null
arekfu/grammar-haskell
src/Grammar/Regex.hs
bsd-3-clause
spliceAlt [] = []
17
spliceAlt [] = []
17
spliceAlt [] = []
17
false
false
1
6
3
17
6
11
null
null
draperlaboratory/specgen
src/Language/CSPM/SpecGen/UMLFunctions.hs
bsd-3-clause
-- Returns true if a set of nodes is pairwise related or orthogonal -- A consistent set of nodes represents a set of states that can be -- simultaneously active in the execution of a statechart consistent :: M.Map Id Node -> S.Set Node -> Bool consistent idMap ns = F.all id $ do m <- ns n <- ns return $ consisten...
497
consistent :: M.Map Id Node -> S.Set Node -> Bool consistent idMap ns = F.all id $ do m <- ns n <- ns return $ consistentPair idMap n m -- Type representing a valid set of nodes active in the execution of a statechart -- In order to be a valid configuration, cNodes must be consistent and maximal
303
consistent idMap ns = F.all id $ do m <- ns n <- ns return $ consistentPair idMap n m -- Type representing a valid set of nodes active in the execution of a statechart -- In order to be a valid configuration, cNodes must be consistent and maximal
253
true
true
0
10
101
83
39
44
null
null
skogsbaer/HTF
Test/Framework/Diff.hs
lgpl-2.1
{- Haskell diff, in case the diff tool is not present -} multiLineDiffHaskell :: String -> String -> ColorString multiLineDiffHaskell left right = if length left > maxLen || length right > maxLen then noColor ("Refusing to compute a multiline diff for strings with more than " ++ show maxLen ++ ...
495
multiLineDiffHaskell :: String -> String -> ColorString multiLineDiffHaskell left right = if length left > maxLen || length right > maxLen then noColor ("Refusing to compute a multiline diff for strings with more than " ++ show maxLen ++ " chars. Please install the 'diff' tool to get ...
438
multiLineDiffHaskell left right = if length left > maxLen || length right > maxLen then noColor ("Refusing to compute a multiline diff for strings with more than " ++ show maxLen ++ " chars. Please install the 'diff' tool to get a diff ouput.") else noColor $ ppDiff $ D.getGrouped...
382
true
true
0
10
125
103
51
52
null
null
LTI2000/hinterface
src/Foreign/Erlang/Mailbox.hs
bsd-3-clause
deliverExit :: Mailbox -> Pid -> Term -> IO () deliverExit = undefined
74
deliverExit :: Mailbox -> Pid -> Term -> IO () deliverExit = undefined
74
deliverExit = undefined
27
false
true
0
10
16
34
15
19
null
null
rahulmutt/ghcvm
compiler/Eta/BasicTypes/Module.hs
bsd-3-clause
integerUnitId, primUnitId, baseUnitId, rtsUnitId, thUnitId, dphSeqUnitId, dphParUnitId, mainUnitId, thisGhcUnitId, etaMetaId, interactiveUnitId, javaUnitId :: UnitId primUnitId = fsToUnitId (fsLit "ghc-prim")
221
integerUnitId, primUnitId, baseUnitId, rtsUnitId, thUnitId, dphSeqUnitId, dphParUnitId, mainUnitId, thisGhcUnitId, etaMetaId, interactiveUnitId, javaUnitId :: UnitId primUnitId = fsToUnitId (fsLit "ghc-prim")
221
primUnitId = fsToUnitId (fsLit "ghc-prim")
49
false
true
0
7
31
42
32
10
null
null
upwawet/vision
src/Properties/Editor/Model.hs
gpl-3.0
resetState :: WithModel => IO () resetState = modifyMVar_ state . const $ return Nothing
88
resetState :: WithModel => IO () resetState = modifyMVar_ state . const $ return Nothing
88
resetState = modifyMVar_ state . const $ return Nothing
55
false
true
3
8
14
42
17
25
null
null
fpco/hlint
data/Default.hs
bsd-3-clause
error "Redundant $!" = id $! x ==> x
36
error "Redundant $!" = id $! x ==> x
36
error "Redundant $!" = id $! x ==> x
36
false
false
4
5
8
25
9
16
null
null
cordawyn/rdf4h
src/Data/RDF/Query.hs
bsd-3-clause
subjectOf :: Triple -> Node subjectOf (Triple s _ _) = s
56
subjectOf :: Triple -> Node subjectOf (Triple s _ _) = s
56
subjectOf (Triple s _ _) = s
28
false
true
0
7
11
28
14
14
null
null
shlevy/ghc
compiler/nativeGen/SPARC/CodeGen/Expand.hs
bsd-3-clause
-- | In the SPARC instruction set the FP register pairs that are used -- to hold 64 bit floats are refered to by just the first reg -- of the pair. Remap our internal reg pairs to the appropriate reg. -- -- For example: -- ldd [%l1], (%f0 | %f1) -- -- gets mapped to -- ldd [$l1], %...
1,119
remapRegPair :: Instr -> Instr remapRegPair instr = let patchF reg = case reg of RegReal (RealRegSingle _) -> reg RegReal (RealRegPair r1 r2) -- sanity checking | r1 >= 32 ...
793
remapRegPair instr = let patchF reg = case reg of RegReal (RealRegSingle _) -> reg RegReal (RealRegPair r1 r2) -- sanity checking | r1 >= 32 , r1 <= 63 ...
762
true
true
0
16
512
177
89
88
null
null
danplubell/hbase-haskell
src/Database/HBase/Client.hs
mit
compact :: TableRegionName -> HBaseConnection -> IO() compact tr c= HClient.compact (connectionIpOp c) (strToLazy tr)
117
compact :: TableRegionName -> HBaseConnection -> IO() compact tr c= HClient.compact (connectionIpOp c) (strToLazy tr)
117
compact tr c= HClient.compact (connectionIpOp c) (strToLazy tr)
63
false
true
0
9
14
53
24
29
null
null
tibbe/event
src/System/Event/Array.hs
bsd-2-clause
snoc :: Storable a => Array a -> a -> IO () snoc (Array ref) e = do ac@(AC _ len _) <- readIORef ref let len' = len + 1 ac'@(AC es _ cap) <- ensureCapacity' ac len' unsafeWrite' ac' len e writeIORef ref (AC es len' cap)
239
snoc :: Storable a => Array a -> a -> IO () snoc (Array ref) e = do ac@(AC _ len _) <- readIORef ref let len' = len + 1 ac'@(AC es _ cap) <- ensureCapacity' ac len' unsafeWrite' ac' len e writeIORef ref (AC es len' cap)
239
snoc (Array ref) e = do ac@(AC _ len _) <- readIORef ref let len' = len + 1 ac'@(AC es _ cap) <- ensureCapacity' ac len' unsafeWrite' ac' len e writeIORef ref (AC es len' cap)
195
false
true
0
10
68
134
62
72
null
null
vincenthz/language-c
test/src/RenderTests.hs
bsd-3-clause
-- | read the dat file containing the test-results readTestRuns :: FilePath -> IO [TestRun] readTestRuns = liftM (map read . lines) . readFile
142
readTestRuns :: FilePath -> IO [TestRun] readTestRuns = liftM (map read . lines) . readFile
91
readTestRuns = liftM (map read . lines) . readFile
50
true
true
0
9
23
45
21
24
null
null
plaprade/haskoin
haskoin-core/src/Network/Haskoin/Script/Evaluator.hs
unlicense
eval OP_CHECKMULTISIG = do nPubKeys <- fromIntegral <$> popInt when (nPubKeys < 0 || nPubKeys > maxKeysMultisig) $ programError $ "nPubKeys outside range: " ++ show nPubKeys pubKeys <- popStackN $ toInteger nPubKeys nSigs <- fromIntegral <$> popInt when (nSigs < 0 || nSigs >...
688
eval OP_CHECKMULTISIG = do nPubKeys <- fromIntegral <$> popInt when (nPubKeys < 0 || nPubKeys > maxKeysMultisig) $ programError $ "nPubKeys outside range: " ++ show nPubKeys pubKeys <- popStackN $ toInteger nPubKeys nSigs <- fromIntegral <$> popInt when (nSigs < 0 || nSigs >...
688
eval OP_CHECKMULTISIG = do nPubKeys <- fromIntegral <$> popInt when (nPubKeys < 0 || nPubKeys > maxKeysMultisig) $ programError $ "nPubKeys outside range: " ++ show nPubKeys pubKeys <- popStackN $ toInteger nPubKeys nSigs <- fromIntegral <$> popInt when (nSigs < 0 || nSigs >...
688
false
false
0
14
203
206
94
112
null
null
seckcoder/vector
Data/Vector.hs
bsd-3-clause
zipWithM = G.zipWithM
21
zipWithM = G.zipWithM
21
zipWithM = G.zipWithM
21
false
false
0
5
2
8
4
4
null
null
romanb/amazonka
amazonka-sts/gen/Network/AWS/STS/Types.hs
mpl-2.0
-- | The access key ID that identifies the temporary security credentials. cAccessKeyId :: Lens' Credentials Text cAccessKeyId = lens _cAccessKeyId (\s a -> s { _cAccessKeyId = a })
181
cAccessKeyId :: Lens' Credentials Text cAccessKeyId = lens _cAccessKeyId (\s a -> s { _cAccessKeyId = a })
106
cAccessKeyId = lens _cAccessKeyId (\s a -> s { _cAccessKeyId = a })
67
true
true
0
9
29
47
23
24
null
null
smit1625/gospotchess
src/api/services/MoveService.hs
gpl-3.0
relativeSpecialMovementsForPiece :: Piece -> Position -> [(PossibleMove, BoardContext -> Bool)] relativeSpecialMovementsForPiece piece current_pos = case piece of Pawn -> [ (( 1, 0 ), pawnCanMoveOneStep current_pos) , (( 2, 0 ), pawnCanMoveTwoSteps current_pos) , (( 1, 1 ), p...
592
relativeSpecialMovementsForPiece :: Piece -> Position -> [(PossibleMove, BoardContext -> Bool)] relativeSpecialMovementsForPiece piece current_pos = case piece of Pawn -> [ (( 1, 0 ), pawnCanMoveOneStep current_pos) , (( 2, 0 ), pawnCanMoveTwoSteps current_pos) , (( 1, 1 ), p...
592
relativeSpecialMovementsForPiece piece current_pos = case piece of Pawn -> [ (( 1, 0 ), pawnCanMoveOneStep current_pos) , (( 2, 0 ), pawnCanMoveTwoSteps current_pos) , (( 1, 1 ), pawnCanCapturePieceAt current_pos ( 1, 1 )) , (( 1, -1 ), pawnCanCapturePieceAt cu...
496
false
true
0
12
180
191
111
80
null
null
Dronte/Operads
Math/Operad/OperadGB.hs
bsd-3-clause
findFirstRight (DTVertex (Left _) ts) = listToMaybe $ mapMaybe findFirstRight ts
81
findFirstRight (DTVertex (Left _) ts) = listToMaybe $ mapMaybe findFirstRight ts
81
findFirstRight (DTVertex (Left _) ts) = listToMaybe $ mapMaybe findFirstRight ts
81
false
false
0
9
11
32
15
17
null
null
gspindles/mj-score-eval
src/Game/Mahjong/Static/Examples.hs
mit
allHonorPairsEx :: Maybe Hand allHonorPairsEx = mkHand1 [ mkPair' Concealed we , mkPair' Concealed ws , mkPair' Concealed ww , mkPair' Concealed wn , mkPair' Concealed dr , mkPair' Concealed dg , mkPair' Revealed dw ] [s3] Nothing
250
allHonorPairsEx :: Maybe Hand allHonorPairsEx = mkHand1 [ mkPair' Concealed we , mkPair' Concealed ws , mkPair' Concealed ww , mkPair' Concealed wn , mkPair' Concealed dr , mkPair' Concealed dg , mkPair' Revealed dw ] [s3] Nothing
250
allHonorPairsEx = mkHand1 [ mkPair' Concealed we , mkPair' Concealed ws , mkPair' Concealed ww , mkPair' Concealed wn , mkPair' Concealed dr , mkPair' Concealed dg , mkPair' Revealed dw ] [s3] Nothing
220
false
true
0
6
57
82
40
42
null
null
Chobbes/Juicy.Pixels
src/Codec/Picture/Gif.hs
bsd-3-clause
extensionIntroducer = 0x21
26
extensionIntroducer = 0x21
26
extensionIntroducer = 0x21
26
false
false
0
4
2
6
3
3
null
null
rahulmutt/ghcvm
compiler/Eta/HsSyn/HsUtils.hs
bsd-3-clause
userHsTyVarBndrs :: SrcSpan -> [name] -> [Located (HsTyVarBndr name)] -- Caller sets location userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]
159
userHsTyVarBndrs :: SrcSpan -> [name] -> [Located (HsTyVarBndr name)] userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]
135
userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]
65
true
true
0
12
26
68
33
35
null
null
rfranek/duckling
Duckling/Numeral/HE/Rules.hs
bsd-3-clause
ruleIntersectNumerals :: Rule ruleIntersectNumerals = Rule { name = "intersect numbers" , pattern = [ numberWith (fromMaybe 0 . TNumeral.grain) (>1) , numberWith TNumeral.multipliable not ] , prod = \tokens -> case tokens of (Token Numeral (NumeralData {TNumeral.value = val1, TNumeral.grain = Ju...
476
ruleIntersectNumerals :: Rule ruleIntersectNumerals = Rule { name = "intersect numbers" , pattern = [ numberWith (fromMaybe 0 . TNumeral.grain) (>1) , numberWith TNumeral.multipliable not ] , prod = \tokens -> case tokens of (Token Numeral (NumeralData {TNumeral.value = val1, TNumeral.grain = Ju...
476
ruleIntersectNumerals = Rule { name = "intersect numbers" , pattern = [ numberWith (fromMaybe 0 . TNumeral.grain) (>1) , numberWith TNumeral.multipliable not ] , prod = \tokens -> case tokens of (Token Numeral (NumeralData {TNumeral.value = val1, TNumeral.grain = Just g}): Token Numeral (...
446
false
true
0
19
113
178
94
84
null
null
ikirill/ComputationalMathematics
Cube/CubeSolver.hs
gpl-3.0
printSolveMiddlesBF :: Int -> Orientrot -> IO () printSolveMiddlesBF maxlen perm = do iolock <- newMVar () finished :: MVar () <- newEmptyMVar best <- newIORef (0::Int) let loop :: Int -> IO () loop k = do -- takeMVar iolock; traceM (printf "solveMiddlesBF:loop: Now doing ...
1,209
printSolveMiddlesBF :: Int -> Orientrot -> IO () printSolveMiddlesBF maxlen perm = do iolock <- newMVar () finished :: MVar () <- newEmptyMVar best <- newIORef (0::Int) let loop :: Int -> IO () loop k = do -- takeMVar iolock; traceM (printf "solveMiddlesBF:loop: Now doing ...
1,209
printSolveMiddlesBF maxlen perm = do iolock <- newMVar () finished :: MVar () <- newEmptyMVar best <- newIORef (0::Int) let loop :: Int -> IO () loop k = do -- takeMVar iolock; traceM (printf "solveMiddlesBF:loop: Now doing %d..." k); putMVar iolock (); bestre...
1,160
false
true
0
22
389
414
196
218
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Diff.hs
gpl-2.0
regex_'28'5c'2a'5c'2a'5c'2a'7c'5c'2d'5c'2d'5c'2d'29'2e'2a'24 = compileRegex True "(\\*\\*\\*|\\-\\-\\-).*$"
107
regex_'28'5c'2a'5c'2a'5c'2a'7c'5c'2d'5c'2d'5c'2d'29'2e'2a'24 = compileRegex True "(\\*\\*\\*|\\-\\-\\-).*$"
107
regex_'28'5c'2a'5c'2a'5c'2a'7c'5c'2d'5c'2d'5c'2d'29'2e'2a'24 = compileRegex True "(\\*\\*\\*|\\-\\-\\-).*$"
107
false
false
0
5
4
11
5
6
null
null
maoe/fop
12-Fun-with-Phantom-Types/Type.hs
bsd-3-clause
pretty (RPair ra rb) (a, b) = text "(" <> pretty ra a <> text ", " <> pretty rb b <> text ")"
172
pretty (RPair ra rb) (a, b) = text "(" <> pretty ra a <> text ", " <> pretty rb b <> text ")"
172
pretty (RPair ra rb) (a, b) = text "(" <> pretty ra a <> text ", " <> pretty rb b <> text ")"
172
false
false
0
9
102
60
28
32
null
null
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/Types.hs
mpl-2.0
corETag :: Lens' CopyObjectResult (Maybe Text) corETag = lens _corETag (\s a -> s { _corETag = a })
99
corETag :: Lens' CopyObjectResult (Maybe Text) corETag = lens _corETag (\s a -> s { _corETag = a })
99
corETag = lens _corETag (\s a -> s { _corETag = a })
52
false
true
0
9
18
45
24
21
null
null
pparkkin/eta
compiler/ETA/Main/DynFlags.hs
bsd-3-clause
setIncoherentInsts True = do l <- getCurLoc upd (\d -> d { incoherentOnLoc = l })
85
setIncoherentInsts True = do l <- getCurLoc upd (\d -> d { incoherentOnLoc = l })
85
setIncoherentInsts True = do l <- getCurLoc upd (\d -> d { incoherentOnLoc = l })
85
false
false
0
11
19
39
19
20
null
null
s9gf4ult/yesod
yesod-form/Yesod/Form/Bootstrap3.hs
mit
addGO (ColLg _) _ = error "Yesod.Form.Bootstrap.addGO: never here"
70
addGO (ColLg _) _ = error "Yesod.Form.Bootstrap.addGO: never here"
70
addGO (ColLg _) _ = error "Yesod.Form.Bootstrap.addGO: never here"
70
false
false
0
7
12
20
9
11
null
null
fmapfmapfmap/amazonka
amazonka-ecs/gen/Network/AWS/ECS/DescribeTasks.hs
mpl-2.0
-- | The short name or full Amazon Resource Name (ARN) of the cluster that -- hosts the task you want to describe. If you do not specify a cluster, -- the default cluster is assumed. dtCluster :: Lens' DescribeTasks (Maybe Text) dtCluster = lens _dtCluster (\ s a -> s{_dtCluster = a})
285
dtCluster :: Lens' DescribeTasks (Maybe Text) dtCluster = lens _dtCluster (\ s a -> s{_dtCluster = a})
102
dtCluster = lens _dtCluster (\ s a -> s{_dtCluster = a})
56
true
true
0
9
52
48
27
21
null
null