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
CristhianMotoche/scion
src/Scion/Session.hs
bsd-3-clause
callWorker :: WorkerHandle -> Command -> IO (Answer, L.ByteString) callWorker h request = do collectLines (workerStderr h) $ do sendMessageToHandle (workerStdin h) request ans_ <- recvMessageFromHandle (workerStdout h) case ans_ of Just ans -> return ans Nothing -> return (Error "callWorker: Could not parse answer")
344
callWorker :: WorkerHandle -> Command -> IO (Answer, L.ByteString) callWorker h request = do collectLines (workerStderr h) $ do sendMessageToHandle (workerStdin h) request ans_ <- recvMessageFromHandle (workerStdout h) case ans_ of Just ans -> return ans Nothing -> return (Error "callWorker: Could not parse answer")
344
callWorker h request = do collectLines (workerStderr h) $ do sendMessageToHandle (workerStdin h) request ans_ <- recvMessageFromHandle (workerStdout h) case ans_ of Just ans -> return ans Nothing -> return (Error "callWorker: Could not parse answer")
277
false
true
0
16
71
120
54
66
null
null
iljakuklic/eel-proto
src/Main/CommandLine.hs
bsd-3-clause
-- this is just fun -- | One positional argument onePosArg = satisfyTok (\t -> not ("-" `isPrefixOf` t)) <?> "positional argument"
131
onePosArg = satisfyTok (\t -> not ("-" `isPrefixOf` t)) <?> "positional argument"
82
onePosArg = satisfyTok (\t -> not ("-" `isPrefixOf` t)) <?> "positional argument"
82
true
false
1
11
22
39
20
19
null
null
haskell/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
renameTyFamInstEqn :: TyFamInstEqn GhcRn -> RnM (TyFamInstEqn DocNameI) renameTyFamInstEqn (FamEqn { feqn_tycon = tc, feqn_bndrs = bndrs , feqn_pats = pats, feqn_fixity = fixity , feqn_rhs = rhs }) = do { tc' <- renameL tc ; bndrs' <- renameOuterTyVarBndrs bndrs ; pats' <- mapM renameLTypeArg pats ; rhs' <- renameLType rhs ; return (FamEqn { feqn_ext = noExtField , feqn_tycon = tc' , feqn_bndrs = bndrs' , feqn_pats = pats' , feqn_fixity = fixity , feqn_rhs = rhs' }) }
686
renameTyFamInstEqn :: TyFamInstEqn GhcRn -> RnM (TyFamInstEqn DocNameI) renameTyFamInstEqn (FamEqn { feqn_tycon = tc, feqn_bndrs = bndrs , feqn_pats = pats, feqn_fixity = fixity , feqn_rhs = rhs }) = do { tc' <- renameL tc ; bndrs' <- renameOuterTyVarBndrs bndrs ; pats' <- mapM renameLTypeArg pats ; rhs' <- renameLType rhs ; return (FamEqn { feqn_ext = noExtField , feqn_tycon = tc' , feqn_bndrs = bndrs' , feqn_pats = pats' , feqn_fixity = fixity , feqn_rhs = rhs' }) }
686
renameTyFamInstEqn (FamEqn { feqn_tycon = tc, feqn_bndrs = bndrs , feqn_pats = pats, feqn_fixity = fixity , feqn_rhs = rhs }) = do { tc' <- renameL tc ; bndrs' <- renameOuterTyVarBndrs bndrs ; pats' <- mapM renameLTypeArg pats ; rhs' <- renameLType rhs ; return (FamEqn { feqn_ext = noExtField , feqn_tycon = tc' , feqn_bndrs = bndrs' , feqn_pats = pats' , feqn_fixity = fixity , feqn_rhs = rhs' }) }
614
false
true
0
10
294
161
89
72
null
null
avh4/elm-format
elm-format-lib/src/AST/Listing.hs
bsd-3-clause
mergeCommentedMap :: Ord k => (v -> v -> v) -> CommentedMap k v -> CommentedMap k v -> CommentedMap k v mergeCommentedMap merge left right = let merge' (C (pre1, post1) a) (C (pre2, post2) b) = C (pre1 ++ pre2, post1 ++ post2) (merge a b) in unionWith merge' left right
301
mergeCommentedMap :: Ord k => (v -> v -> v) -> CommentedMap k v -> CommentedMap k v -> CommentedMap k v mergeCommentedMap merge left right = let merge' (C (pre1, post1) a) (C (pre2, post2) b) = C (pre1 ++ pre2, post1 ++ post2) (merge a b) in unionWith merge' left right
301
mergeCommentedMap merge left right = let merge' (C (pre1, post1) a) (C (pre2, post2) b) = C (pre1 ++ pre2, post1 ++ post2) (merge a b) in unionWith merge' left right
197
false
true
0
12
84
141
70
71
null
null
jean-edouard/idl
rpcgen/Model.hs
gpl-2.0
childElemsWith :: X.CFilter i -> X.Element i -> [X.Element i] childElemsWith fil (X.Elem _ _ contents) = catMaybes . map select . concatMap fil $ contents where select (X.CElem e _) = Just e select _ = Nothing
229
childElemsWith :: X.CFilter i -> X.Element i -> [X.Element i] childElemsWith fil (X.Elem _ _ contents) = catMaybes . map select . concatMap fil $ contents where select (X.CElem e _) = Just e select _ = Nothing
229
childElemsWith fil (X.Elem _ _ contents) = catMaybes . map select . concatMap fil $ contents where select (X.CElem e _) = Just e select _ = Nothing
167
false
true
2
11
57
114
50
64
null
null
robdockins/edison
test/src/Data/Edison/Test/Seq.hs
mit
prop_append :: SeqTest Int seq => seq Int -> seq Int -> seq Int -> Bool prop_append seq xs ys = let xys = append xs ys in si xys && toList (append xs ys) == toList xs ++ toList ys
204
prop_append :: SeqTest Int seq => seq Int -> seq Int -> seq Int -> Bool prop_append seq xs ys = let xys = append xs ys in si xys && toList (append xs ys) == toList xs ++ toList ys
204
prop_append seq xs ys = let xys = append xs ys in si xys && toList (append xs ys) == toList xs ++ toList ys
132
false
true
0
12
65
96
43
53
null
null
alanz/vh-play
src/runghc.hs
bsd-3-clause
showParsedModule p = showData Parser 0 (GHC.pm_parsed_source p)
65
showParsedModule p = showData Parser 0 (GHC.pm_parsed_source p)
65
showParsedModule p = showData Parser 0 (GHC.pm_parsed_source p)
65
false
false
0
8
9
24
11
13
null
null
ayu-mushi/scientific-ants
ALife/ScientificAnts/Instruct.hs
mit
findMatchOutward :: Genome -> Int -> Maybe Int findMatchOutward gs i = if isNothing b && isNothing f then Nothing else if isNothing b then f else if isNothing f then b else if (fmap abs $ fmap (flip (-) i) b) < (fmap abs $ fmap (flip (-) i) f) then b else f where b = findBackward gs i $ reverseTranscriptase pattern f = findForward gs i $ reverseTranscriptase pattern pattern = readPattern gs (i+1)
421
findMatchOutward :: Genome -> Int -> Maybe Int findMatchOutward gs i = if isNothing b && isNothing f then Nothing else if isNothing b then f else if isNothing f then b else if (fmap abs $ fmap (flip (-) i) b) < (fmap abs $ fmap (flip (-) i) f) then b else f where b = findBackward gs i $ reverseTranscriptase pattern f = findForward gs i $ reverseTranscriptase pattern pattern = readPattern gs (i+1)
421
findMatchOutward gs i = if isNothing b && isNothing f then Nothing else if isNothing b then f else if isNothing f then b else if (fmap abs $ fmap (flip (-) i) b) < (fmap abs $ fmap (flip (-) i) f) then b else f where b = findBackward gs i $ reverseTranscriptase pattern f = findForward gs i $ reverseTranscriptase pattern pattern = readPattern gs (i+1)
374
false
true
4
14
98
185
92
93
null
null
Peaker/lamdu
src/Lamdu/Editor.hs
gpl-3.0
withMVarProtection :: a -> (MVar (Maybe a) -> IO b) -> IO b withMVarProtection val = E.bracket (newMVar (Just val)) (`modifyMVar_` (\_ -> pure Nothing))
156
withMVarProtection :: a -> (MVar (Maybe a) -> IO b) -> IO b withMVarProtection val = E.bracket (newMVar (Just val)) (`modifyMVar_` (\_ -> pure Nothing))
156
withMVarProtection val = E.bracket (newMVar (Just val)) (`modifyMVar_` (\_ -> pure Nothing))
96
false
true
0
12
28
85
42
43
null
null
jeroennoels/exact-real
src/Ternary/Util/Triad.hs
mit
triadNumerator :: Triad -> Integer triadNumerator (Triad n _) = n
65
triadNumerator :: Triad -> Integer triadNumerator (Triad n _) = n
65
triadNumerator (Triad n _) = n
30
false
true
0
6
10
30
14
16
null
null
ezyang/ghc
compiler/cmm/CmmNode.hs
bsd-3-clause
wrapRecExpM f n@(CmmLoad addr ty) = maybe (f n) (f . flip CmmLoad ty) (wrapRecExpM f addr)
91
wrapRecExpM f n@(CmmLoad addr ty) = maybe (f n) (f . flip CmmLoad ty) (wrapRecExpM f addr)
91
wrapRecExpM f n@(CmmLoad addr ty) = maybe (f n) (f . flip CmmLoad ty) (wrapRecExpM f addr)
91
false
false
1
8
17
60
27
33
null
null
hspec/hspec
hspec-core/src/Test/Hspec/Core/Formatters/Internal.hs
mit
formatterToFormat :: Formatter -> FormatConfig -> IO Format formatterToFormat Formatter{..} config = monadic (runFormatM config) $ \ event -> case event of Started -> formatterStarted GroupStarted path -> formatterGroupStarted path GroupDone path -> formatterGroupDone path Progress path progress -> formatterProgress path progress ItemStarted path -> formatterItemStarted path ItemDone path item -> do clearTransientOutput case itemResult item of Success {} -> increaseSuccessCount Pending {} -> increasePendingCount Failure loc err -> addFailMessage (loc <|> itemLocation item) path err formatterItemDone path item Done _ -> formatterDone -- | Get the number of failed examples encountered so far.
744
formatterToFormat :: Formatter -> FormatConfig -> IO Format formatterToFormat Formatter{..} config = monadic (runFormatM config) $ \ event -> case event of Started -> formatterStarted GroupStarted path -> formatterGroupStarted path GroupDone path -> formatterGroupDone path Progress path progress -> formatterProgress path progress ItemStarted path -> formatterItemStarted path ItemDone path item -> do clearTransientOutput case itemResult item of Success {} -> increaseSuccessCount Pending {} -> increasePendingCount Failure loc err -> addFailMessage (loc <|> itemLocation item) path err formatterItemDone path item Done _ -> formatterDone -- | Get the number of failed examples encountered so far.
744
formatterToFormat Formatter{..} config = monadic (runFormatM config) $ \ event -> case event of Started -> formatterStarted GroupStarted path -> formatterGroupStarted path GroupDone path -> formatterGroupDone path Progress path progress -> formatterProgress path progress ItemStarted path -> formatterItemStarted path ItemDone path item -> do clearTransientOutput case itemResult item of Success {} -> increaseSuccessCount Pending {} -> increasePendingCount Failure loc err -> addFailMessage (loc <|> itemLocation item) path err formatterItemDone path item Done _ -> formatterDone -- | Get the number of failed examples encountered so far.
684
false
true
0
18
138
203
93
110
null
null
haskell/haddock
html-test/src/DeprecatedFunction3.hs
bsd-2-clause
foo = 23
8
foo = 23
8
foo = 23
8
false
false
0
4
2
6
3
3
null
null
yangsiwei880813/CS644
src/Scanner.hs
gpl-2.0
getJavaCharacter delimeter (x:xs) | x `elem` (delimeter:'\\':lineTerminators) = "" | otherwise = [x]
104
getJavaCharacter delimeter (x:xs) | x `elem` (delimeter:'\\':lineTerminators) = "" | otherwise = [x]
104
getJavaCharacter delimeter (x:xs) | x `elem` (delimeter:'\\':lineTerminators) = "" | otherwise = [x]
104
false
false
1
11
16
52
27
25
null
null
DanielSchuessler/th-build
Language/Haskell/TH/Build/Wrappers.hs
bsd-3-clause
-- | Argument-converting wrapper for 'litP'. litP' :: (Convertible lit Lit) => lit -> PatQ litP' = preconvert1 litP
115
litP' :: (Convertible lit Lit) => lit -> PatQ litP' = preconvert1 litP
70
litP' = preconvert1 litP
24
true
true
0
6
18
30
16
14
null
null
facebookincubator/duckling
Duckling/Rules/KM.hs
bsd-3-clause
langRules :: Seal Dimension -> [Rule] langRules (Seal AmountOfMoney) = []
73
langRules :: Seal Dimension -> [Rule] langRules (Seal AmountOfMoney) = []
73
langRules (Seal AmountOfMoney) = []
35
false
true
0
7
10
32
16
16
null
null
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Services/ServiceLevelObjectives/List.hs
mpl-2.0
-- | A non-negative number that is the maximum number of results to return. -- When 0, use default page size. sslolPageSize :: Lens' ServicesServiceLevelObjectivesList (Maybe Int32) sslolPageSize = lens _sslolPageSize (\ s a -> s{_sslolPageSize = a}) . mapping _Coerce
282
sslolPageSize :: Lens' ServicesServiceLevelObjectivesList (Maybe Int32) sslolPageSize = lens _sslolPageSize (\ s a -> s{_sslolPageSize = a}) . mapping _Coerce
172
sslolPageSize = lens _sslolPageSize (\ s a -> s{_sslolPageSize = a}) . mapping _Coerce
100
true
true
0
10
54
56
29
27
null
null
gcampax/ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
countFreeIds :: VarSet -> Int countFreeIds = foldVarSet add 0 where add :: Var -> Int -> Int add v n | isId v = n+1 | otherwise = n {- ************************************************************************ * * \subsection{Free-To-Level Monad} * * ************************************************************************ -}
488
countFreeIds :: VarSet -> Int countFreeIds = foldVarSet add 0 where add :: Var -> Int -> Int add v n | isId v = n+1 | otherwise = n {- ************************************************************************ * * \subsection{Free-To-Level Monad} * * ************************************************************************ -}
488
countFreeIds = foldVarSet add 0 where add :: Var -> Int -> Int add v n | isId v = n+1 | otherwise = n {- ************************************************************************ * * \subsection{Free-To-Level Monad} * * ************************************************************************ -}
458
false
true
3
8
203
69
33
36
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/main/HscTypes.hs
bsd-3-clause
nameOfObject (DotDLL fn) = fn
29
nameOfObject (DotDLL fn) = fn
29
nameOfObject (DotDLL fn) = fn
29
false
false
0
7
4
15
7
8
null
null
snoyberg/ghc
compiler/types/Type.hs
bsd-3-clause
isStrictType :: Type -> Bool isStrictType = isUnliftedType
58
isStrictType :: Type -> Bool isStrictType = isUnliftedType
58
isStrictType = isUnliftedType
29
false
true
0
7
7
22
9
13
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F29.hs
bsd-3-clause
-- glVertex4i ------------------------------------------------------------------ -- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glVertex.xml OpenGL 2.x>. The vector equivalent of this command is 'glVertex4iv'. glVertex4i :: MonadIO m => GLint -- ^ @x@ of type @CoordI@. -> GLint -- ^ @y@ of type @CoordI@. -> GLint -- ^ @z@ of type @CoordI@. -> GLint -- ^ @w@ of type @CoordI@. -> m () glVertex4i v1 v2 v3 v4 = liftIO $ dyn82 ptr_glVertex4i v1 v2 v3 v4
483
glVertex4i :: MonadIO m => GLint -- ^ @x@ of type @CoordI@. -> GLint -- ^ @y@ of type @CoordI@. -> GLint -- ^ @z@ of type @CoordI@. -> GLint -- ^ @w@ of type @CoordI@. -> m () glVertex4i v1 v2 v3 v4 = liftIO $ dyn82 ptr_glVertex4i v1 v2 v3 v4
254
glVertex4i v1 v2 v3 v4 = liftIO $ dyn82 ptr_glVertex4i v1 v2 v3 v4
66
true
true
0
12
84
73
37
36
null
null
TOSPIO/yi
src/library/Yi/UI/Vty/Conversions.hs
gpl-2.0
fromVtyEvent (Vty.EvKey k mods) = Yi.Event.Event (fromVtyKey k) (sort $ map fromVtyMod mods)
96
fromVtyEvent (Vty.EvKey k mods) = Yi.Event.Event (fromVtyKey k) (sort $ map fromVtyMod mods)
96
fromVtyEvent (Vty.EvKey k mods) = Yi.Event.Event (fromVtyKey k) (sort $ map fromVtyMod mods)
96
false
false
0
8
16
47
22
25
null
null
mettekou/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprSizeDecl :: CLabel -> SDoc pprSizeDecl lbl = sdocWithPlatform $ \platform -> if osElfTarget (platformOS platform) then text "\t.size" <+> ppr lbl <> ptext (sLit ", .-") <> ppr lbl else empty
203
pprSizeDecl :: CLabel -> SDoc pprSizeDecl lbl = sdocWithPlatform $ \platform -> if osElfTarget (platformOS platform) then text "\t.size" <+> ppr lbl <> ptext (sLit ", .-") <> ppr lbl else empty
203
pprSizeDecl lbl = sdocWithPlatform $ \platform -> if osElfTarget (platformOS platform) then text "\t.size" <+> ppr lbl <> ptext (sLit ", .-") <> ppr lbl else empty
173
false
true
0
12
41
74
36
38
null
null
mmhat/h-gpgme
test/KeyGenTest.hs
mit
creation_date_seconds :: Assertion creation_date_seconds = let (Just p) = G.toPositive 123456 params = (def :: G.GenKeyParams) { G.creationDate = Just $ G.CreationS p } in (G.toParamsString params) @?= "<GnupgKeyParms format=\"internal\">\n\ \Key-Type: default\n\ \Creation-Date: seconds=123456\n\ \</GnupgKeyParms>\n"
370
creation_date_seconds :: Assertion creation_date_seconds = let (Just p) = G.toPositive 123456 params = (def :: G.GenKeyParams) { G.creationDate = Just $ G.CreationS p } in (G.toParamsString params) @?= "<GnupgKeyParms format=\"internal\">\n\ \Key-Type: default\n\ \Creation-Date: seconds=123456\n\ \</GnupgKeyParms>\n"
370
creation_date_seconds = let (Just p) = G.toPositive 123456 params = (def :: G.GenKeyParams) { G.creationDate = Just $ G.CreationS p } in (G.toParamsString params) @?= "<GnupgKeyParms format=\"internal\">\n\ \Key-Type: default\n\ \Creation-Date: seconds=123456\n\ \</GnupgKeyParms>\n"
335
false
true
0
13
86
78
40
38
null
null
hanshoglund/comb
combIO.hs
bsd-3-clause
latter = Lift2 "latter" (\_ x -> x)
36
latter = Lift2 "latter" (\_ x -> x)
36
latter = Lift2 "latter" (\_ x -> x)
36
false
false
0
7
8
21
11
10
null
null
green-haskell/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
ppr_co p (TcNthCo n co) = pprPrefixApp p (ptext (sLit "Nth:") <+> int n) [pprParendTcCo co]
97
ppr_co p (TcNthCo n co) = pprPrefixApp p (ptext (sLit "Nth:") <+> int n) [pprParendTcCo co]
97
ppr_co p (TcNthCo n co) = pprPrefixApp p (ptext (sLit "Nth:") <+> int n) [pprParendTcCo co]
97
false
false
0
10
21
51
24
27
null
null
uduki/hsQt
Qtc/Enums/Gui/QAbstractItemDelegate.hs
bsd-2-clause
eSubmitModelCache :: EndEditHint eSubmitModelCache = ieEndEditHint $ 3
72
eSubmitModelCache :: EndEditHint eSubmitModelCache = ieEndEditHint $ 3
72
eSubmitModelCache = ieEndEditHint $ 3
39
false
true
0
6
9
18
8
10
null
null
Helium4Haskell/helium
src/Helium/Parser/ParseLibrary.hs
gpl-3.0
lexMINDOT = lexeme (LexResVarSym "-.")
40
lexMINDOT = lexeme (LexResVarSym "-.")
40
lexMINDOT = lexeme (LexResVarSym "-.")
40
false
false
0
7
6
15
7
8
null
null
fmapfmapfmap/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/SetVaultAccessPolicy.hs
mpl-2.0
-- | Creates a value of 'SetVaultAccessPolicyResponse' with the minimum fields required to make a request. -- setVaultAccessPolicyResponse :: SetVaultAccessPolicyResponse setVaultAccessPolicyResponse = SetVaultAccessPolicyResponse'
235
setVaultAccessPolicyResponse :: SetVaultAccessPolicyResponse setVaultAccessPolicyResponse = SetVaultAccessPolicyResponse'
125
setVaultAccessPolicyResponse = SetVaultAccessPolicyResponse'
60
true
true
1
5
26
17
8
9
null
null
kosmoskatten/traffic-analysis
src/Network/Traffic/Object/Timeline.hs
mit
lastObjectTime :: ObjectVector -> Duration lastObjectTime = Seconds . timestamp . V.last
88
lastObjectTime :: ObjectVector -> Duration lastObjectTime = Seconds . timestamp . V.last
88
lastObjectTime = Seconds . timestamp . V.last
45
false
true
0
6
11
25
13
12
null
null
AndrewRademacher/wai
warp/Network/Wai/Handler/Warp/MultiMap.hs
mit
isBlackSame :: MMap k v -> Bool isBlackSame t = all (n==) ns where n:ns = blacks t
88
isBlackSame :: MMap k v -> Bool isBlackSame t = all (n==) ns where n:ns = blacks t
88
isBlackSame t = all (n==) ns where n:ns = blacks t
56
false
true
1
6
23
49
23
26
null
null
ghcjs/ghcjs-base
test/Tests/Properties.hs
mit
sf_null p = (null . L.filter p) `eqP` (S.null . S.filter p)
67
sf_null p = (null . L.filter p) `eqP` (S.null . S.filter p)
67
sf_null p = (null . L.filter p) `eqP` (S.null . S.filter p)
67
false
false
0
9
19
41
21
20
null
null
jtapolczai/Scratchpad
src/NTFSCleaner.hs
apache-2.0
-- |A dummy implementation for 'renameDirectory'. Does nothing except printing -- a message on stdout. renameDirectoryDummy :: FilePath -> FilePath -> IO () renameDirectoryDummy from to = putStrLn $ "renameDirectory: '" ++ from ++ "' -> " ++ to
245
renameDirectoryDummy :: FilePath -> FilePath -> IO () renameDirectoryDummy from to = putStrLn $ "renameDirectory: '" ++ from ++ "' -> " ++ to
141
renameDirectoryDummy from to = putStrLn $ "renameDirectory: '" ++ from ++ "' -> " ++ to
87
true
true
0
8
39
52
25
27
null
null
Cahu/krpc-hs
src/KRPCHS/Drawing.hs
gpl-3.0
setTextVisible :: KRPCHS.Drawing.Text -> Bool -> RPCContext () setTextVisible thisArg valueArg = do let r = makeRequest "Drawing" "Text_set_Visible" [makeArgument 0 thisArg, makeArgument 1 valueArg] res <- sendRequest r processResponse res
252
setTextVisible :: KRPCHS.Drawing.Text -> Bool -> RPCContext () setTextVisible thisArg valueArg = do let r = makeRequest "Drawing" "Text_set_Visible" [makeArgument 0 thisArg, makeArgument 1 valueArg] res <- sendRequest r processResponse res
252
setTextVisible thisArg valueArg = do let r = makeRequest "Drawing" "Text_set_Visible" [makeArgument 0 thisArg, makeArgument 1 valueArg] res <- sendRequest r processResponse res
189
false
true
0
13
43
85
38
47
null
null
jbracker/supermonad-plugin
examples/applicative/ll1-parser/Main.hs
bsd-3-clause
umberTok :: Parser Token Int numberTok = (\(TNumber i) -> i) <$> predicate isNumber
84
numberTok :: Parser Token Int numberTok = (\(TNumber i) -> i) <$> predicate isNumber
84
numberTok = (\(TNumber i) -> i) <$> predicate isNumber
54
false
true
0
9
14
37
19
18
null
null
hargettp/raft
tests/TestRaft.hs
mit
test7Cluster10Consistency :: (IO Transport) -> RaftConfiguration -> Assertion test7Cluster10Consistency transportF cfg = do transport <- transportF with7Servers transport cfg $ \vRafts -> do pause errOrResult <- race (do _ <- waitForLeader vRafts threadDelay $ 30 * 1000 * 1000 return ()) (withClient transport "client1" cfg $ \client -> do _ <- waitForLeader vRafts _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 RaftTime _ clientIndex <- performAction client $ Cmd $ Add 3 assertBool (printf "Client index should be 9: %v" (show clientIndex)) $ clientIndex == 9 threadDelay $ 2 * 1000 * 1000 checkForConsistency_ vRafts) case errOrResult of Right _ -> assertBool "" True Left _ -> assertBool "Performing action failed" False
1,635
test7Cluster10Consistency :: (IO Transport) -> RaftConfiguration -> Assertion test7Cluster10Consistency transportF cfg = do transport <- transportF with7Servers transport cfg $ \vRafts -> do pause errOrResult <- race (do _ <- waitForLeader vRafts threadDelay $ 30 * 1000 * 1000 return ()) (withClient transport "client1" cfg $ \client -> do _ <- waitForLeader vRafts _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 RaftTime _ clientIndex <- performAction client $ Cmd $ Add 3 assertBool (printf "Client index should be 9: %v" (show clientIndex)) $ clientIndex == 9 threadDelay $ 2 * 1000 * 1000 checkForConsistency_ vRafts) case errOrResult of Right _ -> assertBool "" True Left _ -> assertBool "Performing action failed" False
1,635
test7Cluster10Consistency transportF cfg = do transport <- transportF with7Servers transport cfg $ \vRafts -> do pause errOrResult <- race (do _ <- waitForLeader vRafts threadDelay $ 30 * 1000 * 1000 return ()) (withClient transport "client1" cfg $ \client -> do _ <- waitForLeader vRafts _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 _ <- performAction client $ Cmd $ Add 3 _ <- performAction client $ Cmd $ Multiply 5 _ <- performAction client $ Cmd $ Subtract 2 RaftTime _ clientIndex <- performAction client $ Cmd $ Add 3 assertBool (printf "Client index should be 9: %v" (show clientIndex)) $ clientIndex == 9 threadDelay $ 2 * 1000 * 1000 checkForConsistency_ vRafts) case errOrResult of Right _ -> assertBool "" True Left _ -> assertBool "Performing action failed" False
1,557
false
true
0
24
750
433
191
242
null
null
meteogrid/dropdirwatch
src/System/DirWatch/Threading.hs
bsd-3-clause
tryWaitChild :: ThreadHandle a -> IO (Maybe a) tryWaitChild (ThreadHandle (_,mvar)) = tryTakeMVar mvar
103
tryWaitChild :: ThreadHandle a -> IO (Maybe a) tryWaitChild (ThreadHandle (_,mvar)) = tryTakeMVar mvar
103
tryWaitChild (ThreadHandle (_,mvar)) = tryTakeMVar mvar
55
false
true
0
10
14
49
23
26
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/SkewHeap.hs
mit
count x (T y a b) = case compare x y of LT -> 0 EQ -> 1 + count x b + count x a GT -> count x b + count x a
121
count x (T y a b) = case compare x y of LT -> 0 EQ -> 1 + count x b + count x a GT -> count x b + count x a
121
count x (T y a b) = case compare x y of LT -> 0 EQ -> 1 + count x b + count x a GT -> count x b + count x a
121
false
false
0
10
48
80
37
43
null
null
mazelife/agilulf
src/Agiluf/Pandoc.hs
bsd-3-clause
-- | Parse a list of .rst file contents into pandoc objects. parseRSTContents :: IO [String] -> IO [Pandoc] parseRSTContents = fmap $ map (readRST reader_options)
162
parseRSTContents :: IO [String] -> IO [Pandoc] parseRSTContents = fmap $ map (readRST reader_options)
101
parseRSTContents = fmap $ map (readRST reader_options)
54
true
true
0
8
25
41
21
20
null
null
olsner/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel
59
labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel
59
labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel
59
false
false
0
6
17
20
9
11
null
null
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/concurrent/should_run/allocLimit4.hs
bsd-3-clause
-- check that +RTS -xq is doing the right thing: the test requires -- +RTS -xq300k main = do m <- newEmptyMVar let action = do e <- try $ do setAllocationCounter (10*1024) enableAllocationLimit print (length [1..]) case e of Left AllocationLimitExceeded{} -> do c <- getAllocationCounter when (c < 250*1024 || c > 350*1024) $ fail "wrong limit grace" print (length [2..]) Right _ -> fail "didn't catch AllocationLimitExceeded" forkFinally action (putMVar m) r <- takeMVar m case r of Left e | Just AllocationLimitExceeded <- fromException e -> return () _ -> print r >> exitFailure
723
main = do m <- newEmptyMVar let action = do e <- try $ do setAllocationCounter (10*1024) enableAllocationLimit print (length [1..]) case e of Left AllocationLimitExceeded{} -> do c <- getAllocationCounter when (c < 250*1024 || c > 350*1024) $ fail "wrong limit grace" print (length [2..]) Right _ -> fail "didn't catch AllocationLimitExceeded" forkFinally action (putMVar m) r <- takeMVar m case r of Left e | Just AllocationLimitExceeded <- fromException e -> return () _ -> print r >> exitFailure
639
main = do m <- newEmptyMVar let action = do e <- try $ do setAllocationCounter (10*1024) enableAllocationLimit print (length [1..]) case e of Left AllocationLimitExceeded{} -> do c <- getAllocationCounter when (c < 250*1024 || c > 350*1024) $ fail "wrong limit grace" print (length [2..]) Right _ -> fail "didn't catch AllocationLimitExceeded" forkFinally action (putMVar m) r <- takeMVar m case r of Left e | Just AllocationLimitExceeded <- fromException e -> return () _ -> print r >> exitFailure
639
true
false
1
25
239
235
103
132
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/ARB/half_float_vertex.txt ARB_half_float_vertex> extension supported? glGetARBHalfFloatVertex :: MonadIO m => m Bool glGetARBHalfFloatVertex = getExtensions >>= (return . member "GL_ARB_half_float_vertex")
256
glGetARBHalfFloatVertex :: MonadIO m => m Bool glGetARBHalfFloatVertex = getExtensions >>= (return . member "GL_ARB_half_float_vertex")
135
glGetARBHalfFloatVertex = getExtensions >>= (return . member "GL_ARB_half_float_vertex")
88
true
true
0
8
22
36
18
18
null
null
sivertb/diet-set
src/Data/Set/Diet.hs
gpl-3.0
-- | Creates a new set, containing a single value. singleton :: a -> Diet a singleton = singletonI . point
106
singleton :: a -> Diet a singleton = singletonI . point
55
singleton = singletonI . point
30
true
true
1
7
20
30
13
17
null
null
pcapriotti/pipes-conduit
Control/Pipe/Conduit.hs
bsd-3-clause
conduitPipe_ :: Resource m => Conduit a m b -> Pipe a b (ResourceT m) () conduitPipe_ = void . conduitPipe
106
conduitPipe_ :: Resource m => Conduit a m b -> Pipe a b (ResourceT m) () conduitPipe_ = void . conduitPipe
106
conduitPipe_ = void . conduitPipe
33
false
true
0
9
20
50
24
26
null
null
plclub/cis670-16fa
projects/DynamicLang/src/Compiler.hs
mit
intIntOperands :: C.BinOp -> Bool intIntOperands C.Plus = True
62
intIntOperands :: C.BinOp -> Bool intIntOperands C.Plus = True
62
intIntOperands C.Plus = True
28
false
true
0
6
8
22
11
11
null
null
IgorRodic/fp16-Pongout
src/Main.hs
mit
wallBounce :: PongoutGame -> PongoutGame wallBounce game = game { ball1 = newBall1, ball2 = newBall2, ball1Vel = vxReset1, ball2Vel = vxReset2, player1Points = oldPlayer1Points + newPlayer1Ponts, player2Points = oldPlayer2Points + newPlayer2Ponts } where collisionTypeLeftWall1 = getCollisionType $ detectCollision (ball1 game) leftWall collisionTypeRightWall1 = getCollisionType $ detectCollision (ball1 game) rightWall collisionTypeLeftWall2 = getCollisionType $ detectCollision (ball2 game) leftWall collisionTypeRightWall2 = getCollisionType $ detectCollision (ball2 game) rightWall --Nova brzina prve lopte. vx1' = if collisionTypeLeftWall1 == RightCollision || collisionTypeRightWall1 == LeftCollision then -(fst $ ball1Vel game) else (fst $ ball1Vel game) vy1' = if collisionTypeLeftWall1 == BottomCollision || collisionTypeRightWall1 == TopCollision then -(snd $ ball1Vel game) else (snd $ ball1Vel game) --Nova brzina druge lopte. vx2' = if collisionTypeLeftWall2 == RightCollision || collisionTypeRightWall2 == LeftCollision then -(fst $ ball2Vel game) else (fst $ ball2Vel game) vy2' = if collisionTypeLeftWall2 == BottomCollision || collisionTypeRightWall2 == TopCollision then -(snd $ ball2Vel game) else (snd $ ball2Vel game) --Provera da li je loptica prosla iza nekog od igraca. (x1, y1) = getGameObjectCoordinates (ball1 game) (x2, y2) = getGameObjectCoordinates (ball2 game) (oldPlayer1Points, oldPlayer2Points) = ((player1Points game), (player2Points game)) vxReset1 = if y1 < -375 || y1 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then (if (not (ballSwapped game)) then (0, (-100)) else (0, 100)) else (vx1', vy1') newPlayer1Ponts = if y1 < -375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then -30 else if y1 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then 100 else 0 newBall1 = if newPlayer1Ponts /= 0 then (if (not (ballSwapped game)) then (resetGameObject (ball1 game) 0 (-120)) else (resetGameObject (ball1 game) 0 120)) else (ball1 game) vxReset2 = if y2 < -375 || y2 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then (if (not (ballSwapped game)) then (0, 100) else (0, (-100))) else (vx2', vy2') newPlayer2Ponts = if y2 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then -30 else if y2 < -375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then 100 else 0 newBall2 = if newPlayer2Ponts /= 0 then (if (not (ballSwapped game)) then (resetGameObject (ball2 game) 0 120) else (resetGameObject (ball2 game) 0 (-120))) else (ball2 game)
3,407
wallBounce :: PongoutGame -> PongoutGame wallBounce game = game { ball1 = newBall1, ball2 = newBall2, ball1Vel = vxReset1, ball2Vel = vxReset2, player1Points = oldPlayer1Points + newPlayer1Ponts, player2Points = oldPlayer2Points + newPlayer2Ponts } where collisionTypeLeftWall1 = getCollisionType $ detectCollision (ball1 game) leftWall collisionTypeRightWall1 = getCollisionType $ detectCollision (ball1 game) rightWall collisionTypeLeftWall2 = getCollisionType $ detectCollision (ball2 game) leftWall collisionTypeRightWall2 = getCollisionType $ detectCollision (ball2 game) rightWall --Nova brzina prve lopte. vx1' = if collisionTypeLeftWall1 == RightCollision || collisionTypeRightWall1 == LeftCollision then -(fst $ ball1Vel game) else (fst $ ball1Vel game) vy1' = if collisionTypeLeftWall1 == BottomCollision || collisionTypeRightWall1 == TopCollision then -(snd $ ball1Vel game) else (snd $ ball1Vel game) --Nova brzina druge lopte. vx2' = if collisionTypeLeftWall2 == RightCollision || collisionTypeRightWall2 == LeftCollision then -(fst $ ball2Vel game) else (fst $ ball2Vel game) vy2' = if collisionTypeLeftWall2 == BottomCollision || collisionTypeRightWall2 == TopCollision then -(snd $ ball2Vel game) else (snd $ ball2Vel game) --Provera da li je loptica prosla iza nekog od igraca. (x1, y1) = getGameObjectCoordinates (ball1 game) (x2, y2) = getGameObjectCoordinates (ball2 game) (oldPlayer1Points, oldPlayer2Points) = ((player1Points game), (player2Points game)) vxReset1 = if y1 < -375 || y1 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then (if (not (ballSwapped game)) then (0, (-100)) else (0, 100)) else (vx1', vy1') newPlayer1Ponts = if y1 < -375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then -30 else if y1 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then 100 else 0 newBall1 = if newPlayer1Ponts /= 0 then (if (not (ballSwapped game)) then (resetGameObject (ball1 game) 0 (-120)) else (resetGameObject (ball1 game) 0 120)) else (ball1 game) vxReset2 = if y2 < -375 || y2 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then (if (not (ballSwapped game)) then (0, 100) else (0, (-100))) else (vx2', vy2') newPlayer2Ponts = if y2 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then -30 else if y2 < -375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then 100 else 0 newBall2 = if newPlayer2Ponts /= 0 then (if (not (ballSwapped game)) then (resetGameObject (ball2 game) 0 120) else (resetGameObject (ball2 game) 0 (-120))) else (ball2 game)
3,407
wallBounce game = game { ball1 = newBall1, ball2 = newBall2, ball1Vel = vxReset1, ball2Vel = vxReset2, player1Points = oldPlayer1Points + newPlayer1Ponts, player2Points = oldPlayer2Points + newPlayer2Ponts } where collisionTypeLeftWall1 = getCollisionType $ detectCollision (ball1 game) leftWall collisionTypeRightWall1 = getCollisionType $ detectCollision (ball1 game) rightWall collisionTypeLeftWall2 = getCollisionType $ detectCollision (ball2 game) leftWall collisionTypeRightWall2 = getCollisionType $ detectCollision (ball2 game) rightWall --Nova brzina prve lopte. vx1' = if collisionTypeLeftWall1 == RightCollision || collisionTypeRightWall1 == LeftCollision then -(fst $ ball1Vel game) else (fst $ ball1Vel game) vy1' = if collisionTypeLeftWall1 == BottomCollision || collisionTypeRightWall1 == TopCollision then -(snd $ ball1Vel game) else (snd $ ball1Vel game) --Nova brzina druge lopte. vx2' = if collisionTypeLeftWall2 == RightCollision || collisionTypeRightWall2 == LeftCollision then -(fst $ ball2Vel game) else (fst $ ball2Vel game) vy2' = if collisionTypeLeftWall2 == BottomCollision || collisionTypeRightWall2 == TopCollision then -(snd $ ball2Vel game) else (snd $ ball2Vel game) --Provera da li je loptica prosla iza nekog od igraca. (x1, y1) = getGameObjectCoordinates (ball1 game) (x2, y2) = getGameObjectCoordinates (ball2 game) (oldPlayer1Points, oldPlayer2Points) = ((player1Points game), (player2Points game)) vxReset1 = if y1 < -375 || y1 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then (if (not (ballSwapped game)) then (0, (-100)) else (0, 100)) else (vx1', vy1') newPlayer1Ponts = if y1 < -375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then -30 else if y1 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then 100 else 0 newBall1 = if newPlayer1Ponts /= 0 then (if (not (ballSwapped game)) then (resetGameObject (ball1 game) 0 (-120)) else (resetGameObject (ball1 game) 0 120)) else (ball1 game) vxReset2 = if y2 < -375 || y2 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then (if (not (ballSwapped game)) then (0, 100) else (0, (-100))) else (vx2', vy2') newPlayer2Ponts = if y2 > 375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then -30 else if y2 < -375 || collisionTypeLeftWall1 == LeftCollision || collisionTypeRightWall2 == RightCollision then 100 else 0 newBall2 = if newPlayer2Ponts /= 0 then (if (not (ballSwapped game)) then (resetGameObject (ball2 game) 0 120) else (resetGameObject (ball2 game) 0 (-120))) else (ball2 game)
3,366
false
true
8
13
1,031
912
484
428
null
null
ml9951/ghc
compiler/main/GhcMake.hs
bsd-3-clause
noHsFileErr :: DynFlags -> SrcSpan -> String -> ErrMsg noHsFileErr dflags loc path = mkPlainErrMsg dflags loc $ text "Can't find" <+> text path
145
noHsFileErr :: DynFlags -> SrcSpan -> String -> ErrMsg noHsFileErr dflags loc path = mkPlainErrMsg dflags loc $ text "Can't find" <+> text path
145
noHsFileErr dflags loc path = mkPlainErrMsg dflags loc $ text "Can't find" <+> text path
90
false
true
0
7
25
49
23
26
null
null
jaredpetersen/wou
CS314/Lab4/Lab4.hs
mit
{- ANSWER: The max character in the the string "Cowabunga dudez" is 'z' -} -- Problem #9 removeSpace :: String -> String removeSpace x = filter (/= ' ') x
155
removeSpace :: String -> String removeSpace x = filter (/= ' ') x
65
removeSpace x = filter (/= ' ') x
33
true
true
0
6
30
29
16
13
null
null
spacekitteh/smcghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
-- extend?Rep: wrap integer expression of type rep -- in a conversion to II32 extendSExpr :: Width -> CmmExpr -> CmmExpr extendSExpr W32 x = x
146
extendSExpr :: Width -> CmmExpr -> CmmExpr extendSExpr W32 x = x
64
extendSExpr W32 x = x
21
true
true
0
8
29
32
15
17
null
null
tangboyun/miranda
src/MiRanda/Diagram/LocalAU.hs
gpl-3.0
fColor = limegreen
18
fColor = limegreen
18
fColor = limegreen
18
false
false
0
4
2
6
3
3
null
null
thomkoehler/FunLang
src/TIM/Heap.hs
bsd-3-clause
get :: Ord a => a -> Heap a d -> Maybe d get addr (Heap m _) = Map.lookup addr m
80
get :: Ord a => a -> Heap a d -> Maybe d get addr (Heap m _) = Map.lookup addr m
80
get addr (Heap m _) = Map.lookup addr m
39
false
true
0
8
21
58
26
32
null
null
kylcarte/wangtiles
src/Data/TileSet.hs
bsd-3-clause
{- tsMapMWithKey :: (Monad f) => (TileIndex -> a -> f b) -> TileSet a -> f (TileSet b) tsMapMWithKey = tsOnMapM . -} -- }}} -- Zips {{{ tsZipWithL :: (a -> b -> c) -> TileSet a -> TileSet b -> Maybe (TileSet c) tsZipWithL f ta tb = fmap tsFromMap $ I.traverseWithKey g $ tileSet ta where g i a = f a <$> I.lookup i (tileSet tb)
335
tsZipWithL :: (a -> b -> c) -> TileSet a -> TileSet b -> Maybe (TileSet c) tsZipWithL f ta tb = fmap tsFromMap $ I.traverseWithKey g $ tileSet ta where g i a = f a <$> I.lookup i (tileSet tb)
195
tsZipWithL f ta tb = fmap tsFromMap $ I.traverseWithKey g $ tileSet ta where g i a = f a <$> I.lookup i (tileSet tb)
120
true
true
3
10
78
121
54
67
null
null
UnNetHack/pinobot
lib/IRC/Socket.hs
mit
send :: MonadIO m => Connection -> B.ByteString -> m () send (Connection sock) payload = liftIO $ sendAll sock payload
118
send :: MonadIO m => Connection -> B.ByteString -> m () send (Connection sock) payload = liftIO $ sendAll sock payload
118
send (Connection sock) payload = liftIO $ sendAll sock payload
62
false
true
0
9
20
53
25
28
null
null
TomMD/crypto-api-tests
Test/Crypto.hs
bsd-3-clause
prop_OFBStrictLazyEq = prop_StrictLazyEq ofb ofbLazy unOfb unOfbLazy
68
prop_OFBStrictLazyEq = prop_StrictLazyEq ofb ofbLazy unOfb unOfbLazy
68
prop_OFBStrictLazyEq = prop_StrictLazyEq ofb ofbLazy unOfb unOfbLazy
68
false
false
1
5
6
18
7
11
null
null
kohabi/rxquiz
src/Main.hs
unlicense
runQuiz :: Quiz -> IO () runQuiz [] = return ()
47
runQuiz :: Quiz -> IO () runQuiz [] = return ()
47
runQuiz [] = return ()
22
false
true
0
7
10
30
14
16
null
null
mit-pdos/fscq-impl
src/fscq.hs
mit
materializeFlushgroups :: IORef Integer -> [[(Integer, Coq_word)]] -> IO () materializeFlushgroups idxref groups = do idx <- readIORef idxref writeIORef idxref (idx+1) _ <- System.Process.system $ printf "cp --sparse=always /tmp/crashlog.img /tmp/crashlog-%06d.img" idx ds <- init_disk $ printf "/tmp/crashlog-%06d.img" idx applyFlushgroups ds groups _ <- close_disk ds return ()
393
materializeFlushgroups :: IORef Integer -> [[(Integer, Coq_word)]] -> IO () materializeFlushgroups idxref groups = do idx <- readIORef idxref writeIORef idxref (idx+1) _ <- System.Process.system $ printf "cp --sparse=always /tmp/crashlog.img /tmp/crashlog-%06d.img" idx ds <- init_disk $ printf "/tmp/crashlog-%06d.img" idx applyFlushgroups ds groups _ <- close_disk ds return ()
393
materializeFlushgroups idxref groups = do idx <- readIORef idxref writeIORef idxref (idx+1) _ <- System.Process.system $ printf "cp --sparse=always /tmp/crashlog.img /tmp/crashlog-%06d.img" idx ds <- init_disk $ printf "/tmp/crashlog-%06d.img" idx applyFlushgroups ds groups _ <- close_disk ds return ()
317
false
true
0
9
61
130
60
70
null
null
ComputationWithBoundedResources/tct-core
src/Tct/Core/Interactive.hs
bsd-3-clause
-- | Print proof, state, certificate. proof, state, complexity :: IO() proof = printProof
94
proof, state, complexity :: IO() proof = printProof
56
proof = printProof
23
true
true
5
6
18
33
13
20
null
null
PeterScott/haskell-kyoto-tycoon
Database/KyotoTycoon/UrlEncode.hs
bsd-3-clause
is_safe :: Char -> Bool is_safe c = isAlphaNum c || B.elem c "_.-/"
67
is_safe :: Char -> Bool is_safe c = isAlphaNum c || B.elem c "_.-/"
67
is_safe c = isAlphaNum c || B.elem c "_.-/"
43
false
true
0
7
13
32
15
17
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M12/D05/Solution.hs
mit
-- now we simply rewrite recs so that it uses the subset of the keyword table recs :: Connection -> [KeyWord] -> IO [Recommendation] recs conn kws = keywordKeyphraseDict conn kws >>= recs' conn kws
198
recs :: Connection -> [KeyWord] -> IO [Recommendation] recs conn kws = keywordKeyphraseDict conn kws >>= recs' conn kws
119
recs conn kws = keywordKeyphraseDict conn kws >>= recs' conn kws
64
true
true
0
9
35
53
25
28
null
null
Teaspot-Studio/Urho3D-Haskell
app/sample34/Main.hs
mit
handlePostRenderUpdate :: SharedPtr Application -> IORef CameraData -> EventPostRenderUpdate -> IO () handlePostRenderUpdate app camDataRef _ = do camData <- readIORef camDataRef (renderer :: Ptr Renderer) <- fromJustTrace "Renderer" <$> getSubsystem app -- If draw debug mode is enabled, draw viewport debug geometry, which will show eg. drawable bounding boxes and skeleton -- bones. Note that debug geometry has to be separately requested each frame. This time use depth test, as otherwise the result becomes -- hard to interpret due to large object count when (camDebugGeometry camData) $ rendererDrawDebugGeometry renderer True
649
handlePostRenderUpdate :: SharedPtr Application -> IORef CameraData -> EventPostRenderUpdate -> IO () handlePostRenderUpdate app camDataRef _ = do camData <- readIORef camDataRef (renderer :: Ptr Renderer) <- fromJustTrace "Renderer" <$> getSubsystem app -- If draw debug mode is enabled, draw viewport debug geometry, which will show eg. drawable bounding boxes and skeleton -- bones. Note that debug geometry has to be separately requested each frame. This time use depth test, as otherwise the result becomes -- hard to interpret due to large object count when (camDebugGeometry camData) $ rendererDrawDebugGeometry renderer True
649
handlePostRenderUpdate app camDataRef _ = do camData <- readIORef camDataRef (renderer :: Ptr Renderer) <- fromJustTrace "Renderer" <$> getSubsystem app -- If draw debug mode is enabled, draw viewport debug geometry, which will show eg. drawable bounding boxes and skeleton -- bones. Note that debug geometry has to be separately requested each frame. This time use depth test, as otherwise the result becomes -- hard to interpret due to large object count when (camDebugGeometry camData) $ rendererDrawDebugGeometry renderer True
547
false
true
0
10
107
102
47
55
null
null
haslab/SecreC
src/Language/SecreC/Transformation/Dafny.hs
gpl-3.0
expressionToDafny :: DafnyK m => Bool -> IsQExpr -> AnnKind -> Expression GIdentifier (Typed Position) -> DafnyM m (AnnsDoc,DDoc) expressionToDafny isLVal isQExpr annK se@(PostIndexExpr {}) = do projectionToDafny isLVal isQExpr annK se
239
expressionToDafny :: DafnyK m => Bool -> IsQExpr -> AnnKind -> Expression GIdentifier (Typed Position) -> DafnyM m (AnnsDoc,DDoc) expressionToDafny isLVal isQExpr annK se@(PostIndexExpr {}) = do projectionToDafny isLVal isQExpr annK se
239
expressionToDafny isLVal isQExpr annK se@(PostIndexExpr {}) = do projectionToDafny isLVal isQExpr annK se
109
false
true
0
12
35
87
43
44
null
null
nushio3/ghc
compiler/types/Type.hs
bsd-3-clause
isEqPred ty = case tyConAppTyCon_maybe ty of Just tyCon -> tyCon `hasKey` eqPrimTyConKey || tyCon `hasKey` eqReprPrimTyConKey _ -> False
168
isEqPred ty = case tyConAppTyCon_maybe ty of Just tyCon -> tyCon `hasKey` eqPrimTyConKey || tyCon `hasKey` eqReprPrimTyConKey _ -> False
168
isEqPred ty = case tyConAppTyCon_maybe ty of Just tyCon -> tyCon `hasKey` eqPrimTyConKey || tyCon `hasKey` eqReprPrimTyConKey _ -> False
168
false
false
1
10
51
51
24
27
null
null
jystic/language-scala
src/Language/Scala/Tokens.hs
bsd-3-clause
identTokenValue :: Token -> Ident identTokenValue (Tok_Op x) = x
70
identTokenValue :: Token -> Ident identTokenValue (Tok_Op x) = x
70
identTokenValue (Tok_Op x) = x
36
false
true
0
7
15
24
12
12
null
null
kosmoskatten/ghost-lang
ghost-node/test/GhostLang/FlowTests.hs
mit
-- | A ghost-program that won't compile. defunctProgram :: String defunctProgram = "kklmli"
91
defunctProgram :: String defunctProgram = "kklmli"
50
defunctProgram = "kklmli"
25
true
true
0
4
12
12
7
5
null
null
moves-rwth/storm
resources/3rdparty/parallel_hashmap/html/includes.hs
gpl-3.0
doInclude x = return x
22
doInclude x = return x
22
doInclude x = return x
22
false
false
0
5
4
12
5
7
null
null
wangwangwar/cis194
src/ch7/Editor.hs
bsd-3-clause
doCommand Prev = modCurLine (subtract 1) >> doCommand View
58
doCommand Prev = modCurLine (subtract 1) >> doCommand View
58
doCommand Prev = modCurLine (subtract 1) >> doCommand View
58
false
false
0
8
8
25
11
14
null
null
gambogi/csh-eval
src/CSH/Eval/Cacheable/Fetch.hs
mit
memberStatusToVal AlumniBad = "alumni_bad"
43
memberStatusToVal AlumniBad = "alumni_bad"
43
memberStatusToVal AlumniBad = "alumni_bad"
43
false
false
0
5
4
9
4
5
null
null
frenetic-lang/netcore-1.0
src/Frenetic/Update.hs
bsd-3-clause
version_acts (Forward AllPorts m : actions) version all_ports edge_ports = explode_all_ports version m all_ports edge_ports ++ version_acts actions version all_ports edge_ports
194
version_acts (Forward AllPorts m : actions) version all_ports edge_ports = explode_all_ports version m all_ports edge_ports ++ version_acts actions version all_ports edge_ports
194
version_acts (Forward AllPorts m : actions) version all_ports edge_ports = explode_all_ports version m all_ports edge_ports ++ version_acts actions version all_ports edge_ports
194
false
false
0
8
38
49
23
26
null
null
timtylin/scholdoc-texmath
src/Text/TeXMath/Readers/TeX.hs
gpl-2.0
-- check if sub/superscripts should always be under and over the expression isUnderover :: Exp -> Bool isUnderover (EOver _ _ (ESymbol Accent "\xFE37")) = True
159
isUnderover :: Exp -> Bool isUnderover (EOver _ _ (ESymbol Accent "\xFE37")) = True
83
isUnderover (EOver _ _ (ESymbol Accent "\xFE37")) = True
56
true
true
0
9
25
37
19
18
null
null
meiersi/blaze-builder
benchmarks/Throughput/BlazeBuilder.hs
bsd-3-clause
writeWord64N4Host = loop 0 where loop s n | s `seq` n `seq` False = undefined loop _ 0 = mempty loop s n = fromWrite ( writeWord64host (s+0) `mappend` writeWord64host (s+1) `mappend` writeWord64host (s+2) `mappend` writeWord64host (s+3)) `mappend` loop (s+4) (n-4)
332
writeWord64N4Host = loop 0 where loop s n | s `seq` n `seq` False = undefined loop _ 0 = mempty loop s n = fromWrite ( writeWord64host (s+0) `mappend` writeWord64host (s+1) `mappend` writeWord64host (s+2) `mappend` writeWord64host (s+3)) `mappend` loop (s+4) (n-4)
332
writeWord64N4Host = loop 0 where loop s n | s `seq` n `seq` False = undefined loop _ 0 = mempty loop s n = fromWrite ( writeWord64host (s+0) `mappend` writeWord64host (s+1) `mappend` writeWord64host (s+2) `mappend` writeWord64host (s+3)) `mappend` loop (s+4) (n-4)
332
false
false
3
13
109
155
79
76
null
null
WSCU/JSEuterpea
Euterpea Examples/SimpleEuterpea.hs
gpl-3.0
impani = E.instrument E.Timpani
32
timpani = E.instrument E.Timpani
32
timpani = E.instrument E.Timpani
32
false
false
0
6
4
13
6
7
null
null
mcmaniac/ghc
compiler/llvmGen/Llvm/Types.hs
bsd-3-clause
getPlainName (LMLocalVar x _ ) = "l" ++ show x
54
getPlainName (LMLocalVar x _ ) = "l" ++ show x
54
getPlainName (LMLocalVar x _ ) = "l" ++ show x
54
false
false
0
7
17
24
11
13
null
null
hephaestus-pl/hephaestus
alexandre/feature-modeling/src/FeatureModel/NewFMTypeChecker.hs
mit
expNames (Or e1 e2) = (expNames e1) ++ (expNames e2)
56
expNames (Or e1 e2) = (expNames e1) ++ (expNames e2)
56
expNames (Or e1 e2) = (expNames e1) ++ (expNames e2)
56
false
false
0
7
13
33
16
17
null
null
Zankoku-Okuno/murex
demo.hs
gpl-3.0
interpTest = "putStr \">\"\n\ \putStr\n snoc (getStr ()) '\\n'\n\ \(λ (f x) f (f x)) (λ x addNum x x) 3"
132
interpTest = "putStr \">\"\n\ \putStr\n snoc (getStr ()) '\\n'\n\ \(λ (f x) f (f x)) (λ x addNum x x) 3"
132
interpTest = "putStr \">\"\n\ \putStr\n snoc (getStr ()) '\\n'\n\ \(λ (f x) f (f x)) (λ x addNum x x) 3"
132
false
false
0
4
48
6
3
3
null
null
urbanslug/ghc
testsuite/tests/concurrent/prog003/MVarListLockCoupling.hs
bsd-3-clause
atomicWrite :: IORef a -> a -> IO () atomicWrite ptr x = atomicModifyIORef ptr (\ _ -> (x,()))
97
atomicWrite :: IORef a -> a -> IO () atomicWrite ptr x = atomicModifyIORef ptr (\ _ -> (x,()))
97
atomicWrite ptr x = atomicModifyIORef ptr (\ _ -> (x,()))
60
false
true
0
9
21
59
28
31
null
null
sdiehl/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
getAmode _ other = do (reg, code) <- getSomeReg other let off = ImmInt 0 return (Amode (AddrRegImm reg off) code) -- The 'CondCode' type: Condition codes passed up the tree.
216
getAmode _ other = do (reg, code) <- getSomeReg other let off = ImmInt 0 return (Amode (AddrRegImm reg off) code) -- The 'CondCode' type: Condition codes passed up the tree.
216
getAmode _ other = do (reg, code) <- getSomeReg other let off = ImmInt 0 return (Amode (AddrRegImm reg off) code) -- The 'CondCode' type: Condition codes passed up the tree.
216
false
false
1
12
73
63
29
34
null
null
klarh/haste-webgl
src/Haste/Graphics/WebGL/UniformsAttributes.hs
mit
getAttribLocation::Context->Program->String->IO AttribLocation getAttribLocation = ffi "(function(ctx, program, name) {return ctx.getAttribLocation(program, name);})"
166
getAttribLocation::Context->Program->String->IO AttribLocation getAttribLocation = ffi "(function(ctx, program, name) {return ctx.getAttribLocation(program, name);})"
166
getAttribLocation = ffi "(function(ctx, program, name) {return ctx.getAttribLocation(program, name);})"
103
false
true
0
8
10
29
14
15
null
null
schell/lamdu
Lamdu/Data/Expression/Lens.hs
gpl-3.0
bodyTagType :: Lens.Prism' (Body def expr) () bodyTagType = _BodyLeaf . _TagType
80
bodyTagType :: Lens.Prism' (Body def expr) () bodyTagType = _BodyLeaf . _TagType
80
bodyTagType = _BodyLeaf . _TagType
34
false
true
1
8
11
39
17
22
null
null
robx/puzzle-draw
src/Data/Compose.hs
mit
handle _ t = if isGeneric t then impossible else error $ "puzzle type unhandled: " ++ show t
102
handle _ t = if isGeneric t then impossible else error $ "puzzle type unhandled: " ++ show t
102
handle _ t = if isGeneric t then impossible else error $ "puzzle type unhandled: " ++ show t
102
false
false
1
7
28
33
16
17
null
null
aslatter/smallstring
Data/SmallString.hs
bsd-3-clause
-- | Convert a 'SmallString' into a 'String'. toString :: SmallString -> String toString (SmallString ary) = UTF8.decode . A.toList $ ary
141
toString :: SmallString -> String toString (SmallString ary) = UTF8.decode . A.toList $ ary
95
toString (SmallString ary) = UTF8.decode . A.toList $ ary
61
true
true
0
7
25
37
19
18
null
null
ssaavedra/liquidhaskell
tests/pos/RBTree-height.hs
bsd-3-clause
balS k (Node R x a b) r = Node R k (Node B x a b) r
65
lbalS k (Node R x a b) r = Node R k (Node B x a b) r
65
lbalS k (Node R x a b) r = Node R k (Node B x a b) r
65
false
false
0
7
31
46
22
24
null
null
pikajude/haspell
Language/Aspell.hs
mit
setOpts (ContextVisibleFirst b:opts) pt = setOptBool "context-visible-first" b pt >>= setOpts opts
98
setOpts (ContextVisibleFirst b:opts) pt = setOptBool "context-visible-first" b pt >>= setOpts opts
98
setOpts (ContextVisibleFirst b:opts) pt = setOptBool "context-visible-first" b pt >>= setOpts opts
98
false
false
0
8
11
35
16
19
null
null
phylake/AS3-AST
Data/AS3/AST/Grammar/Expressions.hs
bsd-3-clause
-- $11.1 Primary Expressions primary_expression :: As3Parser Expression primary_expression = ((try $ string "this") >> return This) <|> try paren_group <|> try (liftM TODO_E literal) <|> try array_literal <|> try object_literal <|> try scoped_identifier -- check last because it fails slower <?> "primary_expression"
335
primary_expression :: As3Parser Expression primary_expression = ((try $ string "this") >> return This) <|> try paren_group <|> try (liftM TODO_E literal) <|> try array_literal <|> try object_literal <|> try scoped_identifier -- check last because it fails slower <?> "primary_expression"
305
primary_expression = ((try $ string "this") >> return This) <|> try paren_group <|> try (liftM TODO_E literal) <|> try array_literal <|> try object_literal <|> try scoped_identifier -- check last because it fails slower <?> "primary_expression"
262
true
true
17
9
61
100
50
50
null
null
TomMD/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc pushErrCtxt o err loc@(CtLoc { ctl_env = lcl }) = loc { ctl_origin = o, ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }
176
pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc pushErrCtxt o err loc@(CtLoc { ctl_env = lcl }) = loc { ctl_origin = o, ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }
176
pushErrCtxt o err loc@(CtLoc { ctl_env = lcl }) = loc { ctl_origin = o, ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }
123
false
true
4
11
37
91
43
48
null
null
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/Init.hs
gpl-3.0
getLicense :: InitFlags -> IO InitFlags getLicense flags = do lic <- return (flagToMaybe $ license flags) ?>> fmap (fmap (either UnknownLicense id) . join) (maybePrompt flags (promptListOptional "Please choose a license" listedLicenses)) return $ flags { license = maybeToFlag lic } where listedLicenses = knownLicenses \\ [GPL Nothing, LGPL Nothing, AGPL Nothing , Apache Nothing, OtherLicense] -- | The author's name and email. Prompt, or try to guess from an existing -- darcs repo.
578
getLicense :: InitFlags -> IO InitFlags getLicense flags = do lic <- return (flagToMaybe $ license flags) ?>> fmap (fmap (either UnknownLicense id) . join) (maybePrompt flags (promptListOptional "Please choose a license" listedLicenses)) return $ flags { license = maybeToFlag lic } where listedLicenses = knownLicenses \\ [GPL Nothing, LGPL Nothing, AGPL Nothing , Apache Nothing, OtherLicense] -- | The author's name and email. Prompt, or try to guess from an existing -- darcs repo.
578
getLicense flags = do lic <- return (flagToMaybe $ license flags) ?>> fmap (fmap (either UnknownLicense id) . join) (maybePrompt flags (promptListOptional "Please choose a license" listedLicenses)) return $ flags { license = maybeToFlag lic } where listedLicenses = knownLicenses \\ [GPL Nothing, LGPL Nothing, AGPL Nothing , Apache Nothing, OtherLicense] -- | The author's name and email. Prompt, or try to guess from an existing -- darcs repo.
538
false
true
0
14
167
143
71
72
null
null
simonced/haskell-kata
jmdict/src/Main.hs
gpl-3.0
main :: IO () main = do putStrLn $ "File to parse: " ++ dictFile entries <- getEntries --putStrLn $ "Number of entries: " ++ (show (length entries)) -- for our tests let sampleNumber = 20 putStrLn $ "Sample entry n.: " ++ (show sampleNumber) let sampleEntry = parseDictEntry $ entries !! sampleNumber putStrLn $ "kanji: " ++ entryKanji sampleEntry putStrLn $ "reading: " ++ entryReading sampleEntry putStrLn $ "meanings: " ++ (unlines $ entryMeanings sampleEntry) {- let testEntry = readingAndMeaning $ entries !! sampleNumber -- reading case fst testEntry of Just t -> putStrLn $ "Reading: " ++ t Nothing -> putStrLn "no reading" -- meaning case snd testEntry of Just t -> putStrLn $ "Meaning: " ++ t Nothing -> putStrLn "no meaning" -} return ()
876
main :: IO () main = do putStrLn $ "File to parse: " ++ dictFile entries <- getEntries --putStrLn $ "Number of entries: " ++ (show (length entries)) -- for our tests let sampleNumber = 20 putStrLn $ "Sample entry n.: " ++ (show sampleNumber) let sampleEntry = parseDictEntry $ entries !! sampleNumber putStrLn $ "kanji: " ++ entryKanji sampleEntry putStrLn $ "reading: " ++ entryReading sampleEntry putStrLn $ "meanings: " ++ (unlines $ entryMeanings sampleEntry) {- let testEntry = readingAndMeaning $ entries !! sampleNumber -- reading case fst testEntry of Just t -> putStrLn $ "Reading: " ++ t Nothing -> putStrLn "no reading" -- meaning case snd testEntry of Just t -> putStrLn $ "Meaning: " ++ t Nothing -> putStrLn "no meaning" -} return ()
876
main = do putStrLn $ "File to parse: " ++ dictFile entries <- getEntries --putStrLn $ "Number of entries: " ++ (show (length entries)) -- for our tests let sampleNumber = 20 putStrLn $ "Sample entry n.: " ++ (show sampleNumber) let sampleEntry = parseDictEntry $ entries !! sampleNumber putStrLn $ "kanji: " ++ entryKanji sampleEntry putStrLn $ "reading: " ++ entryReading sampleEntry putStrLn $ "meanings: " ++ (unlines $ entryMeanings sampleEntry) {- let testEntry = readingAndMeaning $ entries !! sampleNumber -- reading case fst testEntry of Just t -> putStrLn $ "Reading: " ++ t Nothing -> putStrLn "no reading" -- meaning case snd testEntry of Just t -> putStrLn $ "Meaning: " ++ t Nothing -> putStrLn "no meaning" -} return ()
862
false
true
0
11
256
137
64
73
null
null
neutronest/eulerproject-douby
e10/e10.hs
mit
main::IO() main = print $ sum [ x | x<-[2..2000000], isPrime x]
64
main::IO() main = print $ sum [ x | x<-[2..2000000], isPrime x]
64
main = print $ sum [ x | x<-[2..2000000], isPrime x]
53
false
true
0
10
12
46
23
23
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Common/ReqFailure.hs
bsd-3-clause
permittedPreciousAI :: Bool -> ItemFull -> Bool permittedPreciousAI calmE itemFull@ItemFull{itemDisco} = let arItem = aspectRecordFull itemFull isPrecious = IA.checkFlag Ability.Precious arItem in (calmE || not isPrecious) && IA.checkFlag Ability.Durable arItem || case itemDisco of ItemDiscoFull{} -> True ItemDiscoMean itemAspectMean -> IA.kmConst itemAspectMean || not isPrecious
446
permittedPreciousAI :: Bool -> ItemFull -> Bool permittedPreciousAI calmE itemFull@ItemFull{itemDisco} = let arItem = aspectRecordFull itemFull isPrecious = IA.checkFlag Ability.Precious arItem in (calmE || not isPrecious) && IA.checkFlag Ability.Durable arItem || case itemDisco of ItemDiscoFull{} -> True ItemDiscoMean itemAspectMean -> IA.kmConst itemAspectMean || not isPrecious
446
permittedPreciousAI calmE itemFull@ItemFull{itemDisco} = let arItem = aspectRecordFull itemFull isPrecious = IA.checkFlag Ability.Precious arItem in (calmE || not isPrecious) && IA.checkFlag Ability.Durable arItem || case itemDisco of ItemDiscoFull{} -> True ItemDiscoMean itemAspectMean -> IA.kmConst itemAspectMean || not isPrecious
398
false
true
8
10
108
116
55
61
null
null
goldfirere/singletons
singletons-th/src/Data/Singletons/TH/Deriving/Util.hs
bsd-3-clause
isFunctorLikeClassName :: Name -> Bool isFunctorLikeClassName class_name = class_name `elem` [functorName, foldableName, traversableName]
139
isFunctorLikeClassName :: Name -> Bool isFunctorLikeClassName class_name = class_name `elem` [functorName, foldableName, traversableName]
139
isFunctorLikeClassName class_name = class_name `elem` [functorName, foldableName, traversableName]
100
false
true
0
6
14
36
20
16
null
null
josuf107/Fizzckle
src/Fizz/Core.hs
gpl-3.0
maybeTimestamp :: Maybe Day -> a -> MaybeTimestamped a maybeTimestamp = (,)
75
maybeTimestamp :: Maybe Day -> a -> MaybeTimestamped a maybeTimestamp = (,)
75
maybeTimestamp = (,)
20
false
true
0
7
11
28
14
14
null
null
Mic92/eidolon
Handler/RootFeed.hs
agpl-3.0
getUserFeedAtomR :: UserId -> Handler RepAtom getUserFeedAtomR = getUserFeedR
77
getUserFeedAtomR :: UserId -> Handler RepAtom getUserFeedAtomR = getUserFeedR
77
getUserFeedAtomR = getUserFeedR
31
false
true
0
6
8
18
9
9
null
null
pbrandwijk/chronorder
Main.hs
gpl-3.0
significantDigits :: Int -> Int significantDigits n = significantDigits' n 1 where significantDigits' :: Int -> Int -> Int significantDigits' n c | n < (10^c) = c | otherwise = significantDigits' n (c+1) -- Quick sort algorithm applied to Handle type. Files are sorted by ascending modification date.
338
significantDigits :: Int -> Int significantDigits n = significantDigits' n 1 where significantDigits' :: Int -> Int -> Int significantDigits' n c | n < (10^c) = c | otherwise = significantDigits' n (c+1) -- Quick sort algorithm applied to Handle type. Files are sorted by ascending modification date.
338
significantDigits n = significantDigits' n 1 where significantDigits' :: Int -> Int -> Int significantDigits' n c | n < (10^c) = c | otherwise = significantDigits' n (c+1) -- Quick sort algorithm applied to Handle type. Files are sorted by ascending modification date.
306
false
true
3
10
86
88
43
45
null
null
urbanslug/ghc
testsuite/tests/deSugar/should_run/dsrun011.hs
bsd-3-clause
h3 x = 1 + h2 x
15
h3 x = 1 + h2 x
15
h3 x = 1 + h2 x
15
false
false
0
6
6
16
7
9
null
null
cutsea110/aop
src/FixTest.hs
bsd-3-clause
sum = cata phi where phi Nil = 0 phi (Cons a x) = a + x -- !?
71
sum = cata phi where phi Nil = 0 phi (Cons a x) = a + x -- !?
71
sum = cata phi where phi Nil = 0 phi (Cons a x) = a + x -- !?
71
false
false
4
6
28
50
20
30
null
null
DanBurton/yield
Util.hs
bsd-3-clause
foreverK :: Monad m => (a -> m a) -> a -> m r foreverK f = let go = f >=> go in go
82
foreverK :: Monad m => (a -> m a) -> a -> m r foreverK f = let go = f >=> go in go
82
foreverK f = let go = f >=> go in go
36
false
true
0
10
24
62
28
34
null
null
carabolic/huring
src/Main.hs
gpl-2.0
machine = TM.init tape transitionFunction
41
machine = TM.init tape transitionFunction
41
machine = TM.init tape transitionFunction
41
false
false
1
5
4
18
6
12
null
null
d16-processor/Haskell-C-
src/Backends/D16Naive/Optimize.hs
mit
cond_jump (x:xs) = x:(cond_jump xs)
35
cond_jump (x:xs) = x:(cond_jump xs)
35
cond_jump (x:xs) = x:(cond_jump xs)
35
false
false
0
7
4
26
13
13
null
null
wxwxwwxxx/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayOptP _ WayThreaded = []
26
wayOptP _ WayThreaded = []
26
wayOptP _ WayThreaded = []
26
false
false
0
5
4
13
6
7
null
null
thomie/cabal
Cabal/tests/UnitTests.hs
bsd-3-clause
main :: IO () main = do (mtimeChange, mtimeChange') <- calibrateMtimeChangeDelay let toMillis :: Int -> Double toMillis x = fromIntegral x / 1000.0 notice normal $ "File modification time resolution calibration completed, " ++ "maximum delay observed: " ++ (show . toMillis $ mtimeChange ) ++ " ms. " ++ "Will be using delay of " ++ (show . toMillis $ mtimeChange') ++ " for test runs." defaultMainWithIngredients (includingOptions extraOptions : defaultIngredients) (tests mtimeChange')
535
main :: IO () main = do (mtimeChange, mtimeChange') <- calibrateMtimeChangeDelay let toMillis :: Int -> Double toMillis x = fromIntegral x / 1000.0 notice normal $ "File modification time resolution calibration completed, " ++ "maximum delay observed: " ++ (show . toMillis $ mtimeChange ) ++ " ms. " ++ "Will be using delay of " ++ (show . toMillis $ mtimeChange') ++ " for test runs." defaultMainWithIngredients (includingOptions extraOptions : defaultIngredients) (tests mtimeChange')
535
main = do (mtimeChange, mtimeChange') <- calibrateMtimeChangeDelay let toMillis :: Int -> Double toMillis x = fromIntegral x / 1000.0 notice normal $ "File modification time resolution calibration completed, " ++ "maximum delay observed: " ++ (show . toMillis $ mtimeChange ) ++ " ms. " ++ "Will be using delay of " ++ (show . toMillis $ mtimeChange') ++ " for test runs." defaultMainWithIngredients (includingOptions extraOptions : defaultIngredients) (tests mtimeChange')
521
false
true
0
15
122
143
68
75
null
null
kemskems/cis194-spring13
src/HW07/HW07Tests.hs
bsd-3-clause
jlToList (Append _ l1 l2) = jlToList l1 ++ jlToList l2
54
jlToList (Append _ l1 l2) = jlToList l1 ++ jlToList l2
54
jlToList (Append _ l1 l2) = jlToList l1 ++ jlToList l2
54
false
false
0
7
10
29
13
16
null
null