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
DanielWaterworth/Idris-dev
src/IRTS/CodegenLLVM.hs
bsd-3-clause
conType :: Word64 -> Type conType nargs = StructureType False [ IntegerType 32 , ArrayType nargs (PointerType valueType (AddrSpace 0)) ]
184
conType :: Word64 -> Type conType nargs = StructureType False [ IntegerType 32 , ArrayType nargs (PointerType valueType (AddrSpace 0)) ]
184
conType nargs = StructureType False [ IntegerType 32 , ArrayType nargs (PointerType valueType (AddrSpace 0)) ]
158
false
true
0
10
68
57
26
31
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2897 = 2896
11
2897 = 2896
11
2897 = 2896
11
false
false
1
5
2
10
3
7
null
null
ygale/yesod
yesod-auth/Yesod/Auth/Email.hs
mit
getRegisterR :: YesodAuthEmail master => HandlerT Auth (HandlerT master IO) Html getRegisterR = registerHandler
111
getRegisterR :: YesodAuthEmail master => HandlerT Auth (HandlerT master IO) Html getRegisterR = registerHandler
111
getRegisterR = registerHandler
30
false
true
0
8
13
33
16
17
null
null
mrmonday/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
compileJS' indent (JSString str) = "\"" `T.append` T.pack str `T.append` "\""
79
compileJS' indent (JSString str) = "\"" `T.append` T.pack str `T.append` "\""
79
compileJS' indent (JSString str) = "\"" `T.append` T.pack str `T.append` "\""
79
false
false
0
8
12
38
20
18
null
null
AaronFriel/eff-experiments
src/Eff/Internal/Eff1.hs
bsd-3-clause
th1 :: Member (Yield Int ()) r => Eff r () th1 = yieldInt 1 >> yieldInt 2
73
th1 :: Member (Yield Int ()) r => Eff r () th1 = yieldInt 1 >> yieldInt 2
73
th1 = yieldInt 1 >> yieldInt 2
30
false
true
0
10
17
52
23
29
null
null
shlevy/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
pprTyClDeclFlavour (SynDecl {}) = text "type"
49
pprTyClDeclFlavour (SynDecl {}) = text "type"
49
pprTyClDeclFlavour (SynDecl {}) = text "type"
49
false
false
0
7
9
19
9
10
null
null
jwiegley/ghc-release
libraries/bytestring/Data/ByteString/Builder/ASCII.hs
gpl-3.0
intDec :: Int -> Builder intDec = P.primBounded P.intDec
56
intDec :: Int -> Builder intDec = P.primBounded P.intDec
56
intDec = P.primBounded P.intDec
31
false
true
0
6
8
22
11
11
null
null
silky/Tidal
Sound/Tidal/Tempo.hs
gpl-3.0
serverApp :: MVar Tempo -> MVar ClientState -> WS.ServerApp serverApp tempoState clientState pending = do conn <- WS.acceptRequest pending tempo <- liftIO $ readMVar tempoState liftIO $ WS.sendTextData conn $ T.pack $ show tempo clients <- liftIO $ readMVar clientState liftIO $ modifyMVar_ clientSta...
399
serverApp :: MVar Tempo -> MVar ClientState -> WS.ServerApp serverApp tempoState clientState pending = do conn <- WS.acceptRequest pending tempo <- liftIO $ readMVar tempoState liftIO $ WS.sendTextData conn $ T.pack $ show tempo clients <- liftIO $ readMVar clientState liftIO $ modifyMVar_ clientSta...
399
serverApp tempoState clientState pending = do conn <- WS.acceptRequest pending tempo <- liftIO $ readMVar tempoState liftIO $ WS.sendTextData conn $ T.pack $ show tempo clients <- liftIO $ readMVar clientState liftIO $ modifyMVar_ clientState $ \s -> return $ addClient conn s serverLoop conn tem...
339
false
true
0
12
79
142
62
80
null
null
christiaanb/ghc
compiler/deSugar/Check.hs
bsd-3-clause
tidy_pat (ListPat ps ty Nothing) = unLoc $ foldr (\ x y -> mkPrefixConPat consDataCon [x,y] [ty]) (mkNilPat ty) (map tidy_lpat ps)
200
tidy_pat (ListPat ps ty Nothing) = unLoc $ foldr (\ x y -> mkPrefixConPat consDataCon [x,y] [ty]) (mkNilPat ty) (map tidy_lpat ps)
200
tidy_pat (ListPat ps ty Nothing) = unLoc $ foldr (\ x y -> mkPrefixConPat consDataCon [x,y] [ty]) (mkNilPat ty) (map tidy_lpat ps)
200
false
false
0
10
91
70
36
34
null
null
jaccokrijnen/leksah
src/IDE/TextEditor/CodeMirror.hs
gpl-2.0
setMode m = jss "mode" m
32
setMode m = jss "mode" m
32
setMode m = jss "mode" m
32
false
false
0
5
13
14
6
8
null
null
text-utf8/text
tests/Tests/Properties.hs
bsd-2-clause
tl_repeat n = (L.take m . L.repeat) `eq` (unpackS . TL.take (fromIntegral m) . TL.repeat) where m = fromIntegral (n :: Word8)
155
tl_repeat n = (L.take m . L.repeat) `eq` (unpackS . TL.take (fromIntegral m) . TL.repeat) where m = fromIntegral (n :: Word8)
155
tl_repeat n = (L.take m . L.repeat) `eq` (unpackS . TL.take (fromIntegral m) . TL.repeat) where m = fromIntegral (n :: Word8)
155
false
false
0
11
51
70
36
34
null
null
mreid/papersite
src/lib/Page.hs
mit
get :: String -> T -> Maybe String get key = lookup key . fields
64
get :: String -> T -> Maybe String get key = lookup key . fields
64
get key = lookup key . fields
29
false
true
0
7
14
36
16
20
null
null
uvNikita/SyntacticAnalyzer
src/Operation.hs
mit
inverse Div = Mul
18
inverse Div = Mul
18
inverse Div = Mul
18
false
false
1
5
4
13
4
9
null
null
kaliumxyz/learnings
haskell/baby.hs
mit
doubleMe x = x + x
18
doubleMe x = x + x
18
doubleMe x = x + x
18
false
false
3
5
5
18
6
12
null
null
nicball/orlin
src/Orlin/Frontend/TypeChecker.hs
mit
lookupSymbol :: String -> TypeChecker (Maybe (Type, Word)) lookupSymbol name = do st <- get return (iter st name 0) where iter (st:rest) name level = case lookup name st of Just t -> Just (t, level) Nothing -> iter rest name (level + 1) iter [] _ _ = Nothing
306
lookupSymbol :: String -> TypeChecker (Maybe (Type, Word)) lookupSymbol name = do st <- get return (iter st name 0) where iter (st:rest) name level = case lookup name st of Just t -> Just (t, level) Nothing -> iter rest name (level + 1) iter [] _ _ = Nothing
306
lookupSymbol name = do st <- get return (iter st name 0) where iter (st:rest) name level = case lookup name st of Just t -> Just (t, level) Nothing -> iter rest name (level + 1) iter [] _ _ = Nothing
247
false
true
1
11
98
141
69
72
null
null
fredyr/copilot-libraries
src/Copilot/Library/Voting.hs
bsd-3-clause
aMajority :: (P.Eq a, Typed a) => [Stream a] -- ^ Vote streams -> Stream a -- ^ Candidate stream -> Stream Bool -- ^ True if candidate holds majority aMajority [] _ = badUsage "aMajority: empty list not allowed"
250
aMajority :: (P.Eq a, Typed a) => [Stream a] -- ^ Vote streams -> Stream a -- ^ Candidate stream -> Stream Bool aMajority [] _ = badUsage "aMajority: empty list not allowed"
212
aMajority [] _ = badUsage "aMajority: empty list not allowed"
61
true
true
0
8
78
61
31
30
null
null
spoqa/nirum
src/Nirum/Docs/Html.hs
gpl-3.0
renderInline (Code code') = [qq|<code>{escape code'}</code>|]
61
renderInline (Code code') = [qq|<code>{escape code'}</code>|]
61
renderInline (Code code') = [qq|<code>{escape code'}</code>|]
61
false
false
0
7
5
19
11
8
null
null
TomMD/ghc
libraries/base/GHC/Exts.hs
bsd-3-clause
groupByFB :: ([a] -> lst -> lst) -> lst -> (a -> a -> Bool) -> [a] -> lst groupByFB c n eq xs0 = groupByFBCore xs0 where groupByFBCore [] = n groupByFBCore (x:xs) = c (x:ys) (groupByFBCore zs) where (ys, zs) = span (eq x) xs -- --------------------------------------------------------------------...
340
groupByFB :: ([a] -> lst -> lst) -> lst -> (a -> a -> Bool) -> [a] -> lst groupByFB c n eq xs0 = groupByFBCore xs0 where groupByFBCore [] = n groupByFBCore (x:xs) = c (x:ys) (groupByFBCore zs) where (ys, zs) = span (eq x) xs -- --------------------------------------------------------------------...
340
groupByFB c n eq xs0 = groupByFBCore xs0 where groupByFBCore [] = n groupByFBCore (x:xs) = c (x:ys) (groupByFBCore zs) where (ys, zs) = span (eq x) xs -- ----------------------------------------------------------------------------- -- tracing
266
false
true
1
11
74
150
74
76
null
null
pdmurray/haskell-book-ex
src/ch10/Exercises10.10.hs
bsd-3-clause
myMinimumBy f (x:xs) = foldl (\a b -> if f a b == LT then a else b) x xs
72
myMinimumBy f (x:xs) = foldl (\a b -> if f a b == LT then a else b) x xs
72
myMinimumBy f (x:xs) = foldl (\a b -> if f a b == LT then a else b) x xs
72
false
false
0
10
19
52
27
25
null
null
matthewleon/libmpd-haskell
src/Network/MPD/Commands/Database.hs
mit
-- | Update the server's database. -- -- If no path is given, the whole library will be scanned. Unreadable or -- non-existent paths are silently ignored. -- -- The update job id is returned. update :: MonadMPD m => Maybe Path -> m Integer update = A.runCommand . A.update
273
update :: MonadMPD m => Maybe Path -> m Integer update = A.runCommand . A.update
80
update = A.runCommand . A.update
32
true
true
0
7
50
42
23
19
null
null
DylanSp/zmachine-interpreter
src/ImmutableBytes.hs
mit
writeByte :: ImmutableBytes -> ByteAddress -> Word8 -> ImmutableBytes writeByte bytes addr@(ByteAddress address) value | isOutOfRange addr (size bytes) = error "ImmutableBytes.writeByte: Address is out of range" | otherwise = ImmutableBytes { originalBytes = originalBytes bytes, ...
412
writeByte :: ImmutableBytes -> ByteAddress -> Word8 -> ImmutableBytes writeByte bytes addr@(ByteAddress address) value | isOutOfRange addr (size bytes) = error "ImmutableBytes.writeByte: Address is out of range" | otherwise = ImmutableBytes { originalBytes = originalBytes bytes, ...
412
writeByte bytes addr@(ByteAddress address) value | isOutOfRange addr (size bytes) = error "ImmutableBytes.writeByte: Address is out of range" | otherwise = ImmutableBytes { originalBytes = originalBytes bytes, edits = Map.insert addres...
342
false
true
0
10
127
100
49
51
null
null
adinapoli/api-tools
src/Data/API/Markdown.hs
bsd-3-clause
union_ :: MarkdownMethods -> APINode -> SpecUnion -> [MDComment] union_ mdm an su = summary_lines mdm an "union object" ++ mk_md_union_table mdm (suFields su)
162
union_ :: MarkdownMethods -> APINode -> SpecUnion -> [MDComment] union_ mdm an su = summary_lines mdm an "union object" ++ mk_md_union_table mdm (suFields su)
162
union_ mdm an su = summary_lines mdm an "union object" ++ mk_md_union_table mdm (suFields su)
97
false
true
0
8
27
59
28
31
null
null
vincenthz/hs-foundation
foundation/tests/Test/Foundation/Primitive/BlockN.hs
bsd-3-clause
createBlockSized :: CountOf Int -> B.Block Int createBlockSized n@(CountOf n') = B.create n (const n')
102
createBlockSized :: CountOf Int -> B.Block Int createBlockSized n@(CountOf n') = B.create n (const n')
102
createBlockSized n@(CountOf n') = B.create n (const n')
55
false
true
1
8
14
55
24
31
null
null
spatial-reasoning/zeno
src/compareGivenNetworks.hs
bsd-2-clause
checkNetworks = do -- dpNet0 <- loadBinaryNetwork ("bla2.net") :: IO (Network [String] (Set.Set Dipole72)) -- dpNet1 <- loadBinaryNetwork ("../testsuite/dipole/24/alleq.net") :: IO (Network [String] (Set.Set Dipole72)) -- dpNet2 <- loadBinaryNetwork ("../testsuite/dipole/24/consistent_01.net") :: IO (Network [...
5,930
checkNetworks = do -- dpNet0 <- loadBinaryNetwork ("bla2.net") :: IO (Network [String] (Set.Set Dipole72)) -- dpNet1 <- loadBinaryNetwork ("../testsuite/dipole/24/alleq.net") :: IO (Network [String] (Set.Set Dipole72)) -- dpNet2 <- loadBinaryNetwork ("../testsuite/dipole/24/consistent_01.net") :: IO (Network [...
5,930
checkNetworks = do -- dpNet0 <- loadBinaryNetwork ("bla2.net") :: IO (Network [String] (Set.Set Dipole72)) -- dpNet1 <- loadBinaryNetwork ("../testsuite/dipole/24/alleq.net") :: IO (Network [String] (Set.Set Dipole72)) -- dpNet2 <- loadBinaryNetwork ("../testsuite/dipole/24/consistent_01.net") :: IO (Network [...
5,930
false
false
1
19
1,438
1,122
561
561
null
null
prt2121/fp101x
natOp.hs
apache-2.0
add n (Succ m) = Succ (add m n)
36
add n (Succ m) = Succ (add m n)
36
add n (Succ m) = Succ (add m n)
36
false
false
0
6
13
30
13
17
null
null
kaoskorobase/mescaline
resources/hugs/packages/base/Data/IntSet.hs
gpl-3.0
split :: Int -> IntSet -> (IntSet,IntSet) split x t = case t of Bin p m l r | m < 0 -> if x >= 0 then let (lt,gt) = split' x l in (union r lt, gt) else let (lt,gt) = split' x r in (lt, union gt l) -- handle negative numbers. ...
502
split :: Int -> IntSet -> (IntSet,IntSet) split x t = case t of Bin p m l r | m < 0 -> if x >= 0 then let (lt,gt) = split' x l in (union r lt, gt) else let (lt,gt) = split' x r in (lt, union gt l) -- handle negative numbers. ...
502
split x t = case t of Bin p m l r | m < 0 -> if x >= 0 then let (lt,gt) = split' x l in (union r lt, gt) else let (lt,gt) = split' x r in (lt, union gt l) -- handle negative numbers. | otherwise -> split' x t Tip...
460
false
true
0
14
248
225
114
111
null
null
johanneshilden/liquid-epsilon
Util/HTML/Elements.hs
bsd-3-clause
i = makePar "i"
24
i = makePar "i"
24
i = makePar "i"
24
false
false
0
5
12
9
4
5
null
null
cirquit/quizlearner
resources/form/n_app_forms.hs
mit
t3 = ("t3 - true3", True)
25
t3 = ("t3 - true3", True)
25
t3 = ("t3 - true3", True)
25
false
false
0
5
5
12
7
5
null
null
jgm/citeproc
src/Citeproc/Types.hs
bsd-2-clause
variableType "PMCID" = StringVariable
37
variableType "PMCID" = StringVariable
37
variableType "PMCID" = StringVariable
37
false
false
0
5
3
9
4
5
null
null
spechub/Hets
Common/Doc.hs
gpl-2.0
quote = symbol "\'"
19
quote = symbol "\'"
19
quote = symbol "\'"
19
false
false
1
5
3
12
4
8
null
null
wellposed/hblas
src/Numerical/HBLAS/BLAS/Internal/Level1.hs
bsd-3-clause
rotmAbstraction :: (SM.Storable el, PrimMonad m, Show el) => String -> RotmFunFFI el -> RotmFunFFI el -> RotmFun el (PrimState m) m rotmAbstraction rotmName rotmSafeFFI rotmUnsafeFFI = rotm where shouldCallFast :: Bool shouldCallFast = True -- O(1) rotm n (MutableDenseVector _ adim astride abuff) ...
1,844
rotmAbstraction :: (SM.Storable el, PrimMonad m, Show el) => String -> RotmFunFFI el -> RotmFunFFI el -> RotmFun el (PrimState m) m rotmAbstraction rotmName rotmSafeFFI rotmUnsafeFFI = rotm where shouldCallFast :: Bool shouldCallFast = True -- O(1) rotm n (MutableDenseVector _ adim astride abuff) ...
1,844
rotmAbstraction rotmName rotmSafeFFI rotmUnsafeFFI = rotm where shouldCallFast :: Bool shouldCallFast = True -- O(1) rotm n (MutableDenseVector _ adim astride abuff) (MutableDenseVector _ bdim bstride bbuff) (MutableDenseVector _ pdim _ pbuff) | isVectorBadWithNIncrement adim n...
1,708
false
true
0
17
454
330
171
159
null
null
tpsinnem/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTTNameType :: Term -> ElabD NameType reifyTTNameType t@(P _ n _) | n == reflm "Bound" = return $ Bound
107
reifyTTNameType :: Term -> ElabD NameType reifyTTNameType t@(P _ n _) | n == reflm "Bound" = return $ Bound
107
reifyTTNameType t@(P _ n _) | n == reflm "Bound" = return $ Bound
65
false
true
0
9
19
51
24
27
null
null
ekmett/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- * Misc -- -- | Find CmmRegs that get assigned and allocate them on the stack -- -- Any register that gets written needs to be allcoated on the -- stack. This avoids having to map a CmmReg to an equivalent SSA form -- and avoids having ...
2,107
funPrologue :: LiveGlobalRegs -> [CmmBlock] -> LlvmM StmtData funPrologue live cmmBlocks = do trash <- getTrashRegs let getAssignedRegs :: CmmNode O O -> [CmmReg] getAssignedRegs (CmmAssign reg _) = [reg] -- Calls will trash all registers. Unfortunately, this needs them to -- be stack-allocated ...
1,473
funPrologue live cmmBlocks = do trash <- getTrashRegs let getAssignedRegs :: CmmNode O O -> [CmmReg] getAssignedRegs (CmmAssign reg _) = [reg] -- Calls will trash all registers. Unfortunately, this needs them to -- be stack-allocated in the first place. getAssignedRegs (CmmUnsafeForeignCal...
1,411
true
true
0
22
542
448
228
220
null
null
kmicklas/pyrec
src/Pyrec/Misc.hs
mit
(<$$$>) :: (Functor f, Functor f1, Functor f2) => (a -> b) -> f (f1 (f2 a)) -> f (f1 (f2 b)) (<$$$>) = fmap . fmap . fmap
132
(<$$$>) :: (Functor f, Functor f1, Functor f2) => (a -> b) -> f (f1 (f2 a)) -> f (f1 (f2 b)) (<$$$>) = fmap . fmap . fmap
132
(<$$$>) = fmap . fmap . fmap
28
false
true
1
13
39
95
48
47
null
null
mightymoose/liquidhaskell
tests/todo/AbsRefNameClash.hs
bsd-3-clause
-@ data Heap a <p :: a -> a -> Prop> = Empty | Node { pri :: a , rnk :: Nat , left :: {v: Heap<p> (a<p pri>) | ValidRank v} , right :: {v: Heap<p> (a<p pri>) | ValidRank v} } @-} {-@ predicate ValidRank V = okRank V && realRank V ...
879
rank Empty = 0
23
rank Empty = 0
23
true
false
41
14
341
413
229
184
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 110789 = 2249
33
getValueFromProduct 110789 = 2249
33
getValueFromProduct 110789 = 2249
33
false
false
0
5
3
9
4
5
null
null
lueck/htcf
src/HTCF/ConfigParser.hs
gpl-3.0
pcTcfSentenceIdPrefix :: IOSArrow XmlTree Config pcTcfSentenceIdPrefix = hasName "tcf" >>> getChildren >>> hasName "sentenceIdPrefix" >>> getAttrValue "prefix" >>> arr (TcfSentenceIdPrefix . defaultOnNull defaultTcfSentenceIdPrefix)
238
pcTcfSentenceIdPrefix :: IOSArrow XmlTree Config pcTcfSentenceIdPrefix = hasName "tcf" >>> getChildren >>> hasName "sentenceIdPrefix" >>> getAttrValue "prefix" >>> arr (TcfSentenceIdPrefix . defaultOnNull defaultTcfSentenceIdPrefix)
238
pcTcfSentenceIdPrefix = hasName "tcf" >>> getChildren >>> hasName "sentenceIdPrefix" >>> getAttrValue "prefix" >>> arr (TcfSentenceIdPrefix . defaultOnNull defaultTcfSentenceIdPrefix)
189
false
true
0
9
28
54
25
29
null
null
ghc-android/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
shouldInlinePrimOp _ CopySmallMutableArrayOp [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] = Just $ \ [] -> doCopySmallMutableArrayOp src src_off dst dst_off (fromInteger n)
191
shouldInlinePrimOp _ CopySmallMutableArrayOp [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] = Just $ \ [] -> doCopySmallMutableArrayOp src src_off dst dst_off (fromInteger n)
191
shouldInlinePrimOp _ CopySmallMutableArrayOp [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] = Just $ \ [] -> doCopySmallMutableArrayOp src src_off dst dst_off (fromInteger n)
191
false
false
0
10
35
70
37
33
null
null
wilbowma/accelerate
Data/Array/Accelerate/CUDA/CodeGen.hs
bsd-3-clause
codeGenIntegralTex (TypeCInt _) = [CTypeDef (internalIdent "TexCInt") internalNode]
89
codeGenIntegralTex (TypeCInt _) = [CTypeDef (internalIdent "TexCInt") internalNode]
89
codeGenIntegralTex (TypeCInt _) = [CTypeDef (internalIdent "TexCInt") internalNode]
89
false
false
0
8
13
29
14
15
null
null
SAdams601/HaRe
old/refactorer/RefacDupTrans.hs
bsd-3-clause
pruneCloneClass _ _ = []
24
pruneCloneClass _ _ = []
24
pruneCloneClass _ _ = []
24
false
false
1
6
4
14
6
8
null
null
Philonous/pontarius-xmpp
source/Network/Xmpp/Lens.hs
bsd-3-clause
-- SessionConfiguration ----------------------- streamConfigurationL :: Lens SessionConfiguration StreamConfiguration streamConfigurationL inj sc@SessionConfiguration{sessionStreamConfiguration = x} = (\x' -> sc{sessionStreamConfiguration = x'}) <$> inj x
259
streamConfigurationL :: Lens SessionConfiguration StreamConfiguration streamConfigurationL inj sc@SessionConfiguration{sessionStreamConfiguration = x} = (\x' -> sc{sessionStreamConfiguration = x'}) <$> inj x
211
streamConfigurationL inj sc@SessionConfiguration{sessionStreamConfiguration = x} = (\x' -> sc{sessionStreamConfiguration = x'}) <$> inj x
141
true
true
0
9
25
58
32
26
null
null
the-real-blackh/hexpat
Text/XML/Expat/Internal/Namespaced.hs
bsd-3-clause
nodeWithQualifiers :: (NodeClass n c, GenericXMLString text, Ord text, Functor c) => Int -> PrefixNsMap text -> n c (NName text) text -> n c (QName text) text nodeWithQualifiers cntr bindings = modifyElement namespaceify where namespac...
2,018
nodeWithQualifiers :: (NodeClass n c, GenericXMLString text, Ord text, Functor c) => Int -> PrefixNsMap text -> n c (NName text) text -> n c (QName text) text nodeWithQualifiers cntr bindings = modifyElement namespaceify where namespac...
2,018
nodeWithQualifiers cntr bindings = modifyElement namespaceify where namespaceify (nname, nattrs, nchildren) = (qname, qattrs, qchildren) where for = flip map ffor = flip fmap (nsAtts, otherAtts) = L.partition ((== Just xmlnsUri) . nnNamespace . fst) nattrs (dfAtt, normalAtts...
1,780
false
true
0
18
739
761
414
347
null
null
JustinUnger/haskell-book
ch24/ch24-ipv6.hs
mit
showAddr6 :: IPAddress6 -> String showAddr6 = concat . intersperse ":" . map showWord16 . addr6ToWords
102
showAddr6 :: IPAddress6 -> String showAddr6 = concat . intersperse ":" . map showWord16 . addr6ToWords
102
showAddr6 = concat . intersperse ":" . map showWord16 . addr6ToWords
68
false
true
0
8
15
33
16
17
null
null
sorki/odrive
src/LDrive/Tests/CANOpen.hs
bsd-3-clause
app :: (e -> ClockConfig) -> (e -> TestCAN) -> (e -> ColoredLEDs) -> Tower e () app tocc totestcan toleds = do can <- fmap totestcan getEnv leds <- fmap toleds getEnv ldriveTowerDeps (res, req, _, _) <- canTower tocc (testCAN can) 1000000 (testCANRX can) (testCANTX can) attrs@Cia402Attrs{.....
1,289
app :: (e -> ClockConfig) -> (e -> TestCAN) -> (e -> ColoredLEDs) -> Tower e () app tocc totestcan toleds = do can <- fmap totestcan getEnv leds <- fmap toleds getEnv ldriveTowerDeps (res, req, _, _) <- canTower tocc (testCAN can) 1000000 (testCANRX can) (testCANTX can) attrs@Cia402Attrs{.....
1,289
app tocc totestcan toleds = do can <- fmap totestcan getEnv leds <- fmap toleds getEnv ldriveTowerDeps (res, req, _, _) <- canTower tocc (testCAN can) 1000000 (testCANRX can) (testCANTX can) attrs@Cia402Attrs{..} <- towerCia402Attrs initCia402Attrs od@ObjDict{..} <- objDictTower attrs canopenTower ...
1,197
false
true
0
21
395
436
208
228
null
null
pparkkin/eta
compiler/ETA/Main/DynFlags.hs
bsd-3-clause
-- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@ fLangFlags :: [FlagSpec ExtensionFlag] fLangFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] flagSpec' "th" Opt_TemplateHaskell (\on -> deprecatedForExte...
2,161
fLangFlags :: [FlagSpec ExtensionFlag] fLangFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] flagSpec' "th" Opt_TemplateHaskell (\on -> deprecatedForExtension "TemplateHaskell" on >> checkTemplateHaskellOk on), fl...
2,090
fLangFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] flagSpec' "th" Opt_TemplateHaskell (\on -> deprecatedForExtension "TemplateHaskell" on >> checkTemplateHaskellOk on), flagSpec' "fi" ...
2,051
true
true
0
10
497
290
147
143
null
null
dmbarbour/awelon
hsrc/ABC/Imperative/Operations.hs
bsd-3-clause
-- | block literals require TWO encodings of the same program. -- -- The first is the raw ABC code for the program (as a string) -- The second is the Haskell encoding -- -- The two encodings must be equivalent up to performance. That is, -- it must always be possible to interpret the code instead of run -- the...
1,147
bl :: (Monad m) => String -> Prog m -> Prog m bl s p = return . (P (B b)) where b = Block { b_aff = False, b_rel = False, b_prog = p , b_code = S.fromList (read s) } -- | text literals are relatively trivial. They quote a text value, -- which has type `µT.(1+(Chr*T))` where Chr is a small integer in...
403
bl s p = return . (P (B b)) where b = Block { b_aff = False, b_rel = False, b_prog = p , b_code = S.fromList (read s) } -- | text literals are relatively trivial. They quote a text value, -- which has type `µT.(1+(Chr*T))` where Chr is a small integer in -- range 0..0x10ffff. We translate the given ...
357
true
true
2
10
247
134
77
57
null
null
drcabana/euler-fp
source/hs/P28.hs
epl-1.0
sumOfCorners n = 4*n*n - 6*n + 6
36
sumOfCorners n = 4*n*n - 6*n + 6
36
sumOfCorners n = 4*n*n - 6*n + 6
36
false
false
6
5
11
40
14
26
null
null
fmapfmapfmap/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/Types/Product.hs
mpl-2.0
-- | Undocumented member. mfFilterPattern :: Lens' MetricFilter (Maybe Text) mfFilterPattern = lens _mfFilterPattern (\ s a -> s{_mfFilterPattern = a})
151
mfFilterPattern :: Lens' MetricFilter (Maybe Text) mfFilterPattern = lens _mfFilterPattern (\ s a -> s{_mfFilterPattern = a})
125
mfFilterPattern = lens _mfFilterPattern (\ s a -> s{_mfFilterPattern = a})
74
true
true
0
9
20
46
25
21
null
null
a143753/AOJ
CGL_2_A.hs
apache-2.0
vnorm (x,y) = x*x+y*y
21
vnorm (x,y) = x*x+y*y
21
vnorm (x,y) = x*x+y*y
21
false
false
3
5
3
32
14
18
null
null
plaimi/tempuhs-server
src/Tempuhs/Server/Requests/Clock.hs
agpl-3.0
postClock :: ConnectionPool -> ActionE () -- | 'postClock' inserts a 'Clock'. postClock p = do n <- paramE "name" runDatabase p $ liftAE . jsonKey =<< insert (Clock n Nothing)
179
postClock :: ConnectionPool -> ActionE () postClock p = do n <- paramE "name" runDatabase p $ liftAE . jsonKey =<< insert (Clock n Nothing)
143
postClock p = do n <- paramE "name" runDatabase p $ liftAE . jsonKey =<< insert (Clock n Nothing)
101
true
true
0
11
34
68
30
38
null
null
nikki-and-the-robots/nikki
src/Editor/Menu.hs
lgpl-3.0
fileExists app save path metaData objects = menuAppState app menuType (Just save) ( MenuItem (p "no") (const save) : MenuItem (p "yes") (const writeAnyway) : []) 0 where menuType = NormalMenu (p "saving level") (Just (pVerbatim path <> p " already exists")) writeAnyway = appState (...
446
fileExists app save path metaData objects = menuAppState app menuType (Just save) ( MenuItem (p "no") (const save) : MenuItem (p "yes") (const writeAnyway) : []) 0 where menuType = NormalMenu (p "saving level") (Just (pVerbatim path <> p " already exists")) writeAnyway = appState (...
446
fileExists app save path metaData objects = menuAppState app menuType (Just save) ( MenuItem (p "no") (const save) : MenuItem (p "yes") (const writeAnyway) : []) 0 where menuType = NormalMenu (p "saving level") (Just (pVerbatim path <> p " already exists")) writeAnyway = appState (...
446
false
false
0
11
115
165
78
87
null
null
JoshuaGross/haskell-learning-log
Code/Haskellbook/Reader/src/Functions.hs
mit
frooty :: Num a => [a] -> ([a], Int) frooty r = bar (foo r) r
61
frooty :: Num a => [a] -> ([a], Int) frooty r = bar (foo r) r
61
frooty r = bar (foo r) r
24
false
true
0
8
15
48
25
23
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/concat_1.hs
mit
foldr :: (a -> b -> b) -> b -> (List a) -> b; foldr f z Nil = z
73
foldr :: (a -> b -> b) -> b -> (List a) -> b foldr f z Nil = z
72
foldr f z Nil = z
17
false
true
0
9
29
48
25
23
null
null
randrade23/html-render
src/HTMLRender/HTMLPretty.hs
mit
ppHTML :: Document -> String ppHTML (Doc vs) = wrapBold ("% " ++ t) ++ (unlines $ map ppValue vs) where t = (if null $ findTitle vs then "" else (findTitle vs) !! 0) ++ "\n"
177
ppHTML :: Document -> String ppHTML (Doc vs) = wrapBold ("% " ++ t) ++ (unlines $ map ppValue vs) where t = (if null $ findTitle vs then "" else (findTitle vs) !! 0) ++ "\n"
177
ppHTML (Doc vs) = wrapBold ("% " ++ t) ++ (unlines $ map ppValue vs) where t = (if null $ findTitle vs then "" else (findTitle vs) !! 0) ++ "\n"
148
false
true
1
10
40
99
47
52
null
null
ssaavedra/liquidhaskell
tests/pos/RelativeComplete.hs
bsd-3-clause
{-@ LIQUID "--no-termination" @-} -- Here p and q of `app` will be instantiated to -- p , q := \v -> i <= v main i = app (check i) i
135
main i = app (check i) i
24
main i = app (check i) i
24
true
false
0
7
34
23
12
11
null
null
bjpop/blip
blipcompiler/src/Blip/Compiler/Compile.hs
bsd-3-clause
compileExpr expr@(AST.Float {}) = compileConstantEmit $ constantToPyObject expr
82
compileExpr expr@(AST.Float {}) = compileConstantEmit $ constantToPyObject expr
82
compileExpr expr@(AST.Float {}) = compileConstantEmit $ constantToPyObject expr
82
false
false
0
9
10
28
14
14
null
null
AlexeyRaga/eta
compiler/ETA/Main/HscTypes.hs
bsd-3-clause
hptAnns hsc_env Nothing = hptAllThings (md_anns . hm_details) hsc_env
69
hptAnns hsc_env Nothing = hptAllThings (md_anns . hm_details) hsc_env
69
hptAnns hsc_env Nothing = hptAllThings (md_anns . hm_details) hsc_env
69
false
false
0
7
8
23
11
12
null
null
nushio3/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
exprIsCheap' good_app (Case e _ _ alts) = exprIsCheap' good_app e && and [exprIsCheap' good_app rhs | (_,_,rhs) <- alts]
162
exprIsCheap' good_app (Case e _ _ alts) = exprIsCheap' good_app e && and [exprIsCheap' good_app rhs | (_,_,rhs) <- alts]
162
exprIsCheap' good_app (Case e _ _ alts) = exprIsCheap' good_app e && and [exprIsCheap' good_app rhs | (_,_,rhs) <- alts]
162
false
false
0
10
61
60
30
30
null
null
DNoved1/distill
src/Distill/Expr/Representation.hs
mit
parseProduct :: Parser (Type' String) parseProduct = label' "product type" $ withSource $ do symbol tokens "(&" factors <- flip sepBy (symbol tokens "&") $ choice [ try $ do x <- identifier tokens symbol tokens ":" t <- parseExpr return (x, t) , do...
674
parseProduct :: Parser (Type' String) parseProduct = label' "product type" $ withSource $ do symbol tokens "(&" factors <- flip sepBy (symbol tokens "&") $ choice [ try $ do x <- identifier tokens symbol tokens ":" t <- parseExpr return (x, t) , do...
674
parseProduct = label' "product type" $ withSource $ do symbol tokens "(&" factors <- flip sepBy (symbol tokens "&") $ choice [ try $ do x <- identifier tokens symbol tokens ":" t <- parseExpr return (x, t) , do t <- parseExpr ...
636
false
true
0
18
263
218
98
120
null
null
bitemyapp/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
mkTcNthCo :: Int -> TcCoercion -> TcCoercion mkTcNthCo n (TcRefl r ty) = TcRefl r (tyConAppArgN n ty)
101
mkTcNthCo :: Int -> TcCoercion -> TcCoercion mkTcNthCo n (TcRefl r ty) = TcRefl r (tyConAppArgN n ty)
101
mkTcNthCo n (TcRefl r ty) = TcRefl r (tyConAppArgN n ty)
56
false
true
0
7
17
45
22
23
null
null
Oscarzhao/haskell
functional_program_design/ch05/sudoku_orig.hs
apache-2.0
cols :: Matrix a -> Matrix a cols [xs] = [[x] | x <- xs]
57
cols :: Matrix a -> Matrix a cols [xs] = [[x] | x <- xs]
56
cols [xs] = [[x] | x <- xs]
27
false
true
0
8
15
46
22
24
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/ConvertHaskell/TypeInfo.hs
mit
store' lens qid@(Qualified mi _) x = do TypeInfoT (use (processedModules.contains mi)) >>= \case False -> liftIO $ do hPutStrLn stderr $ "Cannot store information about " ++ showP qid --exitFailure True -> TypeInfoT $ modify $ lens . at qid ?~ x
289
store' lens qid@(Qualified mi _) x = do TypeInfoT (use (processedModules.contains mi)) >>= \case False -> liftIO $ do hPutStrLn stderr $ "Cannot store information about " ++ showP qid --exitFailure True -> TypeInfoT $ modify $ lens . at qid ?~ x
289
store' lens qid@(Qualified mi _) x = do TypeInfoT (use (processedModules.contains mi)) >>= \case False -> liftIO $ do hPutStrLn stderr $ "Cannot store information about " ++ showP qid --exitFailure True -> TypeInfoT $ modify $ lens . at qid ?~ x
289
false
false
1
18
86
111
49
62
null
null
melted/idris-java
src/IRTS/Java/JTypes.hs
bsd-3-clause
sourceTypes (LExternal n) | n == sUN "prim__readFile" = [worldType, objectType] | n == sUN "prim__writeFile" = [worldType, objectType, stringType] | n == sUN "prim__stdin" = [] | n == sUN "prim__stdout" = [] | n == sUN "prim__stderr" =...
960
sourceTypes (LExternal n) | n == sUN "prim__readFile" = [worldType, objectType] | n == sUN "prim__writeFile" = [worldType, objectType, stringType] | n == sUN "prim__stdin" = [] | n == sUN "prim__stdout" = [] | n == sUN "prim__stderr" =...
960
sourceTypes (LExternal n) | n == sUN "prim__readFile" = [worldType, objectType] | n == sUN "prim__writeFile" = [worldType, objectType, stringType] | n == sUN "prim__stdin" = [] | n == sUN "prim__stdout" = [] | n == sUN "prim__stderr" =...
960
false
false
0
9
323
255
124
131
null
null
skeskinen/FTGL
Graphics/Rendering/FTGL.hs
bsd-2-clause
marshalCharMap EncodingBig5= encodeTag 'b' 'i' 'g' '5'
54
marshalCharMap EncodingBig5= encodeTag 'b' 'i' 'g' '5'
54
marshalCharMap EncodingBig5= encodeTag 'b' 'i' 'g' '5'
54
false
false
0
5
6
18
8
10
null
null
haskell-tinc/hpack
src/Hpack/Render.hs
mit
renderSystemBuildTool :: (String, VersionConstraint) -> String renderSystemBuildTool (name, constraint) = name ++ renderVersionConstraint constraint
148
renderSystemBuildTool :: (String, VersionConstraint) -> String renderSystemBuildTool (name, constraint) = name ++ renderVersionConstraint constraint
148
renderSystemBuildTool (name, constraint) = name ++ renderVersionConstraint constraint
85
false
true
0
6
13
37
20
17
null
null
Paow/encore
src/types/Typechecker/Typechecker.hs
bsd-3-clause
checkSubordinateReturn :: Name -> Type -> Type -> TypecheckM () checkSubordinateReturn name returnType targetType = do subordReturn <- isSubordinateType returnType targetIsEncaps <- isEncapsulatedType targetType when subordReturn $ unless targetIsEncaps $ tcError $ SubordinateReturnError name
320
checkSubordinateReturn :: Name -> Type -> Type -> TypecheckM () checkSubordinateReturn name returnType targetType = do subordReturn <- isSubordinateType returnType targetIsEncaps <- isEncapsulatedType targetType when subordReturn $ unless targetIsEncaps $ tcError $ SubordinateReturnError name
320
checkSubordinateReturn name returnType targetType = do subordReturn <- isSubordinateType returnType targetIsEncaps <- isEncapsulatedType targetType when subordReturn $ unless targetIsEncaps $ tcError $ SubordinateReturnError name
256
false
true
0
11
60
84
36
48
null
null
madjestic/b1
tests/B1/Data/Price/GoogleTest.hs
bsd-3-clause
case_parseGoogleCsv_badFormat :: Assertion case_parseGoogleCsv_badFormat = let csv = foldl (++) "" ([headers] ++ goodLines ++ [badFormat]) in assertEqual "" (Right "Invalid CSV format") (parseGoogleCsv csv)
210
case_parseGoogleCsv_badFormat :: Assertion case_parseGoogleCsv_badFormat = let csv = foldl (++) "" ([headers] ++ goodLines ++ [badFormat]) in assertEqual "" (Right "Invalid CSV format") (parseGoogleCsv csv)
210
case_parseGoogleCsv_badFormat = let csv = foldl (++) "" ([headers] ++ goodLines ++ [badFormat]) in assertEqual "" (Right "Invalid CSV format") (parseGoogleCsv csv)
167
false
true
0
13
28
67
35
32
null
null
tpsinnem/Idris-dev
src/Idris/Providers.hs
bsd-3-clause
ermod :: Name ermod = sNS (sUN "Error") ["Providers", "Prelude"]
64
ermod :: Name ermod = sNS (sUN "Error") ["Providers", "Prelude"]
64
ermod = sNS (sUN "Error") ["Providers", "Prelude"]
50
false
true
0
7
9
34
16
18
null
null
nfjinjing/miku
src/Network/Miku/DSL.hs
bsd-3-clause
json :: ByteString -> AppMonad' json x = do modify - setContentType "text/json" modify - setBody - x
104
json :: ByteString -> AppMonad' json x = do modify - setContentType "text/json" modify - setBody - x
104
json x = do modify - setContentType "text/json" modify - setBody - x
72
false
true
0
8
21
45
19
26
null
null
sol/aeson
tests/UnitTests.hs
bsd-3-clause
utcTimeGood :: Assertion utcTimeGood = do let ts1 = "2015-01-01T12:13:00.00Z" :: LT.Text let ts2 = "2015-01-01T12:13:00Z" :: LT.Text -- 'T' between date and time is not required, can be space let ts3 = "2015-01-03 12:13:00.00Z" :: LT.Text let ts4 = "2015-01-03 12:13:00.125Z" :: LT.Text let (Just (t1 :: UTC...
2,720
utcTimeGood :: Assertion utcTimeGood = do let ts1 = "2015-01-01T12:13:00.00Z" :: LT.Text let ts2 = "2015-01-01T12:13:00Z" :: LT.Text -- 'T' between date and time is not required, can be space let ts3 = "2015-01-03 12:13:00.00Z" :: LT.Text let ts4 = "2015-01-03 12:13:00.125Z" :: LT.Text let (Just (t1 :: UTC...
2,720
utcTimeGood = do let ts1 = "2015-01-01T12:13:00.00Z" :: LT.Text let ts2 = "2015-01-01T12:13:00Z" :: LT.Text -- 'T' between date and time is not required, can be space let ts3 = "2015-01-03 12:13:00.00Z" :: LT.Text let ts4 = "2015-01-03 12:13:00.125Z" :: LT.Text let (Just (t1 :: UTCTime)) = parseWithAeson t...
2,695
false
true
0
13
478
816
388
428
null
null
capitanbatata/marlows-parconc-exercises
parconc-ch07/test/ChanSpec.hs
gpl-3.0
spec :: Spec spec = do let testList = [0..100] describe "Unbounded channels" $ do it "buffers items" $ do ch <- newChan a <- async $ mapM_ (writeChan ch) testList receivedList <- mapM (const (readChan ch)) testList wait a receivedList `shouldBe` testList it "supports multipl...
2,159
spec :: Spec spec = do let testList = [0..100] describe "Unbounded channels" $ do it "buffers items" $ do ch <- newChan a <- async $ mapM_ (writeChan ch) testList receivedList <- mapM (const (readChan ch)) testList wait a receivedList `shouldBe` testList it "supports multipl...
2,159
spec = do let testList = [0..100] describe "Unbounded channels" $ do it "buffers items" $ do ch <- newChan a <- async $ mapM_ (writeChan ch) testList receivedList <- mapM (const (readChan ch)) testList wait a receivedList `shouldBe` testList it "supports multiple readers/wri...
2,146
false
true
0
19
638
674
310
364
null
null
ezyang/ghc
testsuite/tests/codeGen/should_run/CmmSwitchTest64.hs
bsd-3-clause
ah 2# = 43#
11
ah 2# = 43#
11
ah 2# = 43#
11
false
false
0
5
3
9
4
5
null
null
intolerable/GroupProject
src/Emulator/CPU/Instructions/THUMB/Opcodes.hs
bsd-2-clause
functionFromOpcode :: IsSystem s m => ThumbOpcode -> (RegisterName -> RegisterName -> m ()) functionFromOpcode op = case op of T_AND -> tAnd T_EOR -> tEor T_LSL -> tLsl T_LSR -> tLsr T_ASR -> tAsr T_ADC -> tAdc T_SBC -> tSbc T_ROR -> tRor T_TST -> tTst T_NEG -> tNeg T_CMP -> tCmp T_CMN -> tCmn ...
488
functionFromOpcode :: IsSystem s m => ThumbOpcode -> (RegisterName -> RegisterName -> m ()) functionFromOpcode op = case op of T_AND -> tAnd T_EOR -> tEor T_LSL -> tLsl T_LSR -> tLsr T_ASR -> tAsr T_ADC -> tAdc T_SBC -> tSbc T_ROR -> tRor T_TST -> tTst T_NEG -> tNeg T_CMP -> tCmp T_CMN -> tCmn ...
488
functionFromOpcode op = case op of T_AND -> tAnd T_EOR -> tEor T_LSL -> tLsl T_LSR -> tLsr T_ASR -> tAsr T_ADC -> tAdc T_SBC -> tSbc T_ROR -> tRor T_TST -> tTst T_NEG -> tNeg T_CMP -> tCmp T_CMN -> tCmn T_ORR -> tOrr T_MUL -> tMul T_BIC -> tBic T_MVN -> tMvn T_MOV -> error "Mov passed ...
396
false
true
0
11
121
161
79
82
null
null
nh2/haskell-ordnub
MiniSet.hs
mit
ordNubStrictAcc :: Ord a => [a] -> [a] ordNubStrictAcc = go empty where go !_ [] = [] go !s (x : xs) = if member x s then go s xs else x : go (insert x s) xs
189
ordNubStrictAcc :: Ord a => [a] -> [a] ordNubStrictAcc = go empty where go !_ [] = [] go !s (x : xs) = if member x s then go s xs else x : go (insert x s) xs
189
ordNubStrictAcc = go empty where go !_ [] = [] go !s (x : xs) = if member x s then go s xs else x : go (insert x s) xs
150
false
true
3
9
71
114
52
62
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 83030 = 4609
32
getValueFromProduct 83030 = 4609
32
getValueFromProduct 83030 = 4609
32
false
false
0
5
3
9
4
5
null
null
wavewave/lhc-analysis-collection
lib/HEP/Physics/Analysis/ATLAS/SUSY/SUSY_1to2L2to6JMET_8TeV.hs
gpl-3.0
-- | preselection object for hard lepton analysis preselectionHard :: PhyEventNoTau -> PhyEventNoTauNoBJet preselectionHard ev = let alljs = (map (\case JO_Jet j ->j ; JO_BJet b -> bJet2Jet b) . view jetBJets) ev es = filter (\e -> pt e > 10 && abs (eta e) < 2.47) . view electrons $ ev ms = filter (\m ...
629
preselectionHard :: PhyEventNoTau -> PhyEventNoTauNoBJet preselectionHard ev = let alljs = (map (\case JO_Jet j ->j ; JO_BJet b -> bJet2Jet b) . view jetBJets) ev es = filter (\e -> pt e > 10 && abs (eta e) < 2.47) . view electrons $ ev ms = filter (\m -> pt m > 10 && abs (eta m) < 2.4) . view muons ...
579
preselectionHard ev = let alljs = (map (\case JO_Jet j ->j ; JO_BJet b -> bJet2Jet b) . view jetBJets) ev es = filter (\e -> pt e > 10 && abs (eta e) < 2.47) . view electrons $ ev ms = filter (\m -> pt m > 10 && abs (eta m) < 2.4) . view muons $ ev js = filter (\j -> pt j > 20 && abs (eta j...
522
true
true
0
18
182
302
144
158
null
null
ArthurClune/pastewatch
src/PasteWatch/Sites.hs
gpl-3.0
getNewPastes Slexy = getNewPastes' "http://slexy.org/recent" (css "div[class=main] tr a" ! "href") (\u -> "http://slexy.org/raw/" ++ drop 6 u)
182
getNewPastes Slexy = getNewPastes' "http://slexy.org/recent" (css "div[class=main] tr a" ! "href") (\u -> "http://slexy.org/raw/" ++ drop 6 u)
182
getNewPastes Slexy = getNewPastes' "http://slexy.org/recent" (css "div[class=main] tr a" ! "href") (\u -> "http://slexy.org/raw/" ++ drop 6 u)
182
false
false
0
9
57
43
21
22
null
null
uuhan/Idris-dev
src/Idris/Unlit.hs
bsd-3-clause
check :: FilePath -> Int -> [(LineType, String)] -> TC () check f l (a:b:cs) = do chkAdj f l (fst a) (fst b) check f (l+1) (b:cs)
153
check :: FilePath -> Int -> [(LineType, String)] -> TC () check f l (a:b:cs) = do chkAdj f l (fst a) (fst b) check f (l+1) (b:cs)
153
check f l (a:b:cs) = do chkAdj f l (fst a) (fst b) check f (l+1) (b:cs)
95
false
true
0
9
51
103
52
51
null
null
ideas-edu/ideas
src/Ideas/Common/Exercise.hs
apache-2.0
diffEnvironment :: HasEnvironment a => Derivation s a -> Derivation (s, Environment) a diffEnvironment = updateSteps $ \old a new -> let keep x = not (getId x == newId "location" || x `elem` list) list = bindings old in (a, makeEnvironment $ filter keep $ bindings new)
286
diffEnvironment :: HasEnvironment a => Derivation s a -> Derivation (s, Environment) a diffEnvironment = updateSteps $ \old a new -> let keep x = not (getId x == newId "location" || x `elem` list) list = bindings old in (a, makeEnvironment $ filter keep $ bindings new)
285
diffEnvironment = updateSteps $ \old a new -> let keep x = not (getId x == newId "location" || x `elem` list) list = bindings old in (a, makeEnvironment $ filter keep $ bindings new)
198
false
true
0
16
64
125
60
65
null
null
energyflowanalysis/efa-2.1
test/EFA/Test/Signal.hs
bsd-3-clause
------------------------------------------------------------------- prop_functor_identity :: Val Double -> Bool prop_functor_identity x = fmap id x == x
154
prop_functor_identity :: Val Double -> Bool prop_functor_identity x = fmap id x == x
84
prop_functor_identity x = fmap id x == x
40
true
true
1
7
16
41
17
24
null
null
Michaelt293/Lipid-Haskell
src/Lipid/Parsers/CombinedRadyl/Glycerophospholipid.hs
gpl-3.0
pgP :: Parser a -> Parser (PG a) pgP p = PG <$> (string "PG " *> twoCombinedRadylsP p)
86
pgP :: Parser a -> Parser (PG a) pgP p = PG <$> (string "PG " *> twoCombinedRadylsP p)
86
pgP p = PG <$> (string "PG " *> twoCombinedRadylsP p)
53
false
true
0
9
18
51
23
28
null
null
martijnbastiaan/sprockell
src/Sprockell/System.hs
mit
memDevice mem (addr, WriteReq value) = return (mem <~= (addr, value), Nothing)
78
memDevice mem (addr, WriteReq value) = return (mem <~= (addr, value), Nothing)
78
memDevice mem (addr, WriteReq value) = return (mem <~= (addr, value), Nothing)
78
false
false
0
8
11
39
21
18
null
null
Deewiant/haschoo
Haschoo/Evaluator/Standard/Numeric.hs
bsd-3-clause
isInteger (ScmComplex (a:+b)) = b == 0 && a == fromInteger (round a)
68
isInteger (ScmComplex (a:+b)) = b == 0 && a == fromInteger (round a)
68
isInteger (ScmComplex (a:+b)) = b == 0 && a == fromInteger (round a)
68
false
false
0
8
12
44
21
23
null
null
CloudI/CloudI
src/api/haskell/external/binary-0.8.7.0/tests/Action.hs
mit
gen_actions :: Bool -> Gen [Action] gen_actions genFail = do acts <- sized (go False) return acts where go :: Bool -> Int -> Gen [Action] go _ 0 = return [] go inTry s = oneof $ [ do n <- choose (0,10) (:) (GetByteString n) <$> go inTry (s-1) , do n <- ...
1,723
gen_actions :: Bool -> Gen [Action] gen_actions genFail = do acts <- sized (go False) return acts where go :: Bool -> Int -> Gen [Action] go _ 0 = return [] go inTry s = oneof $ [ do n <- choose (0,10) (:) (GetByteString n) <$> go inTry (s-1) , do n <- ...
1,723
gen_actions genFail = do acts <- sized (go False) return acts where go :: Bool -> Int -> Gen [Action] go _ 0 = return [] go inTry s = oneof $ [ do n <- choose (0,10) (:) (GetByteString n) <$> go inTry (s-1) , do n <- choose (0,10) ...
1,687
false
true
0
16
902
730
374
356
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x1E9B' = "\x017F\x0307"
39
decomposeChar '\x1E9B' = "\x017F\x0307"
39
decomposeChar '\x1E9B' = "\x017F\x0307"
39
false
false
1
5
3
13
4
9
null
null
shadwstalkr/GrahamScanDemo
test.hs
gpl-3.0
evaluate points = do start <- getCurrentTime grahamScan points `deepseq` return () end <- getCurrentTime hPutStrLn stderr . show $ diffUTCTime end start
160
evaluate points = do start <- getCurrentTime grahamScan points `deepseq` return () end <- getCurrentTime hPutStrLn stderr . show $ diffUTCTime end start
160
evaluate points = do start <- getCurrentTime grahamScan points `deepseq` return () end <- getCurrentTime hPutStrLn stderr . show $ diffUTCTime end start
160
false
false
1
10
30
63
26
37
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Primitive.hs
bsd-3-clause
dropWhile = G.dropWhile
23
dropWhile = G.dropWhile
23
dropWhile = G.dropWhile
23
false
false
1
6
2
12
4
8
null
null
cdparks/mini-core
src/MiniCore/Template.hs
mit
-- Convert a binary arithmetic function into a function on nodes fromBinary :: (Int -> Int -> Int) -> (Node -> Node -> Node) fromBinary f (NNum x) (NNum y) = NNum $ f x y
170
fromBinary :: (Int -> Int -> Int) -> (Node -> Node -> Node) fromBinary f (NNum x) (NNum y) = NNum $ f x y
105
fromBinary f (NNum x) (NNum y) = NNum $ f x y
45
true
true
0
10
35
71
35
36
null
null
vizziv/qsim
src/Job.hs
bsd-3-clause
repeated :: Int -> (a -> a) -> a -> a repeated n f x = foldl' (flip ($)) x (replicate n f)
90
repeated :: Int -> (a -> a) -> a -> a repeated n f x = foldl' (flip ($)) x (replicate n f)
90
repeated n f x = foldl' (flip ($)) x (replicate n f)
52
false
true
0
8
22
60
31
29
null
null
haskell/haddock
haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
bsd-2-clause
divContent = sectionDiv "content"
42
divContent = sectionDiv "content"
42
divContent = sectionDiv "content"
42
false
false
0
5
12
9
4
5
null
null
narurien/ganeti-ceph
src/Ganeti/Utils.hs
gpl-2.0
recombineEithers :: (Show a, Show b) => [a] -> [b] -> [Bool] -> Result [Either a b] recombineEithers lefts rights trail = foldM recombiner ([], lefts, rights) trail >>= checker where checker (eithers, [], []) = Ok eithers checker (_, lefts', rights') = Bad $ "Inconsistent...
785
recombineEithers :: (Show a, Show b) => [a] -> [b] -> [Bool] -> Result [Either a b] recombineEithers lefts rights trail = foldM recombiner ([], lefts, rights) trail >>= checker where checker (eithers, [], []) = Ok eithers checker (_, lefts', rights') = Bad $ "Inconsistent...
785
recombineEithers lefts rights trail = foldM recombiner ([], lefts, rights) trail >>= checker where checker (eithers, [], []) = Ok eithers checker (_, lefts', rights') = Bad $ "Inconsistent results after recombination, l'=" ++ show lefts' ++ ", r'=" ++ show rights' r...
681
false
true
0
12
287
289
153
136
null
null
timtylin/scholdoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
atxClosing :: MarkdownParser Attr atxClosing = try $ do attr' <- option nullAttr (guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier) skipMany (char '#') skipSpaces attr <- option attr' (guardEnabled Ext_header_attributes >> attributes) blanklines return attr
309
atxClosing :: MarkdownParser Attr atxClosing = try $ do attr' <- option nullAttr (guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier) skipMany (char '#') skipSpaces attr <- option attr' (guardEnabled Ext_header_attributes >> attributes) blanklines return attr
309
atxClosing = try $ do attr' <- option nullAttr (guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier) skipMany (char '#') skipSpaces attr <- option attr' (guardEnabled Ext_header_attributes >> attributes) blanklines return attr
275
false
true
0
12
69
86
38
48
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110330set2.hs
gpl-3.0
sets :: [Int] sets = [1]
24
sets :: [Int] sets = [1]
24
sets = [1]
10
false
true
0
5
5
17
10
7
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/Coverage.hs
bsd-3-clause
addTickLStmts' :: (Maybe (Bool -> BoxLabel)) -> [ExprLStmt Id] -> TM a -> TM ([ExprLStmt Id], a) addTickLStmts' isGuard lstmts res = bindLocals (collectLStmtsBinders lstmts) $ do { lstmts' <- mapM (liftL (addTickStmt isGuard)) lstmts ; a <- res ; return (lstmts', a) }
303
addTickLStmts' :: (Maybe (Bool -> BoxLabel)) -> [ExprLStmt Id] -> TM a -> TM ([ExprLStmt Id], a) addTickLStmts' isGuard lstmts res = bindLocals (collectLStmtsBinders lstmts) $ do { lstmts' <- mapM (liftL (addTickStmt isGuard)) lstmts ; a <- res ; return (lstmts', a) }
303
addTickLStmts' isGuard lstmts res = bindLocals (collectLStmtsBinders lstmts) $ do { lstmts' <- mapM (liftL (addTickStmt isGuard)) lstmts ; a <- res ; return (lstmts', a) }
191
false
true
0
13
78
127
64
63
null
null
peteg/ADHOC
Apps/Cache/Tests/030_cache_bugfinder.hs
gpl-2.0
proc_writeP i = "pw" ++ show i
30
proc_writeP i = "pw" ++ show i
30
proc_writeP i = "pw" ++ show i
30
false
false
0
6
6
16
7
9
null
null
kawu/dawg-new
src/Data/DAWG/Dynamic/State/Trans/Vect.hs
bsd-2-clause
printTrans' :: Trans' -> IO () printTrans' Trans'{..} = forM_ [0..size'-1] $ \i -> do print (symv' I.! i, stiv' I.! i) ------------------------------------------------------------------ -- Conversion ------------------------------------------------------------------ -- | Translate map to its pure version.
314
printTrans' :: Trans' -> IO () printTrans' Trans'{..} = forM_ [0..size'-1] $ \i -> do print (symv' I.! i, stiv' I.! i) ------------------------------------------------------------------ -- Conversion ------------------------------------------------------------------ -- | Translate map to its pure version.
314
printTrans' Trans'{..} = forM_ [0..size'-1] $ \i -> do print (symv' I.! i, stiv' I.! i) ------------------------------------------------------------------ -- Conversion ------------------------------------------------------------------ -- | Translate map to its pure version.
283
false
true
0
11
41
78
41
37
null
null
Bodigrim/arithmoi
test-suite/Math/NumberTheory/Moduli/ClassTests.hs
mit
someModAbsSignumProperty :: Integer -> Positive Natural -> Bool someModAbsSignumProperty x (Positive m) = z == abs z * signum z where z = x `modulo` m
156
someModAbsSignumProperty :: Integer -> Positive Natural -> Bool someModAbsSignumProperty x (Positive m) = z == abs z * signum z where z = x `modulo` m
156
someModAbsSignumProperty x (Positive m) = z == abs z * signum z where z = x `modulo` m
92
false
true
1
7
31
64
30
34
null
null
christiaanb/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
monadPlusClassKey, randomClassKey, randomGenClassKey :: Unique monadPlusClassKey = mkPreludeClassUnique 30
112
monadPlusClassKey, randomClassKey, randomGenClassKey :: Unique monadPlusClassKey = mkPreludeClassUnique 30
112
monadPlusClassKey = mkPreludeClassUnique 30
49
false
true
0
5
14
18
11
7
null
null
HIPERFIT/language-c-quote
Language/C/Parser/Tokens.hs
bsd-3-clause
tokenStrings :: [(Token, String)] tokenStrings = [(Tlparen, "("), (Trparen, ")"), (Tlbrack, "["), (Trbrack, "]"), (Tlbrace, "{"), (Trbrace, "}"), (Tcomma, ","), (Tsemi, ";")...
3,976
tokenStrings :: [(Token, String)] tokenStrings = [(Tlparen, "("), (Trparen, ")"), (Tlbrack, "["), (Trbrack, "]"), (Tlbrace, "{"), (Trbrace, "}"), (Tcomma, ","), (Tsemi, ";")...
3,976
tokenStrings = [(Tlparen, "("), (Trparen, ")"), (Tlbrack, "["), (Trbrack, "]"), (Tlbrace, "{"), (Trbrace, "}"), (Tcomma, ","), (Tsemi, ";"), (Tcolon, ":...
3,942
false
true
0
8
2,270
891
592
299
null
null
ekmett/ghc
includes/CodeGen.Platform.hs
bsd-3-clause
callerSaves CurrentNursery = True
36
callerSaves CurrentNursery = True
36
callerSaves CurrentNursery = True
36
false
false
0
5
6
9
4
5
null
null