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
emc2/saltlang
src/salt/Language/Salt/Surface/AST.hs
bsd-3-clause
expDot Sym { symName = sym } = do namestr <- name sym nodeid <- getNodeID return (dquoted (string nodeid) <+> brackets (string "label = " <> dquoted (string "Sym | " <> string "\\\"" <> bytestring namestr <> st...
408
expDot Sym { symName = sym } = do namestr <- name sym nodeid <- getNodeID return (dquoted (string nodeid) <+> brackets (string "label = " <> dquoted (string "Sym | " <> string "\\\"" <> bytestring namestr <> st...
408
expDot Sym { symName = sym } = do namestr <- name sym nodeid <- getNodeID return (dquoted (string nodeid) <+> brackets (string "label = " <> dquoted (string "Sym | " <> string "\\\"" <> bytestring namestr <> st...
408
false
false
0
20
181
117
53
64
null
null
udoprog/gabriel
Gabriel/Opts.hs
gpl-3.0
updateOptions :: Options -> IO Options updateOptions opts = do wd <- getCurrentDirectory let cwd = joinPath [wd, optCwd opts] let cmd = (canon wd cwd (optCommand opts) "command") let out = (canon wd cwd (optStdout opts) "out") let err = (canon wd cwd (optStderr opts) "err") let pid = (canon wd cwd (...
842
updateOptions :: Options -> IO Options updateOptions opts = do wd <- getCurrentDirectory let cwd = joinPath [wd, optCwd opts] let cmd = (canon wd cwd (optCommand opts) "command") let out = (canon wd cwd (optStdout opts) "out") let err = (canon wd cwd (optStderr opts) "err") let pid = (canon wd cwd (...
842
updateOptions opts = do wd <- getCurrentDirectory let cwd = joinPath [wd, optCwd opts] let cmd = (canon wd cwd (optCommand opts) "command") let out = (canon wd cwd (optStdout opts) "out") let err = (canon wd cwd (optStderr opts) "err") let pid = (canon wd cwd (optPidfile opts) "pid") let sock = (c...
803
false
true
2
15
230
355
177
178
null
null
shnarazk/profileAnalyzer
GHC/ProfileAnalyzer/Types.hs
gpl-3.0
mergeProfileLines p1 p2 = [ProfileLine id (getAt id p1 ++ getAt id p2) | id <- intersect (map idOf p1) (map idOf p2)] where idOf (ProfileLine n _) = n valOf (ProfileLine _ l) = l getAt id l = fromMaybe undefined $ liftM valOf $ find ((id ==) . idOf) l
265
mergeProfileLines p1 p2 = [ProfileLine id (getAt id p1 ++ getAt id p2) | id <- intersect (map idOf p1) (map idOf p2)] where idOf (ProfileLine n _) = n valOf (ProfileLine _ l) = l getAt id l = fromMaybe undefined $ liftM valOf $ find ((id ==) . idOf) l
265
mergeProfileLines p1 p2 = [ProfileLine id (getAt id p1 ++ getAt id p2) | id <- intersect (map idOf p1) (map idOf p2)] where idOf (ProfileLine n _) = n valOf (ProfileLine _ l) = l getAt id l = fromMaybe undefined $ liftM valOf $ find ((id ==) . idOf) l
265
false
false
2
10
65
150
68
82
null
null
DanielRS/marquee
src/Text/Marquee/SyntaxTrees/CST.hs
mit
group (BlockquoteBlock x : BlockquoteBlock y : xs) = group $ BlockquoteBlock (x ++ y) : xs
93
group (BlockquoteBlock x : BlockquoteBlock y : xs) = group $ BlockquoteBlock (x ++ y) : xs
93
group (BlockquoteBlock x : BlockquoteBlock y : xs) = group $ BlockquoteBlock (x ++ y) : xs
93
false
false
0
9
19
44
21
23
null
null
bitemyapp/seventy-one
src/BuildNumerals.hs
bsd-3-clause
zeroToNineEndings = "" : map ("-"<>) oneToNine
46
zeroToNineEndings = "" : map ("-"<>) oneToNine
46
zeroToNineEndings = "" : map ("-"<>) oneToNine
46
false
false
0
7
6
19
10
9
null
null
mpickering/hlint
src/HSE/Util.hs
bsd-3-clause
isWHNF Lambda{} = True
22
isWHNF Lambda{} = True
22
isWHNF Lambda{} = True
22
false
false
1
5
3
16
6
10
null
null
codemac/yi-editor
src/Yi/Search.hs
gpl-2.0
makeISearch :: String -> SearchExp makeISearch s = case makeSearchOptsM opts s of Left _ -> SearchExp s emptyRegex emptyRegex Right search -> search where opts = QuoteRegex : if any isUpper s then [] else [IgnoreCase]
256
makeISearch :: String -> SearchExp makeISearch s = case makeSearchOptsM opts s of Left _ -> SearchExp s emptyRegex emptyRegex Right search -> search where opts = QuoteRegex : if any isUpper s then [] else [IgnoreCase]
256
makeISearch s = case makeSearchOptsM opts s of Left _ -> SearchExp s emptyRegex emptyRegex Right search -> search where opts = QuoteRegex : if any isUpper s then [] else [IgnoreCase]
221
false
true
0
9
75
81
40
41
null
null
droundy/franchise
Distribution/Franchise/YAML.hs
bsd-3-clause
splitByIndentation :: [String] -> ([String], [String]) splitByIndentation [] = ([],[])
86
splitByIndentation :: [String] -> ([String], [String]) splitByIndentation [] = ([],[])
86
splitByIndentation [] = ([],[])
31
false
true
0
7
9
45
26
19
null
null
kaoskorobase/mescaline
lib/mescaline/Mescaline/Application/Config.hs
gpl-3.0
readConfigFiles :: ConfigParser -> [FilePath] -> IO ConfigParser readConfigFiles = foldM readConfigFile
103
readConfigFiles :: ConfigParser -> [FilePath] -> IO ConfigParser readConfigFiles = foldM readConfigFile
103
readConfigFiles = foldM readConfigFile
38
false
true
0
7
11
28
14
14
null
null
fmapfmapfmap/amazonka
amazonka/src/Control/Monad/Trans/AWS.hs
mpl-2.0
-- | Send a request, returning the associated response if successful. -- -- Throws 'Error'. send :: (AWSConstraint r m, AWSRequest a) => a -> m (Rs a) send = retrier >=> fmap snd . hoistError
201
send :: (AWSConstraint r m, AWSRequest a) => a -> m (Rs a) send = retrier >=> fmap snd . hoistError
109
send = retrier >=> fmap snd . hoistError
40
true
true
0
9
45
55
29
26
null
null
ezyang/ghc
ghc/GHCi/UI/Monad.hs
bsd-3-clause
reflectGHCi :: (Session, IORef GHCiState) -> GHCi a -> IO a reflectGHCi (s, gs) m = unGhc (unGHCi m gs) s
105
reflectGHCi :: (Session, IORef GHCiState) -> GHCi a -> IO a reflectGHCi (s, gs) m = unGhc (unGHCi m gs) s
105
reflectGHCi (s, gs) m = unGhc (unGHCi m gs) s
45
false
true
0
7
20
58
29
29
null
null
green-haskell/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
le_RDR = varQual_RDR gHC_CLASSES (fsLit "<=")
63
le_RDR = varQual_RDR gHC_CLASSES (fsLit "<=")
63
le_RDR = varQual_RDR gHC_CLASSES (fsLit "<=")
63
false
false
0
7
23
17
8
9
null
null
olorin/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateApp.hs
mpl-2.0
-- | The app ID. carsAppId :: Lens' CreateAppResponse (Maybe Text) carsAppId = lens _carsAppId (\ s a -> s{_carsAppId = a})
123
carsAppId :: Lens' CreateAppResponse (Maybe Text) carsAppId = lens _carsAppId (\ s a -> s{_carsAppId = a})
106
carsAppId = lens _carsAppId (\ s a -> s{_carsAppId = a})
56
true
true
0
9
21
46
25
21
null
null
eukaryote/denominate
src/Denominate/Internal.hs
bsd-3-clause
-- |Split path into directory part and file part. -- The directory part will not have an initial "./" or a trailing "/". dirAndFile :: FilePath -> (String, String) dirAndFile path = (normalizePath dirPath, fileName) where (dirPath, fileName) = splitFileName path -- |Split file path into filename and ext.
308
dirAndFile :: FilePath -> (String, String) dirAndFile path = (normalizePath dirPath, fileName) where (dirPath, fileName) = splitFileName path -- |Split file path into filename and ext.
187
dirAndFile path = (normalizePath dirPath, fileName) where (dirPath, fileName) = splitFileName path -- |Split file path into filename and ext.
144
true
true
0
6
51
53
30
23
null
null
tokiwoousaka/bucephalus-base
src/Game/Bucephalus.hs
bsd-3-clause
getState :: BucephalusState a i s s getState = get >>= return . buceState
73
getState :: BucephalusState a i s s getState = get >>= return . buceState
73
getState = get >>= return . buceState
37
false
true
0
6
13
28
14
14
null
null
amccausl/Swish
Swish/HaskellRDF/RDFGraphTest.hs
lgpl-2.1
testClass66 = testClass "testClass66" isMemberProp cm2 True
63
testClass66 = testClass "testClass66" isMemberProp cm2 True
63
testClass66 = testClass "testClass66" isMemberProp cm2 True
63
false
false
0
5
10
15
7
8
null
null
nlinker/haskell-you-could
src/Step4.hs
mit
--------------------------------- -- добавим ещё один шаг к цепочку pureChain2 :: Double -> Bool pureChain2 x1 = pureBind x1 (\x -> pureBind (pureFloor x) (\y -> pureBind (pureGt y) id))
192
pureChain2 :: Double -> Bool pureChain2 x1 = pureBind x1 (\x -> pureBind (pureFloor x) (\y -> pureBind (pureGt y) id))
124
pureChain2 x1 = pureBind x1 (\x -> pureBind (pureFloor x) (\y -> pureBind (pureGt y) id))
95
true
true
0
13
34
63
33
30
null
null
nazrhom/vcs-clojure
src/VCS/Compatible.hs
bsd-3-clause
matchCtxNeg rec (There a1 ctx1) (There a2 ctx2) = a1 == a2 && matchCtxNeg rec ctx1 ctx2
101
matchCtxNeg rec (There a1 ctx1) (There a2 ctx2) = a1 == a2 && matchCtxNeg rec ctx1 ctx2
101
matchCtxNeg rec (There a1 ctx1) (There a2 ctx2) = a1 == a2 && matchCtxNeg rec ctx1 ctx2
101
false
false
3
7
30
44
19
25
null
null
arjunguha/haskell-couchdb
src/Database/CouchDB/Unsafe.hs
bsd-3-clause
dropDB :: String -> CouchMonad Bool -- ^False if the database does not exist dropDB name = do resp <- request' name DELETE case rspCode resp of (2,0,0) -> return True (4,0,4) -> return False otherwise -> error (rspReason resp)
242
dropDB :: String -> CouchMonad Bool dropDB name = do resp <- request' name DELETE case rspCode resp of (2,0,0) -> return True (4,0,4) -> return False otherwise -> error (rspReason resp)
201
dropDB name = do resp <- request' name DELETE case rspCode resp of (2,0,0) -> return True (4,0,4) -> return False otherwise -> error (rspReason resp)
165
true
true
0
12
55
95
47
48
null
null
danielksb/eventlog
src/Tcp.hs
bsd-3-clause
notifyCommand :: EventLog -> [String] -> ClientSession () notifyCommand eventLog args = do session <- get let eventId = unwords args liftIO $ notify eventLog eventId
171
notifyCommand :: EventLog -> [String] -> ClientSession () notifyCommand eventLog args = do session <- get let eventId = unwords args liftIO $ notify eventLog eventId
171
notifyCommand eventLog args = do session <- get let eventId = unwords args liftIO $ notify eventLog eventId
113
false
true
0
10
31
63
29
34
null
null
dillonhuff/Folly
src/Folly/Unification.hs
bsd-3-clause
applyUnifier :: Unifier -> Term -> Term applyUnifier u t = case possibleSubs u t of True -> applyUnifier u (subTerm u t) False -> t
135
applyUnifier :: Unifier -> Term -> Term applyUnifier u t = case possibleSubs u t of True -> applyUnifier u (subTerm u t) False -> t
135
applyUnifier u t = case possibleSubs u t of True -> applyUnifier u (subTerm u t) False -> t
95
false
true
0
10
29
58
28
30
null
null
kolmodin/cabal
cabal-install/Distribution/Solver/Modular/Linking.hs
bsd-3-clause
verifyStanza' :: SN PN -> LinkGroup -> UpdateState () verifyStanza' (SN (PI pn i) sn) lg = do vs <- get let stanzas = map (\pp' -> SN (PI (Q pp' pn) i) sn) (S.toList (lgMembers lg)) vals = map (`M.lookup` vsStanzas vs) stanzas if allEqual (catMaybes vals) -- We ignore not-yet assigned stanzas ...
1,111
verifyStanza' :: SN PN -> LinkGroup -> UpdateState () verifyStanza' (SN (PI pn i) sn) lg = do vs <- get let stanzas = map (\pp' -> SN (PI (Q pp' pn) i) sn) (S.toList (lgMembers lg)) vals = map (`M.lookup` vsStanzas vs) stanzas if allEqual (catMaybes vals) -- We ignore not-yet assigned stanzas ...
1,111
verifyStanza' (SN (PI pn i) sn) lg = do vs <- get let stanzas = map (\pp' -> SN (PI (Q pp' pn) i) sn) (S.toList (lgMembers lg)) vals = map (`M.lookup` vsStanzas vs) stanzas if allEqual (catMaybes vals) -- We ignore not-yet assigned stanzas then return () else conflict ( CS.fromList (m...
1,057
false
true
0
17
235
211
109
102
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | The health status of the stream. lssHealthStatus :: Lens' LiveStreamStatus (Maybe LiveStreamHealthStatus) lssHealthStatus = lens _lssHealthStatus (\ s a -> s{_lssHealthStatus = a})
193
lssHealthStatus :: Lens' LiveStreamStatus (Maybe LiveStreamHealthStatus) lssHealthStatus = lens _lssHealthStatus (\ s a -> s{_lssHealthStatus = a})
155
lssHealthStatus = lens _lssHealthStatus (\ s a -> s{_lssHealthStatus = a})
82
true
true
0
9
32
48
25
23
null
null
sdiehl/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
-- Atomics pprInstr (LOCK i) = text "\tlock" $$ pprInstr i
59
pprInstr (LOCK i) = text "\tlock" $$ pprInstr i
47
pprInstr (LOCK i) = text "\tlock" $$ pprInstr i
47
true
false
0
7
11
26
12
14
null
null
cchens/courseography
hs/WebParsing/TimeTableParser.hs
gpl-3.0
-- | inserts a single courseSlot into a session insertSession :: Session -> CourseSlot -> Session insertSession sesh slot = if isLecture slot then sesh {lectures = (makeLecture slot):(lectures sesh)} else sesh {tutorials = (makeTutorial slot):(tutorials sesh)}
266
insertSession :: Session -> CourseSlot -> Session insertSession sesh slot = if isLecture slot then sesh {lectures = (makeLecture slot):(lectures sesh)} else sesh {tutorials = (makeTutorial slot):(tutorials sesh)}
218
insertSession sesh slot = if isLecture slot then sesh {lectures = (makeLecture slot):(lectures sesh)} else sesh {tutorials = (makeTutorial slot):(tutorials sesh)}
168
true
true
0
10
42
84
45
39
null
null
diagrams/diagrams-contrib
src/Diagrams/Color/XKCD.hs
bsd-3-clause
scarlet = fromJust $ readHexColor "#be0119"
57
scarlet = fromJust $ readHexColor "#be0119"
57
scarlet = fromJust $ readHexColor "#be0119"
57
false
false
0
6
19
13
6
7
null
null
spacekitteh/smcghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
-- These PrimOps are NOPs in Cmm nopOp :: PrimOp -> Bool nopOp Int2WordOp = True
85
nopOp :: PrimOp -> Bool nopOp Int2WordOp = True
51
nopOp Int2WordOp = True
27
true
true
0
7
20
25
11
14
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M12/D29/Solution.hs
mit
pb idx (Error err) = say ("Could not parse article " ++ show idx ++ ", error: " ++ err) >> return Nothing
111
pb idx (Error err) = say ("Could not parse article " ++ show idx ++ ", error: " ++ err) >> return Nothing
111
pb idx (Error err) = say ("Could not parse article " ++ show idx ++ ", error: " ++ err) >> return Nothing
111
false
false
0
11
28
45
21
24
null
null
bangalore-haskell-user-group/functorrent
src/FuncTorrent/Bencode.hs
gpl-3.0
bValToInfoDict :: BVal -> Maybe (Map String BVal) bValToInfoDict (Bdict dict) = Just dict
93
bValToInfoDict :: BVal -> Maybe (Map String BVal) bValToInfoDict (Bdict dict) = Just dict
93
bValToInfoDict (Bdict dict) = Just dict
39
false
true
0
8
17
38
18
20
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_362 (153#) = happyShift action_47
40
action_362 (153#) = happyShift action_47
40
action_362 (153#) = happyShift action_47
40
false
false
0
6
4
15
7
8
null
null
dambaev/hproxyrules
src/Data/HProxy/Rules.hs
gpl-2.0
parseDate:: GenParser Char st Date parseDate = do try parseDateRange <|> try parseWeekDay <|> try parseWeekDays <|> try parseDay
132
parseDate:: GenParser Char st Date parseDate = do try parseDateRange <|> try parseWeekDay <|> try parseWeekDays <|> try parseDay
132
parseDate = do try parseDateRange <|> try parseWeekDay <|> try parseWeekDays <|> try parseDay
97
false
true
0
10
22
45
20
25
null
null
shockkolate/shockklang3
src/Parser.hs
apache-2.0
parsePrimary :: ExceptT String TokenState (Maybe AST) parsePrimary = get >>= \case T.Identifier ident : _ -> modify tail >> return (Just (NamedFunction ident)) T.Literal lit : _ -> modify tail >> return (Just (Literal lit)) T.BracketOpen : _ -> modify tail >> parseExpr >>= return . Just _ -> return Noth...
323
parsePrimary :: ExceptT String TokenState (Maybe AST) parsePrimary = get >>= \case T.Identifier ident : _ -> modify tail >> return (Just (NamedFunction ident)) T.Literal lit : _ -> modify tail >> return (Just (Literal lit)) T.BracketOpen : _ -> modify tail >> parseExpr >>= return . Just _ -> return Noth...
323
parsePrimary = get >>= \case T.Identifier ident : _ -> modify tail >> return (Just (NamedFunction ident)) T.Literal lit : _ -> modify tail >> return (Just (Literal lit)) T.BracketOpen : _ -> modify tail >> parseExpr >>= return . Just _ -> return Nothing
269
false
true
0
14
67
140
66
74
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/Sessions/DeleteContexts.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). pasdcUploadType :: Lens' ProjectsAgentSessionsDeleteContexts (Maybe Text) pasdcUploadType = lens _pasdcUploadType (\ s a -> s{_pasdcUploadType = a})
227
pasdcUploadType :: Lens' ProjectsAgentSessionsDeleteContexts (Maybe Text) pasdcUploadType = lens _pasdcUploadType (\ s a -> s{_pasdcUploadType = a})
156
pasdcUploadType = lens _pasdcUploadType (\ s a -> s{_pasdcUploadType = a})
82
true
true
0
9
34
48
25
23
null
null
alexDarcy/shelly-examples
krypt.hs
gpl-3.0
gpg :: FilePath -> FilePath -> FilePath -> FilePath -> Sh() gpg pass flag input output = cmd "gpg" args where args = ["-o", output, "--batch", "--passphrase-file", pass , flag, input] -- | Symmetric encryption from FILE to FILE.gpg.
250
gpg :: FilePath -> FilePath -> FilePath -> FilePath -> Sh() gpg pass flag input output = cmd "gpg" args where args = ["-o", output, "--batch", "--passphrase-file", pass , flag, input] -- | Symmetric encryption from FILE to FILE.gpg.
250
gpg pass flag input output = cmd "gpg" args where args = ["-o", output, "--batch", "--passphrase-file", pass , flag, input] -- | Symmetric encryption from FILE to FILE.gpg.
190
false
true
1
11
56
83
42
41
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/rangeSize_3.hs
mit
primPlusNat (Succ x) Zero = Succ x
34
primPlusNat (Succ x) Zero = Succ x
34
primPlusNat (Succ x) Zero = Succ x
34
false
false
0
7
6
20
9
11
null
null
luzhuomi/cpp-obs
Language/C/Obfuscate/ASTUtils.hs
apache-2.0
(.&.) :: AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo (.&.) lhs rhs = AST.CBinary AST.CAndOp lhs rhs N.undefNode
154
(.&.) :: AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo (.&.) lhs rhs = AST.CBinary AST.CAndOp lhs rhs N.undefNode
154
(.&.) lhs rhs = AST.CBinary AST.CAndOp lhs rhs N.undefNode
58
false
true
0
8
18
64
32
32
null
null
psibi/cabal2nix
src/hackage2nix.hs
bsd-3-clause
parsePreferredVersionsLine :: String -> Maybe Constraint parsePreferredVersionsLine [] = Nothing
96
parsePreferredVersionsLine :: String -> Maybe Constraint parsePreferredVersionsLine [] = Nothing
96
parsePreferredVersionsLine [] = Nothing
39
false
true
0
6
9
23
11
12
null
null
tamarin-prover/tamarin-prover
lib/sapic/src/Sapic/Basetranslation.hs
gpl-3.0
-- | Produce locking lemma for variable v by instantiating resLockingL -- with (Un)Lock_pos instead of (Un)LockPOS, where pos is the variable id -- of v. resLocking :: MonadThrow m => Bool -> LVar -> m SyntacticRestriction resLocking hasUnlock v = do rest <- if hasUnlock then toEx resLockingL ...
990
resLocking :: MonadThrow m => Bool -> LVar -> m SyntacticRestriction resLocking hasUnlock v = do rest <- if hasUnlock then toEx resLockingL else toEx resLockingLNoUnlockPOS return $ mapName hardcode $ mapFormula (mapAtoms subst) rest where subst _ a ...
834
resLocking hasUnlock v = do rest <- if hasUnlock then toEx resLockingL else toEx resLockingLNoUnlockPOS return $ mapName hardcode $ mapFormula (mapAtoms subst) rest where subst _ a | (Action t f) <- a, Fact {factTag = ProtoFact Linea...
765
true
true
0
14
329
294
144
150
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
1361 = 1360
11
1361 = 1360
11
1361 = 1360
11
false
false
1
5
2
10
3
7
null
null
siddhanathan/yi
yi-core/src/Yi/Layout.hs
gpl-2.0
singleWindow :: a -> LayoutM a singleWindow a = LayoutM (pure (SingleWindow a))
79
singleWindow :: a -> LayoutM a singleWindow a = LayoutM (pure (SingleWindow a))
79
singleWindow a = LayoutM (pure (SingleWindow a))
48
false
true
0
9
12
41
18
23
null
null
bitemyapp/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
getPathEntry :: TM [String] getPathEntry = declPath `liftM` getEnv
66
getPathEntry :: TM [String] getPathEntry = declPath `liftM` getEnv
66
getPathEntry = declPath `liftM` getEnv
38
false
true
0
6
8
23
13
10
null
null
schell/odin
odin-engine/src/Odin/Engine/New/UI/Button.hs
mit
buttonWith :: forall r t m a. OdinWidget r t m => Painter (ButtonData a) IO -> a -> ButtonCfg t a -> m (Dynamic t ButtonState) buttonWith buttonPainter a cfg = do tvFresh <- getFreshVar evMotion <- getMouseMotionEvent evButton <- getMouseButtonEvent mdo let evUpdate = leftmost [ ButtonUpdateSetD...
1,430
buttonWith :: forall r t m a. OdinWidget r t m => Painter (ButtonData a) IO -> a -> ButtonCfg t a -> m (Dynamic t ButtonState) buttonWith buttonPainter a cfg = do tvFresh <- getFreshVar evMotion <- getMouseMotionEvent evButton <- getMouseButtonEvent mdo let evUpdate = leftmost [ ButtonUpdateSetD...
1,430
buttonWith buttonPainter a cfg = do tvFresh <- getFreshVar evMotion <- getMouseMotionEvent evButton <- getMouseButtonEvent mdo let evUpdate = leftmost [ ButtonUpdateSetData <$> cfg ^. setData , ButtonUpdateSetPainter <$> cfg ^. setButtonPainter , ...
1,293
false
true
0
18
567
356
174
182
null
null
zachsully/hakaru
haskell/Tests/TypeCheck.hs
bsd-3-clause
xname :: Variable 'U.U xname = Variable "x" (unsafeNat 0) U.SU
63
xname :: Variable 'U.U xname = Variable "x" (unsafeNat 0) U.SU
63
xname = Variable "x" (unsafeNat 0) U.SU
40
false
true
0
7
11
33
16
17
null
null
jaimeMF/mediawiki-dl
src/MediaWiki/Image.hs
bsd-2-clause
getImagesFrom :: [String] -> Wiki -> IO [Image] getImagesFrom [] _ = return []
78
getImagesFrom :: [String] -> Wiki -> IO [Image] getImagesFrom [] _ = return []
78
getImagesFrom [] _ = return []
30
false
true
0
9
13
45
21
24
null
null
NightRa/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintErr' i (CantInferType t) = text "Can't infer type for" <+> text t
71
pprintErr' i (CantInferType t) = text "Can't infer type for" <+> text t
71
pprintErr' i (CantInferType t) = text "Can't infer type for" <+> text t
71
false
false
0
7
12
27
12
15
null
null
d0kt0r0/estuary
client/src/Estuary/Types/View/Parser.hs
gpl-3.0
stopwatchFunc :: Int -> View stopwatchFunc z = StopWatchView z
62
stopwatchFunc :: Int -> View stopwatchFunc z = StopWatchView z
62
stopwatchFunc z = StopWatchView z
33
false
true
0
5
9
21
10
11
null
null
jgoerzen/hsh
HSH/ShellEquivs.hs
lgpl-2.1
catTo :: FilePath -> Channel -> IO Channel catTo fp ichan = do ofile <- openFile fp WriteMode chanToHandle True ichan ofile return (ChanString "") #ifdef __HSH_POSIX__ {- | Like 'catTo', but opens the destination in ReadWriteMode instead of ReadOnlyMode. Due to an oddity of the Haskell IO system, t...
677
catTo :: FilePath -> Channel -> IO Channel catTo fp ichan = do ofile <- openFile fp WriteMode chanToHandle True ichan ofile return (ChanString "") #ifdef __HSH_POSIX__ {- | Like 'catTo', but opens the destination in ReadWriteMode instead of ReadOnlyMode. Due to an oddity of the Haskell IO system, t...
677
catTo fp ichan = do ofile <- openFile fp WriteMode chanToHandle True ichan ofile return (ChanString "") #ifdef __HSH_POSIX__ {- | Like 'catTo', but opens the destination in ReadWriteMode instead of ReadOnlyMode. Due to an oddity of the Haskell IO system, this is required when writing to a named pip...
634
false
true
0
9
139
63
29
34
null
null
cbaatz/hamu8080
src/Hamu8080/Compute.hs
mit
-- ADC A, A doOp 0x90 = liftM2 sub (getReg A) (getReg B) >>= setResultC
72
doOp 0x90 = liftM2 sub (getReg A) (getReg B) >>= setResultC
59
doOp 0x90 = liftM2 sub (getReg A) (getReg B) >>= setResultC
59
true
false
0
8
15
33
16
17
null
null
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/Logic.hs
bsd-3-clause
-- Make EQUIVALENCE expression with given arguments makeIff :: (Formula a) -> (Formula a) -> (Formula a) makeIff p q = (Iff p q)
128
makeIff :: (Formula a) -> (Formula a) -> (Formula a) makeIff p q = (Iff p q)
76
makeIff p q = (Iff p q)
23
true
true
0
8
23
51
26
25
null
null
narrative/achaeabot
src/Bot.hs
mit
top3 db range rangeStr f t twInfo mgr = checkFlag db rangeStr range $ \db -> do today <- liftIO getCurrentTime events <- DB.runRedis db getEvents fromRange <- forM (fromR events) $ \evtID -> do date <- DB.runRedis db $ getDate evtID case fromR date >>= parseAchaeaTime >>= inRange today of ...
1,035
top3 db range rangeStr f t twInfo mgr = checkFlag db rangeStr range $ \db -> do today <- liftIO getCurrentTime events <- DB.runRedis db getEvents fromRange <- forM (fromR events) $ \evtID -> do date <- DB.runRedis db $ getDate evtID case fromR date >>= parseAchaeaTime >>= inRange today of ...
1,035
top3 db range rangeStr f t twInfo mgr = checkFlag db rangeStr range $ \db -> do today <- liftIO getCurrentTime events <- DB.runRedis db getEvents fromRange <- forM (fromR events) $ \evtID -> do date <- DB.runRedis db $ getDate evtID case fromR date >>= parseAchaeaTime >>= inRange today of ...
1,035
false
false
1
18
298
397
180
217
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo UnpackClosureOp = mkGenPrimOp (fsLit "unpackClosure#") [alphaTyVar, betaTyVar] [alphaTy] ((mkTupleTy UnboxedTuple [addrPrimTy, mkArrayPrimTy betaTy, byteArrayPrimTy]))
179
primOpInfo UnpackClosureOp = mkGenPrimOp (fsLit "unpackClosure#") [alphaTyVar, betaTyVar] [alphaTy] ((mkTupleTy UnboxedTuple [addrPrimTy, mkArrayPrimTy betaTy, byteArrayPrimTy]))
179
primOpInfo UnpackClosureOp = mkGenPrimOp (fsLit "unpackClosure#") [alphaTyVar, betaTyVar] [alphaTy] ((mkTupleTy UnboxedTuple [addrPrimTy, mkArrayPrimTy betaTy, byteArrayPrimTy]))
179
false
false
0
10
15
56
30
26
null
null
li-zhirui/JSAnalyzer
JSEvaluator.hs
mit
jsSubtract _ JSNaN = return JSNaN
49
jsSubtract _ JSNaN = return JSNaN
49
jsSubtract _ JSNaN = return JSNaN
49
false
false
1
5
21
15
6
9
null
null
Motions/motions
src/Bio/Motions/Format/DumpDeserialisation.hs
apache-2.0
readChainName :: ChainDescription -> Maybe String readChainName ChainDescription{..} = uToString <$> chain_name
111
readChainName :: ChainDescription -> Maybe String readChainName ChainDescription{..} = uToString <$> chain_name
111
readChainName ChainDescription{..} = uToString <$> chain_name
61
false
true
0
7
11
31
15
16
null
null
andrewMacmurray/haskell-book-solutions
src/ch14/Exercises.hs
mit
main :: IO () main = do putStrLn "prop half checks" quickCheck prop_half putStrLn "half identity checks" quickCheck prop_halfIdentity putStrLn "prop sorted list checks" quickCheck prop_sortedList putStrLn "plus associative checks" quickCheck prop_add_associative putStrLn "plus commutative checks" qu...
1,133
main :: IO () main = do putStrLn "prop half checks" quickCheck prop_half putStrLn "half identity checks" quickCheck prop_halfIdentity putStrLn "prop sorted list checks" quickCheck prop_sortedList putStrLn "plus associative checks" quickCheck prop_add_associative putStrLn "plus commutative checks" qu...
1,133
main = do putStrLn "prop half checks" quickCheck prop_half putStrLn "half identity checks" quickCheck prop_halfIdentity putStrLn "prop sorted list checks" quickCheck prop_sortedList putStrLn "plus associative checks" quickCheck prop_add_associative putStrLn "plus commutative checks" quickCheck prop_...
1,119
false
true
0
7
182
232
80
152
null
null
spechub/Hets
TPTP/StaticAnalysis.hs
gpl-2.0
signOfTHF_pair_connective :: THF_pair_connective -> Sign signOfTHF_pair_connective x = case x of THF_infix_equality -> emptySign Infix_inequality -> emptySign THFPC_binary a -> signOfBinary_connective a THF_assignment -> emptySign
238
signOfTHF_pair_connective :: THF_pair_connective -> Sign signOfTHF_pair_connective x = case x of THF_infix_equality -> emptySign Infix_inequality -> emptySign THFPC_binary a -> signOfBinary_connective a THF_assignment -> emptySign
238
signOfTHF_pair_connective x = case x of THF_infix_equality -> emptySign Infix_inequality -> emptySign THFPC_binary a -> signOfBinary_connective a THF_assignment -> emptySign
181
false
true
5
5
32
55
25
30
null
null
marcellussiegburg/autotool
collection/src/DPLLT/Solve.hs
gpl-2.0
handle_units mo history a (cl : nit) = let vs = map (\ l -> (l, evaluate_literal (assignment a) l)) cl [ l ] = map fst $ filter ( (== Nothing) . snd ) vs in handle mo (Propagate cl l : history) $ propagate a cl l
230
handle_units mo history a (cl : nit) = let vs = map (\ l -> (l, evaluate_literal (assignment a) l)) cl [ l ] = map fst $ filter ( (== Nothing) . snd ) vs in handle mo (Propagate cl l : history) $ propagate a cl l
230
handle_units mo history a (cl : nit) = let vs = map (\ l -> (l, evaluate_literal (assignment a) l)) cl [ l ] = map fst $ filter ( (== Nothing) . snd ) vs in handle mo (Propagate cl l : history) $ propagate a cl l
230
false
false
0
15
66
123
62
61
null
null
olsner/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
mkLHsTupleExpr es = noLoc $ ExplicitTuple (map (noLoc . Present) es) Boxed
75
mkLHsTupleExpr es = noLoc $ ExplicitTuple (map (noLoc . Present) es) Boxed
75
mkLHsTupleExpr es = noLoc $ ExplicitTuple (map (noLoc . Present) es) Boxed
75
false
false
0
10
12
33
16
17
null
null
sfilipov/hmdx
src/Database/HMDX/SSAS.hs
mit
mdSchemaLevels :: Transport -> SearchSettings -> IO [Text] mdSchemaLevels t settings = mdSchemaGeneric t settings "MDSCHEMA_LEVELS" "LEVEL_NAME"
144
mdSchemaLevels :: Transport -> SearchSettings -> IO [Text] mdSchemaLevels t settings = mdSchemaGeneric t settings "MDSCHEMA_LEVELS" "LEVEL_NAME"
144
mdSchemaLevels t settings = mdSchemaGeneric t settings "MDSCHEMA_LEVELS" "LEVEL_NAME"
85
false
true
0
8
16
39
19
20
null
null
kajigor/uKanren_transformations
test/resources/Program/Bridge2.hs
bsd-3-clause
grForPerson :: [Def] grForPerson = [grForPersonDef]
51
grForPerson :: [Def] grForPerson = [grForPersonDef]
51
grForPerson = [grForPersonDef]
30
false
true
0
5
5
17
10
7
null
null
yairchu/ad
src/Numeric/AD/Internal/Sparse.hs
bsd-3-clause
ds fs (AD as@(Sparse a _)) = a :< (go emptyIndex <$> fns) where fns = skeleton fs -- go :: Index -> Int -> Cofree f a go ix i = partial (indices ix') as :< (go ix' <$> fns) where ix' = addToIndex i ix
241
ds fs (AD as@(Sparse a _)) = a :< (go emptyIndex <$> fns) where fns = skeleton fs -- go :: Index -> Int -> Cofree f a go ix i = partial (indices ix') as :< (go ix' <$> fns) where ix' = addToIndex i ix
241
ds fs (AD as@(Sparse a _)) = a :< (go emptyIndex <$> fns) where fns = skeleton fs -- go :: Index -> Int -> Cofree f a go ix i = partial (indices ix') as :< (go ix' <$> fns) where ix' = addToIndex i ix
241
false
false
0
9
87
103
50
53
null
null
VictorCMiraldo/mmm
MMM/OOP/ToMMM.hs
mit
-- |Translates a module trModule :: (IsVar id, MyMonad m) => Module id -> E m HsModule trModule (Module is cs) = let mis = defImports $ className $ head cs iis = map (flip HsSImport Nothing) is in do mc <- mapM classToModule cs return $ mis ++ iis ++ sort (concat mc) -- |Translates a class into a H...
327
trModule :: (IsVar id, MyMonad m) => Module id -> E m HsModule trModule (Module is cs) = let mis = defImports $ className $ head cs iis = map (flip HsSImport Nothing) is in do mc <- mapM classToModule cs return $ mis ++ iis ++ sort (concat mc) -- |Translates a class into a HsModule
303
trModule (Module is cs) = let mis = defImports $ className $ head cs iis = map (flip HsSImport Nothing) is in do mc <- mapM classToModule cs return $ mis ++ iis ++ sort (concat mc) -- |Translates a class into a HsModule
240
true
true
0
12
81
127
61
66
null
null
haroldcarr/juno
src/Juno/Types/Log.hs
bsd-3-clause
-- | Get largest index in ledger. maxIndex :: Log a -> LogIndex maxIndex = subtract 1 . entryCount
98
maxIndex :: Log a -> LogIndex maxIndex = subtract 1 . entryCount
64
maxIndex = subtract 1 . entryCount
34
true
true
0
6
18
26
13
13
null
null
narrative/stack
src/Stack/Image.hs
bsd-3-clause
-- | The command name for building a docker container. imgDockerCmdName :: String imgDockerCmdName = "container"
116
imgDockerCmdName :: String imgDockerCmdName = "container"
61
imgDockerCmdName = "container"
30
true
true
0
6
19
19
8
11
null
null
mmarx/milkman
src/Milkman/Context.hs
gpl-3.0
-- |Compute the intent of a set of objects, i.e. the set of all -- attributes that belong to all the objects intent' :: Context -> [Object] -> [Attribute] intent' (Context _ m i) objs = [ att | att <- keys m , all (\obj -> incident i obj att) objs ...
342
intent' :: Context -> [Object] -> [Attribute] intent' (Context _ m i) objs = [ att | att <- keys m , all (\obj -> incident i obj att) objs ]
233
intent' (Context _ m i) objs = [ att | att <- keys m , all (\obj -> incident i obj att) objs ]
187
true
true
0
11
145
86
43
43
null
null
surajx/learn-haskell
basic.hs
mit
ccat x y = x++y
15
ccat x y = x++y
15
ccat x y = x++y
15
false
false
3
5
4
22
7
15
null
null
zefciu/Turtle
src/Turtle/Commands.hs
bsd-3-clause
turnRight = turnTurtle True
27
turnRight = turnTurtle True
27
turnRight = turnTurtle True
27
false
false
0
5
3
9
4
5
null
null
diku-dk/futhark
src/Futhark/Analysis/HORep/SOAC.hs
isc
-- | Set the lambda used in the SOAC. setLambda :: Lambda rep -> SOAC rep -> SOAC rep setLambda lam (Stream w form _ nes arrs) = Stream w form lam nes arrs
157
setLambda :: Lambda rep -> SOAC rep -> SOAC rep setLambda lam (Stream w form _ nes arrs) = Stream w form lam nes arrs
119
setLambda lam (Stream w form _ nes arrs) = Stream w form lam nes arrs
71
true
true
0
7
35
59
28
31
null
null
diku-dk/futhark
src/Futhark/IR/Primitive.hs
isc
zeroIshInt (Int32Value k) = k == 0
34
zeroIshInt (Int32Value k) = k == 0
34
zeroIshInt (Int32Value k) = k == 0
34
false
false
0
7
6
19
9
10
null
null
tjakway/ghcjvm
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
untag_Expr tycon ((untag_this, put_tag_here) : more) expr = nlHsCase (nlHsPar (nlHsVarApps (con2tag_RDR tycon) [untag_this])) {-of-} [mkSimpleHsAlt (nlVarPat put_tag_here) (untag_Expr tycon more expr)]
209
untag_Expr tycon ((untag_this, put_tag_here) : more) expr = nlHsCase (nlHsPar (nlHsVarApps (con2tag_RDR tycon) [untag_this])) {-of-} [mkSimpleHsAlt (nlVarPat put_tag_here) (untag_Expr tycon more expr)]
209
untag_Expr tycon ((untag_this, put_tag_here) : more) expr = nlHsCase (nlHsPar (nlHsVarApps (con2tag_RDR tycon) [untag_this])) {-of-} [mkSimpleHsAlt (nlVarPat put_tag_here) (untag_Expr tycon more expr)]
209
false
false
0
10
29
81
41
40
null
null
chrisdone/ircbrowse
src/Ircbrowse/View/Browse.hs
bsd-3-clause
noResults :: Html noResults = do p "There are no results!"
60
noResults :: Html noResults = do p "There are no results!"
60
noResults = do p "There are no results!"
42
false
true
0
8
12
24
9
15
null
null
urbanslug/ghc
compiler/basicTypes/SrcLoc.hs
bsd-3-clause
wiredInSrcSpan = UnhelpfulSpan (fsLit "<wired into compiler>")
62
wiredInSrcSpan = UnhelpfulSpan (fsLit "<wired into compiler>")
62
wiredInSrcSpan = UnhelpfulSpan (fsLit "<wired into compiler>")
62
false
false
1
7
6
18
7
11
null
null
Helkafen/haddock
haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
bsd-2-clause
punctuate h (d0:ds) = go d0 ds where go d [] = [d] go d (e:es) = (d +++ h) : go e es
145
punctuate h (d0:ds) = go d0 ds where go d [] = [d] go d (e:es) = (d +++ h) : go e es
145
punctuate h (d0:ds) = go d0 ds where go d [] = [d] go d (e:es) = (d +++ h) : go e es
145
false
false
0
9
84
73
37
36
null
null
umairsd/course-haskell-cis194
hw07/JoinList.hs
mit
main :: IO() main = runEditor editor (fromString "HW7-Test" :: (JoinList (Score, Size) String) )
96
main :: IO() main = runEditor editor (fromString "HW7-Test" :: (JoinList (Score, Size) String) )
96
main = runEditor editor (fromString "HW7-Test" :: (JoinList (Score, Size) String) )
83
false
true
1
9
14
47
23
24
null
null
bj4rtmar/sdl2
src/SDL/Hint.hs
bsd-3-clause
hintToString HintFramebufferAcceleration = "SDL_HINT_FRAMEBUFFER_ACCELERATION"
78
hintToString HintFramebufferAcceleration = "SDL_HINT_FRAMEBUFFER_ACCELERATION"
78
hintToString HintFramebufferAcceleration = "SDL_HINT_FRAMEBUFFER_ACCELERATION"
78
false
false
0
4
3
10
4
6
null
null
michalkonecny/aern2
aern2-mfun/src/AERN2/BoxFunMinMax/Expressions/Type.hs
bsd-3-clause
simplifyF (FConn Or FTrue _) = FTrue
68
simplifyF (FConn Or FTrue _) = FTrue
68
simplifyF (FConn Or FTrue _) = FTrue
68
false
false
0
7
38
19
9
10
null
null
mapinguari/usb-hid
System/USB/HID/Parsers.hs
bsd-3-clause
binDec :: Word8 -> Int binDec w = (t * 10) + s where beS = 0xF0 s = fromEnum $ w .&. beS t = fromEnum $ (rotate w 4) .&. beS
149
binDec :: Word8 -> Int binDec w = (t * 10) + s where beS = 0xF0 s = fromEnum $ w .&. beS t = fromEnum $ (rotate w 4) .&. beS
148
binDec w = (t * 10) + s where beS = 0xF0 s = fromEnum $ w .&. beS t = fromEnum $ (rotate w 4) .&. beS
125
false
true
11
7
57
91
39
52
null
null
cnc-patch/disass
src/Language/Assembly/X86/Parse.hs
bsd-3-clause
parsePSLLW :: (Stream s m Word8, Monad m) => t -> ParsecT s PState m Instr parsePSLLW = parseMmxXmmPQVW PSLLW
109
parsePSLLW :: (Stream s m Word8, Monad m) => t -> ParsecT s PState m Instr parsePSLLW = parseMmxXmmPQVW PSLLW
109
parsePSLLW = parseMmxXmmPQVW PSLLW
34
false
true
0
7
19
46
23
23
null
null
Kermit95/Playground
lang/haskell/haskell_tut1.hs
apache-2.0
-- calculate addEx = 5 + 4
26
addEx = 5 + 4
13
addEx = 5 + 4
13
true
false
3
5
6
16
6
10
null
null
sdiehl/ghc
compiler/basicTypes/VarEnv.hs
bsd-3-clause
plusDVarEnv :: DVarEnv a -> DVarEnv a -> DVarEnv a plusDVarEnv = plusUDFM
73
plusDVarEnv :: DVarEnv a -> DVarEnv a -> DVarEnv a plusDVarEnv = plusUDFM
73
plusDVarEnv = plusUDFM
22
false
true
0
7
12
28
13
15
null
null
martin-kolinek/AgentH
test/CityTest.hs
mit
cityTests = [ testCase "viewAddition is correct" $ viewAddition testCity (0, 0) (WindowDimensions (100, 100)) @?= (50 - wallWidth, 50 - wallWidth), testCase "viewAddition is correct" $ viewAddition testCity (10, 20) (WindowDimensions (100, 100)) @?= (40 - wallWidth, 30 - wallWidth), testCa...
792
cityTests = [ testCase "viewAddition is correct" $ viewAddition testCity (0, 0) (WindowDimensions (100, 100)) @?= (50 - wallWidth, 50 - wallWidth), testCase "viewAddition is correct" $ viewAddition testCity (10, 20) (WindowDimensions (100, 100)) @?= (40 - wallWidth, 30 - wallWidth), testCa...
792
cityTests = [ testCase "viewAddition is correct" $ viewAddition testCity (0, 0) (WindowDimensions (100, 100)) @?= (50 - wallWidth, 50 - wallWidth), testCase "viewAddition is correct" $ viewAddition testCity (10, 20) (WindowDimensions (100, 100)) @?= (40 - wallWidth, 30 - wallWidth), testCa...
792
false
false
0
11
176
287
157
130
null
null
ivanacostarubio/tic-tac-toe
tic-tac-toe.hs
mit
secondElement :: [String] -> String secondElement x = head (drop 1 x)
69
secondElement :: [String] -> String secondElement x = head (drop 1 x)
69
secondElement x = head (drop 1 x)
33
false
true
0
7
11
38
17
21
null
null
abooij/cubicaltt
TypeChecker.hs
mit
checkGlue :: Val -> System Ter -> Typing () checkGlue va ts = do checkSystemWith ts (\alpha tAlpha -> checkEquiv (va `face` alpha) tAlpha) rho <- asks env checkCompSystem (evalSystem rho ts) -- An iso for a type b is a five-tuple: (a,f,g,s,t) where -- a : U -- f : a -> b -- g : b -> a -- s : fora...
380
checkGlue :: Val -> System Ter -> Typing () checkGlue va ts = do checkSystemWith ts (\alpha tAlpha -> checkEquiv (va `face` alpha) tAlpha) rho <- asks env checkCompSystem (evalSystem rho ts) -- An iso for a type b is a five-tuple: (a,f,g,s,t) where -- a : U -- f : a -> b -- g : b -> a -- s : foral...
379
checkGlue va ts = do checkSystemWith ts (\alpha tAlpha -> checkEquiv (va `face` alpha) tAlpha) rho <- asks env checkCompSystem (evalSystem rho ts) -- An iso for a type b is a five-tuple: (a,f,g,s,t) where -- a : U -- f : a -> b -- g : b -> a -- s : forall (y : b), f (g y) = y -- t : forall (x : ...
335
false
true
0
12
108
94
48
46
null
null
bgamari/GGen
GGen/Geometry/LineSeg.hs
gpl-3.0
prop_merge_line_seg_into_list :: P3 -> NonNull R3 -> NonZero Double -> Bool prop_merge_line_seg_into_list a (NonNull v) (NonZero s) = let b = a .+^ v l = LineSeg a b l' = LineSeg b (b .+^ s *^ lsDispl l) merged = mergeLineSegIntoList [l] l' in length merged == 1
315
prop_merge_line_seg_into_list :: P3 -> NonNull R3 -> NonZero Double -> Bool prop_merge_line_seg_into_list a (NonNull v) (NonZero s) = let b = a .+^ v l = LineSeg a b l' = LineSeg b (b .+^ s *^ lsDispl l) merged = mergeLineSegIntoList [l] l' in length merged == 1
315
prop_merge_line_seg_into_list a (NonNull v) (NonZero s) = let b = a .+^ v l = LineSeg a b l' = LineSeg b (b .+^ s *^ lsDispl l) merged = mergeLineSegIntoList [l] l' in length merged == 1
239
false
true
0
12
101
117
57
60
null
null
snoyberg/ghc
compiler/cmm/CmmCommonBlockElim.hs
bsd-3-clause
-- Utilities: equality and substitution on the graph. -- Given a map ``subst'' from BlockID -> BlockID, we define equality. eqBid :: BlockEnv BlockId -> BlockId -> BlockId -> Bool eqBid subst bid bid' = lookupBid subst bid == lookupBid subst bid'
247
eqBid :: BlockEnv BlockId -> BlockId -> BlockId -> Bool eqBid subst bid bid' = lookupBid subst bid == lookupBid subst bid'
122
eqBid subst bid bid' = lookupBid subst bid == lookupBid subst bid'
66
true
true
0
7
42
49
24
25
null
null
meiersi/scyther-proof
src/Scyther/Message.hs
gpl-3.0
-- | The thread corresponding to an agent variable avarTID :: AVar -> TID avarTID = snd . getLocalId . getAVar
110
avarTID :: AVar -> TID avarTID = snd . getLocalId . getAVar
59
avarTID = snd . getLocalId . getAVar
36
true
true
0
6
20
24
13
11
null
null
mettekou/ghc
compiler/nativeGen/AsmCodeGen.hs
bsd-3-clause
cmmStmtConFold :: CmmNode e x -> CmmOptM (CmmNode e x) cmmStmtConFold stmt = case stmt of CmmAssign reg src -> do src' <- cmmExprConFold DataReference src return $ case src' of CmmReg reg' | reg == reg' -> CmmComment (fsLit "nop") new_src -> C...
1,693
cmmStmtConFold :: CmmNode e x -> CmmOptM (CmmNode e x) cmmStmtConFold stmt = case stmt of CmmAssign reg src -> do src' <- cmmExprConFold DataReference src return $ case src' of CmmReg reg' | reg == reg' -> CmmComment (fsLit "nop") new_src -> C...
1,693
cmmStmtConFold stmt = case stmt of CmmAssign reg src -> do src' <- cmmExprConFold DataReference src return $ case src' of CmmReg reg' | reg == reg' -> CmmComment (fsLit "nop") new_src -> CmmAssign reg new_src CmmStore addr src ...
1,638
false
true
0
17
716
444
198
246
null
null
wxwxwwxxx/ghc
compiler/rename/RnTypes.hs
bsd-3-clause
opTyErr _ ty = pprPanic "opTyErr: Not an op" (ppr ty)
53
opTyErr _ ty = pprPanic "opTyErr: Not an op" (ppr ty)
53
opTyErr _ ty = pprPanic "opTyErr: Not an op" (ppr ty)
53
false
false
0
7
10
22
10
12
null
null
aurapm/aura
aura/lib/Aura/Languages.hs
gpl-3.0
backupCache_5 :: Int -> Language -> Doc AnsiStyle backupCache_5 (bt . tshow -> n) = \case Japanese -> "パッケージのファイル数:" <> n Polish -> "Pliki będące częścią\xa0kopii zapasowej: " <> n Croatian -> "Datoteke koje su dio sigurnosne kopije: " <> n Swedish -> "Paket-filer att ta backup på: " <> n ...
1,098
backupCache_5 :: Int -> Language -> Doc AnsiStyle backupCache_5 (bt . tshow -> n) = \case Japanese -> "パッケージのファイル数:" <> n Polish -> "Pliki będące częścią\xa0kopii zapasowej: " <> n Croatian -> "Datoteke koje su dio sigurnosne kopije: " <> n Swedish -> "Paket-filer att ta backup på: " <> n ...
1,098
backupCache_5 (bt . tshow -> n) = \case Japanese -> "パッケージのファイル数:" <> n Polish -> "Pliki będące częścią\xa0kopii zapasowej: " <> n Croatian -> "Datoteke koje su dio sigurnosne kopije: " <> n Swedish -> "Paket-filer att ta backup på: " <> n German -> "Zu sichernde Paketdateien: " <> n ...
1,048
false
true
17
8
302
240
104
136
null
null
Melvar/Idris-dev
src/Idris/Core/Elaborate.hs
bsd-3-clause
is_guess :: Elab' aux Bool is_guess = do ES p _ _ <- get b <- lift $ goalAtFocus (fst p) case b of Guess _ _ -> return True _ -> return False -- | Get the guess at the current hole, if there is one
264
is_guess :: Elab' aux Bool is_guess = do ES p _ _ <- get b <- lift $ goalAtFocus (fst p) case b of Guess _ _ -> return True _ -> return False -- | Get the guess at the current hole, if there is one
264
is_guess = do ES p _ _ <- get b <- lift $ goalAtFocus (fst p) case b of Guess _ _ -> return True _ -> return False -- | Get the guess at the current hole, if there is one
237
false
true
0
12
113
87
38
49
null
null
massysett/penny
penny/lib/Penny/Copper/Optics/Manual.hs
bsd-3-clause
-- | Maps over every 'Transaction' in the 'WholeFile'. allTransactions :: Lens.Traversal' (WholeFile t a) (Transaction t a) allTransactions = allFileItems . _FileItem'Transaction
178
allTransactions :: Lens.Traversal' (WholeFile t a) (Transaction t a) allTransactions = allFileItems . _FileItem'Transaction
123
allTransactions = allFileItems . _FileItem'Transaction
54
true
true
0
7
22
39
20
19
null
null
spoqa/nirum
test/Nirum/Package/MetadataSpec.hs
gpl-3.0
ignoreLines :: String -> String ignoreLines = concatMap stripPrefix . lines
75
ignoreLines :: String -> String ignoreLines = concatMap stripPrefix . lines
75
ignoreLines = concatMap stripPrefix . lines
43
false
true
0
6
10
22
11
11
null
null
Ace124/TICTACTOE2
src/Parser.hs
bsd-3-clause
ountO :: String -> Int countO str = count str 'o'
51
countO :: String -> Int countO str = count str 'o'
50
countO str = count str 'o'
26
false
true
0
5
12
23
11
12
null
null
DaMSL/K3
src/Language/K3/Transform/Simplification.hs
apache-2.0
pUnstream :: K3 Type -> Annotation Expression pUnstream t = inferredEProp "Unstream" $ Just $ LC.string $ show t
112
pUnstream :: K3 Type -> Annotation Expression pUnstream t = inferredEProp "Unstream" $ Just $ LC.string $ show t
112
pUnstream t = inferredEProp "Unstream" $ Just $ LC.string $ show t
66
false
true
0
8
18
48
21
27
null
null
NorfairKing/hess
src/UrlScrape.hs
mit
parser :: Pipe (URI, ByteString) (URI, Tag ByteString) HESS () parser = forever $ do (uri, content) <- await forM_ (parseTags content) $ \t -> yield (uri, t)
165
parser :: Pipe (URI, ByteString) (URI, Tag ByteString) HESS () parser = forever $ do (uri, content) <- await forM_ (parseTags content) $ \t -> yield (uri, t)
165
parser = forever $ do (uri, content) <- await forM_ (parseTags content) $ \t -> yield (uri, t)
102
false
true
2
11
35
91
45
46
null
null
baldo/epass
src/Control/Concurrent/Mailbox.hs
bsd-3-clause
receive :: MailboxClass b => b m -- ^ mailbox to receive on -> [MsgHandler m a] -- ^ message handlers -> IO a receive _ [] = error "No message handler given! Cannot match."
210
receive :: MailboxClass b => b m -- ^ mailbox to receive on -> [MsgHandler m a] -- ^ message handlers -> IO a receive _ [] = error "No message handler given! Cannot match."
210
receive _ [] = error "No message handler given! Cannot match."
71
false
true
0
10
72
56
26
30
null
null
corngood/cabal
Cabal/Distribution/Simple/Haddock.hs
bsd-3-clause
getExeSourceFiles :: LocalBuildInfo -> Executable -> IO [(ModuleName.ModuleName, FilePath)] getExeSourceFiles lbi exe = do moduleFiles <- getSourceFiles searchpaths modules srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe) return ((ModuleName.main, srcMainP...
493
getExeSourceFiles :: LocalBuildInfo -> Executable -> IO [(ModuleName.ModuleName, FilePath)] getExeSourceFiles lbi exe = do moduleFiles <- getSourceFiles searchpaths modules srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe) return ((ModuleName.main, srcMainP...
493
getExeSourceFiles lbi exe = do moduleFiles <- getSourceFiles searchpaths modules srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe) return ((ModuleName.main, srcMainPath) : moduleFiles) where bi = buildInfo exe modules = otherModules bi searchpaths = autogenModulesDir lbi ...
359
false
true
0
11
131
138
67
71
null
null
tphyahoo/haskoin
haskoin-core/Network/Haskoin/Script/Parser.hs
unlicense
isPayMulSig _ = False
21
isPayMulSig _ = False
21
isPayMulSig _ = False
21
false
false
0
5
3
9
4
5
null
null
siddhanathan/ghc
includes/CodeGen.Platform.hs
bsd-3-clause
globalRegMaybe (DoubleReg 5) = # if MACHREGS_sparc Just (RealRegPair REG_D5 (REG_D5 + 1)) # else Just (RealRegSingle REG_D5)
221
globalRegMaybe (DoubleReg 5) = # if MACHREGS_sparc Just (RealRegPair REG_D5 (REG_D5 + 1)) # else Just (RealRegSingle REG_D5)
221
globalRegMaybe (DoubleReg 5) = # if MACHREGS_sparc Just (RealRegPair REG_D5 (REG_D5 + 1)) # else Just (RealRegSingle REG_D5)
221
false
false
0
9
114
45
23
22
null
null
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/HTML.hs
gpl-2.0
tableOfContents opts sects = do let opts' = opts { writerIgnoreNotes = True } contents <- mapM (elementToListItem opts') sects let tocList = catMaybes contents return $ if null tocList then Nothing else Just $ unordList opts tocList -- | Convert section number to string
315
tableOfContents opts sects = do let opts' = opts { writerIgnoreNotes = True } contents <- mapM (elementToListItem opts') sects let tocList = catMaybes contents return $ if null tocList then Nothing else Just $ unordList opts tocList -- | Convert section number to string
315
tableOfContents opts sects = do let opts' = opts { writerIgnoreNotes = True } contents <- mapM (elementToListItem opts') sects let tocList = catMaybes contents return $ if null tocList then Nothing else Just $ unordList opts tocList -- | Convert section number to string
315
false
false
0
11
89
86
41
45
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
3846 = 3845
11
3846 = 3845
11
3846 = 3845
11
false
false
1
5
2
10
3
7
null
null