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
meiersi/blaze-builder
benchmarks/Throughput/BinaryBuilderDeclarative.hs
bsd-3-clause
------------------------------------------------------------------------ -- Host endian, unaligned, word64 writes writeWord64N1Host = mconcat . map putWord64host . word64List
176
writeWord64N1Host = mconcat . map putWord64host . word64List
61
writeWord64N1Host = mconcat . map putWord64host . word64List
61
true
false
0
7
16
19
10
9
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/pred_7.hs
mit
primEqNat (Succ x) Zero = MyFalse
33
primEqNat (Succ x) Zero = MyFalse
33
primEqNat (Succ x) Zero = MyFalse
33
false
false
0
7
5
17
8
9
null
null
sleepomeno/TForth
src/TF/Printer.hs
apache-2.0
dataType' (IndexedStackType WildcardWrapper index) = text $ "xw" ++ showMaybe index
83
dataType' (IndexedStackType WildcardWrapper index) = text $ "xw" ++ showMaybe index
83
dataType' (IndexedStackType WildcardWrapper index) = text $ "xw" ++ showMaybe index
83
false
false
0
7
10
28
13
15
null
null
tolysz/prepare-ghcjs
spec-lts8/aeson/Data/Aeson/TH.hs
bsd-3-clause
jsonFunValName ToJSON Arity2 = 'liftToJSON2
47
jsonFunValName ToJSON Arity2 = 'liftToJSON2
47
jsonFunValName ToJSON Arity2 = 'liftToJSON2
47
false
false
0
5
8
12
6
6
null
null
evansb/sacred
sacred/Driver/JavaScript.hs
mit
minMaxPos :: [STree] -> (SourcePos, SourcePos) minMaxPos s = (minPos, maxPos) where minPos = case s of SLeaf _ s : _ -> s SNode _ (l, _) _ : _ -> l _ -> error "Wrong match" maxPos = case last s of SLeaf _ s -> s ...
401
minMaxPos :: [STree] -> (SourcePos, SourcePos) minMaxPos s = (minPos, maxPos) where minPos = case s of SLeaf _ s : _ -> s SNode _ (l, _) _ : _ -> l _ -> error "Wrong match" maxPos = case last s of SLeaf _ s -> s ...
401
minMaxPos s = (minPos, maxPos) where minPos = case s of SLeaf _ s : _ -> s SNode _ (l, _) _ : _ -> l _ -> error "Wrong match" maxPos = case last s of SLeaf _ s -> s SNode _ (_, r) _ -> r ...
354
false
true
4
11
203
129
69
60
null
null
ku00/meow
src/Command.hs
bsd-3-clause
execCommand :: IO () execCommand = execParser parseInfo >>= run where run cmd = case cmd of Init -> initialize New t -> newTask t Add t l -> addLine t l Run t -> runTask t
253
execCommand :: IO () execCommand = execParser parseInfo >>= run where run cmd = case cmd of Init -> initialize New t -> newTask t Add t l -> addLine t l Run t -> runTask t
253
execCommand = execParser parseInfo >>= run where run cmd = case cmd of Init -> initialize New t -> newTask t Add t l -> addLine t l Run t -> runTask t
232
false
true
0
8
118
83
38
45
null
null
binesiyu/ifl
examples/ch05/Prettify.hs
mit
{-- /snippet fsep --} {-- snippet group --} group :: Doc -> Doc group x = flatten x `Union` x
94
group :: Doc -> Doc group x = flatten x `Union` x
49
group x = flatten x `Union` x
29
true
true
0
7
20
37
18
19
null
null
ecaustin/haskhol-deductive
src/HaskHOL/Lib/Tactics.hs
bsd-2-clause
tacX_GEN :: forall tm cls thry. (BoolCtxt thry, HOLTermRep tm cls thry) => tm -> Tactic cls thry tacX_GEN px (Goal asl w@(Forall x bod)) = do x' <- toHTm px let avoids = foldr (union . thmFrees . snd) (frees w) asl if x' `elem` avoids then fail "tacX_GEN: variable free in goal."...
683
tacX_GEN :: forall tm cls thry. (BoolCtxt thry, HOLTermRep tm cls thry) => tm -> Tactic cls thry tacX_GEN px (Goal asl w@(Forall x bod)) = do x' <- toHTm px let avoids = foldr (union . thmFrees . snd) (frees w) asl if x' `elem` avoids then fail "tacX_GEN: variable free in goal."...
683
tacX_GEN px (Goal asl w@(Forall x bod)) = do x' <- toHTm px let avoids = foldr (union . thmFrees . snd) (frees w) asl if x' `elem` avoids then fail "tacX_GEN: variable free in goal." else (do bod' <- varSubst [(x, x')] bod return $! GS nullMeta [Goal asl bod'] j...
574
false
true
0
15
205
252
124
128
null
null
brendanhay/gogol
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
mpl-2.0
tpRequirePartitionFilter :: Lens' TimePartitioning (Maybe Bool) tpRequirePartitionFilter = lens _tpRequirePartitionFilter (\ s a -> s{_tpRequirePartitionFilter = a})
173
tpRequirePartitionFilter :: Lens' TimePartitioning (Maybe Bool) tpRequirePartitionFilter = lens _tpRequirePartitionFilter (\ s a -> s{_tpRequirePartitionFilter = a})
173
tpRequirePartitionFilter = lens _tpRequirePartitionFilter (\ s a -> s{_tpRequirePartitionFilter = a})
109
false
true
0
9
24
47
24
23
null
null
jonsterling/singletons
Data/Singletons/Singletons.hs
bsd-3-clause
singInfo (ClassOpI name ty className fixity) = fail "Singling of class members info not supported"
100
singInfo (ClassOpI name ty className fixity) = fail "Singling of class members info not supported"
100
singInfo (ClassOpI name ty className fixity) = fail "Singling of class members info not supported"
100
false
false
0
6
16
25
11
14
null
null
exercism/xhaskell
exercises/practice/forth/.meta/examples/success-standard/src/Forth.hs
mit
resolveUser :: Map FWord Definition -> Term -> [Term] resolveUser defs (W w) = case M.lookup w defs of Just (User u) -> u _ -> [W w]
148
resolveUser :: Map FWord Definition -> Term -> [Term] resolveUser defs (W w) = case M.lookup w defs of Just (User u) -> u _ -> [W w]
148
resolveUser defs (W w) = case M.lookup w defs of Just (User u) -> u _ -> [W w]
94
false
true
3
7
43
76
37
39
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT11.hs
gpl-3.0
rotate :: Nat -> [a] -> [a] rotate Z xs = xs
44
rotate :: Nat -> [a] -> [a] rotate Z xs = xs
44
rotate Z xs = xs
16
false
true
0
7
11
30
16
14
null
null
apyrgio/ganeti
src/Ganeti/WConfd/TempRes.hs
bsd-2-clause
-- * Other temporary resources -- | Tests if a given value is reserved for a given job. isReserved :: (Ord a, Ord j) => a -> TempRes j a -> Bool isReserved x = MM.elem x . getTempRes
183
isReserved :: (Ord a, Ord j) => a -> TempRes j a -> Bool isReserved x = MM.elem x . getTempRes
94
isReserved x = MM.elem x . getTempRes
37
true
true
0
8
39
53
27
26
null
null
ssaavedra/liquidhaskell
benchmarks/containers-0.5.0.0/Data/Map/Base.hs
bsd-3-clause
-- | /O(n+m)/. Intersection with a combining function. -- Intersection is more efficient on (bigset \``intersection`\` smallset). -- -- > let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar -- > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A" {-@ intersectio...
599
intersectionWithKey :: Ord k => (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c intersectionWithKey f t1 t2 = mergeWithKey (\k x1 x2 -> Just $ f k x1 x2) (\ _ _ _ -> Tip) (\ _ _ _ -> Tip) t1 t2
197
intersectionWithKey f t1 t2 = mergeWithKey (\k x1 x2 -> Just $ f k x1 x2) (\ _ _ _ -> Tip) (\ _ _ _ -> Tip) t1 t2
113
true
true
0
11
135
136
70
66
null
null
ashgti/DTI
src/Language/Perl/Parser.hs
mit
stringLetter = satisfy (\c -> (c /= '"') && (c /= '\\') && (c > '\026'))
75
stringLetter = satisfy (\c -> (c /= '"') && (c /= '\\') && (c > '\026'))
75
stringLetter = satisfy (\c -> (c /= '"') && (c /= '\\') && (c > '\026'))
75
false
false
0
11
18
46
25
21
null
null
johnjcamilleri/maltese-functional-morphology
lib/Dictionary.hs
lgpl-3.0
-- | Inflection function + inherent + paradigm identifier -> Entry entryIP :: Dict a => (a -> Str) -> [Inherent] -> Paradigm -> Entry entryIP f ihs p = (entry_id f ihs p, dictword f, p , category f, ihs, infTable f,[])
218
entryIP :: Dict a => (a -> Str) -> [Inherent] -> Paradigm -> Entry entryIP f ihs p = (entry_id f ihs p, dictword f, p , category f, ihs, infTable f,[])
151
entryIP f ihs p = (entry_id f ihs p, dictword f, p , category f, ihs, infTable f,[])
84
true
true
0
10
42
93
47
46
null
null
achirkin/BuildWrapper
test/Language/Haskell/BuildWrapper/CMDTests.hs
bsd-3-clause
testProjectName :: String testProjectName="BWTest"
50
testProjectName :: String testProjectName="BWTest"
50
testProjectName="BWTest"
24
false
true
0
4
3
11
6
5
null
null
AlexanderPankiv/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
cONTROL_APPLICATIVE = mkBaseModule (fsLit "Control.Applicative")
64
cONTROL_APPLICATIVE = mkBaseModule (fsLit "Control.Applicative")
64
cONTROL_APPLICATIVE = mkBaseModule (fsLit "Control.Applicative")
64
false
false
0
7
4
15
7
8
null
null
fpco/cabal
Cabal/Distribution/Version.hs
bsd-3-clause
-- | Does this 'VersionRange' place any restriction on the 'Version' or is it -- in fact equivalent to 'AnyVersion'. -- -- Note this is a semantic check, not simply a syntactic check. So for example -- the following is @True@ (for all @v@). -- -- > isAnyVersion (EarlierVersion v `UnionVersionRanges` orLaterVersion v) -...
834
isAnyVersion :: VersionRange -> Bool isAnyVersion vr = case asVersionIntervals vr of [(LowerBound v InclusiveBound, NoUpperBound)] | isVersion0 v -> True _ -> False -- | This is the converse of 'isAnyVersion'. It check if the version range is -- empty, if ...
512
isAnyVersion vr = case asVersionIntervals vr of [(LowerBound v InclusiveBound, NoUpperBound)] | isVersion0 v -> True _ -> False -- | This is the converse of 'isAnyVersion'. It check if the version range is -- empty, if there is no possible version that sat...
475
true
true
1
7
189
71
43
28
null
null
polar-engine/polar-configfile
src/Polar/ConfigFile/Parser.hs
bsd-3-clause
main :: GeneralizedTokenParser CPTok () ParseOutput main = do {s <- sectionlist; return s} <|> try (do o <- optionlist s <- sectionlist return $ ("DEFAULT", o) : s ) <|> do {o <- optionlist; return $ [("DEFAULT", o)] } <?> "Error parsing config file tok...
324
main :: GeneralizedTokenParser CPTok () ParseOutput main = do {s <- sectionlist; return s} <|> try (do o <- optionlist s <- sectionlist return $ ("DEFAULT", o) : s ) <|> do {o <- optionlist; return $ [("DEFAULT", o)] } <?> "Error parsing config file tok...
324
main = do {s <- sectionlist; return s} <|> try (do o <- optionlist s <- sectionlist return $ ("DEFAULT", o) : s ) <|> do {o <- optionlist; return $ [("DEFAULT", o)] } <?> "Error parsing config file tokens"
272
false
true
0
14
112
111
57
54
null
null
julienschmaltz/madl
examples/Examples/SmallTestNetwork.hs
mit
-- | Small network without macros, consisting of source -\> queue -\> sink stn :: MadlNetwork stn = mkNetwork (NSpec components channels ports) where source = C Source{ componentName = "source", messages = req} queue = C Queue{componentName = "queue", capacity = 2} sink = C Sink{ componen...
804
stn :: MadlNetwork stn = mkNetwork (NSpec components channels ports) where source = C Source{ componentName = "source", messages = req} queue = C Queue{componentName = "queue", capacity = 2} sink = C Sink{ componentName = "sink"} source_queue = Channel{ channelName = "source_queu...
729
stn = mkNetwork (NSpec components channels ports) where source = C Source{ componentName = "source", messages = req} queue = C Queue{componentName = "queue", capacity = 2} sink = C Sink{ componentName = "sink"} source_queue = Channel{ channelName = "source_queue"} queue_s...
710
true
true
0
9
210
213
129
84
null
null
matterhorn-chat/matterhorn
src/Matterhorn/FilePaths.hs
bsd-3-clause
getAllScripts :: IO ([FilePath], [FilePath]) getAllScripts = do xdgLocations <- getAllConfigFiles xdgName scriptDirName let cmdLocations = xdgLocations ++ ["/etc/matterhorn/scripts"] let getCommands dir = do exists <- doesDirectoryExist dir if exists then map ((dir ++ "/") ++) `fmap` get...
758
getAllScripts :: IO ([FilePath], [FilePath]) getAllScripts = do xdgLocations <- getAllConfigFiles xdgName scriptDirName let cmdLocations = xdgLocations ++ ["/etc/matterhorn/scripts"] let getCommands dir = do exists <- doesDirectoryExist dir if exists then map ((dir ++ "/") ++) `fmap` get...
758
getAllScripts = do xdgLocations <- getAllConfigFiles xdgName scriptDirName let cmdLocations = xdgLocations ++ ["/etc/matterhorn/scripts"] let getCommands dir = do exists <- doesDirectoryExist dir if exists then map ((dir ++ "/") ++) `fmap` getDirectoryContents dir else return [...
713
false
true
0
17
198
246
119
127
null
null
palf/free-driver
packages/drive-trello/lib/Drive/Trello/Handlers.hs
bsd-3-clause
showUser :: User -> Text showUser (User u) = u
46
showUser :: User -> Text showUser (User u) = u
46
showUser (User u) = u
21
false
true
0
9
9
30
13
17
null
null
sjpet/quark
src/Quark/Project.hs
mit
toggleInsertMode :: Project -> Project toggleInsertMode project = second (setInsertMode' $ not $ insertMode project) project
128
toggleInsertMode :: Project -> Project toggleInsertMode project = second (setInsertMode' $ not $ insertMode project) project
128
toggleInsertMode project = second (setInsertMode' $ not $ insertMode project) project
89
false
true
0
8
19
41
19
22
null
null
hanjoes/cis194
hw6/HW06.hs
mit
-- Exercise 8 ----------------------------------------- {- Total Memory in use: 236 MB -} minMaxSlow :: [Int] -> Maybe (Int, Int) minMaxSlow [] = Nothing
154
minMaxSlow :: [Int] -> Maybe (Int, Int) minMaxSlow [] = Nothing
63
minMaxSlow [] = Nothing
23
true
true
0
7
23
34
19
15
null
null
text-utf8/text
tests/Tests/Properties.hs
bsd-2-clause
tl_takeWhileEnd p = (L.reverse . L.takeWhile p . L.reverse) `eqP` (unpackS . TL.takeWhileEnd p)
115
tl_takeWhileEnd p = (L.reverse . L.takeWhile p . L.reverse) `eqP` (unpackS . TL.takeWhileEnd p)
115
tl_takeWhileEnd p = (L.reverse . L.takeWhile p . L.reverse) `eqP` (unpackS . TL.takeWhileEnd p)
115
false
false
0
10
33
47
24
23
null
null
agrafix/typed-wire
src/TW/CodeGen/PureScript.hs
mit
decoderName :: TypeName -> T.Text decoderName ty = "dec" <> unTypeName ty
73
decoderName :: TypeName -> T.Text decoderName ty = "dec" <> unTypeName ty
73
decoderName ty = "dec" <> unTypeName ty
39
false
true
0
6
11
27
13
14
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 302005 = 4837
33
getValueFromProduct 302005 = 4837
33
getValueFromProduct 302005 = 4837
33
false
false
0
5
3
9
4
5
null
null
orchid-hybrid/WHILE
EllaBased/Assembly.hs
gpl-2.0
s' (AMov x@(Cell _) y@(Num _)) = sp "mov qword" ++ op x ++ "," ++ op y
70
s' (AMov x@(Cell _) y@(Num _)) = sp "mov qword" ++ op x ++ "," ++ op y
70
s' (AMov x@(Cell _) y@(Num _)) = sp "mov qword" ++ op x ++ "," ++ op y
70
false
false
0
10
17
56
27
29
null
null
polux/hgom
src/Gom/CodeGen/Common/Helpers.hs
gpl-3.0
-- | Renders @modifier type name(arg_1,...,arg_n) { body }@. rMethodDef :: Doc -- ^ modifier -> Doc -- ^ return type -> Doc -- ^ method name -> [Doc] -- ^ arguments -> Doc -- ^ body -> Doc rMethodDef md ty mn args body = md <+> ty <+> mn <> encloseCommas args <+> ibraces body
293
rMethodDef :: Doc -- ^ modifier -> Doc -- ^ return type -> Doc -- ^ method name -> [Doc] -- ^ arguments -> Doc -- ^ body -> Doc rMethodDef md ty mn args body = md <+> ty <+> mn <> encloseCommas args <+> ibraces body
232
rMethodDef md ty mn args body = md <+> ty <+> mn <> encloseCommas args <+> ibraces body
90
true
true
2
11
73
79
40
39
null
null
raguay/AlfredLibraryInHaskell
Alfred.hs
mit
condAddItemTitle :: String -> String -> String -> String -> String -> String -> String -> String -> String condAddItemTitle con a b c d e f g | (isInfixOf (toWordLower con) (toWordLower e)) = addItem a b c d e f g | otherwise = ""
235
condAddItemTitle :: String -> String -> String -> String -> String -> String -> String -> String -> String condAddItemTitle con a b c d e f g | (isInfixOf (toWordLower con) (toWordLower e)) = addItem a b c d e f g | otherwise = ""
235
condAddItemTitle con a b c d e f g | (isInfixOf (toWordLower con) (toWordLower e)) = addItem a b c d e f g | otherwise = ""
128
false
true
1
12
51
109
53
56
null
null
shlevy/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
parenify e = mkHsPar e
38
parenify e = mkHsPar e
38
parenify e = mkHsPar e
38
false
false
0
5
20
12
5
7
null
null
GaloisInc/halvm-ghc
compiler/main/HscMain.hs
bsd-3-clause
genericHscFrontend :: ModSummary -> Hsc FrontendResult genericHscFrontend mod_summary = getHooked hscFrontendHook genericHscFrontend' >>= ($ mod_summary)
155
genericHscFrontend :: ModSummary -> Hsc FrontendResult genericHscFrontend mod_summary = getHooked hscFrontendHook genericHscFrontend' >>= ($ mod_summary)
155
genericHscFrontend mod_summary = getHooked hscFrontendHook genericHscFrontend' >>= ($ mod_summary)
100
false
true
0
7
16
39
18
21
null
null
schnecki/HaskellMachineLearning
src/Data/ML/RandomForest/Test.hs
gpl-3.0
forestRand :: IO (Forest Restaurant (Maybe Bool)) forestRand = do rs <- evalRandIO (randomDataSetNoisy 0.23 120) evalRandIO $ randomForest 3 willWait atts rs
161
forestRand :: IO (Forest Restaurant (Maybe Bool)) forestRand = do rs <- evalRandIO (randomDataSetNoisy 0.23 120) evalRandIO $ randomForest 3 willWait atts rs
161
forestRand = do rs <- evalRandIO (randomDataSetNoisy 0.23 120) evalRandIO $ randomForest 3 willWait atts rs
111
false
true
0
10
26
62
29
33
null
null
HJvT/com
System/Win32/Com/Automation.hs
bsd-3-clause
methodID0 :: DISPID -> [VarIn] -> IDispatch i -> IO () methodID0 dispid args obj = do p <- obj # invokeMethod dispid args [] unmarshallVariants0 p
182
methodID0 :: DISPID -> [VarIn] -> IDispatch i -> IO () methodID0 dispid args obj = do p <- obj # invokeMethod dispid args [] unmarshallVariants0 p
182
methodID0 dispid args obj = do p <- obj # invokeMethod dispid args [] unmarshallVariants0 p
97
false
true
0
10
62
67
31
36
null
null
danr/dotfiles
xmonad/xmonad.hs
unlicense
myWorkspaces = map show [1..9]
33
myWorkspaces = map show [1..9]
33
myWorkspaces = map show [1..9]
33
false
false
0
6
7
16
8
8
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/SY/Interface.hs
bsd-3-clause
toSDF3' (p1,p2,p3) s1 s2 s3 = (toSDF1' p1 s1, toSDF1' p2 s2, toSDF1' p3 s3)
81
toSDF3' (p1,p2,p3) s1 s2 s3 = (toSDF1' p1 s1, toSDF1' p2 s2, toSDF1' p3 s3)
81
toSDF3' (p1,p2,p3) s1 s2 s3 = (toSDF1' p1 s1, toSDF1' p2 s2, toSDF1' p3 s3)
81
false
false
0
6
20
48
25
23
null
null
TravisWhitaker/rdf
src/Data/RDF/Internal.hs
mit
parseFragment :: A.Parser (Maybe T.Text) parseFragment = A.option Nothing (Just <$> (A.char '#' *> A.takeWhile1 isIRI))
119
parseFragment :: A.Parser (Maybe T.Text) parseFragment = A.option Nothing (Just <$> (A.char '#' *> A.takeWhile1 isIRI))
119
parseFragment = A.option Nothing (Just <$> (A.char '#' *> A.takeWhile1 isIRI))
78
false
true
0
11
15
55
27
28
null
null
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell
src/ATP/PropExamples.hs
gpl-3.0
ripplecarry :: Wire -> Wire -> Wire -> Wire -> Wire ripplecarry x y c out n = conjoin (\i -> fa (x i) (y i) (c i) (out i) (c (i+1))) [0 .. n-1]
146
ripplecarry :: Wire -> Wire -> Wire -> Wire -> Wire ripplecarry x y c out n = conjoin (\i -> fa (x i) (y i) (c i) (out i) (c (i+1))) [0 .. n-1]
146
ripplecarry x y c out n = conjoin (\i -> fa (x i) (y i) (c i) (out i) (c (i+1))) [0 .. n-1]
94
false
true
0
12
37
109
56
53
null
null
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/UpdateAccountPasswordPolicy.hs
mpl-2.0
-- | Prevents IAM users from setting a new password after their password has -- expired. -- -- Default value: false uappHardExpiry :: Lens' UpdateAccountPasswordPolicy (Maybe Bool) uappHardExpiry = lens _uappHardExpiry (\ s a -> s{_uappHardExpiry = a})
252
uappHardExpiry :: Lens' UpdateAccountPasswordPolicy (Maybe Bool) uappHardExpiry = lens _uappHardExpiry (\ s a -> s{_uappHardExpiry = a})
136
uappHardExpiry = lens _uappHardExpiry (\ s a -> s{_uappHardExpiry = a})
71
true
true
0
9
37
49
28
21
null
null
d0kt0r0/estuary
client/src/Estuary/Languages/Hydra/Parser.hs
gpl-3.0
lexeme = P.lexeme tokenParser
29
lexeme = P.lexeme tokenParser
29
lexeme = P.lexeme tokenParser
29
false
false
0
6
3
11
5
6
null
null
unisonweb/platform
unison-core/src/Unison/Util/Monoid.hs
mit
nonEmpty = not . isEmpty
24
nonEmpty = not . isEmpty
24
nonEmpty = not . isEmpty
24
false
false
0
5
4
10
5
5
null
null
byorgey/Idris-dev
src/Core/Elaborate.hs
bsd-3-clause
get_probs :: Elab' aux Fails get_probs = do ES p _ _ <- get return (problems (fst p)) -- get the current goal type
130
get_probs :: Elab' aux Fails get_probs = do ES p _ _ <- get return (problems (fst p)) -- get the current goal type
130
get_probs = do ES p _ _ <- get return (problems (fst p)) -- get the current goal type
101
false
true
1
12
39
53
23
30
null
null
maoe/Haskell-Turtle-Library
src/Turtle/Prelude.hs
bsd-3-clause
mktemp :: FilePath -- ^ Parent directory -> Text -- ^ File name template -> Managed (FilePath, Handle) mktemp parent prefix = do let parent' = Filesystem.encodeString parent let prefix' = unpack prefix (file', handle) <- managed (\k -> withTempFile parent' prefix' (\file' handle ...
462
mktemp :: FilePath -- ^ Parent directory -> Text -- ^ File name template -> Managed (FilePath, Handle) mktemp parent prefix = do let parent' = Filesystem.encodeString parent let prefix' = unpack prefix (file', handle) <- managed (\k -> withTempFile parent' prefix' (\file' handle ...
462
mktemp parent prefix = do let parent' = Filesystem.encodeString parent let prefix' = unpack prefix (file', handle) <- managed (\k -> withTempFile parent' prefix' (\file' handle -> k (file', handle)) ) let file = Filesystem.decodeString file' return (file, handle) -- | Fork a thread, acquiri...
339
false
true
0
16
114
143
71
72
null
null
erikd/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Lookup a request header. -- -- Since 1.2.2 lookupHeaders :: MonadHandler m => CI S8.ByteString -> m [S8.ByteString] lookupHeaders key = do req <- waiRequest return $ lookup' key $ W.requestHeaders req -- | Lookup basic authentication data from __Authorization__ header of -- request. Returns user name and ...
346
lookupHeaders :: MonadHandler m => CI S8.ByteString -> m [S8.ByteString] lookupHeaders key = do req <- waiRequest return $ lookup' key $ W.requestHeaders req -- | Lookup basic authentication data from __Authorization__ header of -- request. Returns user name and password -- -- Since 1.4.9
298
lookupHeaders key = do req <- waiRequest return $ lookup' key $ W.requestHeaders req -- | Lookup basic authentication data from __Authorization__ header of -- request. Returns user name and password -- -- Since 1.4.9
225
true
true
0
9
63
71
36
35
null
null
kmate/HaRe
old/testing/letToWhere/Monad2.hs
bsd-3-clause
f x y = do let sq 0 = 0 sq x = x ^ pow return (sq x * sq y) where pow = 2
114
f x y = do let sq 0 = 0 sq x = x ^ pow return (sq x * sq y) where pow = 2
114
f x y = do let sq 0 = 0 sq x = x ^ pow return (sq x * sq y) where pow = 2
114
false
false
0
10
66
62
28
34
null
null
dimara/ganeti
src/Ganeti/HTools/Backend/IAlloc.hs
bsd-2-clause
-- | Flatten the log of a solution into a string. describeSolution :: AllocSol.GenericAllocSolution a -> String describeSolution = intercalate ", " . AllocSol.asLog
164
describeSolution :: AllocSol.GenericAllocSolution a -> String describeSolution = intercalate ", " . AllocSol.asLog
114
describeSolution = intercalate ", " . AllocSol.asLog
52
true
true
0
7
23
30
15
15
null
null
Fuuzetsu/haddock
haddock-api/src/Haddock/Interface/Specialize.hs
bsd-2-clause
renameType (HsWildCardTy wc) = pure (HsWildCardTy wc)
53
renameType (HsWildCardTy wc) = pure (HsWildCardTy wc)
53
renameType (HsWildCardTy wc) = pure (HsWildCardTy wc)
53
false
false
0
7
6
24
11
13
null
null
oldmanmike/haskellSDL2Examples
src/lesson08.hs
gpl-2.0
setColor renderer Green = SDL.setRenderDrawColor renderer 0x00 0xFF 0x00 0xFF
78
setColor renderer Green = SDL.setRenderDrawColor renderer 0x00 0xFF 0x00 0xFF
78
setColor renderer Green = SDL.setRenderDrawColor renderer 0x00 0xFF 0x00 0xFF
78
false
false
0
6
10
24
11
13
null
null
siddhanathan/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
z_RDR = mkVarUnqual (fsLit "z")
41
z_RDR = mkVarUnqual (fsLit "z")
41
z_RDR = mkVarUnqual (fsLit "z")
41
false
false
1
7
14
18
7
11
null
null
GaloisInc/verification-game
web-prover/exes/ViewStormFile.hs
bsd-3-clause
main :: IO () main = mapM_ ppFile =<< getArgs
45
main :: IO () main = mapM_ ppFile =<< getArgs
45
main = mapM_ ppFile =<< getArgs
31
false
true
0
6
9
23
11
12
null
null
geigerzaehler/pladen
Pladen/Tar.hs
mit
entrySize :: FileEntryHandle -> IO Integer entrySize (FileEntryHandle _ h) = do fsize <- hFileSize h return $ 512 -- header size + fsize + (negate fsize `mod` 512) ----------------------------------------------------------- -- Paths in Archive ----------------------------------------...
339
entrySize :: FileEntryHandle -> IO Integer entrySize (FileEntryHandle _ h) = do fsize <- hFileSize h return $ 512 -- header size + fsize + (negate fsize `mod` 512) ----------------------------------------------------------- -- Paths in Archive ----------------------------------------...
339
entrySize (FileEntryHandle _ h) = do fsize <- hFileSize h return $ 512 -- header size + fsize + (negate fsize `mod` 512) ----------------------------------------------------------- -- Paths in Archive -----------------------------------------------------------
296
false
true
0
10
70
70
36
34
null
null
tismith/tlisp
src/Primitives.hs
mit
anyNumBinDiv e _ = throwError $ TypeMismatch "number" e
55
anyNumBinDiv e _ = throwError $ TypeMismatch "number" e
55
anyNumBinDiv e _ = throwError $ TypeMismatch "number" e
55
false
false
0
6
8
20
9
11
null
null
changlinli/nikki
src/Physics/Chipmunk.hs
lgpl-3.0
-- normalizes (and returns) the angle of an object to (-pi, pi) normalizeAngle :: Body -> IO Angle normalizeAngle body = do a <- foldAngle <$> get (angle body) angle body $= a return a
196
normalizeAngle :: Body -> IO Angle normalizeAngle body = do a <- foldAngle <$> get (angle body) angle body $= a return a
132
normalizeAngle body = do a <- foldAngle <$> get (angle body) angle body $= a return a
97
true
true
0
11
46
58
26
32
null
null
ivanperez-keera/Yampa
yampa/src/FRP/Yampa/InternalCore.hs
bsd-3-clause
cpXA _ (FDC c) = sfConst c
34
cpXA _ (FDC c) = sfConst c
34
cpXA _ (FDC c) = sfConst c
34
false
false
0
7
14
20
9
11
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M01/D03/Exercise.hs
mit
{-- >>> isMunchausen 3435 True >>> isMunchausen 4 False --} {-- BONUS ----------------------------------------------------------------- Here's the thing. 3435 is the only Munchausen number, base ten, but there are other Munchausen numbers in other bases. Write a base-n Munchausen number verifier. Then, with that, w...
440
isMunchausen' :: Int -> Integer -> Bool isMunchausen' base n = undefined
72
isMunchausen' base n = undefined
32
true
true
0
8
67
32
15
17
null
null
nevrenato/HyLoRes_Source
src/HyLoRes/Formula/Internal.hs
gpl-2.0
unsafeFromF (F.At n f) = do op <- unsafeFromF f case op :: Form n p r a Opaque of Opaque g -> return $ Opaque (at n g)
200
unsafeFromF (F.At n f) = do op <- unsafeFromF f case op :: Form n p r a Opaque of Opaque g -> return $ Opaque (at n g)
200
unsafeFromF (F.At n f) = do op <- unsafeFromF f case op :: Form n p r a Opaque of Opaque g -> return $ Opaque (at n g)
200
false
false
0
13
110
74
34
40
null
null
othercriteria/blaze
packaging/Math/Statistics/Inference/Blaze.hs
mit
dummyDensity :: Density dummyDensity = mkDensity [] [] [] vague
63
dummyDensity :: Density dummyDensity = mkDensity [] [] [] vague
63
dummyDensity = mkDensity [] [] [] vague
39
false
true
0
6
9
26
13
13
null
null
np/hlatex
Language/LaTeX/Builder/QQ.hs
bsd-3-clause
frTop :: a -> a frTop = id
26
frTop :: a -> a frTop = id
26
frTop = id
10
false
true
0
7
7
22
9
13
null
null
Warbo/mlspec-helper
src/MLSpec/Helper.hs
gpl-3.0
vToC (VarE n) = if isC n then ConE n else VarE n
48
vToC (VarE n) = if isC n then ConE n else VarE n
48
vToC (VarE n) = if isC n then ConE n else VarE n
48
false
false
0
7
12
32
15
17
null
null
aelyasov/Haslog
src/Eu/Fittest/Logging/Compression/RawlogParser_withAttoparsec.hs
bsd-3-clause
exSec1 = "%<S \"a tag\" %>" :: T.Text
38
exSec1 = "%<S \"a tag\" %>" :: T.Text
38
exSec1 = "%<S \"a tag\" %>" :: T.Text
38
false
false
0
5
8
14
7
7
null
null
Spawek/HCPParse
src/Data/Either/Unwrap.hs
mit
-- yuck fromRight (Right x) = x
31
fromRight (Right x) = x
23
fromRight (Right x) = x
23
true
false
0
7
6
16
8
8
null
null
rvion/lamdu
test/InferAssert.hs
gpl-3.0
allowFailAssertion :: String -> HUnit.Assertion -> HUnit.Assertion allowFailAssertion msg assertion = (assertion >> successOccurred) `E.catch` \(E.SomeException _) -> errorOccurred where successOccurred = hPutStrLn stderr . ansiAround ansiYellow $ "NOTE: doesn't fail. Remove AllowFail?" ...
463
allowFailAssertion :: String -> HUnit.Assertion -> HUnit.Assertion allowFailAssertion msg assertion = (assertion >> successOccurred) `E.catch` \(E.SomeException _) -> errorOccurred where successOccurred = hPutStrLn stderr . ansiAround ansiYellow $ "NOTE: doesn't fail. Remove AllowFail?" ...
463
allowFailAssertion msg assertion = (assertion >> successOccurred) `E.catch` \(E.SomeException _) -> errorOccurred where successOccurred = hPutStrLn stderr . ansiAround ansiYellow $ "NOTE: doesn't fail. Remove AllowFail?" errorOccurred = hPutStrLn stderr . ansiAround a...
396
false
true
1
9
112
110
56
54
null
null
sinelaw/lamdu
bottlelib/Data/Store/Transaction.hs
gpl-3.0
lookup :: (MonadA m, Binary a) => Guid -> Transaction m (Maybe a) lookup = (fmap . fmap) decodeS . lookupBS
107
lookup :: (MonadA m, Binary a) => Guid -> Transaction m (Maybe a) lookup = (fmap . fmap) decodeS . lookupBS
107
lookup = (fmap . fmap) decodeS . lookupBS
41
false
true
0
9
20
55
28
27
null
null
romanb/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types.hs
mpl-2.0
-- | A unique namespace identifying the option's associated AWS resource. cosNamespace :: Lens' ConfigurationOptionSetting (Maybe Text) cosNamespace = lens _cosNamespace (\s a -> s { _cosNamespace = a })
203
cosNamespace :: Lens' ConfigurationOptionSetting (Maybe Text) cosNamespace = lens _cosNamespace (\s a -> s { _cosNamespace = a })
129
cosNamespace = lens _cosNamespace (\s a -> s { _cosNamespace = a })
67
true
true
0
9
29
46
25
21
null
null
beni55/hspec
hspec-core/src/Test/Hspec/Core/QuickCheck.hs
mit
modifyMaxDiscardRatio :: (Int -> Int) -> SpecWith a -> SpecWith a modifyMaxDiscardRatio = modifyArgs . modify where modify :: (Int -> Int) -> Args -> Args modify f args = args {maxDiscardRatio = f (maxDiscardRatio args)} -- | Use a modified `maxSize` for given spec.
277
modifyMaxDiscardRatio :: (Int -> Int) -> SpecWith a -> SpecWith a modifyMaxDiscardRatio = modifyArgs . modify where modify :: (Int -> Int) -> Args -> Args modify f args = args {maxDiscardRatio = f (maxDiscardRatio args)} -- | Use a modified `maxSize` for given spec.
277
modifyMaxDiscardRatio = modifyArgs . modify where modify :: (Int -> Int) -> Args -> Args modify f args = args {maxDiscardRatio = f (maxDiscardRatio args)} -- | Use a modified `maxSize` for given spec.
211
false
true
0
10
55
98
47
51
null
null
go1dshtein/hint
src/haskell/main/Hint/Executable/Hint.hs
gpl-2.0
proceedInteractive :: Either Error Context -> IO () proceedInteractive (Left error) = proceedError (Left error)
111
proceedInteractive :: Either Error Context -> IO () proceedInteractive (Left error) = proceedError (Left error)
111
proceedInteractive (Left error) = proceedError (Left error)
59
false
true
0
7
14
43
20
23
null
null
Lysxia/twentyseven
src/Rubik/Distances.hs
mit
distancesM :: forall a m t r v . ( Traversable t, Eq a, Integral a, Show a , G.Vector v a, PrimMonad m, MonadRef r m ) => MG.ILoop m (G.Mutable v) a -> Int -> Coord -> (Coord -> t Coord) -> m (v a) distancesM forV n root neighbors = do mv <- MG.replicate n (-1) mb <- MBV.replicate n False count <- n...
781
distancesM :: forall a m t r v . ( Traversable t, Eq a, Integral a, Show a , G.Vector v a, PrimMonad m, MonadRef r m ) => MG.ILoop m (G.Mutable v) a -> Int -> Coord -> (Coord -> t Coord) -> m (v a) distancesM forV n root neighbors = do mv <- MG.replicate n (-1) mb <- MBV.replicate n False count <- n...
781
distancesM forV n root neighbors = do mv <- MG.replicate n (-1) mb <- MBV.replicate n False count <- newRef (0 :: Int) fill forV n root neighbors mv mb count 0 G.unsafeFreeze mv -- We use two algorithms to fill the vector @mv@ with the distance from the -- root to every node. The first @fill@ is mo...
575
false
true
0
13
185
215
109
106
null
null
christiaanb/ghc
testsuite/tests/simplCore/should_compile/T8274.hs
bsd-3-clause
n = Negatives -4# -4.0# -4.0##
30
n = Negatives -4# -4.0# -4.0##
30
n = Negatives -4# -4.0# -4.0##
30
false
false
1
5
5
24
9
15
null
null
AyaMorisawa/aya-script
src/AyaScript/Parser.hs
mit
stmts :: Parser [Stmt] stmts = sepBy stmt (char '\n')
53
stmts :: Parser [Stmt] stmts = sepBy stmt (char '\n')
53
stmts = sepBy stmt (char '\n')
30
false
true
0
7
9
28
14
14
null
null
tibbe/ghc
compiler/cmm/PprCmm.hs
bsd-3-clause
pprGraph (GUnit block) = ppr block
34
pprGraph (GUnit block) = ppr block
34
pprGraph (GUnit block) = ppr block
34
false
false
0
6
5
19
8
11
null
null
ghcjs/ghcjs
src-bin/haddock/ResponseFile.hs
mit
unescape :: String -> [String] unescape args = reverse . map reverse $ go args NoneQ False [] [] where -- n.b., the order of these cases matters; these are cribbed from gcc -- case 1: end of input go [] _q _bs a as = a:as -- case 2: back-slash escape in progress go (c:cs) q ...
1,273
unescape :: String -> [String] unescape args = reverse . map reverse $ go args NoneQ False [] [] where -- n.b., the order of these cases matters; these are cribbed from gcc -- case 1: end of input go [] _q _bs a as = a:as -- case 2: back-slash escape in progress go (c:cs) q ...
1,273
unescape args = reverse . map reverse $ go args NoneQ False [] [] where -- n.b., the order of these cases matters; these are cribbed from gcc -- case 1: end of input go [] _q _bs a as = a:as -- case 2: back-slash escape in progress go (c:cs) q True a as = go cs q Fals...
1,242
false
true
19
13
545
414
212
202
null
null
fjarri/wigner
src/Wigner/Expression.hs
bsd-3-clause
mulSums :: Sum a => a -> a -> a mulSums x y = fromTerms products where products = [(c1 * c2, mulTerms t1 t2) | (c1, t1) <- terms x, (c2, t2) <- terms y] -- Num instances
175
mulSums :: Sum a => a -> a -> a mulSums x y = fromTerms products where products = [(c1 * c2, mulTerms t1 t2) | (c1, t1) <- terms x, (c2, t2) <- terms y] -- Num instances
175
mulSums x y = fromTerms products where products = [(c1 * c2, mulTerms t1 t2) | (c1, t1) <- terms x, (c2, t2) <- terms y] -- Num instances
143
false
true
0
8
44
93
49
44
null
null
benkolera/talk-stacking-your-monads
code/src/Db/Internal.hs
mit
liftInsertReturningFirst :: ( Default QueryRunner returned haskells , Default Unpackspec returned returned ) => Table columnsW columnsR -> (columnsR -> returned) -> columnsW -> Db haskells liftInsertReturningFirst t f = fmap head . liftInsertReturning t f
273
liftInsertReturningFirst :: ( Default QueryRunner returned haskells , Default Unpackspec returned returned ) => Table columnsW columnsR -> (columnsR -> returned) -> columnsW -> Db haskells liftInsertReturningFirst t f = fmap head . liftInsertReturning t f
273
liftInsertReturningFirst t f = fmap head . liftInsertReturning t f
66
false
true
0
10
53
82
39
43
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/RST.hs
gpl-2.0
-- autolink inlineToRST (Link [Str str] (src, _)) | isURI src && if "mailto:" `isPrefixOf` src then src == escapeURI ("mailto:" ++ str) else src == escapeURI str = do let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src return $ text srcSuffix
283
inlineToRST (Link [Str str] (src, _)) | isURI src && if "mailto:" `isPrefixOf` src then src == escapeURI ("mailto:" ++ str) else src == escapeURI str = do let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src return $ text srcSuffix
271
inlineToRST (Link [Str str] (src, _)) | isURI src && if "mailto:" `isPrefixOf` src then src == escapeURI ("mailto:" ++ str) else src == escapeURI str = do let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src return $ text srcSuffix
271
true
false
0
13
70
116
57
59
null
null
brendanhay/gogol
gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types/Product.hs
mpl-2.0
-- | Logging configuration. sLogging :: Lens' Service (Maybe Logging) sLogging = lens _sLogging (\ s a -> s{_sLogging = a})
123
sLogging :: Lens' Service (Maybe Logging) sLogging = lens _sLogging (\ s a -> s{_sLogging = a})
95
sLogging = lens _sLogging (\ s a -> s{_sLogging = a})
53
true
true
0
9
20
46
25
21
null
null
tjakway/ghcjvm
compiler/typecheck/TcBinds.hs
bsd-3-clause
-- AbsBind, VarBind impossible ------------------- tcRhs :: TcMonoBind -> TcM (HsBind TcId) tcRhs (TcFunBind info@(MBI { mbi_sig = mb_sig, mbi_mono_id = mono_id }) loc matches) = tcExtendIdBinderStackForRhs [info] $ tcExtendTyVarEnvForRhs mb_sig $ do { traceTc "tcRhs: fun bind" (ppr ...
747
tcRhs :: TcMonoBind -> TcM (HsBind TcId) tcRhs (TcFunBind info@(MBI { mbi_sig = mb_sig, mbi_mono_id = mono_id }) loc matches) = tcExtendIdBinderStackForRhs [info] $ tcExtendTyVarEnvForRhs mb_sig $ do { traceTc "tcRhs: fun bind" (ppr mono_id $$ ppr (idType mono_id)) ; (co_fn, m...
695
tcRhs (TcFunBind info@(MBI { mbi_sig = mb_sig, mbi_mono_id = mono_id }) loc matches) = tcExtendIdBinderStackForRhs [info] $ tcExtendTyVarEnvForRhs mb_sig $ do { traceTc "tcRhs: fun bind" (ppr mono_id $$ ppr (idType mono_id)) ; (co_fn, matches') <- tcMatchesFun (idName mono_id)...
654
true
true
0
14
277
197
104
93
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_HJA_STRINGEOL :: Int wxSTC_HJA_STRINGEOL = 66
51
wxSTC_HJA_STRINGEOL :: Int wxSTC_HJA_STRINGEOL = 66
51
wxSTC_HJA_STRINGEOL = 66
24
false
true
0
4
5
11
6
5
null
null
hpacheco/HAAP
examples/gameworker/li1g147/Bomberman/Engine.hs
mit
validaBoard :: Word8 -> Board -> P () validaBoard n tab = do let dim = boardDim tab unless (odd dim) $ unexpected "tabuleiro deve ter dimensão ímpar" --let allpos = [(Pos x y) | y::Word8 <- [1..n-2], x::Word8 <- [1..n-2] ] --let somepos = drop (fromEnum $ boardCaracol tab) allpos --let cantos = filt...
550
validaBoard :: Word8 -> Board -> P () validaBoard n tab = do let dim = boardDim tab unless (odd dim) $ unexpected "tabuleiro deve ter dimensão ímpar" --let allpos = [(Pos x y) | y::Word8 <- [1..n-2], x::Word8 <- [1..n-2] ] --let somepos = drop (fromEnum $ boardCaracol tab) allpos --let cantos = filt...
550
validaBoard n tab = do let dim = boardDim tab unless (odd dim) $ unexpected "tabuleiro deve ter dimensão ímpar" --let allpos = [(Pos x y) | y::Word8 <- [1..n-2], x::Word8 <- [1..n-2] ] --let somepos = drop (fromEnum $ boardCaracol tab) allpos --let cantos = filter (isCorner n) somepos --forM_ ca...
512
false
true
0
10
138
66
33
33
null
null
zoomhub/zoomhub
src/ZoomHub/Web/Main.hs
mit
contentBaseURIEnvName :: String contentBaseURIEnvName = "CONTENT_BASE_URI"
74
contentBaseURIEnvName :: String contentBaseURIEnvName = "CONTENT_BASE_URI"
74
contentBaseURIEnvName = "CONTENT_BASE_URI"
42
false
true
0
4
5
11
6
5
null
null
zobot/accelerateAD
lib/Main.hs
bsd-2-clause
--testAccFunc :: AccFunc (Z :. Int) (Exp Int) (Z :. Int) (Exp Int) --testAccFunc = Map id (testAccFunc) -- -- sh = Z :. (5 :: Int) -- x = 5 :: Int -- arr = InArray sh x --mArr = Map id arr sh --fmArr = Fold (+) mArr sh main :: IO () main = do dimString <- getLine let dim = read dimString :: Int --print . C.r...
450
main :: IO () main = do dimString <- getLine let dim = read dimString :: Int --print . C.run . normSq . use . toVec dim $ [1..] print . C.run . testEltDeriv . use . toVec dim $ [1..] --print $ grad testFunc [1, 2, 3]
226
main = do dimString <- getLine let dim = read dimString :: Int --print . C.run . normSq . use . toVec dim $ [1..] print . C.run . testEltDeriv . use . toVec dim $ [1..] --print $ grad testFunc [1, 2, 3]
212
true
true
0
12
113
85
44
41
null
null
bendmorris/scotch
Scotch/Eval/Calc.hs
gpl-3.0
vadd _ (Val (NumFloat a)) (Val (NumInt b)) = Val (NumFloat (a + (realToFrac b)))
80
vadd _ (Val (NumFloat a)) (Val (NumInt b)) = Val (NumFloat (a + (realToFrac b)))
80
vadd _ (Val (NumFloat a)) (Val (NumInt b)) = Val (NumFloat (a + (realToFrac b)))
80
false
false
1
11
14
62
29
33
null
null
munyari/programming-problems
exercism.io/haskell/space-age/src/SpaceAge.hs
gpl-2.0
ageOn Saturn seconds = seconds / saturnYear
44
ageOn Saturn seconds = seconds / saturnYear
44
ageOn Saturn seconds = seconds / saturnYear
44
false
false
0
5
7
15
7
8
null
null
batterseapower/core-haskell
Name.hs
bsd-3-clause
freshName :: IdSupply -> String -> (IdSupply, Name) freshName ids s = second (Name s . Just) $ stepIdSupply ids
111
freshName :: IdSupply -> String -> (IdSupply, Name) freshName ids s = second (Name s . Just) $ stepIdSupply ids
111
freshName ids s = second (Name s . Just) $ stepIdSupply ids
59
false
true
0
9
19
50
25
25
null
null
TravisWhitaker/VM.hs
src/VM/Core.hs
mit
valOf (Mem m) (CPU _ _ mem) = mem V.! m
39
valOf (Mem m) (CPU _ _ mem) = mem V.! m
39
valOf (Mem m) (CPU _ _ mem) = mem V.! m
39
false
false
0
6
10
35
16
19
null
null
Purview/purview
src/Graphics/Forensics/Analyser.hs
gpl-3.0
-- | Logs a message with 'InformationLevel' importance inform :: Text -> Analysis () inform = flip reportInfo ReportNothing
123
inform :: Text -> Analysis () inform = flip reportInfo ReportNothing
68
inform = flip reportInfo ReportNothing
38
true
true
0
8
18
31
14
17
null
null
oldmanmike/ghc
compiler/types/Type.hs
bsd-3-clause
-- | Like mkForAllTys, but assumes all variables are dependent and specified, -- a common case mkSpecForAllTys :: [TyVar] -> Type -> Type mkSpecForAllTys tvs = ASSERT( all isTyVar tvs ) mkForAllTys (map (flip Named Specified) tvs)
252
mkSpecForAllTys :: [TyVar] -> Type -> Type mkSpecForAllTys tvs = ASSERT( all isTyVar tvs ) mkForAllTys (map (flip Named Specified) tvs)
157
mkSpecForAllTys tvs = ASSERT( all isTyVar tvs ) mkForAllTys (map (flip Named Specified) tvs)
114
true
true
0
9
58
63
31
32
null
null
arnizamani/occam
occam.hs
mit
-- generate a list of list expressions for each pattern -- the second argument is a list of functions of type :: [a] -> [a] -- the third argument is a list of functions of type :: [a] -> [a] -> [a] generateListExps :: Int -> [HsExp] -> [HsExp] -> HsExp -> [HsExp] generateListExps len _ _ _ | len < 1 = [HsList []]
315
generateListExps :: Int -> [HsExp] -> [HsExp] -> HsExp -> [HsExp] generateListExps len _ _ _ | len < 1 = [HsList []]
116
generateListExps len _ _ _ | len < 1 = [HsList []]
50
true
true
0
9
65
66
35
31
null
null
k0001/haskell-money
safe-money/test/Main.hs
bsd-3-clause
-- | Leading plus, decimal dot, 2 decimals ds_p_dd_2 :: Money.DecimalConf ds_p_dd_2 = ds_dd_2 { Money.decimalConf_leadingPlus = True }
134
ds_p_dd_2 :: Money.DecimalConf ds_p_dd_2 = ds_dd_2 { Money.decimalConf_leadingPlus = True }
91
ds_p_dd_2 = ds_dd_2 { Money.decimalConf_leadingPlus = True }
60
true
true
0
6
18
24
14
10
null
null
nickng/gong
TypeSize.hs
apache-2.0
sizeOfT seen defEnv (Close _ ty) = sizeOfT seen defEnv ty
57
sizeOfT seen defEnv (Close _ ty) = sizeOfT seen defEnv ty
57
sizeOfT seen defEnv (Close _ ty) = sizeOfT seen defEnv ty
57
false
false
0
6
10
31
13
18
null
null
rahulmutt/ghcvm
compiler/Eta/StgSyn/StgSyn.hs
bsd-3-clause
pprStgLVs :: Outputable occ => GenStgLiveVars occ -> SDoc pprStgLVs lvs = getPprStyle $ \ sty -> if userStyle sty || isEmptyUniqSet lvs then empty else hcat [text "{-lvs:", interpp'SP (uniqSetToList lvs), text "-}"]
241
pprStgLVs :: Outputable occ => GenStgLiveVars occ -> SDoc pprStgLVs lvs = getPprStyle $ \ sty -> if userStyle sty || isEmptyUniqSet lvs then empty else hcat [text "{-lvs:", interpp'SP (uniqSetToList lvs), text "-}"]
241
pprStgLVs lvs = getPprStyle $ \ sty -> if userStyle sty || isEmptyUniqSet lvs then empty else hcat [text "{-lvs:", interpp'SP (uniqSetToList lvs), text "-}"]
183
false
true
2
9
59
89
41
48
null
null
hvr/vector
old-testsuite/Testsuite/Vector/Errors.hs
bsd-3-clause
tests = "errors" $$? [ "head of empty" $? prop_headOfEmpty , "last of empty" $? prop_lastOfEmpty , "negative index" $? prop_indexNegative , "index out of range" $? prop_indexOutOfRange ...
1,220
tests = "errors" $$? [ "head of empty" $? prop_headOfEmpty , "last of empty" $? prop_lastOfEmpty , "negative index" $? prop_indexNegative , "index out of range" $? prop_indexOutOfRange ...
1,220
tests = "errors" $$? [ "head of empty" $? prop_headOfEmpty , "last of empty" $? prop_lastOfEmpty , "negative index" $? prop_indexNegative , "index out of range" $? prop_indexOutOfRange ...
1,220
false
false
0
7
610
115
65
50
null
null
bos/text
tests/Tests/Properties/Folds.hs
bsd-2-clause
t_foldl f z = L.foldl f z `eqP` (T.foldl f z) where _types = f :: Char -> Char -> Char
98
t_foldl f z = L.foldl f z `eqP` (T.foldl f z) where _types = f :: Char -> Char -> Char
98
t_foldl f z = L.foldl f z `eqP` (T.foldl f z) where _types = f :: Char -> Char -> Char
98
false
false
0
8
32
52
27
25
null
null
bcrisp/Cobalt
FDA_req.hs
mit
-- pierces a Monad m, extracts the lazy ByteString, converts it to a String and wraps it in the Monad fromLazyToString :: Monad m => BLC.ByteString -> m [Char] fromLazyToString a = return (BC.unpack (BLC.toStrict a))
216
fromLazyToString :: Monad m => BLC.ByteString -> m [Char] fromLazyToString a = return (BC.unpack (BLC.toStrict a))
114
fromLazyToString a = return (BC.unpack (BLC.toStrict a))
56
true
true
0
10
35
53
26
27
null
null
samscott89/tamarin-prover
lib/theory/src/Theory/Proof.hs
gpl-3.0
-- | The status of a 'DiffProofStep'. diffProofStepStatus :: DiffProofStep (Maybe a) -> ProofStatus diffProofStepStatus (DiffProofStep _ Nothing ) = UndeterminedProof
178
diffProofStepStatus :: DiffProofStep (Maybe a) -> ProofStatus diffProofStepStatus (DiffProofStep _ Nothing ) = UndeterminedProof
140
diffProofStepStatus (DiffProofStep _ Nothing ) = UndeterminedProof
78
true
true
0
8
32
40
19
21
null
null
jhartikainen/hs-language-php
StringParse.hs
bsd-3-clause
stringLetter d = satisfy (\c -> (c /= d) && (c /= '\\') && (c > '\026'))
74
stringLetter d = satisfy (\c -> (c /= d) && (c /= '\\') && (c > '\026'))
74
stringLetter d = satisfy (\c -> (c /= d) && (c /= '\\') && (c > '\026'))
74
false
false
0
11
18
49
26
23
null
null
glguy/5puzzle
Loopy.hs
isc
newBits :: MonadSAT s m => Int {- ^ number of bits -} -> m Bits newBits n = Bits <$> replicateM n exists
104
newBits :: MonadSAT s m => Int {- ^ number of bits -} -> m Bits newBits n = Bits <$> replicateM n exists
104
newBits n = Bits <$> replicateM n exists
40
false
true
0
7
23
40
19
21
null
null
bagl/takusen-oracle
Database/Test/Enumerator.hs
bsd-3-clause
{- Use execDrop when the DDL is likely to raise an error. Note that PostgreSQL + ODBC seems to require you commit or rollback the DDL; if you don't then the next statement will fail with a 25P02 ("in failed SQL transaction") I guess that's a result of PostgreSQL's transactional DDL feature. -} execDrop s = cat...
385
execDrop s = catchDB (withTransaction Serializable (execDDL s)) (\e -> return ())
81
execDrop s = catchDB (withTransaction Serializable (execDDL s)) (\e -> return ())
81
true
false
1
9
73
46
21
25
null
null
maxwellc/xmonad
xmonad.hs
mit
startupWorkspace = "1:Term"
27
startupWorkspace = "1:Term"
27
startupWorkspace = "1:Term"
27
false
false
1
5
2
10
3
7
null
null
sardonicpresence/glucose
test/Test/Utils.hs
mit
shouldBe a e = expectationFailure $ "expected:" ++ formatResult e ++ "\nbut got: " ++ formatResult a
100
shouldBe a e = expectationFailure $ "expected:" ++ formatResult e ++ "\nbut got: " ++ formatResult a
100
shouldBe a e = expectationFailure $ "expected:" ++ formatResult e ++ "\nbut got: " ++ formatResult a
100
false
false
0
8
16
33
15
18
null
null