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
GaloisInc/halvm-ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
lkA env (DataAlt dc, bs, rhs) = am_data >.> lkDNamed dc >=> lkG (D (extendCMEs env bs) rhs)
131
lkA env (DataAlt dc, bs, rhs) = am_data >.> lkDNamed dc >=> lkG (D (extendCMEs env bs) rhs)
131
lkA env (DataAlt dc, bs, rhs) = am_data >.> lkDNamed dc >=> lkG (D (extendCMEs env bs) rhs)
131
false
false
0
10
57
53
26
27
null
null
Fermat/higher-rank
src/Matching.hs
bsd-3-clause
convert :: Exp -> Exp -- convert (Pos _ e) = convert e convert (Imply x y) = App (App (Const "->" dummyPos) (convert x)) (convert y)
132
convert :: Exp -> Exp convert (Imply x y) = App (App (Const "->" dummyPos) (convert x)) (convert y)
99
convert (Imply x y) = App (App (Const "->" dummyPos) (convert x)) (convert y)
77
true
true
0
9
26
64
31
33
null
null
mdsteele/fallback
src/Fallback/Data/Point.hs
gpl-3.0
dirDelta DirSE = Point 1 1
31
dirDelta DirSE = Point 1 1
31
dirDelta DirSE = Point 1 1
31
false
false
0
5
10
14
6
8
null
null
carlostome/shrdlite
haskell/Popper.hs
gpl-3.0
goalInEff :: (Conjunct,Action) -> Action -> Bool goalInEff goal (Action _ _ effs) = elem (fst goal) effs
104
goalInEff :: (Conjunct,Action) -> Action -> Bool goalInEff goal (Action _ _ effs) = elem (fst goal) effs
104
goalInEff goal (Action _ _ effs) = elem (fst goal) effs
55
false
true
0
7
17
51
26
25
null
null
ezyang/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
{- ************************************************************************ * * \subsection{Bulk operations on IdInfo} * * ***********************************************************...
1,492
zapLamInfo :: IdInfo -> Maybe IdInfo zapLamInfo info@(IdInfo {occInfo = occ, demandInfo = demand}) | is_safe_occ occ && is_safe_dmd demand = Nothing | otherwise = Just (info {occInfo = safe_occ, demandInfo = topDmd}) where -- The "unsafe" occ info is the ones that say I'm not in a lambda -- be...
914
zapLamInfo info@(IdInfo {occInfo = occ, demandInfo = demand}) | is_safe_occ occ && is_safe_dmd demand = Nothing | otherwise = Just (info {occInfo = safe_occ, demandInfo = topDmd}) where -- The "unsafe" occ info is the ones that say I'm not in a lambda -- because that might not be true for an u...
877
true
true
7
9
519
237
120
117
null
null
10sr/scheme_hs
main.hs
mit
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
false
false
1
6
7
21
8
13
null
null
marcellussiegburg/autotool
collection/src/Lambda/Derive2.hs
gpl-2.0
derive2 :: Bool -> Lambda -> [ Step ] -> Reporter Lambda derive2 drawing t steps = do t' <- foldM (step drawing) t steps inform $ vcat [ text "Ergebnis der Ableitung ist", nest 4 $ toDoc t' ] return t'
213
derive2 :: Bool -> Lambda -> [ Step ] -> Reporter Lambda derive2 drawing t steps = do t' <- foldM (step drawing) t steps inform $ vcat [ text "Ergebnis der Ableitung ist", nest 4 $ toDoc t' ] return t'
213
derive2 drawing t steps = do t' <- foldM (step drawing) t steps inform $ vcat [ text "Ergebnis der Ableitung ist", nest 4 $ toDoc t' ] return t'
156
false
true
0
12
53
96
43
53
null
null
tanishiking/HasC
src/AssignAddr.hs
mit
assignIStmt (ICompoundStmt decls stmts) = do fp <- getFp let requiredWords = map (calcWords . getTypeFromIVar) decls declsAddress <- mapM assignFpWords requiredWords mapM_ pushVar $ zip decls declsAddress stmts' <- mapM assignIStmt stmts resetFp fp return $ ICompoundStmt (map VarAddr declsAddress) stmts'
319
assignIStmt (ICompoundStmt decls stmts) = do fp <- getFp let requiredWords = map (calcWords . getTypeFromIVar) decls declsAddress <- mapM assignFpWords requiredWords mapM_ pushVar $ zip decls declsAddress stmts' <- mapM assignIStmt stmts resetFp fp return $ ICompoundStmt (map VarAddr declsAddress) stmts'
319
assignIStmt (ICompoundStmt decls stmts) = do fp <- getFp let requiredWords = map (calcWords . getTypeFromIVar) decls declsAddress <- mapM assignFpWords requiredWords mapM_ pushVar $ zip decls declsAddress stmts' <- mapM assignIStmt stmts resetFp fp return $ ICompoundStmt (map VarAddr declsAddress) stmts'
319
false
false
0
12
55
111
48
63
null
null
dterei/Scraps
haskell/lenses/Types.hs
bsd-3-clause
-- # Holes: Editing focus value over :: (c -> d) -> PairZipper a b c -> PairZipper a b d over f (PZ c l) = PZ (f c) l
118
over :: (c -> d) -> PairZipper a b c -> PairZipper a b d over f (PZ c l) = PZ (f c) l
85
over f (PZ c l) = PZ (f c) l
28
true
true
0
7
31
65
32
33
null
null
mattias-lundell/timber-llvm
src/Reduce.hs
bsd-3-clause
plus gs (Left a) b = return b
50
plus gs (Left a) b = return b
50
plus gs (Left a) b = return b
50
false
false
0
7
28
22
10
12
null
null
baldore/haskell-99-exercises
25.hs
mit
rndPermutationG ls gen = let (i,g) = randomR (0, length ls - 1) gen (x,xs) = removeAt i ls in x : rndPermutationG (reverse xs) g
139
rndPermutationG ls gen = let (i,g) = randomR (0, length ls - 1) gen (x,xs) = removeAt i ls in x : rndPermutationG (reverse xs) g
139
rndPermutationG ls gen = let (i,g) = randomR (0, length ls - 1) gen (x,xs) = removeAt i ls in x : rndPermutationG (reverse xs) g
139
false
false
3
12
36
85
39
46
null
null
mcschroeder/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
isExact _ = False
25
isExact _ = False
25
isExact _ = False
25
false
false
0
4
11
10
4
6
null
null
arnizamani/DLvalidity
DLvalidity.hs
gpl-2.0
maxDm :: [(WM,(RuleD,Maybe Fi))] -> Int maxDm [] = 0
52
maxDm :: [(WM,(RuleD,Maybe Fi))] -> Int maxDm [] = 0
52
maxDm [] = 0
12
false
true
0
9
9
38
21
17
null
null
expipiplus1/spir-v
Language/SpirV/OpCode.hs
mit
instructionSize OpCopyMemorySized = Fixed 4
43
instructionSize OpCopyMemorySized = Fixed 4
43
instructionSize OpCopyMemorySized = Fixed 4
43
false
false
0
5
4
12
5
7
null
null
mtak/chess-hs
src/Chess.hs
mit
newChess :: Chess newChess = newChess' newBoard L
49
newChess :: Chess newChess = newChess' newBoard L
49
newChess = newChess' newBoard L
31
false
true
0
6
7
22
9
13
null
null
sjpet/quark
src/Quark/Buffer.hs
mit
-- Copy selection selection :: Buffer -> T.Text selection (Buffer s _ crs sel) = T.take l $ T.drop k s where l = abs $ distance crs sel s k = cursorToIx (min crs sel) s
178
selection :: Buffer -> T.Text selection (Buffer s _ crs sel) = T.take l $ T.drop k s where l = abs $ distance crs sel s k = cursorToIx (min crs sel) s
160
selection (Buffer s _ crs sel) = T.take l $ T.drop k s where l = abs $ distance crs sel s k = cursorToIx (min crs sel) s
130
true
true
3
7
46
93
43
50
null
null
bvdelft/parac2
src/Language/Java/Paragon/Interaction.hs
bsd-3-clause
typeCheckerBase = libraryBase ++ ".TypeCheck"
45
typeCheckerBase = libraryBase ++ ".TypeCheck"
45
typeCheckerBase = libraryBase ++ ".TypeCheck"
45
false
false
1
5
4
13
5
8
null
null
haskell-distributed/distributed-process-execution
src/Control/Distributed/Process/Execution/Exchange/Internal.hs
bsd-3-clause
runExchange :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> Process () runExchange t tc = MP.chanServe t exInit (processDefinition t tc)
195
runExchange :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> Process () runExchange t tc = MP.chanServe t exInit (processDefinition t tc)
195
runExchange t tc = MP.chanServe t exInit (processDefinition t tc)
65
false
true
0
11
61
67
31
36
null
null
ndmitchell/shake
src/Development/Shake/Internal/FilePattern.hs
bsd-3-clause
-- | Do they have the same * and // counts in the same order compatible :: [FilePattern] -> Bool compatible [] = True
117
compatible :: [FilePattern] -> Bool compatible [] = True
56
compatible [] = True
20
true
true
0
6
23
24
13
11
null
null
joelchelliah/diy-lang-haskell
test/parts/Test_5_AddingFunctionsToTheMix.hs
bsd-3-clause
closureHoldsFunction :: TestTree closureHoldsFunction = testCase "\n Test 5.3 - A closure holds a function. \n\ \ The closure contains a parameter list and a function body. They \n\ \ are represented as a <DiyFunction [DiyAST] DiyAST> in our AST" $ do let lambda = parse "(lambda (x y) (+ x y))" ...
602
closureHoldsFunction :: TestTree closureHoldsFunction = testCase "\n Test 5.3 - A closure holds a function. \n\ \ The closure contains a parameter list and a function body. They \n\ \ are represented as a <DiyFunction [DiyAST] DiyAST> in our AST" $ do let lambda = parse "(lambda (x y) (+ x y))" ...
602
closureHoldsFunction = testCase "\n Test 5.3 - A closure holds a function. \n\ \ The closure contains a parameter list and a function body. They \n\ \ are represented as a <DiyFunction [DiyAST] DiyAST> in our AST" $ do let lambda = parse "(lambda (x y) (+ x y))" (closure, _) = evaluate lamb...
569
false
true
0
13
140
113
54
59
null
null
phischu/fragnix
builtins/ghc-prim/GHC.Prim.hs
bsd-3-clause
-- | Unpack the elements of a vector into an unboxed tuple. # unpackInt32X16# :: Int32X16# -> (# Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int# #) unpackInt32X16# = unpackInt32X16#
214
unpackInt32X16# :: Int32X16# -> (# Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int#,Int# #) unpackInt32X16# = unpackInt32X16#
151
unpackInt32X16# = unpackInt32X16#
33
true
true
0
8
23
70
41
29
null
null
oldmanmike/ghc
compiler/utils/Pretty.hs
bsd-3-clause
oneLiner (Above {}) = error "oneLiner Above"
53
oneLiner (Above {}) = error "oneLiner Above"
53
oneLiner (Above {}) = error "oneLiner Above"
53
false
false
0
7
15
19
9
10
null
null
jgm/blaze-html
Text/Blaze/Renderer/Utf8.hs
bsd-3-clause
fromChoiceString (AppendChoiceString x y) = fromChoiceString x `mappend` fromChoiceString y
95
fromChoiceString (AppendChoiceString x y) = fromChoiceString x `mappend` fromChoiceString y
95
fromChoiceString (AppendChoiceString x y) = fromChoiceString x `mappend` fromChoiceString y
95
false
false
0
6
13
33
15
18
null
null
pxqr/base32-bytestring
src/Data/ByteString/Base32/Hex.hs
bsd-3-clause
decTable :: DecTable decTable = BS.pack $ L.map decW5 [minBound .. maxBound]
76
decTable :: DecTable decTable = BS.pack $ L.map decW5 [minBound .. maxBound]
76
decTable = BS.pack $ L.map decW5 [minBound .. maxBound]
55
false
true
2
6
11
39
17
22
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_STENCIL_INDEX16_EXT :: GLenum gl_STENCIL_INDEX16_EXT = 0x8D49
64
gl_STENCIL_INDEX16_EXT :: GLenum gl_STENCIL_INDEX16_EXT = 0x8D49
64
gl_STENCIL_INDEX16_EXT = 0x8D49
31
false
true
0
4
5
11
6
5
null
null
quchen/shaking-up-ghc
src/Rules/Cabal.hs
bsd-3-clause
collectDeps (Just (CondNode _ deps ifs)) = deps ++ concatMap f ifs where f (_, t, mt) = collectDeps (Just t) ++ collectDeps mt
132
collectDeps (Just (CondNode _ deps ifs)) = deps ++ concatMap f ifs where f (_, t, mt) = collectDeps (Just t) ++ collectDeps mt
132
collectDeps (Just (CondNode _ deps ifs)) = deps ++ concatMap f ifs where f (_, t, mt) = collectDeps (Just t) ++ collectDeps mt
132
false
false
0
9
29
70
34
36
null
null
shak-mar/botstrats
supervisor/Robots.hs
mit
startRobot :: Robot -> IO (Maybe Robot) startRobot (Off identifier) = (packInRobot <$> createProcess process) `catch` \(e :: SomeException) -> return Nothing where packInRobot (Just stdin, Just stdout, Nothing, procHandle) = Just $ Running identifier stdin stdout procHandle drivePath...
988
startRobot :: Robot -> IO (Maybe Robot) startRobot (Off identifier) = (packInRobot <$> createProcess process) `catch` \(e :: SomeException) -> return Nothing where packInRobot (Just stdin, Just stdout, Nothing, procHandle) = Just $ Running identifier stdin stdout procHandle drivePath...
988
startRobot (Off identifier) = (packInRobot <$> createProcess process) `catch` \(e :: SomeException) -> return Nothing where packInRobot (Just stdin, Just stdout, Nothing, procHandle) = Just $ Running identifier stdin stdout procHandle drivePath = genDrivePath identifier pro...
948
false
true
2
10
362
169
91
78
null
null
keithodulaigh/Hets
QVTR/Parser.hs
gpl-2.0
pPropertyTemplateList :: CharParser st [QVTR.PropertyTemplate] pPropertyTemplateList = do skip try $ pCommaSep pPropertyTemplate {- <propertyTemplate> ::= <identifier> '=' <OclExpressionCS> <identifier> '=' <objectTemplate> -}
232
pPropertyTemplateList :: CharParser st [QVTR.PropertyTemplate] pPropertyTemplateList = do skip try $ pCommaSep pPropertyTemplate {- <propertyTemplate> ::= <identifier> '=' <OclExpressionCS> <identifier> '=' <objectTemplate> -}
232
pPropertyTemplateList = do skip try $ pCommaSep pPropertyTemplate {- <propertyTemplate> ::= <identifier> '=' <OclExpressionCS> <identifier> '=' <objectTemplate> -}
169
false
true
0
8
28
35
17
18
null
null
tinco/nanc
Nanc/IR/Types.hs
mit
booleanType = LLVM.IntegerType 1
32
booleanType = LLVM.IntegerType 1
32
booleanType = LLVM.IntegerType 1
32
false
false
0
6
3
11
5
6
null
null
adamschoenemann/simple-frp
src/FRP/TypeChecker.hs
mit
stableCtx :: Context t -> Context t stableCtx (Ctx c1) = Ctx $ M.map (maybe (error "laterCtx") (id)) $ M.filter isJust $ M.map mapper c1 where mapper (t,q) = case q of QNow -> Nothing QStable -> Just (t, QStable) QLater -> Nothing
255
stableCtx :: Context t -> Context t stableCtx (Ctx c1) = Ctx $ M.map (maybe (error "laterCtx") (id)) $ M.filter isJust $ M.map mapper c1 where mapper (t,q) = case q of QNow -> Nothing QStable -> Just (t, QStable) QLater -> Nothing
255
stableCtx (Ctx c1) = Ctx $ M.map (maybe (error "laterCtx") (id)) $ M.filter isJust $ M.map mapper c1 where mapper (t,q) = case q of QNow -> Nothing QStable -> Just (t, QStable) QLater -> Nothing
219
false
true
0
12
67
123
61
62
null
null
narurien/ganeti-ceph
src/Ganeti/OpCodes.hs
gpl-2.0
opSummaryVal OpInstanceRecreateDisks { opInstanceName = s } = Just s
68
opSummaryVal OpInstanceRecreateDisks { opInstanceName = s } = Just s
68
opSummaryVal OpInstanceRecreateDisks { opInstanceName = s } = Just s
68
false
false
0
7
9
22
10
12
null
null
timjs/idris-clean
Sources/IRTS/CodegenClean.hs
mit
cgPrim LFACos = cgPrimFn BReal "acos"
39
cgPrim LFACos = cgPrimFn BReal "acos"
39
cgPrim LFACos = cgPrimFn BReal "acos"
39
false
false
0
5
7
14
6
8
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkOverridingPath _ _ = return ()
35
checkOverridingPath _ _ = return ()
35
checkOverridingPath _ _ = return ()
35
false
false
0
6
5
16
7
9
null
null
rohit507/mfd-experiments
app/Sealing.hs
bsd-3-clause
getEstTimePlot :: Integer -> EstTimePlot getEstTimePlot numDice = EstTimePlot{ diffs = {- trace ("for diffs " ++ show diffs) -} diffs , totals = {- trace ("for totals " ++ show totals) -} totals , estDays = estDays , variance = variance } where diffs = getDiffs numDice totals = getTotals numDice ...
1,138
getEstTimePlot :: Integer -> EstTimePlot getEstTimePlot numDice = EstTimePlot{ diffs = {- trace ("for diffs " ++ show diffs) -} diffs , totals = {- trace ("for totals " ++ show totals) -} totals , estDays = estDays , variance = variance } where diffs = getDiffs numDice totals = getTotals numDice ...
1,138
getEstTimePlot numDice = EstTimePlot{ diffs = {- trace ("for diffs " ++ show diffs) -} diffs , totals = {- trace ("for totals " ++ show totals) -} totals , estDays = estDays , variance = variance } where diffs = getDiffs numDice totals = getTotals numDice -- get all rows (estDays,variance)...
1,097
false
true
3
16
300
273
149
124
null
null
uwap/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
85
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
85
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
85
false
false
0
9
15
46
22
24
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GL/Extensions.hs
bsd-3-clause
throwIfNull :: String -> IO (FunPtr a) -> IO (FunPtr a) throwIfNull msg act = do res <- act if res == nullFunPtr then ioError (userError msg) else return res
175
throwIfNull :: String -> IO (FunPtr a) -> IO (FunPtr a) throwIfNull msg act = do res <- act if res == nullFunPtr then ioError (userError msg) else return res
175
throwIfNull msg act = do res <- act if res == nullFunPtr then ioError (userError msg) else return res
119
false
true
0
11
47
81
37
44
null
null
ChrisKuklewicz/SafeSemaphore
src/Control/Concurrent/STM/SSem.hs
bsd-3-clause
-- | Try to take the given value from the semaphore. This succeeds when the quantity is greater or -- equal to the given value, and then subtracts the given value from the quantity. Otherwise this -- will 'retry'. This will never result in a negative quantity. If several threads are retrying -- then which one succe...
613
waitN :: SSem -> Int -> STM () waitN (SSem s) i = do v <- readTVar s if v >= i then writeTVar s $! v-i else retry -- | Signal that single unit of the semaphore is available. This increases the available quantity -- by one.
236
waitN (SSem s) i = do v <- readTVar s if v >= i then writeTVar s $! v-i else retry -- | Signal that single unit of the semaphore is available. This increases the available quantity -- by one.
205
true
true
0
10
131
82
41
41
null
null
benweitzman/PhoBuddies-Servant
src/Util/Server.hs
mit
requireToken :: Maybe (Token a) -> ConfigM a requireToken Nothing = errorOf err401
82
requireToken :: Maybe (Token a) -> ConfigM a requireToken Nothing = errorOf err401
82
requireToken Nothing = errorOf err401
37
false
true
0
8
12
33
15
18
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/WebGPURenderingContext.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGPURenderingContext.nextDrawable Mozilla WebGPURenderingContext.nextDrawable documentation> nextDrawable :: (MonadDOM m) => WebGPURenderingContext -> m (Maybe WebGPUDrawable) nextDrawable self = liftDOM ((self ^. jsf "nextDrawable" ()) >>= fromJS...
324
nextDrawable :: (MonadDOM m) => WebGPURenderingContext -> m (Maybe WebGPUDrawable) nextDrawable self = liftDOM ((self ^. jsf "nextDrawable" ()) >>= fromJSVal)
173
nextDrawable self = liftDOM ((self ^. jsf "nextDrawable" ()) >>= fromJSVal)
77
true
true
0
11
42
66
32
34
null
null
talanis85/haScales
src/Data/Music/Chords.hs
bsd-3-clause
dominant7Chord = tetrad mixolydianScale
39
dominant7Chord = tetrad mixolydianScale
39
dominant7Chord = tetrad mixolydianScale
39
false
false
1
5
3
12
4
8
null
null
urbit/urbit
pkg/hs/urbit-king/test/AmesTests.hs
mit
packetSplitMorphism :: Packet -> Bool packetSplitMorphism p = (decode . encode) p == Right p
92
packetSplitMorphism :: Packet -> Bool packetSplitMorphism p = (decode . encode) p == Right p
92
packetSplitMorphism p = (decode . encode) p == Right p
54
false
true
0
8
14
35
17
18
null
null
taruti/diagrams-cairo-raster
example/PlainRaster.hs
bsd-3-clause
cplus :: Int -> Int -> CairoColor cplus x y = crgb x y (x*y)
60
cplus :: Int -> Int -> CairoColor cplus x y = crgb x y (x*y)
60
cplus x y = crgb x y (x*y)
26
false
true
0
8
14
46
20
26
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/DeprecateWorkflowType.hs
mpl-2.0
-- | The workflow type to deprecate. dWorkflowType :: Lens' DeprecateWorkflowType WorkflowType dWorkflowType = lens _dWorkflowType (\ s a -> s{_dWorkflowType = a})
163
dWorkflowType :: Lens' DeprecateWorkflowType WorkflowType dWorkflowType = lens _dWorkflowType (\ s a -> s{_dWorkflowType = a})
126
dWorkflowType = lens _dWorkflowType (\ s a -> s{_dWorkflowType = a})
68
true
true
0
9
22
40
22
18
null
null
txkaduo/hs-vdian-sdk
VDian/Order.hs
bsd-3-clause
fromOrderStatusNum :: Int -> Maybe OrderStatus fromOrderStatusNum 0 = Just OrderStatusJustCreated
97
fromOrderStatusNum :: Int -> Maybe OrderStatus fromOrderStatusNum 0 = Just OrderStatusJustCreated
97
fromOrderStatusNum 0 = Just OrderStatusJustCreated
50
false
true
0
6
10
24
11
13
null
null
minad/omega
vendor/algorithm-p/Types.hs
bsd-3-clause
collectType :: Eq a => Endo (Type -> [a]) collectType f = walk where walk (TyCon _ tas) = unions (map walk tas) walk t = f t
144
collectType :: Eq a => Endo (Type -> [a]) collectType f = walk where walk (TyCon _ tas) = unions (map walk tas) walk t = f t
144
collectType f = walk where walk (TyCon _ tas) = unions (map walk tas) walk t = f t
102
false
true
0
9
47
74
36
38
null
null
avh4/elm-format
tests/Test/ElmSourceGenerators.hs
bsd-3-clause
elmModule :: Gen String elmModule = do header <- moduleHeader d <- declaration return $ unlines [ header, d ]
123
elmModule :: Gen String elmModule = do header <- moduleHeader d <- declaration return $ unlines [ header, d ]
123
elmModule = do header <- moduleHeader d <- declaration return $ unlines [ header, d ]
99
false
true
0
9
33
44
21
23
null
null
pparkkin/eta
compiler/ETA/Main/DynFlags.hs
bsd-3-clause
wayOptl _ WayThreaded = []
28
wayOptl _ WayThreaded = []
28
wayOptl _ WayThreaded = []
28
false
false
1
6
6
15
6
9
null
null
techtangents/ablist
test/AbListTests.hs
bsd-3-clause
p_abMapLefts_id :: AbList Int Char -> Bool p_abMapLefts_id x = abMapLefts id x == x
83
p_abMapLefts_id :: AbList Int Char -> Bool p_abMapLefts_id x = abMapLefts id x == x
83
p_abMapLefts_id x = abMapLefts id x == x
40
false
true
0
6
14
32
15
17
null
null
markuspf/Idris-dev
src/Idris/Parser/Helpers.hs
bsd-3-clause
docComment :: IdrisParser (Docstring (), [(Name, Docstring ())]) docComment = do dc <- pushIndent *> docCommentLine rest <- many (indented docCommentLine) args <- many $ do (name, first) <- indented argDocCommentLine rest <- many (indented docCommentLine...
1,680
docComment :: IdrisParser (Docstring (), [(Name, Docstring ())]) docComment = do dc <- pushIndent *> docCommentLine rest <- many (indented docCommentLine) args <- many $ do (name, first) <- indented argDocCommentLine rest <- many (indented docCommentLine...
1,680
docComment = do dc <- pushIndent *> docCommentLine rest <- many (indented docCommentLine) args <- many $ do (name, first) <- indented argDocCommentLine rest <- many (indented docCommentLine) return (name, concat (intersp...
1,615
false
true
3
23
853
481
230
251
null
null
tolysz/hiccup
Hiccup.hs
lgpl-2.1
hiccupVersion = 0.49
20
hiccupVersion = 0.49
20
hiccupVersion = 0.49
20
false
false
0
4
2
6
3
3
null
null
mariefarrell/Hets
Driver/Options.hs
gpl-2.0
getFileNames :: [String] -> FilePath -> [FilePath] getFileNames exts file = file : map (rmSuffix file ++) exts
112
getFileNames :: [String] -> FilePath -> [FilePath] getFileNames exts file = file : map (rmSuffix file ++) exts
112
getFileNames exts file = file : map (rmSuffix file ++) exts
61
false
true
2
9
19
53
25
28
null
null
nevrenato/HetsAlloy
Maude/Maude2DG.hs
gpl-2.0
createEdgeImport tok1 (Inc, tok2, _, morph, _, _) sg tim dg = (tim, dg') where morph' = setTarget sg morph (n1, _, _, _, _) = fromJust $ Map.lookup tok1 tim (n2, _, _, _, _) = fromJust $ Map.lookup tok2 tim dg' = insertDefEdgeMorphism n1 n2 m...
378
createEdgeImport tok1 (Inc, tok2, _, morph, _, _) sg tim dg = (tim, dg') where morph' = setTarget sg morph (n1, _, _, _, _) = fromJust $ Map.lookup tok1 tim (n2, _, _, _, _) = fromJust $ Map.lookup tok2 tim dg' = insertDefEdgeMorphism n1 n2 m...
378
createEdgeImport tok1 (Inc, tok2, _, morph, _, _) sg tim dg = (tim, dg') where morph' = setTarget sg morph (n1, _, _, _, _) = fromJust $ Map.lookup tok1 tim (n2, _, _, _, _) = fromJust $ Map.lookup tok2 tim dg' = insertDefEdgeMorphism n1 n2 m...
378
false
false
1
7
136
137
74
63
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp EqStablePtrOp = _ILIT(372)
39
tagOf_PrimOp EqStablePtrOp = _ILIT(372)
39
tagOf_PrimOp EqStablePtrOp = _ILIT(372)
39
false
false
0
6
3
16
7
9
null
null
soenkehahn/nhc
src/Run.hs
bsd-3-clause
wrapBashArg :: String -> String wrapBashArg a = "\"" ++ a ++ "\""
67
wrapBashArg :: String -> String wrapBashArg a = "\"" ++ a ++ "\""
67
wrapBashArg a = "\"" ++ a ++ "\""
35
false
true
4
7
14
34
14
20
null
null
vincenthz/hs-foundation
basement/Basement/UArray/Base.hs
bsd-3-clause
-- | write to a cell in a mutable array without bounds checking. -- -- Writing with invalid bounds will corrupt memory and your program will -- become unreliable. use 'write' if unsure. unsafeWrite :: (PrimMonad prim, PrimType ty) => MUArray ty (PrimState prim) -> Offset ty -> ty -> prim () unsafeWrite (MUArray start _...
375
unsafeWrite :: (PrimMonad prim, PrimType ty) => MUArray ty (PrimState prim) -> Offset ty -> ty -> prim () unsafeWrite (MUArray start _ (MUArrayMBA mb)) i v = MBLK.unsafeWrite mb (start+i) v
189
unsafeWrite (MUArray start _ (MUArrayMBA mb)) i v = MBLK.unsafeWrite mb (start+i) v
83
true
true
0
10
64
100
51
49
null
null
ku-fpg/flat-json
src/Database/Flat/JSON.hs
bsd-3-clause
rowId :: Row -> Text rowId (Row o) = case parse (.: "_id") o of Success v -> v Error msg -> error $ "rowId failed " ++ msg
158
rowId :: Row -> Text rowId (Row o) = case parse (.: "_id") o of Success v -> v Error msg -> error $ "rowId failed " ++ msg
158
rowId (Row o) = case parse (.: "_id") o of Success v -> v Error msg -> error $ "rowId failed " ++ msg
137
false
true
0
9
64
63
31
32
null
null
Newlifer/libstep
src/Data/EXPRESS/Parsers.hs
mit
-- simple_id . pSubtypeConstraintId :: Parser SubtypeConstraintId pSubtypeConstraintId = pSimpleId
98
pSubtypeConstraintId :: Parser SubtypeConstraintId pSubtypeConstraintId = pSimpleId
83
pSubtypeConstraintId = pSimpleId
32
true
true
0
5
9
15
8
7
null
null
monte-language/masque
Masque/Monte.hs
gpl-3.0
unwrapChar :: Obj -> Monte Char unwrapChar (CharObj c) = return c
65
unwrapChar :: Obj -> Monte Char unwrapChar (CharObj c) = return c
65
unwrapChar (CharObj c) = return c
33
false
true
0
7
11
30
14
16
null
null
TransformingMusicology/libaudioDB-haskell
src/Sound/Audio/Database.hs
gpl-3.0
withNewPoweredAudioDB fp datasize ntracks dim f = withNewAudioDB fp datasize ntracks dim False True f
109
withNewPoweredAudioDB fp datasize ntracks dim f = withNewAudioDB fp datasize ntracks dim False True f
109
withNewPoweredAudioDB fp datasize ntracks dim f = withNewAudioDB fp datasize ntracks dim False True f
109
false
false
0
5
22
32
15
17
null
null
Numberartificial/workflow
haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter10.hs
mit
{- 2. myAny returns True if a -> Bool applied to any of the values in the list returns True . myAny :: (a -> Bool) -> [a] -> Bool myAny = undefined Example for validating myAny : Prelude> myAny even [1, 3, 5] False Prelude> myAny odd [1, 3, 5] True -} myAny :: (a -> Bool) -> [a] -> Bool myAny f' = foldr ((||)...
332
myAny :: (a -> Bool) -> [a] -> Bool myAny f' = foldr ((||) . f') False
70
myAny f' = foldr ((||) . f') False
34
true
true
0
7
79
47
26
21
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Disks/Resize.hs
mpl-2.0
-- | Project ID for this request. drProject :: Lens' DisksResize Text drProject = lens _drProject (\ s a -> s{_drProject = a})
128
drProject :: Lens' DisksResize Text drProject = lens _drProject (\ s a -> s{_drProject = a})
94
drProject = lens _drProject (\ s a -> s{_drProject = a})
58
true
true
0
9
24
42
22
20
null
null
Zankoku-Okuno/ammonite
Language/Ammonite/Syntax/Parser.hs
gpl-3.0
_expr :: Bool -> Parser Syntax _expr inline = do (stmts, pos) <- withPosition $ applyExpr inline coreExpr `sepBy1` sepSemicolon return $ case stmts of [e] -> e _ -> (Block stmts, pos)
215
_expr :: Bool -> Parser Syntax _expr inline = do (stmts, pos) <- withPosition $ applyExpr inline coreExpr `sepBy1` sepSemicolon return $ case stmts of [e] -> e _ -> (Block stmts, pos)
215
_expr inline = do (stmts, pos) <- withPosition $ applyExpr inline coreExpr `sepBy1` sepSemicolon return $ case stmts of [e] -> e _ -> (Block stmts, pos)
184
false
true
0
12
64
84
43
41
null
null
daherb/Haskell-Muste
muste-lib/Test/Grammar.hs
artistic-2.0
hunit_getRuleCat_test = TestList [ TestLabel "NoType" ( getRuleCat (Function "f" NoType) ~?= wildCard), TestLabel "Constant" ( getRuleCat (Function "f" (Fun "A" [])) ~?= "A"), TestLabel "Constant" ( getRuleCat (Function "f" (Fun "A" ["A","B"])) ~?= "A") ]
265
hunit_getRuleCat_test = TestList [ TestLabel "NoType" ( getRuleCat (Function "f" NoType) ~?= wildCard), TestLabel "Constant" ( getRuleCat (Function "f" (Fun "A" [])) ~?= "A"), TestLabel "Constant" ( getRuleCat (Function "f" (Fun "A" ["A","B"])) ~?= "A") ]
265
hunit_getRuleCat_test = TestList [ TestLabel "NoType" ( getRuleCat (Function "f" NoType) ~?= wildCard), TestLabel "Constant" ( getRuleCat (Function "f" (Fun "A" [])) ~?= "A"), TestLabel "Constant" ( getRuleCat (Function "f" (Fun "A" ["A","B"])) ~?= "A") ]
265
false
false
1
15
45
115
56
59
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC.hs
bsd-3-clause
mealy24 ns od i s1 s2 = comb34 od st s1 s2 where st = i -&>- comb31 ns st s1 s2
111
mealy24 ns od i s1 s2 = comb34 od st s1 s2 where st = i -&>- comb31 ns st s1 s2
111
mealy24 ns od i s1 s2 = comb34 od st s1 s2 where st = i -&>- comb31 ns st s1 s2
111
false
false
0
6
53
47
22
25
null
null
phischu/fragnix
tests/packages/scotty/Network.HTTP.Date.Parser.hs
bsd-3-clause
month :: Parser Int month = 1 <$ string "Jan" <|> 2 <$ string "Feb" <|> 3 <$ string "Mar" <|> 4 <$ string "Apr" <|> 5 <$ string "May" <|> 6 <$ string "Jun" <|> 7 <$ string "Jul" <|> 8 <$ string "Aug" <|> 9 <$ string "Sep" <|> 10 <$ string "Oct" <|> 11 <$ string "Nov" ...
343
month :: Parser Int month = 1 <$ string "Jan" <|> 2 <$ string "Feb" <|> 3 <$ string "Mar" <|> 4 <$ string "Apr" <|> 5 <$ string "May" <|> 6 <$ string "Jun" <|> 7 <$ string "Jul" <|> 8 <$ string "Aug" <|> 9 <$ string "Sep" <|> 10 <$ string "Oct" <|> 11 <$ string "Nov" ...
343
month = 1 <$ string "Jan" <|> 2 <$ string "Feb" <|> 3 <$ string "Mar" <|> 4 <$ string "Apr" <|> 5 <$ string "May" <|> 6 <$ string "Jun" <|> 7 <$ string "Jul" <|> 8 <$ string "Aug" <|> 9 <$ string "Sep" <|> 10 <$ string "Oct" <|> 11 <$ string "Nov" <|> 12 <$ string "D...
323
false
true
33
6
117
175
87
88
null
null
zalora/redsift
redsift.hs
gpl-3.0
defaultConfigFile :: FilePath defaultConfigFile = "./Config/redsift.config"
75
defaultConfigFile :: FilePath defaultConfigFile = "./Config/redsift.config"
75
defaultConfigFile = "./Config/redsift.config"
45
false
true
0
4
5
11
6
5
null
null
kidaa/taygeta
src/Taygeta/Parser/Utils.hs
apache-2.0
isParen :: Char -> Bool isParen '(' = True
42
isParen :: Char -> Bool isParen '(' = True
42
isParen '(' = True
18
false
true
0
5
8
18
9
9
null
null
githubkleon/ConvenientHDL
src/Language/Cynide/PrettyPrint.hs
bsd-3-clause
ppItem (InOutDeclItem x) = ppInOutDecl x
44
ppItem (InOutDeclItem x) = ppInOutDecl x
44
ppItem (InOutDeclItem x) = ppInOutDecl x
44
false
false
0
6
9
19
8
11
null
null
olsner/ghc
compiler/prelude/THNames.hs
bsd-3-clause
matchQTyConName, clauseQTyConName, expQTyConName, stmtQTyConName, decQTyConName, conQTyConName, bangTypeQTyConName, varBangTypeQTyConName, typeQTyConName, fieldExpQTyConName, patQTyConName, fieldPatQTyConName, predQTyConName, decsQTyConName, ruleBndrQTyConName, tySynEqnQTyConName, roleTyConName, der...
418
matchQTyConName, clauseQTyConName, expQTyConName, stmtQTyConName, decQTyConName, conQTyConName, bangTypeQTyConName, varBangTypeQTyConName, typeQTyConName, fieldExpQTyConName, patQTyConName, fieldPatQTyConName, predQTyConName, decsQTyConName, ruleBndrQTyConName, tySynEqnQTyConName, roleTyConName, der...
418
matchQTyConName = libTc (fsLit "MatchQ") matchQTyConKey
71
false
true
0
7
61
56
45
11
null
null
39aldo39/klfc
src/Lookup/Tmk.hs
gpl-3.0
posAndTmkAction ∷ [(Pos, String)] posAndTmkAction = [ (P.Tilde, "GRV") , (P.Tilde, "GRAVE") , (P.Tilde, "ZKHK") , (P.N1, "1") , (P.N2, "2") , (P.N3, "3") , (P.N4, "4") , (P.N5, "5") , (P.N6, "6") , (P.N7, "7") , (P.N8, "8") , (P.N9, "9") , (P.N0, "0") , (P.Minus, ...
5,765
posAndTmkAction ∷ [(Pos, String)] posAndTmkAction = [ (P.Tilde, "GRV") , (P.Tilde, "GRAVE") , (P.Tilde, "ZKHK") , (P.N1, "1") , (P.N2, "2") , (P.N3, "3") , (P.N4, "4") , (P.N5, "5") , (P.N6, "6") , (P.N7, "7") , (P.N8, "8") , (P.N9, "9") , (P.N0, "0") , (P.Minus, ...
5,765
posAndTmkAction = [ (P.Tilde, "GRV") , (P.Tilde, "GRAVE") , (P.Tilde, "ZKHK") , (P.N1, "1") , (P.N2, "2") , (P.N3, "3") , (P.N4, "4") , (P.N5, "5") , (P.N6, "6") , (P.N7, "7") , (P.N8, "8") , (P.N9, "9") , (P.N0, "0") , (P.Minus, "MINS") , (P.Minus, "MINUS") ...
5,731
false
true
0
7
1,618
2,518
1,602
916
null
null
Hodapp87/ivory
ivory-backend-c/src/Ivory/Compile/C/Gen.hs
bsd-3-clause
exp2 :: [C.Exp] -> C.Exp exp2 = flip (!!) 2
43
exp2 :: [C.Exp] -> C.Exp exp2 = flip (!!) 2
43
exp2 = flip (!!) 2
18
false
true
0
8
9
35
17
18
null
null
tanakh/MonadPoint
src/MonadPoint/Presentation.hs
bsd-3-clause
pageConcat :: [Component] -> Component pageConcat ps = head ret where totl = length ps qs = map (\(p, i) -> seq p $ scl 0.9 $ sclrd 0.05 0.05 $ TextComponent False AlignLeft $ show i ++ "/"++ show totl) $ zip ps [1..] ret = [ prp (n...
658
pageConcat :: [Component] -> Component pageConcat ps = head ret where totl = length ps qs = map (\(p, i) -> seq p $ scl 0.9 $ sclrd 0.05 0.05 $ TextComponent False AlignLeft $ show i ++ "/"++ show totl) $ zip ps [1..] ret = [ prp (nx...
657
pageConcat ps = head ret where totl = length ps qs = map (\(p, i) -> seq p $ scl 0.9 $ sclrd 0.05 0.05 $ TextComponent False AlignLeft $ show i ++ "/"++ show totl) $ zip ps [1..] ret = [ prp (nxp p (ix+1)) (ix-1) | (p, ix)...
618
false
true
15
14
290
376
165
211
null
null
nikita-volkov/laika
library/Laika/Parsing/XMLTree.hs
mit
lazyText :: C.Text -> Either Text [Node] lazyText = first interpretError . D.eitherResult . D.parse (B.nodes <* A.endOfInput) where interpretError x = fromString (showString "XML parsing error: " x)
212
lazyText :: C.Text -> Either Text [Node] lazyText = first interpretError . D.eitherResult . D.parse (B.nodes <* A.endOfInput) where interpretError x = fromString (showString "XML parsing error: " x)
212
lazyText = first interpretError . D.eitherResult . D.parse (B.nodes <* A.endOfInput) where interpretError x = fromString (showString "XML parsing error: " x)
171
false
true
0
9
42
76
37
39
null
null
sergv/vector
Data/Vector/Generic.hs
bsd-3-clause
unstablePartition f = unstablePartition_stream f . stream
57
unstablePartition f = unstablePartition_stream f . stream
57
unstablePartition f = unstablePartition_stream f . stream
57
false
false
1
6
6
20
7
13
null
null
prowdsponsor/esqueleto
src/Database/Esqueleto/Internal/Sql.hs
bsd-3-clause
initialIdentState :: IdentState initialIdentState = IdentState mempty
69
initialIdentState :: IdentState initialIdentState = IdentState mempty
69
initialIdentState = IdentState mempty
37
false
true
0
5
6
14
7
7
null
null
pdbartlett/misc-stuff
unfuddle/PdbMisc/Haskell/HelloHaskell/par.hs
apache-2.0
fac n = n * fac (n - 1)
23
fac n = n * fac (n - 1)
23
fac n = n * fac (n - 1)
23
false
false
0
8
8
23
11
12
null
null
pernas/Primes
Primes.hs
unlicense
-------------------------------------------------------------------------------- -- the longer is the randomList, the higher is the accuracy of the test isPrime :: (RandomGen g, Integral a, Random a) => g -> a -> Bool isPrime seed can = isPrimePure can $ randomList seed (2,can-2) 20
283
isPrime :: (RandomGen g, Integral a, Random a) => g -> a -> Bool isPrime seed can = isPrimePure can $ randomList seed (2,can-2) 20
130
isPrime seed can = isPrimePure can $ randomList seed (2,can-2) 20
65
true
true
2
9
39
77
38
39
null
null
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Monad.hs
gpl-3.0
mkUGraphM :: (GraphM m gr) => [Node] -> [Edge] -> m (gr () ()); mkUGraphM vs es = mkGraphM (labUNodes vs) (labUEdges es)
122
mkUGraphM :: (GraphM m gr) => [Node] -> [Edge] -> m (gr () ()) mkUGraphM vs es = mkGraphM (labUNodes vs) (labUEdges es)
119
mkUGraphM vs es = mkGraphM (labUNodes vs) (labUEdges es)
56
false
true
1
11
24
81
39
42
null
null
codeq/language-go
src/Language/Go/LexerUtils.hs
mit
keywords :: Map.Map String (SrcSpan -> Token) keywords = Map.fromList keywordNames
82
keywords :: Map.Map String (SrcSpan -> Token) keywords = Map.fromList keywordNames
82
keywords = Map.fromList keywordNames
36
false
true
0
7
10
30
15
15
null
null
DanielWaterworth/Idris-dev
src/Idris/WhoCalls.hs
bsd-3-clause
occursDef n (CaseOp _ ty _ _ _ defs) = occurs n ty || occursSC n (snd (cases_compiletime defs))
95
occursDef n (CaseOp _ ty _ _ _ defs) = occurs n ty || occursSC n (snd (cases_compiletime defs))
95
occursDef n (CaseOp _ ty _ _ _ defs) = occurs n ty || occursSC n (snd (cases_compiletime defs))
95
false
false
0
10
18
55
25
30
null
null
Peaker/lamdu
src/Lamdu/Builtins/Anchors.hs
gpl-3.0
genericVarTag :: Tag genericVarTag = -- This random UUID was generated in the stdlib prior to being a "builtin" "\xa3\x86\xd9\x80\xd9os$Q\xf7\xb7\xb7\xeb\xab\x44\x1c"
174
genericVarTag :: Tag genericVarTag = -- This random UUID was generated in the stdlib prior to being a "builtin" "\xa3\x86\xd9\x80\xd9os$Q\xf7\xb7\xb7\xeb\xab\x44\x1c"
174
genericVarTag = -- This random UUID was generated in the stdlib prior to being a "builtin" "\xa3\x86\xd9\x80\xd9os$Q\xf7\xb7\xb7\xeb\xab\x44\x1c"
153
false
true
0
6
27
19
8
11
null
null
ezyang/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
cmpAltCon (LitAlt _) DEFAULT = GT
40
cmpAltCon (LitAlt _) DEFAULT = GT
40
cmpAltCon (LitAlt _) DEFAULT = GT
40
false
false
0
7
12
17
8
9
null
null
arianvp/binary-serialise-cbor
Data/Binary/Serialise/CBOR/FlatTerm.hs
bsd-3-clause
fromFlatTerm :: Decoder a -- ^ A @'Dec.Decoder'@ for a serialized value. -> FlatTerm -- ^ The serialized @'FlatTerm'@. -> Either String a -- ^ The deserialized value, or an error. fromFlatTerm decoder ft = go (getDecodeAction decoder) ft where go (ConsumeWord k) (TkInt ...
8,377
fromFlatTerm :: Decoder a -- ^ A @'Dec.Decoder'@ for a serialized value. -> FlatTerm -- ^ The serialized @'FlatTerm'@. -> Either String a fromFlatTerm decoder ft = go (getDecodeAction decoder) ft where go (ConsumeWord k) (TkInt n : ts) | n >= 0 ...
8,335
fromFlatTerm decoder ft = go (getDecodeAction decoder) ft where go (ConsumeWord k) (TkInt n : ts) | n >= 0 = go (k (unW# (fromIntegral n))) ts go (ConsumeWord k) (TkInteger n : ts) | n >= 0 = go (k (unW# (fromIntegral n))) ts ...
8,158
true
true
0
15
2,755
3,529
1,709
1,820
null
null
zeyuanxy/haskell-playground
write-yourself-a-scheme/chap7/main.hs
mit
unpackEquals :: LispVal -> LispVal -> Unpacker -> ThrowsError Bool unpackEquals arg1 arg2 (AnyUnpacker unpacker) = do unpacked1 <- unpacker arg1 unpacked2 <- unpacker arg2 return $ unpacked1 == unpacked2 `catchError` (const $ return False)
247
unpackEquals :: LispVal -> LispVal -> Unpacker -> ThrowsError Bool unpackEquals arg1 arg2 (AnyUnpacker unpacker) = do unpacked1 <- unpacker arg1 unpacked2 <- unpacker arg2 return $ unpacked1 == unpacked2 `catchError` (const $ return False)
247
unpackEquals arg1 arg2 (AnyUnpacker unpacker) = do unpacked1 <- unpacker arg1 unpacked2 <- unpacker arg2 return $ unpacked1 == unpacked2 `catchError` (const $ return False)
180
false
true
0
9
42
90
42
48
null
null
xmonad/xmonad-contrib
XMonad/Config/Dmwit.hs
bsd-3-clause
xmobarCommand (S s) = unwords ["xmobar", "-x", show s, "-t", template s, "-C", pipeReader ] where template 0 = "}%focus%{%workspaces%" template _ = "%date%}%focus%{%workspaces%" pipeReader = "'[\ \Run PipeReader \"" ++ pipeName "focus" s ++ "\" \"focus\",\ \Run PipeR...
392
xmobarCommand (S s) = unwords ["xmobar", "-x", show s, "-t", template s, "-C", pipeReader ] where template 0 = "}%focus%{%workspaces%" template _ = "%date%}%focus%{%workspaces%" pipeReader = "'[\ \Run PipeReader \"" ++ pipeName "focus" s ++ "\" \"focus\",\ \Run PipeR...
392
xmobarCommand (S s) = unwords ["xmobar", "-x", show s, "-t", template s, "-C", pipeReader ] where template 0 = "}%focus%{%workspaces%" template _ = "%date%}%focus%{%workspaces%" pipeReader = "'[\ \Run PipeReader \"" ++ pipeName "focus" s ++ "\" \"focus\",\ \Run PipeR...
392
false
false
0
9
108
95
48
47
null
null
apyrgio/snf-ganeti
src/Ganeti/HTools/Backend/Luxi.hs
bsd-2-clause
annotateConvert :: String -> String -> String -> Result a -> Result a annotateConvert otype oname oattr = annotateResult $ otype ++ " '" ++ oname ++ "', error while reading attribute '" ++ oattr ++ "'"
207
annotateConvert :: String -> String -> String -> Result a -> Result a annotateConvert otype oname oattr = annotateResult $ otype ++ " '" ++ oname ++ "', error while reading attribute '" ++ oattr ++ "'"
207
annotateConvert otype oname oattr = annotateResult $ otype ++ " '" ++ oname ++ "', error while reading attribute '" ++ oattr ++ "'"
137
false
true
2
9
42
70
32
38
null
null
fxmy/haskell-book-exercise
src/Wat.hs
gpl-3.0
flipMaybe (Just a : rest) = case flipMaybe rest of Nothing -> Nothing Just as -> Just $ a:as
108
flipMaybe (Just a : rest) = case flipMaybe rest of Nothing -> Nothing Just as -> Just $ a:as
108
flipMaybe (Just a : rest) = case flipMaybe rest of Nothing -> Nothing Just as -> Just $ a:as
108
false
false
0
9
34
50
23
27
null
null
judge0/api-base
tests/ghc/main.hs
gpl-3.0
main = do str <- getLine printf "hello, %s\n" str
57
main = do str <- getLine printf "hello, %s\n" str
57
main = do str <- getLine printf "hello, %s\n" str
57
false
false
0
7
17
21
9
12
null
null
ekmett/time-series
src/Data/Time/Series/Literal.hs
bsd-3-clause
double :: Literate t => Double -> t Double double a = _Literal # Double a
73
double :: Literate t => Double -> t Double double a = _Literal # Double a
73
double a = _Literal # Double a
30
false
true
0
7
15
35
16
19
null
null
mboes/dedukti
Dedukti/Module.hs
gpl-3.0
objPathFromModule :: MName -> FilePath objPathFromModule = pathFromModule ".dko"
80
objPathFromModule :: MName -> FilePath objPathFromModule = pathFromModule ".dko"
80
objPathFromModule = pathFromModule ".dko"
41
false
true
0
5
8
18
9
9
null
null
joelburget/material-ui-hs
src/React/MaterialUI/Elements.hs
mit
raisedButton :: [AttrOrHandler s] -> ReactNode s raisedButton attrs = foreignLeaf mui_raisedButton attrs ()
107
raisedButton :: [AttrOrHandler s] -> ReactNode s raisedButton attrs = foreignLeaf mui_raisedButton attrs ()
107
raisedButton attrs = foreignLeaf mui_raisedButton attrs ()
58
false
true
0
7
13
36
17
19
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/RefType.hs
bsd-3-clause
isDecreasing autoenv _ (RApp c _ _ _) = isJust (sizeFunction (rtc_info c)) -- user specified size or || isSizeable autoenv tc where tc = rtc_tc c
153
isDecreasing autoenv _ (RApp c _ _ _) = isJust (sizeFunction (rtc_info c)) -- user specified size or || isSizeable autoenv tc where tc = rtc_tc c
153
isDecreasing autoenv _ (RApp c _ _ _) = isJust (sizeFunction (rtc_info c)) -- user specified size or || isSizeable autoenv tc where tc = rtc_tc c
153
false
false
1
9
34
56
27
29
null
null
imccoy/utopia
src/Code.hs
mit
frameResult :: Exp -> Exp frameResult frame = app (var "frameResult") [("frameResult_frame", frame)]
124
frameResult :: Exp -> Exp frameResult frame = app (var "frameResult") [("frameResult_frame", frame)]
124
frameResult frame = app (var "frameResult") [("frameResult_frame", frame)]
98
false
true
0
7
36
44
21
23
null
null
OS2World/DEV-UTIL-HUGS
oldlib/PatriciaLoMap.hs
bsd-3-clause
insertWith f k x t@(L j y) = if j == k then L k (f x y) else join k (L k x) j t
79
insertWith f k x t@(L j y) = if j == k then L k (f x y) else join k (L k x) j t
79
insertWith f k x t@(L j y) = if j == k then L k (f x y) else join k (L k x) j t
79
false
false
0
8
25
68
34
34
null
null
sbditto85/parsedsltest
test/Generators.hs
apache-2.0
replaceSlash [] = []
20
replaceSlash [] = []
20
replaceSlash [] = []
20
false
false
0
6
3
13
6
7
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
esActionGrow :: String esActionGrow = "grow"
44
esActionGrow :: String esActionGrow = "grow"
44
esActionGrow = "grow"
21
false
true
0
6
5
18
7
11
null
null
UBMLtonGroup/timberc
src/Common.hs
bsd-3-clause
delete k (x:xs) | fst x == k = xs | otherwise = x : delete k xs
102
delete k (x:xs) | fst x == k = xs | otherwise = x : delete k xs
102
delete k (x:xs) | fst x == k = xs | otherwise = x : delete k xs
102
false
false
1
9
56
47
22
25
null
null
mmachenry/final-fortune
src/Card.hs
bsd-2-clause
isColor :: Color -> Card -> Bool isColor color card = color `elem` cardColors card
82
isColor :: Color -> Card -> Bool isColor color card = color `elem` cardColors card
82
isColor color card = color `elem` cardColors card
49
false
true
0
8
14
38
18
20
null
null
sdiehl/ghc
compiler/GHC/Iface/Ext/Utils.hs
bsd-3-clause
hieTypeToIface :: HieTypeFix -> IfaceType hieTypeToIface = foldType go where go (HTyVarTy n) = IfaceTyVar $ occNameFS $ getOccName n go (HAppTy a b) = IfaceAppTy a (hieToIfaceArgs b) go (HLitTy l) = IfaceLitTy l go (HForAllTy ((n,k),af) t) = let b = (occNameFS $ getOccName n, k) ...
936
hieTypeToIface :: HieTypeFix -> IfaceType hieTypeToIface = foldType go where go (HTyVarTy n) = IfaceTyVar $ occNameFS $ getOccName n go (HAppTy a b) = IfaceAppTy a (hieToIfaceArgs b) go (HLitTy l) = IfaceLitTy l go (HForAllTy ((n,k),af) t) = let b = (occNameFS $ getOccName n, k) ...
936
hieTypeToIface = foldType go where go (HTyVarTy n) = IfaceTyVar $ occNameFS $ getOccName n go (HAppTy a b) = IfaceAppTy a (hieToIfaceArgs b) go (HLitTy l) = IfaceLitTy l go (HForAllTy ((n,k),af) t) = let b = (occNameFS $ getOccName n, k) in IfaceForAllTy (Bndr (IfaceT...
894
false
true
17
13
264
356
182
174
null
null
li-zhirui/EoplLangs
src/CallByReference/Parser.hs
bsd-3-clause
unaryOpsMap :: [(String, UnaryOp)] unaryOpsMap = [ ("minus", Minus), ("zero?", IsZero) ]
90
unaryOpsMap :: [(String, UnaryOp)] unaryOpsMap = [ ("minus", Minus), ("zero?", IsZero) ]
90
unaryOpsMap = [ ("minus", Minus), ("zero?", IsZero) ]
55
false
true
0
6
13
38
24
14
null
null