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
keera-studios/hsQt
Qtc/Gui/QGraphicsSimpleTextItem.hs
bsd-2-clause
qGraphicsSimpleTextItem_delete1 :: QGraphicsSimpleTextItem a -> IO () qGraphicsSimpleTextItem_delete1 x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsSimpleTextItem_delete1 cobj_x0
187
qGraphicsSimpleTextItem_delete1 :: QGraphicsSimpleTextItem a -> IO () qGraphicsSimpleTextItem_delete1 x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsSimpleTextItem_delete1 cobj_x0
187
qGraphicsSimpleTextItem_delete1 x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsSimpleTextItem_delete1 cobj_x0
117
false
true
0
7
22
41
19
22
null
null
ekr/tamarin-prover
lib/theory/src/Theory/Tools/Wellformedness.hs
gpl-3.0
publicNamesReport :: OpenTheory -> WfErrorReport publicNamesReport thy = case findClashes publicNames of [] -> [] clashes -> return $ (,) topic $ numbered' $ map (nest 2 . fsep . punctuate comma . map ppRuleAndName) clashes where topic = "public names with mismatching capitali...
698
publicNamesReport :: OpenTheory -> WfErrorReport publicNamesReport thy = case findClashes publicNames of [] -> [] clashes -> return $ (,) topic $ numbered' $ map (nest 2 . fsep . punctuate comma . map ppRuleAndName) clashes where topic = "public names with mismatching capitali...
698
publicNamesReport thy = case findClashes publicNames of [] -> [] clashes -> return $ (,) topic $ numbered' $ map (nest 2 . fsep . punctuate comma . map ppRuleAndName) clashes where topic = "public names with mismatching capitalization" publicNames = do ru <- thyPro...
649
false
true
0
14
194
222
110
112
null
null
deech/fltkhs-demos
src/Examples/table-simple.hs
mit
tableData :: [[Int]] tableData = let rowIndices = [0 .. (maxRows - 1)] colIndices = [0 .. (maxCols - 1)] in map (\r -> map (\c -> 1000 + (r * 1000) + c) colIndices) rowIndices
197
tableData :: [[Int]] tableData = let rowIndices = [0 .. (maxRows - 1)] colIndices = [0 .. (maxCols - 1)] in map (\r -> map (\c -> 1000 + (r * 1000) + c) colIndices) rowIndices
197
tableData = let rowIndices = [0 .. (maxRows - 1)] colIndices = [0 .. (maxCols - 1)] in map (\r -> map (\c -> 1000 + (r * 1000) + c) colIndices) rowIndices
176
false
true
0
16
57
100
56
44
null
null
rsasse/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/Reduction.hs
gpl-3.0
-- | Insert a goal and its status with a new age. Merge status if goal exists. insertGoalStatus :: Goal -> GoalStatus -> Reduction () insertGoalStatus goal status = do age <- getM sNextGoalNr modM sGoals $ M'.insertWith combineGoalStatus goal (set gsNr age status) sNextGoalNr =: succ age -- | Insert a 'Goa...
341
insertGoalStatus :: Goal -> GoalStatus -> Reduction () insertGoalStatus goal status = do age <- getM sNextGoalNr modM sGoals $ M'.insertWith combineGoalStatus goal (set gsNr age status) sNextGoalNr =: succ age -- | Insert a 'Goal' and store its age.
262
insertGoalStatus goal status = do age <- getM sNextGoalNr modM sGoals $ M'.insertWith combineGoalStatus goal (set gsNr age status) sNextGoalNr =: succ age -- | Insert a 'Goal' and store its age.
207
true
true
0
10
69
80
37
43
null
null
farrellm/advent
src/Day9.hs
mit
lexer = P.makeTokenParser emptyDef
39
lexer = P.makeTokenParser emptyDef
39
lexer = P.makeTokenParser emptyDef
39
false
false
0
6
8
11
5
6
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/mod_1.hs
mit
stop :: MyBool -> a; stop MyFalse = stop MyFalse
50
stop :: MyBool -> a stop MyFalse = stop MyFalse
49
stop MyFalse = stop MyFalse
27
false
true
0
5
11
22
11
11
null
null
thlorenz/WebToInk
webtoink-converter/Data/List/Utils.hs
bsd-2-clause
uniq (x:xs) = x : uniq (filter (/= x) xs)
41
uniq (x:xs) = x : uniq (filter (/= x) xs)
41
uniq (x:xs) = x : uniq (filter (/= x) xs)
41
false
false
2
8
9
38
18
20
null
null
scvalex/ltorrent
System/Configuration.hs
lgpl-3.0
readConfig :: (IsByteString a) => [String] -> IO a readConfig ks = do ltd <- getLTorrentDir let k = foldl' (</>) ltd ("config":ks) e <- doesFileExist k if not e then fail "key not found" else do withBinaryFile k ReadMode $ \h -> do txt <- L.hGetContents h if...
559
readConfig :: (IsByteString a) => [String] -> IO a readConfig ks = do ltd <- getLTorrentDir let k = foldl' (</>) ltd ("config":ks) e <- doesFileExist k if not e then fail "key not found" else do withBinaryFile k ReadMode $ \h -> do txt <- L.hGetContents h if...
559
readConfig ks = do ltd <- getLTorrentDir let k = foldl' (</>) ltd ("config":ks) e <- doesFileExist k if not e then fail "key not found" else do withBinaryFile k ReadMode $ \h -> do txt <- L.hGetContents h if L.length txt > 0 then return $ ...
507
false
true
0
17
189
153
74
79
null
null
uduki/hsQt
Qtc/Enums/Gui/QPainterPath.hs
bsd-2-clause
eCurveToDataElement :: ElementType eCurveToDataElement = ieElementType $ 3
76
eCurveToDataElement :: ElementType eCurveToDataElement = ieElementType $ 3
76
eCurveToDataElement = ieElementType $ 3
41
false
true
2
6
9
23
9
14
null
null
hvr/multi-ghc-travis
src/HaskellCI/Config/HLint.hs
bsd-3-clause
hlintConfigGrammar :: (OptionsGrammar c g, Applicative (g HLintConfig), c (Identity HLintJob)) => g HLintConfig HLintConfig hlintConfigGrammar = HLintConfig <$> C.booleanFieldDef "hlint" (field @"cfgHLintEnabled") False ^^^ help "Enable HLint job" <*>...
1,140
hlintConfigGrammar :: (OptionsGrammar c g, Applicative (g HLintConfig), c (Identity HLintJob)) => g HLintConfig HLintConfig hlintConfigGrammar = HLintConfig <$> C.booleanFieldDef "hlint" (field @"cfgHLintEnabled") False ^^^ help "Enable HLint job" <*>...
1,140
hlintConfigGrammar = HLintConfig <$> C.booleanFieldDef "hlint" (field @"cfgHLintEnabled") False ^^^ help "Enable HLint job" <*> C.optionalFieldDef "hlint-job" (field @"cfgHLintJob") HLintJobLatest ^^^ metahelp "...
1,008
false
true
29
9
346
283
128
155
null
null
olsner/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- 'trivial*Code': deal with trivial instructions -- Trivial (dyadic: 'trivialCode', floating-point: 'trivialFCode', -- unary: 'trivialUCode', unary fl-pt:'trivialUFCode') instructions. -- Only look for constants on the right hand side, b...
2,054
trivialCode :: Width -> Bool -> (Reg -> Reg -> RI -> Instr) -> CmmExpr -> CmmExpr -> NatM Register trivialCode rep signed instr x (CmmLit (CmmInt y _)) | Just imm <- makeImmediate rep signed y = do (src1, code1) <- getSomeReg x let code dst = code1...
398
trivialCode rep signed instr x (CmmLit (CmmInt y _)) | Just imm <- makeImmediate rep signed y = do (src1, code1) <- getSomeReg x let code dst = code1 `snocOL` instr dst src1 (RIImm imm) return (Any (intFormat rep) code)
251
true
true
0
15
424
176
88
88
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSQL_C_TIME :: Int wxSQL_C_TIME = 10
37
wxSQL_C_TIME :: Int wxSQL_C_TIME = 10
37
wxSQL_C_TIME = 10
17
false
true
0
4
5
11
6
5
null
null
profan/mal
haskell/Core.hs
mpl-2.0
count (Nil:[]) = return $ MalNumber 0
49
count (Nil:[]) = return $ MalNumber 0
49
count (Nil:[]) = return $ MalNumber 0
49
false
false
0
8
18
25
12
13
null
null
rfranek/duckling
Duckling/Time/EN/Rules.hs
bsd-3-clause
-- Specific for time-of-day, to help resolve ambiguities ruleIntervalTODDash :: Rule ruleIntervalTODDash = Rule { name = "<time-of-day> - <time-of-day> (interval)" , pattern = [ Predicate $ liftM2 (&&) isNotLatent isATimeOfDay , regex "\\-|:|to|th?ru|through|(un)?til(l)?" , Predicate isATimeOfDay ] ...
477
ruleIntervalTODDash :: Rule ruleIntervalTODDash = Rule { name = "<time-of-day> - <time-of-day> (interval)" , pattern = [ Predicate $ liftM2 (&&) isNotLatent isATimeOfDay , regex "\\-|:|to|th?ru|through|(un)?til(l)?" , Predicate isATimeOfDay ] , prod = \tokens -> case tokens of (Token Time td...
420
ruleIntervalTODDash = Rule { name = "<time-of-day> - <time-of-day> (interval)" , pattern = [ Predicate $ liftM2 (&&) isNotLatent isATimeOfDay , regex "\\-|:|to|th?ru|through|(un)?til(l)?" , Predicate isATimeOfDay ] , prod = \tokens -> case tokens of (Token Time td1:_:Token Time td2:_) -> ...
392
true
true
0
16
106
126
66
60
null
null
brendanhay/gogol
gogol-docs/gen/Network/Google/Docs/Types/Product.hs
mpl-2.0
-- | The width of the border. tcboWidth :: Lens' TableCellBOrder (Maybe Dimension) tcboWidth = lens _tcboWidth (\ s a -> s{_tcboWidth = a})
141
tcboWidth :: Lens' TableCellBOrder (Maybe Dimension) tcboWidth = lens _tcboWidth (\ s a -> s{_tcboWidth = a})
111
tcboWidth = lens _tcboWidth (\ s a -> s{_tcboWidth = a})
58
true
true
0
9
25
48
25
23
null
null
ekmett/ghc
compiler/cmm/Hoopl.hs
bsd-3-clause
_frewrite_cps :: ((Graph n e x, FwdRewrite UniqSM n f) -> UniqSM a) -> UniqSM a -> (forall e x . n e x -> f -> UniqSM (Maybe (Graph n e x, FwdRewrite UniqSM n f))) -> n e x -> f -> UniqSM a _frewrite_cps j n rw node f = do mg <- rw node f case ...
420
_frewrite_cps :: ((Graph n e x, FwdRewrite UniqSM n f) -> UniqSM a) -> UniqSM a -> (forall e x . n e x -> f -> UniqSM (Maybe (Graph n e x, FwdRewrite UniqSM n f))) -> n e x -> f -> UniqSM a _frewrite_cps j n rw node f = do mg <- rw node f case ...
420
_frewrite_cps j n rw node f = do mg <- rw node f case mg of Nothing -> n Just gr -> j gr -- | Function inspired by 'add' in the paper
165
false
true
0
16
175
172
83
89
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeReservedInstancesOfferings.hs
mpl-2.0
-- | The Availability Zone in which the Reserved Instance can be used. drioAvailabilityZone :: Lens' DescribeReservedInstancesOfferings (Maybe Text) drioAvailabilityZone = lens _drioAvailabilityZone (\ s a -> s{_drioAvailabilityZone = a})
238
drioAvailabilityZone :: Lens' DescribeReservedInstancesOfferings (Maybe Text) drioAvailabilityZone = lens _drioAvailabilityZone (\ s a -> s{_drioAvailabilityZone = a})
167
drioAvailabilityZone = lens _drioAvailabilityZone (\ s a -> s{_drioAvailabilityZone = a})
89
true
true
0
9
29
46
25
21
null
null
rahulmutt/ghcvm
libraries/eta-meta/Language/Eta/Meta/Ppr.hs
bsd-3-clause
-- Argument of an infix operator unopPrec = 1
45
unopPrec = 1
12
unopPrec = 1
12
true
false
1
5
8
11
4
7
null
null
PierreR/streaming
benchmarks/old/Stream/Prelude/Folding.hs
bsd-3-clause
iterateM_ :: Monad m => (a -> m a) -> m a -> Folding_ (Of a) m r iterateM_ f ma = \construct wrap done -> let loop mx = wrap $ liftM (\x -> construct (x :> loop (f x))) mx in loop ma
192
iterateM_ :: Monad m => (a -> m a) -> m a -> Folding_ (Of a) m r iterateM_ f ma = \construct wrap done -> let loop mx = wrap $ liftM (\x -> construct (x :> loop (f x))) mx in loop ma
192
iterateM_ f ma = \construct wrap done -> let loop mx = wrap $ liftM (\x -> construct (x :> loop (f x))) mx in loop ma
127
false
true
0
19
54
119
57
62
null
null
maciej-bendkowski/boltzmann-brain
Data/Boltzmann/Compiler/Haskell/Algebraic.hs
bsd-3-clause
maybeTType :: Type () -> Type () maybeTType = TyApp () (TyApp () maybeT' (TyApp () buffonMachine' g'))
102
maybeTType :: Type () -> Type () maybeTType = TyApp () (TyApp () maybeT' (TyApp () buffonMachine' g'))
102
maybeTType = TyApp () (TyApp () maybeT' (TyApp () buffonMachine' g'))
69
false
true
0
10
17
61
28
33
null
null
kylcarte/wangtiles
src/Util.hs
bsd-3-clause
-- }}} -- Pretty Printing {{{ addLine :: String -> String -> String addLine l1 l2 = l1 ++ "\n" ++ l2
102
addLine :: String -> String -> String addLine l1 l2 = l1 ++ "\n" ++ l2
70
addLine l1 l2 = l1 ++ "\n" ++ l2
32
true
true
0
6
23
34
18
16
null
null
fpoli/abstat
src/While/Parser.hs
gpl-3.0
aTerm :: Parser AExpr aTerm = parens aExpression <|> liftM Var identifier <|> liftM IntConst integer
111
aTerm :: Parser AExpr aTerm = parens aExpression <|> liftM Var identifier <|> liftM IntConst integer
111
aTerm = parens aExpression <|> liftM Var identifier <|> liftM IntConst integer
89
false
true
6
6
26
49
21
28
null
null
sternenseemann/gopher-proxy
src/GopherProxy/Protocol.hs
gpl-3.0
gopherFileParser :: Parser GopherResponse gopherFileParser = FileResponse <$> takeLazyByteString
96
gopherFileParser :: Parser GopherResponse gopherFileParser = FileResponse <$> takeLazyByteString
96
gopherFileParser = FileResponse <$> takeLazyByteString
54
false
true
0
5
8
18
9
9
null
null
elben/lambda-core
src/LambdaCore/Parser.hs
bsd-3-clause
-- | Parse string. -- -- >>> parse parseString "" "\"Hello\"" -- Right (Lit (StringV "Hello")) -- -- >>> parse parseString "" "\"\"" -- Right (Lit (StringV "")) -- -- >>> isLeft $ parse parseString "" "Hello" -- True -- -- >>> isLeft $ parse parseString "" "\"Hello" -- True -- parseString :: Parser Exp parseString = do...
616
parseString :: Parser Exp parseString = do s <- between (char '"') (char '"') (many (noneOf "\"")) return $ Lit (StringV s) -- | Parse Boolean. -- -- >>> parse parseBool "" "true" -- Right (Lit (BoolV True)) -- -- >>> parse parseBool "" "false" -- Right (Lit (BoolV False)) -- -- >>> isLeft $ parse parseBool "" "\"...
338
parseString = do s <- between (char '"') (char '"') (many (noneOf "\"")) return $ Lit (StringV s) -- | Parse Boolean. -- -- >>> parse parseBool "" "true" -- Right (Lit (BoolV True)) -- -- >>> parse parseBool "" "false" -- Right (Lit (BoolV False)) -- -- >>> isLeft $ parse parseBool "" "\"true\"" -- True --
312
true
true
0
12
117
93
57
36
null
null
bitemyapp/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pSrcPath :: Field pSrcPath = withDoc "Source directory for import" $ optionalNEStringField "src_path"
105
pSrcPath :: Field pSrcPath = withDoc "Source directory for import" $ optionalNEStringField "src_path"
105
pSrcPath = withDoc "Source directory for import" $ optionalNEStringField "src_path"
87
false
true
0
6
16
21
10
11
null
null
hguenther/nbis
Realization.hs
agpl-3.0
realizeInstruction :: (Ord ptr,Enum ptr,Enum mem) => (InstrDesc Operand,Maybe Integer) -> Realization mem ptr (Maybe (BlockFinalization ptr)) realizeInstruction (ITerminator (IRet e),_) = reSetReturn *> (Just . Return . Just <$> argToExpr e)
241
realizeInstruction :: (Ord ptr,Enum ptr,Enum mem) => (InstrDesc Operand,Maybe Integer) -> Realization mem ptr (Maybe (BlockFinalization ptr)) realizeInstruction (ITerminator (IRet e),_) = reSetReturn *> (Just . Return . Just <$> argToExpr e)
241
realizeInstruction (ITerminator (IRet e),_) = reSetReturn *> (Just . Return . Just <$> argToExpr e)
99
false
true
0
11
31
107
54
53
null
null
oulgen/CudaPy
py2cuda/src/Translation/Translate.hs
mit
extractRange _ = throwError "In correct number of range arguments"
66
extractRange _ = throwError "In correct number of range arguments"
66
extractRange _ = throwError "In correct number of range arguments"
66
false
false
0
5
9
12
5
7
null
null
rukokarasu/squigly-trace
src/Lib.hs
mit
-- | Called once per pixel. makeRay :: Ix2 -> Ix2 -> Camera -> Ray makeRay (w :. h) (y :. x) cam = let ww = fromIntegral w hh = fromIntegral h xoffs = (fromIntegral x - (ww / 2)) / ww yoffs = ((hh / 2) - fromIntegral y) / hh dir = V3 1 xoffs yoffs `rotVert` rotation cam in Ray (...
337
makeRay :: Ix2 -> Ix2 -> Camera -> Ray makeRay (w :. h) (y :. x) cam = let ww = fromIntegral w hh = fromIntegral h xoffs = (fromIntegral x - (ww / 2)) / ww yoffs = ((hh / 2) - fromIntegral y) / hh dir = V3 1 xoffs yoffs `rotVert` rotation cam in Ray (position cam) dir
309
makeRay (w :. h) (y :. x) cam = let ww = fromIntegral w hh = fromIntegral h xoffs = (fromIntegral x - (ww / 2)) / ww yoffs = ((hh / 2) - fromIntegral y) / hh dir = V3 1 xoffs yoffs `rotVert` rotation cam in Ray (position cam) dir
270
true
true
0
13
107
151
78
73
null
null
jstolarek/dep-typed-wbl-heaps-hs
src/TwoPassMerge/CombinedProofs.hs
bsd-3-clause
-- With the new definition of liftBound we can now define deleteMin. -- Implementation is a combination of earlier implementations. It uses -- liftBound (like the PriorityProof implmentation) and is total (like -- RankProof implementation). deleteMin :: Heap b (Succ r) -> Heap b r deleteMin (Node _ pgeb _ l r) = merge ...
357
deleteMin :: Heap b (Succ r) -> Heap b r deleteMin (Node _ pgeb _ l r) = merge (liftBound pgeb l) (liftBound pgeb r)
116
deleteMin (Node _ pgeb _ l r) = merge (liftBound pgeb l) (liftBound pgeb r)
75
true
true
0
8
59
73
37
36
null
null
bobatkey/Forvie
tests/LayoutHUnit.hs
bsd-3-clause
checkTestCase :: (T.Text, Maybe [Token]) -> Assertion checkTestCase (input, expectedOutput) = assertEqual "layout test case" (lexer input |>> doLayout |>> map lexemeTok |>| toList) expectedOutput
231
checkTestCase :: (T.Text, Maybe [Token]) -> Assertion checkTestCase (input, expectedOutput) = assertEqual "layout test case" (lexer input |>> doLayout |>> map lexemeTok |>| toList) expectedOutput
231
checkTestCase (input, expectedOutput) = assertEqual "layout test case" (lexer input |>> doLayout |>> map lexemeTok |>| toList) expectedOutput
177
false
true
0
10
60
66
34
32
null
null
alexisVallet/deep-banana
src/DeepBanana/Layer.hs
bsd-3-clause
combinePasses' :: (Monad m) => (inp -> m out) -> (inp -> out -> m (out -> inp)) -> Layer m a '[] inp out combinePasses' fwd bwd = noWeights $ \inp -> do out <- fwd inp bwd' <- bwd inp out return (out, bwd') -- Category instance fits recurrent composition. (shared weig...
324
combinePasses' :: (Monad m) => (inp -> m out) -> (inp -> out -> m (out -> inp)) -> Layer m a '[] inp out combinePasses' fwd bwd = noWeights $ \inp -> do out <- fwd inp bwd' <- bwd inp out return (out, bwd') -- Category instance fits recurrent composition. (shared weig...
324
combinePasses' fwd bwd = noWeights $ \inp -> do out <- fwd inp bwd' <- bwd inp out return (out, bwd') -- Category instance fits recurrent composition. (shared weights)
174
false
true
0
13
105
123
61
62
null
null
rahulmutt/ghcvm
compiler/Eta/HsSyn/HsExpr.hs
bsd-3-clause
ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True) = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]
105
ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True) = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]
105
ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True) = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]
105
false
false
0
6
15
42
20
22
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x1FB7' = "\x03B1\x0342\x0345"
45
decomposeChar '\x1FB7' = "\x03B1\x0342\x0345"
45
decomposeChar '\x1FB7' = "\x03B1\x0342\x0345"
45
false
false
0
4
3
10
4
6
null
null
rootmos/primes
haskell/primes.hs
gpl-3.0
start = 5697
12
start = 5697
12
start = 5697
12
false
false
0
4
2
6
3
3
null
null
shlevy/ghc
compiler/types/Coercion.hs
bsd-3-clause
mkForAllCo :: TyVar -> Coercion -> Coercion -> Coercion mkForAllCo tv kind_co co | Refl r ty <- co , Refl {} <- kind_co = Refl r (mkInvForAllTy tv ty) | otherwise = ForAllCo tv kind_co co
197
mkForAllCo :: TyVar -> Coercion -> Coercion -> Coercion mkForAllCo tv kind_co co | Refl r ty <- co , Refl {} <- kind_co = Refl r (mkInvForAllTy tv ty) | otherwise = ForAllCo tv kind_co co
197
mkForAllCo tv kind_co co | Refl r ty <- co , Refl {} <- kind_co = Refl r (mkInvForAllTy tv ty) | otherwise = ForAllCo tv kind_co co
141
false
true
0
9
46
97
42
55
null
null
tpsinnem/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
bCmp (ITFixed IT32) op [B32 x, B32 y] = Just $ I (if (op x y) then 1 else 0)
80
bCmp (ITFixed IT32) op [B32 x, B32 y] = Just $ I (if (op x y) then 1 else 0)
80
bCmp (ITFixed IT32) op [B32 x, B32 y] = Just $ I (if (op x y) then 1 else 0)
80
false
false
1
10
23
60
29
31
null
null
ion1/rrdgraph-haskell
Data/RRDGraph/Tests/CDef.hs
isc
stackProp :: [(String, f, [StackItem])] -> [CDef] -> (f -> CDef) -> Property stackProp ops cDefs opF = conjoin . flip map ops $ \(name, op, stack) -> let cDef = opF op in not (isConstant cDef) ==> assert (name ++ ": ") (==) (CDefStack cDefs stack) cDef
273
stackProp :: [(String, f, [StackItem])] -> [CDef] -> (f -> CDef) -> Property stackProp ops cDefs opF = conjoin . flip map ops $ \(name, op, stack) -> let cDef = opF op in not (isConstant cDef) ==> assert (name ++ ": ") (==) (CDefStack cDefs stack) cDef
273
stackProp ops cDefs opF = conjoin . flip map ops $ \(name, op, stack) -> let cDef = opF op in not (isConstant cDef) ==> assert (name ++ ": ") (==) (CDefStack cDefs stack) cDef
196
false
true
0
12
68
135
72
63
null
null
diffusionkinetics/open
fuml/lib/Fuml/Optimisation/SGD.hs
mit
sgdBatch :: SGDOpts -> (Vector Double -> Vector Double) -> Vector Double -> Vector Double sgdBatch opts grad p = p - scale (learning_rate opts) (grad p)
152
sgdBatch :: SGDOpts -> (Vector Double -> Vector Double) -> Vector Double -> Vector Double sgdBatch opts grad p = p - scale (learning_rate opts) (grad p)
152
sgdBatch opts grad p = p - scale (learning_rate opts) (grad p)
62
false
true
0
9
26
70
33
37
null
null
istehem/ACO-for-vasttrafik
ACO.hs
bsd-3-clause
defaultMain :: IO () defaultMain = mkApp runArgParser >>= \args -> runApp args setup
84
defaultMain :: IO () defaultMain = mkApp runArgParser >>= \args -> runApp args setup
84
defaultMain = mkApp runArgParser >>= \args -> runApp args setup
63
false
true
0
7
13
33
16
17
null
null
konn/lxc-dummy
src/System/LXC/Internal/Container.hs
bsd-3-clause
mkGetItemFn :: FunPtr ContainerGetItemFn -> ContainerGetItemFn mkGetItemFn = error "mkGetItemFn"
96
mkGetItemFn :: FunPtr ContainerGetItemFn -> ContainerGetItemFn mkGetItemFn = error "mkGetItemFn"
96
mkGetItemFn = error "mkGetItemFn"
33
false
true
0
6
9
21
10
11
null
null
enolan/cabal
cabal-install/Distribution/Client/Manpage.hs
bsd-3-clause
optionLines (OptArg description (optionChars, optionStrings) placeHolder _ _ _) = argOptionLines description optionChars optionStrings (Optional, placeHolder)
160
optionLines (OptArg description (optionChars, optionStrings) placeHolder _ _ _) = argOptionLines description optionChars optionStrings (Optional, placeHolder)
160
optionLines (OptArg description (optionChars, optionStrings) placeHolder _ _ _) = argOptionLines description optionChars optionStrings (Optional, placeHolder)
160
false
false
0
8
17
46
24
22
null
null
bvdelft/parac2
src/Language/Java/Paragon/NameResolution.hs
bsd-3-clause
rnBlockStmt :: BlockStmt SourcePos -> NameRes a -> NameRes (BlockStmt SourcePos, a) rnBlockStmt bs cont = case bs of BlockStmt pos stmt -> (,) <$> (BlockStmt pos <$> rnStmt stmt) <*> cont LocalVars pos ms t vds -> do lvf <- LocalVars pos ...
590
rnBlockStmt :: BlockStmt SourcePos -> NameRes a -> NameRes (BlockStmt SourcePos, a) rnBlockStmt bs cont = case bs of BlockStmt pos stmt -> (,) <$> (BlockStmt pos <$> rnStmt stmt) <*> cont LocalVars pos ms t vds -> do lvf <- LocalVars pos ...
590
rnBlockStmt bs cont = case bs of BlockStmt pos stmt -> (,) <$> (BlockStmt pos <$> rnStmt stmt) <*> cont LocalVars pos ms t vds -> do lvf <- LocalVars pos <$> mapM rnModifier ms <*> rnType t (vds', a) <- rnVarDecls vd...
475
false
true
5
11
243
172
83
89
null
null
haslab/SecreC
src/Language/SecreC/Transformation/Simplify.hs
gpl-3.0
appendLeak (Just x) (Just y) = Just (x || y)
44
appendLeak (Just x) (Just y) = Just (x || y)
44
appendLeak (Just x) (Just y) = Just (x || y)
44
false
false
0
7
9
33
16
17
null
null
trenta3/zeno-0.2.0.1
src/Zeno/Type.hs
mit
unflattenAppType :: [Type a] -> Type a unflattenAppType ts = foldl1 AppType ts
79
unflattenAppType :: [Type a] -> Type a unflattenAppType ts = foldl1 AppType ts
78
unflattenAppType ts = foldl1 AppType ts
39
false
true
0
7
13
32
15
17
null
null
sapek/pandoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
-- | Whether we are right behind a char allowed before emphasis afterEmphasisPreChar :: OrgParser Bool afterEmphasisPreChar = do pos <- getPosition lastPrePos <- orgStateLastPreCharPos <$> getState return . fromMaybe True $ (== pos) <$> lastPrePos -- | Whether the parser is right after a forbidden border char
317
afterEmphasisPreChar :: OrgParser Bool afterEmphasisPreChar = do pos <- getPosition lastPrePos <- orgStateLastPreCharPos <$> getState return . fromMaybe True $ (== pos) <$> lastPrePos -- | Whether the parser is right after a forbidden border char
253
afterEmphasisPreChar = do pos <- getPosition lastPrePos <- orgStateLastPreCharPos <$> getState return . fromMaybe True $ (== pos) <$> lastPrePos -- | Whether the parser is right after a forbidden border char
214
true
true
0
10
54
56
28
28
null
null
beni55/haste-compiler
libraries/time/lib/Data/Time/Format/Parse.hs
bsd-3-clause
-- | Case-insensitive version of 'Text.ParserCombinators.ReadP.char'. char :: Char -> ReadP Char char c = satisfy (\x -> toUpper c == toUpper x)
144
char :: Char -> ReadP Char char c = satisfy (\x -> toUpper c == toUpper x)
74
char c = satisfy (\x -> toUpper c == toUpper x)
47
true
true
0
9
22
43
21
22
null
null
kim/amazonka
amazonka-elb/gen/Network/AWS/ELB/Types.hs
mpl-2.0
aaValue :: Lens' AdditionalAttribute (Maybe Text) aaValue = lens _aaValue (\s a -> s { _aaValue = a })
102
aaValue :: Lens' AdditionalAttribute (Maybe Text) aaValue = lens _aaValue (\s a -> s { _aaValue = a })
102
aaValue = lens _aaValue (\s a -> s { _aaValue = a })
52
false
true
1
9
18
48
24
24
null
null
urbit/urbit
pkg/hs/urbit-king/lib/Urbit/King/EventBrowser.hs
mit
showEffects (Just fx) = do putStrLn "\n" putStrLn " [EFFECTS]" for_ fx $ \ef -> do putStrLn "" showEffect ef putStrLn ""
155
showEffects (Just fx) = do putStrLn "\n" putStrLn " [EFFECTS]" for_ fx $ \ef -> do putStrLn "" showEffect ef putStrLn ""
155
showEffects (Just fx) = do putStrLn "\n" putStrLn " [EFFECTS]" for_ fx $ \ef -> do putStrLn "" showEffect ef putStrLn ""
155
false
false
0
11
56
60
24
36
null
null
wangbj/excises
tail/app/Main.hs
bsd-3-clause
read8KBackward :: Integer -> Handle -> IO (Maybe (Int, C.ByteString, Integer)) read8KBackward off handle = do if off <= 0 then return Nothing else do let off' = max 0 (off - size8K) size = fromIntegral (off - off') buff <- liftIO $ hSeek handle AbsoluteSeek off' >> C.hGetSome handle size return . ...
345
read8KBackward :: Integer -> Handle -> IO (Maybe (Int, C.ByteString, Integer)) read8KBackward off handle = do if off <= 0 then return Nothing else do let off' = max 0 (off - size8K) size = fromIntegral (off - off') buff <- liftIO $ hSeek handle AbsoluteSeek off' >> C.hGetSome handle size return . ...
345
read8KBackward off handle = do if off <= 0 then return Nothing else do let off' = max 0 (off - size8K) size = fromIntegral (off - off') buff <- liftIO $ hSeek handle AbsoluteSeek off' >> C.hGetSome handle size return . Just $ (size, buff, off')
266
false
true
0
15
79
147
74
73
null
null
haskellweekly/haskellweekly.github.io
executables/haskell-weekly.hs
mit
getIssuesByNumber :: FilePath -> [FilePath] -> IO [(Integer, Text)] getIssuesByNumber input = mapM (getIssue input) . Maybe.mapMaybe (Read.readMaybe . FilePath.takeBaseName) . filter (hasExtension "markdown")
218
getIssuesByNumber :: FilePath -> [FilePath] -> IO [(Integer, Text)] getIssuesByNumber input = mapM (getIssue input) . Maybe.mapMaybe (Read.readMaybe . FilePath.takeBaseName) . filter (hasExtension "markdown")
218
getIssuesByNumber input = mapM (getIssue input) . Maybe.mapMaybe (Read.readMaybe . FilePath.takeBaseName) . filter (hasExtension "markdown")
150
false
true
0
10
33
79
40
39
null
null
lbodor/amazonia
src/Run.hs
bsd-3-clause
run :: (Show a) => AWST (ExceptT Text IO) a -> IO () run f = do logger <- newLogger Debug stdout region <- read <$> liftIO (getEnv "AWS_REGION") env <- AWS.getEnv region Discover <&> envLogger .~ logger <&> envRetryPolicy ?~ retryPolicy result <- runExceptT $ runA...
590
run :: (Show a) => AWST (ExceptT Text IO) a -> IO () run f = do logger <- newLogger Debug stdout region <- read <$> liftIO (getEnv "AWS_REGION") env <- AWS.getEnv region Discover <&> envLogger .~ logger <&> envRetryPolicy ?~ retryPolicy result <- runExceptT $ runA...
590
run f = do logger <- newLogger Debug stdout region <- read <$> liftIO (getEnv "AWS_REGION") env <- AWS.getEnv region Discover <&> envLogger .~ logger <&> envRetryPolicy ?~ retryPolicy result <- runExceptT $ runAWST env f case join (over (_Right . _Left) (T.pac...
537
false
true
3
16
183
254
119
135
null
null
fmapfmapfmap/amazonka
amazonka-rds/test/Test/AWS/Gen/RDS.hs
mpl-2.0
testResetDBClusterParameterGroup :: ResetDBClusterParameterGroup -> TestTree testResetDBClusterParameterGroup = req "ResetDBClusterParameterGroup" "fixture/ResetDBClusterParameterGroup.yaml"
198
testResetDBClusterParameterGroup :: ResetDBClusterParameterGroup -> TestTree testResetDBClusterParameterGroup = req "ResetDBClusterParameterGroup" "fixture/ResetDBClusterParameterGroup.yaml"
198
testResetDBClusterParameterGroup = req "ResetDBClusterParameterGroup" "fixture/ResetDBClusterParameterGroup.yaml"
121
false
true
0
5
17
20
10
10
null
null
brendanhay/gogol
gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Create.hs
mpl-2.0
-- | JSONP mzcCallback :: Lens' ManagedZonesCreate (Maybe Text) mzcCallback = lens _mzcCallback (\ s a -> s{_mzcCallback = a})
128
mzcCallback :: Lens' ManagedZonesCreate (Maybe Text) mzcCallback = lens _mzcCallback (\ s a -> s{_mzcCallback = a})
117
mzcCallback = lens _mzcCallback (\ s a -> s{_mzcCallback = a})
64
true
true
0
9
21
48
25
23
null
null
nomeata/ghc
compiler/codeGen/CgUtils.hs
bsd-3-clause
baseRegOffset CurrentNursery = oFFSET_StgRegTable_rCurrentNursery
70
baseRegOffset CurrentNursery = oFFSET_StgRegTable_rCurrentNursery
70
baseRegOffset CurrentNursery = oFFSET_StgRegTable_rCurrentNursery
70
false
false
0
4
8
10
4
6
null
null
jBugman/euler
part1/p017.hs
mit
spell 3 = "three"
18
spell 3 = "three"
18
spell 3 = "three"
18
false
false
1
5
4
13
4
9
null
null
lolisa/ChineseChess
app/Main.hs
bsd-3-clause
win :: Player -> Result win Red = RedWin
40
win :: Player -> Result win Red = RedWin
40
win Red = RedWin
16
false
true
0
7
8
24
10
14
null
null
urbanslug/ghc
testsuite/tests/programs/joao-circular/Main.hs
bsd-3-clause
showInstr (C_Pusha_1 n i) = "PUSHa " ++ (showName n) ++ " " ++ (show i)
72
showInstr (C_Pusha_1 n i) = "PUSHa " ++ (showName n) ++ " " ++ (show i)
72
showInstr (C_Pusha_1 n i) = "PUSHa " ++ (showName n) ++ " " ++ (show i)
72
false
false
0
9
16
42
20
22
null
null
olsner/ghc
compiler/typecheck/TcSigs.hs
bsd-3-clause
lookupPragEnv :: TcPragEnv -> Name -> [LSig Name] lookupPragEnv prag_fn n = lookupNameEnv prag_fn n `orElse` []
111
lookupPragEnv :: TcPragEnv -> Name -> [LSig Name] lookupPragEnv prag_fn n = lookupNameEnv prag_fn n `orElse` []
111
lookupPragEnv prag_fn n = lookupNameEnv prag_fn n `orElse` []
61
false
true
0
8
16
43
22
21
null
null
kjgorman/melchior
Melchior/Remote/Json.hs
mit
numberFrom _ = Nothing
22
numberFrom _ = Nothing
22
numberFrom _ = Nothing
22
false
false
0
5
3
9
4
5
null
null
hermish/courseography
app/Svg/Parser.hs
gpl-3.0
fromAttrib _ x = error $ show x ++ " is not a TagText"
54
fromAttrib _ x = error $ show x ++ " is not a TagText"
54
fromAttrib _ x = error $ show x ++ " is not a TagText"
54
false
false
3
6
13
24
10
14
null
null
input-output-hk/pos-haskell-prototype
client/test/Test/Pos/Client/Txp/Mode.hs
mit
fakeAddressForMonadAddresses :: NetworkMagic -> Address fakeAddressForMonadAddresses nm = address where -- seed for address generation is a ByteString with 32 255's seedSize = 32 seed = BS.replicate seedSize (255 :: Word8) address = makePubKeyAddressBoot nm $ fst $ deterministicKeyGen seed
308
fakeAddressForMonadAddresses :: NetworkMagic -> Address fakeAddressForMonadAddresses nm = address where -- seed for address generation is a ByteString with 32 255's seedSize = 32 seed = BS.replicate seedSize (255 :: Word8) address = makePubKeyAddressBoot nm $ fst $ deterministicKeyGen seed
308
fakeAddressForMonadAddresses nm = address where -- seed for address generation is a ByteString with 32 255's seedSize = 32 seed = BS.replicate seedSize (255 :: Word8) address = makePubKeyAddressBoot nm $ fst $ deterministicKeyGen seed
252
false
true
2
8
57
65
33
32
null
null
brendanhay/gogol
gogol-serviceuser/gen/Network/Google/Resource/ServiceUser/Projects/Services/Disable.hs
mpl-2.0
-- | JSONP psdCallback :: Lens' ProjectsServicesDisable (Maybe Text) psdCallback = lens _psdCallback (\ s a -> s{_psdCallback = a})
133
psdCallback :: Lens' ProjectsServicesDisable (Maybe Text) psdCallback = lens _psdCallback (\ s a -> s{_psdCallback = a})
122
psdCallback = lens _psdCallback (\ s a -> s{_psdCallback = a})
64
true
true
0
9
21
48
25
23
null
null
chalmers-kandidat14/off-lattice
OffLattice/Util.hs
bsd-3-clause
expQuota :: Floating a => a -> a -> a -> a expQuota x y t = exp ((-x+y) / t)
114
expQuota :: Floating a => a -> a -> a -> a expQuota x y t = exp ((-x+y) / t)
114
expQuota x y t = exp ((-x+y) / t)
33
false
true
0
10
58
62
29
33
null
null
nushio3/ghc
compiler/types/Coercion.hs
bsd-3-clause
extendLiftingContextEx :: LiftingContext -- ^ original lifting context -> [(TyVar,Type)] -- ^ ex. var / value pairs -> LiftingContext -- Note that this is more involved than extendLiftingContext. That function -- takes a coercion to extend with, so it's assumed that t...
440
extendLiftingContextEx :: LiftingContext -- ^ original lifting context -> [(TyVar,Type)] -- ^ ex. var / value pairs -> LiftingContext extendLiftingContextEx lc [] = lc
219
extendLiftingContextEx lc [] = lc
33
true
true
0
8
112
40
24
16
null
null
vdweegen/UvA-Software_Testing
Lab1/Willem/Exercises.hs
gpl-3.0
-- Arnold Matthew or Peter is speaking the truth, but not both. accuses Arnold b = accuses Matthew b `xor` accuses Peter b
123
accuses Arnold b = accuses Matthew b `xor` accuses Peter b
59
accuses Arnold b = accuses Matthew b `xor` accuses Peter b
59
true
false
1
6
23
32
14
18
null
null
urbanslug/ghc
compiler/types/Type.hs
bsd-3-clause
repSplitAppTy_maybe :: Type -> Maybe (Type,Type) -- ^ Does the AppTy split as in 'splitAppTy_maybe', but assumes that -- any Core view stuff is already done repSplitAppTy_maybe (FunTy ty1 ty2) | isConstraintKind (typeKind ty1) = Nothing -- See Note [Decomposing fat arrow c=>t] | otherwise ...
358
repSplitAppTy_maybe :: Type -> Maybe (Type,Type) repSplitAppTy_maybe (FunTy ty1 ty2) | isConstraintKind (typeKind ty1) = Nothing -- See Note [Decomposing fat arrow c=>t] | otherwise = Just (TyConApp funTyCon [ty1], ty2)
250
repSplitAppTy_maybe (FunTy ty1 ty2) | isConstraintKind (typeKind ty1) = Nothing -- See Note [Decomposing fat arrow c=>t] | otherwise = Just (TyConApp funTyCon [ty1], ty2)
201
true
true
1
10
81
81
41
40
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/GTEQ_6.hs
mit
primCmpInt (Pos x) (Neg y) = GT
31
primCmpInt (Pos x) (Neg y) = GT
31
primCmpInt (Pos x) (Neg y) = GT
31
false
false
0
7
6
23
11
12
null
null
themoritz/cabal
cabal-install/Distribution/Client/Init.hs
bsd-3-clause
getYear :: IO Integer getYear = do u <- getCurrentTime z <- getCurrentTimeZone let l = utcToLocalTime z u (y, _, _) = toGregorian $ localDay l return y
165
getYear :: IO Integer getYear = do u <- getCurrentTime z <- getCurrentTimeZone let l = utcToLocalTime z u (y, _, _) = toGregorian $ localDay l return y
165
getYear = do u <- getCurrentTime z <- getCurrentTimeZone let l = utcToLocalTime z u (y, _, _) = toGregorian $ localDay l return y
143
false
true
0
11
42
70
33
37
null
null
brownsys/nettle-openflow
src/Nettle/Topology/LabelledGraph.hs
bsd-3-clause
adjustEdgeWeight :: (Ord n, Ord e) => e -> (Weight -> Weight) -> LabelledGraph n e -> LabelledGraph n e adjustEdgeWeight e f graph = let el = Map.adjust (Map.adjust (\(st,weight) -> (st, f weight)) e) (source graph e) (edgesLeaving graph) in graph { sourceTarget = Map.adjust (\(st,weight) -> (st, f weight)) e (s...
387
adjustEdgeWeight :: (Ord n, Ord e) => e -> (Weight -> Weight) -> LabelledGraph n e -> LabelledGraph n e adjustEdgeWeight e f graph = let el = Map.adjust (Map.adjust (\(st,weight) -> (st, f weight)) e) (source graph e) (edgesLeaving graph) in graph { sourceTarget = Map.adjust (\(st,weight) -> (st, f weight)) e (s...
387
adjustEdgeWeight e f graph = let el = Map.adjust (Map.adjust (\(st,weight) -> (st, f weight)) e) (source graph e) (edgesLeaving graph) in graph { sourceTarget = Map.adjust (\(st,weight) -> (st, f weight)) e (sourceTarget graph) , edgesLeaving = el }
283
false
true
0
15
93
181
96
85
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x2F9F1' = "\x28D77"
35
decomposeChar '\x2F9F1' = "\x28D77"
35
decomposeChar '\x2F9F1' = "\x28D77"
35
false
false
0
4
3
10
4
6
null
null
zchn/ethereum-analyzer
ethereum-analyzer-deps/src/Blockchain/VM/Opcodes.hs
apache-2.0
op2CodeMap :: M.Map Operation Word8 op2CodeMap = M.fromList $ (\(OPData code op _ _ _) -> (op, code)) <$> opDatas
113
op2CodeMap :: M.Map Operation Word8 op2CodeMap = M.fromList $ (\(OPData code op _ _ _) -> (op, code)) <$> opDatas
113
op2CodeMap = M.fromList $ (\(OPData code op _ _ _) -> (op, code)) <$> opDatas
77
false
true
0
10
19
56
30
26
null
null
ennocramer/hindent
src/HIndent/Styles/ChrisDone.hs
bsd-3-clause
isSmallFitting :: MonadState (PrintState t) m => m a -> m (Bool,PrintState t) isSmallFitting p = do (_,st) <- sandbox p return (psColumn st < smallColumnLimit,st)
184
isSmallFitting :: MonadState (PrintState t) m => m a -> m (Bool,PrintState t) isSmallFitting p = do (_,st) <- sandbox p return (psColumn st < smallColumnLimit,st)
184
isSmallFitting p = do (_,st) <- sandbox p return (psColumn st < smallColumnLimit,st)
91
false
true
0
10
47
83
40
43
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 47150 = 5559
32
getValueFromProduct 47150 = 5559
32
getValueFromProduct 47150 = 5559
32
false
false
0
5
3
9
4
5
null
null
jameshsmith/HRL
Server/Core/Engine.hs
mit
livingAt :: (Row, Col) -> Level -> Maybe ARef livingAt l = listToMaybe . living (\a -> a ^. loc == l)
101
livingAt :: (Row, Col) -> Level -> Maybe ARef livingAt l = listToMaybe . living (\a -> a ^. loc == l)
101
livingAt l = listToMaybe . living (\a -> a ^. loc == l)
55
false
true
0
10
21
58
29
29
null
null
alexander-at-github/eta
compiler/ETA/Utils/ListSetOps.hs
bsd-3-clause
removeDups cmp xs = case (mapAccumR collect_dups [] (equivClasses cmp xs)) of { (dups, xs') -> (xs', dups) } where collect_dups _ [] = panic "ListSetOps: removeDups" collect_dups dups_so_far [x] = (dups_so_far, x) collect_dups dups_so_far dups@(x:_) = (dups:dups_so_far,...
323
removeDups cmp xs = case (mapAccumR collect_dups [] (equivClasses cmp xs)) of { (dups, xs') -> (xs', dups) } where collect_dups _ [] = panic "ListSetOps: removeDups" collect_dups dups_so_far [x] = (dups_so_far, x) collect_dups dups_so_far dups@(x:_) = (dups:dups_so_far,...
323
removeDups cmp xs = case (mapAccumR collect_dups [] (equivClasses cmp xs)) of { (dups, xs') -> (xs', dups) } where collect_dups _ [] = panic "ListSetOps: removeDups" collect_dups dups_so_far [x] = (dups_so_far, x) collect_dups dups_so_far dups@(x:_) = (dups:dups_so_far,...
323
false
false
0
9
88
122
66
56
null
null
rodrigosetti/master-plan
src/MasterPlan/Backend/Graph.hs
mit
renderProject colorByP attrs p@Atomic {} = pure $ alignL $ renderNode colorByP attrs p
89
renderProject colorByP attrs p@Atomic {} = pure $ alignL $ renderNode colorByP attrs p
89
renderProject colorByP attrs p@Atomic {} = pure $ alignL $ renderNode colorByP attrs p
89
false
false
0
7
16
35
17
18
null
null
olsner/sedition
IR.hs
mit
tCheck (AST.Match Nothing) = emitNewPred (MatchLastRE sPattern)
63
tCheck (AST.Match Nothing) = emitNewPred (MatchLastRE sPattern)
63
tCheck (AST.Match Nothing) = emitNewPred (MatchLastRE sPattern)
63
false
false
0
7
6
27
12
15
null
null
silkapp/heist
src/Heist/Types.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | HeistT's 'put'. putHS :: Monad m => HeistState n -> HeistT n m () putHS s = HeistT $ \_ _ -> return ((), s)
191
putHS :: Monad m => HeistState n -> HeistT n m () putHS s = HeistT $ \_ _ -> return ((), s)
91
putHS s = HeistT $ \_ _ -> return ((), s)
41
true
true
2
9
27
66
32
34
null
null
jvictor0/JoSQL
Server/Parser.hs
mit
parseTypeDec :: [LexTree] -> Maybe TypeDec parseTypeDec ((Ident a):ColonToken:tp) = fmap (TypeDec a) $ parseType tp
115
parseTypeDec :: [LexTree] -> Maybe TypeDec parseTypeDec ((Ident a):ColonToken:tp) = fmap (TypeDec a) $ parseType tp
115
parseTypeDec ((Ident a):ColonToken:tp) = fmap (TypeDec a) $ parseType tp
72
false
true
0
9
15
57
28
29
null
null
ben-schulz/Idris-dev
src/Idris/Docs.hs
bsd-3-clause
pprintFDWithTotality :: IState -> Bool -> FunDoc -> Doc OutputAnnotation pprintFDWithTotality ist = pprintFD ist True
117
pprintFDWithTotality :: IState -> Bool -> FunDoc -> Doc OutputAnnotation pprintFDWithTotality ist = pprintFD ist True
117
pprintFDWithTotality ist = pprintFD ist True
44
false
true
0
8
15
34
16
18
null
null
ben-z/dotfiles
xmonad/.xmonad/xmonad.hs
mit
defaults = defaultConfig { -- simple stuff terminal = myTerminal, focusFollowsMouse = myFocusFollowsMouse, borderWidth = myBorderWidth, modMask = myModMask, workspaces = myWorkspaces, normalBorderColor = myNormalBorderColor, focusedBorderColor = myFo...
586
defaults = defaultConfig { -- simple stuff terminal = myTerminal, focusFollowsMouse = myFocusFollowsMouse, borderWidth = myBorderWidth, modMask = myModMask, workspaces = myWorkspaces, normalBorderColor = myNormalBorderColor, focusedBorderColor = myFo...
586
defaults = defaultConfig { -- simple stuff terminal = myTerminal, focusFollowsMouse = myFocusFollowsMouse, borderWidth = myBorderWidth, modMask = myModMask, workspaces = myWorkspaces, normalBorderColor = myNormalBorderColor, focusedBorderColor = myFo...
586
false
false
0
7
193
87
57
30
null
null
DylanSp/zmachine-interpreter
src/Dictionary.hs
mit
entryBase :: S.Story -> ByteAddress entryBase story = incByteAddrBy wsBase (fromIntegral (wsCount + 1)) where dictBase = getDictionaryBase story wsCount = wordSeparatorsCount story wsBase = wordSeparatorsBase dictBase --length of each entry
275
entryBase :: S.Story -> ByteAddress entryBase story = incByteAddrBy wsBase (fromIntegral (wsCount + 1)) where dictBase = getDictionaryBase story wsCount = wordSeparatorsCount story wsBase = wordSeparatorsBase dictBase --length of each entry
275
entryBase story = incByteAddrBy wsBase (fromIntegral (wsCount + 1)) where dictBase = getDictionaryBase story wsCount = wordSeparatorsCount story wsBase = wordSeparatorsBase dictBase --length of each entry
239
false
true
2
9
65
66
33
33
null
null
YLiLarry/db-model
src/DB/Model/Internal/Prelude.hs
mit
kvp2json :: (ToJSON a) => [(String, a)] -> A.Value kvp2json = toJSON . H.fromList
81
kvp2json :: (ToJSON a) => [(String, a)] -> A.Value kvp2json = toJSON . H.fromList
81
kvp2json = toJSON . H.fromList
30
false
true
0
8
13
41
23
18
null
null
nikita-volkov/postgresql-error-codes
library/PostgreSQL/ErrorCodes.hs
mit
-- | Code \"22021\". character_not_in_repertoire :: ErrorCode = "22021"
96
character_not_in_repertoire :: ErrorCode = "22021"
75
character_not_in_repertoire :: ErrorCode = "22021"
75
true
false
0
5
33
12
6
6
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/ShowXmlLazy.hs
bsd-3-clause
entitydef (DefEntityValue ev) = entityvalue ev
47
entitydef (DefEntityValue ev) = entityvalue ev
47
entitydef (DefEntityValue ev) = entityvalue ev
47
false
false
0
7
6
18
8
10
null
null
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/countdown.hs
gpl-3.0
-- Exploiting algebraic properties valid' :: Op -> Int -> Int -> Bool valid' Add x y = x <= y
94
valid' :: Op -> Int -> Int -> Bool valid' Add x y = x <= y
58
valid' Add x y = x <= y
23
true
true
0
7
21
35
18
17
null
null
athanclark/sets
src/Data/Set/Ordered/Many/With.hs
mit
deleteMax :: SetsWith k c a -> SetsWith k c a deleteMax (SetsWith (f,xs)) = SetsWith (f, Map.deleteMax xs)
106
deleteMax :: SetsWith k c a -> SetsWith k c a deleteMax (SetsWith (f,xs)) = SetsWith (f, Map.deleteMax xs)
106
deleteMax (SetsWith (f,xs)) = SetsWith (f, Map.deleteMax xs)
60
false
true
0
8
18
58
29
29
null
null
mwotton/sofadb
mkindex.hs
bsd-3-clause
tailer :: String tailer = "\ \</pre>\n\ \<hr>\n\ \</body>\n\ \</html>\n"
72
tailer :: String tailer = "\ \</pre>\n\ \<hr>\n\ \</body>\n\ \</html>\n"
72
tailer = "\ \</pre>\n\ \<hr>\n\ \</body>\n\ \</html>\n"
55
false
true
0
6
9
18
7
11
null
null
Teaspot-Studio/GPipe-Core
src/Graphics/GPipe/Internal/Format.hs
mit
getGlInternalFormat RGB32I = GL_RGB32I
38
getGlInternalFormat RGB32I = GL_RGB32I
38
getGlInternalFormat RGB32I = GL_RGB32I
38
false
false
1
5
3
13
4
9
null
null
AlexanderPankiv/ghc
compiler/types/InstEnv.hs
bsd-3-clause
instanceCantMatch _ _ = False
46
instanceCantMatch _ _ = False
46
instanceCantMatch _ _ = False
46
false
false
0
5
21
11
5
6
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_DRAW_BUFFER9_EXT :: GLenum gl_DRAW_BUFFER9_EXT = 0x882E
58
gl_DRAW_BUFFER9_EXT :: GLenum gl_DRAW_BUFFER9_EXT = 0x882E
58
gl_DRAW_BUFFER9_EXT = 0x882E
28
false
true
0
4
5
11
6
5
null
null
hvr/containers
Data/IntSet/Base.hs
bsd-3-clause
showsBitMap :: Word -> ShowS showsBitMap = showString . showBitMap
66
showsBitMap :: Word -> ShowS showsBitMap = showString . showBitMap
66
showsBitMap = showString . showBitMap
37
false
true
0
5
9
19
10
9
null
null
mbakke/ganeti
src/Ganeti/Query/Filter.hs
bsd-2-clause
-- send all other combinations (all errors) to 'binOpFilter', which -- has good error messages eqFilter _ flv jsv = binOpFilter (==) flv jsv
140
eqFilter _ flv jsv = binOpFilter (==) flv jsv
45
eqFilter _ flv jsv = binOpFilter (==) flv jsv
45
true
false
0
5
23
24
13
11
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Dtd.hs
gpl-2.0
pEndLine = do updateState $ \st -> st{ synStPrevNonspace = False } context <- currentContext contexts <- synStContexts `fmap` getState st <- getState if length contexts >= 2 then case context of _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False } ("DTD","Normal") -...
575
pEndLine = do updateState $ \st -> st{ synStPrevNonspace = False } context <- currentContext contexts <- synStContexts `fmap` getState st <- getState if length contexts >= 2 then case context of _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False } ("DTD","Normal") -...
575
pEndLine = do updateState $ \st -> st{ synStPrevNonspace = False } context <- currentContext contexts <- synStContexts `fmap` getState st <- getState if length contexts >= 2 then case context of _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False } ("DTD","Normal") -...
575
false
false
0
15
143
227
117
110
null
null
JHawk/enterpriseFizzBuzz
src/Enterprise/FizzBuzz.hs
bsd-3-clause
functionToPad6 i = undefined
28
functionToPad6 i = undefined
28
functionToPad6 i = undefined
28
false
false
0
5
3
9
4
5
null
null
elovalo/elovalo
helpers/WeberFechner.hs
gpl-3.0
-- |Modified Weber–Fechner algorithm which saves energy when stimulus can not be -- perceived. weberFechner :: Integer -> Integer weberFechner x_i | alg == s0 = 0 | otherwise = alg where alg = round (exp (a*x)) + (s0-1) x = fromIntegral x_i
267
weberFechner :: Integer -> Integer weberFechner x_i | alg == s0 = 0 | otherwise = alg where alg = round (exp (a*x)) + (s0-1) x = fromIntegral x_i
172
weberFechner x_i | alg == s0 = 0 | otherwise = alg where alg = round (exp (a*x)) + (s0-1) x = fromIntegral x_i
137
true
true
2
10
69
91
42
49
null
null
gbataille/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
keyvals :: LP [(String, String)] keyvals = try $ char '[' *> manyTill keyval (char ']')
87
keyvals :: LP [(String, String)] keyvals = try $ char '[' *> manyTill keyval (char ']')
87
keyvals = try $ char '[' *> manyTill keyval (char ']')
54
false
true
4
8
15
54
25
29
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/FetchUtils.hs
bsd-3-clause
fetchPackage :: Verbosity -> RepoContext -> PackageLocation (Maybe FilePath) -> IO (PackageLocation FilePath) fetchPackage verbosity repoCtxt loc = case loc of LocalUnpackedPackage dir -> return (LocalUnpackedPackage dir) LocalTarballPackage file -> return (L...
1,254
fetchPackage :: Verbosity -> RepoContext -> PackageLocation (Maybe FilePath) -> IO (PackageLocation FilePath) fetchPackage verbosity repoCtxt loc = case loc of LocalUnpackedPackage dir -> return (LocalUnpackedPackage dir) LocalTarballPackage file -> return (L...
1,254
fetchPackage verbosity repoCtxt loc = case loc of LocalUnpackedPackage dir -> return (LocalUnpackedPackage dir) LocalTarballPackage file -> return (LocalTarballPackage file) RemoteTarballPackage uri (Just file) -> return (RemoteTarballPackage uri file) RepoTarballPackage repo pkgid ...
1,105
false
true
8
10
306
309
149
160
null
null
bobjflong/yesod-csp
test/Test.hs
mit
middlewareTest :: Spec middlewareTest = yesodSpecApp Test getApp $ do ydescribe "Middleware" $ do yit "works" $ do get NoCspR assertHeader "Content-Security-Policy" "frame-ancestors 'self'" where getApp = cspMiddleware [FrameAncestors (Self :| [])] <$> toWaiAppPlain Test
308
middlewareTest :: Spec middlewareTest = yesodSpecApp Test getApp $ do ydescribe "Middleware" $ do yit "works" $ do get NoCspR assertHeader "Content-Security-Policy" "frame-ancestors 'self'" where getApp = cspMiddleware [FrameAncestors (Self :| [])] <$> toWaiAppPlain Test
308
middlewareTest = yesodSpecApp Test getApp $ do ydescribe "Middleware" $ do yit "works" $ do get NoCspR assertHeader "Content-Security-Policy" "frame-ancestors 'self'" where getApp = cspMiddleware [FrameAncestors (Self :| [])] <$> toWaiAppPlain Test
285
false
true
0
14
71
87
39
48
null
null
bergey/cabal-edit
src/Edit/Printer.hs
bsd-3-clause
debugDetailedLine l = showB l <> "\n"
37
debugDetailedLine l = showB l <> "\n"
37
debugDetailedLine l = showB l <> "\n"
37
false
false
0
6
6
16
7
9
null
null