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
rueshyna/gogol
gogol-books/gen/Network/Google/Books/Types/Product.hs
mpl-2.0
-- | Identifies the volume for which this entry applies. carVolumeId :: Lens' ConcurrentAccessRestriction (Maybe Text) carVolumeId = lens _carVolumeId (\ s a -> s{_carVolumeId = a})
183
carVolumeId :: Lens' ConcurrentAccessRestriction (Maybe Text) carVolumeId = lens _carVolumeId (\ s a -> s{_carVolumeId = a})
126
carVolumeId = lens _carVolumeId (\ s a -> s{_carVolumeId = a})
64
true
true
1
9
28
50
25
25
null
null
sdiehl/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
badIO :: String -> IO a badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad") ; fail "Template Haskell failure" }
150
badIO :: String -> IO a badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad") ; fail "Template Haskell failure" }
150
badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad") ; fail "Template Haskell failure" }
126
false
true
0
10
47
49
24
25
null
null
aaronvargo/htut
src/Tut/Misc.hs
bsd-3-clause
allWhiteSpace :: Text -> Bool allWhiteSpace = T.null . T.strip
62
allWhiteSpace :: Text -> Bool allWhiteSpace = T.null . T.strip
62
allWhiteSpace = T.null . T.strip
32
false
true
0
6
9
23
12
11
null
null
iu-parfunc/haskell-hpx
src/Foreign/HPX.hs
bsd-3-clause
isActive :: HPX Bool isActive = liftIO $ fmap (toEnum . fromIntegral) c'hpx_is_active
85
isActive :: HPX Bool isActive = liftIO $ fmap (toEnum . fromIntegral) c'hpx_is_active
85
isActive = liftIO $ fmap (toEnum . fromIntegral) c'hpx_is_active
64
false
true
2
6
12
38
16
22
null
null
kmate/HaRe
old/refactorer/RefacRenaming.hs
bsd-3-clause
---------Rename a class name--------------------------------- doRenaming oldPNT@(PNT _ (Class _ _) _) newName modName mod inscps exps env =doRenaming' oldPNT newName mod mod (hsTypeConstrsAndClasses modName) exps env
220
doRenaming oldPNT@(PNT _ (Class _ _) _) newName modName mod inscps exps env =doRenaming' oldPNT newName mod mod (hsTypeConstrsAndClasses modName) exps env
158
doRenaming oldPNT@(PNT _ (Class _ _) _) newName modName mod inscps exps env =doRenaming' oldPNT newName mod mod (hsTypeConstrsAndClasses modName) exps env
158
true
false
0
10
29
64
32
32
null
null
dosenfrucht/mcasm
src/Generator.hs
gpl-2.0
immToBytes :: Imm -> [Word8] immToBytes (Literal i) = integerToBytes i
70
immToBytes :: Imm -> [Word8] immToBytes (Literal i) = integerToBytes i
70
immToBytes (Literal i) = integerToBytes i
41
false
true
0
7
10
30
15
15
null
null
ryzhyk/cocoon
cocoon/Boogie/Boogie.hs
apache-2.0
--bvbop :: (?p::String, ?mset::MSet, ?r::Refine, ?c::ECtx, ?loc::Doc) => BOp -> Expr -> Expr -> Doc --bvbop op e1 e2 = text ("BV"++(show $ typeWidth $ typ' ?r ?c e1)++"_"++bvbopname op) <> (parens $ mkExpr' e1 <> comma <+> mkExpr' e2) --bvbopname Lt = "ULT" --bvbopname Gt = "UGT" --bvbopname Lte = "ULEQ" --bvb...
633
mkStatement :: (?rmap::RMap, ?maxdepth::Int) => Refine -> ECtx -> Statement -> Doc mkStatement r ctx (SSeq _ s1 s2) = mkStatement r ctx s1 $$ mkStatement r ctx s2
162
mkStatement r ctx (SSeq _ s1 s2) = mkStatement r ctx s1 $$ mkStatement r ctx s2
79
true
true
0
8
120
82
47
35
null
null
fizruk/lanthanum
src/Lanthanum/API.hs
bsd-3-clause
forkAppM :: AppM a -> AppM ThreadId forkAppM m = do cfg <- ask liftIO $ forkIO $ do _ <- runEitherT (runReaderT m cfg) return ()
140
forkAppM :: AppM a -> AppM ThreadId forkAppM m = do cfg <- ask liftIO $ forkIO $ do _ <- runEitherT (runReaderT m cfg) return ()
140
forkAppM m = do cfg <- ask liftIO $ forkIO $ do _ <- runEitherT (runReaderT m cfg) return ()
104
false
true
0
13
38
68
30
38
null
null
ndmitchell/hoogle
src/Action/CmdLine.hs
bsd-3-clause
cmdLineMode = cmdArgsMode $ modes [search_ &= auto,generate,server,replay,test] &= verbosity &= program "hoogle" &= summary ("Hoogle " ++ showVersion version ++ ", https://hoogle.haskell.org/")
201
cmdLineMode = cmdArgsMode $ modes [search_ &= auto,generate,server,replay,test] &= verbosity &= program "hoogle" &= summary ("Hoogle " ++ showVersion version ++ ", https://hoogle.haskell.org/")
201
cmdLineMode = cmdArgsMode $ modes [search_ &= auto,generate,server,replay,test] &= verbosity &= program "hoogle" &= summary ("Hoogle " ++ showVersion version ++ ", https://hoogle.haskell.org/")
201
false
false
4
9
30
68
35
33
null
null
kylcarte/ixfunctors
src/Data/IxFunctor/Bind.hs
bsd-3-clause
ijoin :: IxBind m => m i j (m j k a) -> m i k a ijoin = flip ibind id
69
ijoin :: IxBind m => m i j (m j k a) -> m i k a ijoin = flip ibind id
69
ijoin = flip ibind id
21
false
true
0
10
21
56
25
31
null
null
kosmikus/getopt-generics
src/WithCli/Result.hs
bsd-3-clause
stripTrailingSpaces :: String -> String stripTrailingSpaces = reverse . inner . dropWhile (`elem` [' ', '\n']) . reverse where inner s = case s of ('\n' : ' ' : r) -> inner ('\n' : r) (a : r) -> a : inner r [] -> []
241
stripTrailingSpaces :: String -> String stripTrailingSpaces = reverse . inner . dropWhile (`elem` [' ', '\n']) . reverse where inner s = case s of ('\n' : ' ' : r) -> inner ('\n' : r) (a : r) -> a : inner r [] -> []
241
stripTrailingSpaces = reverse . inner . dropWhile (`elem` [' ', '\n']) . reverse where inner s = case s of ('\n' : ' ' : r) -> inner ('\n' : r) (a : r) -> a : inner r [] -> []
201
false
true
3
10
72
120
60
60
null
null
linzhp/Language-GLSL
src/Language/C/Data/Error.hs
bsd-3-clause
-- | converts an error into a string using a fixed format -- -- * either the lines of the long error message or the short message has to be non-empty -- -- * the format is -- -- > <fname>:<row>: (column <col>) [<err lvl>] -- > >>> <line_1> -- > <line_2> -- > ... -- > <line_n> showErrorInfo :: S...
843
showErrorInfo :: String -> ErrorInfo -> String showErrorInfo short_msg (ErrorInfo level pos msgs) = header ++ showMsgLines (if null short_msg then msgs else short_msg:msgs) where header = (posFile pos) ++ ":" ++ show (posRow pos) ++ ": " ++ "(column " ++ show (posColumn pos) ++ ") " ++ ...
541
showErrorInfo short_msg (ErrorInfo level pos msgs) = header ++ showMsgLines (if null short_msg then msgs else short_msg:msgs) where header = (posFile pos) ++ ":" ++ show (posRow pos) ++ ": " ++ "(column " ++ show (posColumn pos) ++ ") " ++ "[" ++ show level ++ "]" showMsgLines ...
494
true
true
12
10
219
218
107
111
null
null
ganeti/ganeti
src/Ganeti/HTools/Backend/Text.hs
bsd-2-clause
-- | Generate min/max instance specs data. serializeMultipleMinMaxISpecs :: [MinMaxISpecs] -> String serializeMultipleMinMaxISpecs minmaxes = intercalate [iSpecsSeparator] $ foldr serialpair [] minmaxes where serialpair (MinMaxISpecs minspec maxspec) acc = serializeISpec minspec : serializeISpec maxspec :...
379
serializeMultipleMinMaxISpecs :: [MinMaxISpecs] -> String serializeMultipleMinMaxISpecs minmaxes = intercalate [iSpecsSeparator] $ foldr serialpair [] minmaxes where serialpair (MinMaxISpecs minspec maxspec) acc = serializeISpec minspec : serializeISpec maxspec : acc -- | Generate policy data from a give...
336
serializeMultipleMinMaxISpecs minmaxes = intercalate [iSpecsSeparator] $ foldr serialpair [] minmaxes where serialpair (MinMaxISpecs minspec maxspec) acc = serializeISpec minspec : serializeISpec maxspec : acc -- | Generate policy data from a given policy object.
278
true
true
0
7
60
77
38
39
null
null
sseefried/shady-gen
src/Shady/Language/Type.hs
agpl-3.0
vectorT :: (IsNat n, IsScalar a) => VectorT n a vectorT = VectorT nat scalarT
77
vectorT :: (IsNat n, IsScalar a) => VectorT n a vectorT = VectorT nat scalarT
77
vectorT = VectorT nat scalarT
29
false
true
0
6
14
36
18
18
null
null
mitchellwrosen/language-lua2
src/Language/Lua/Parser.hs
bsd-3-clause
-- | Parse a Lua file. May throw 'LuaParseException'. -- -- @ -- 'parseLua' = 'parseLuaWith' 'luaChunk' -- @ parseLua :: String -- ^ Source filename (used in locations). -> String -- ^ Source contents. -> Chunk NodeInfo parseLua = parseLuaWith luaChunk
258
parseLua :: String -- ^ Source filename (used in locations). -> String -- ^ Source contents. -> Chunk NodeInfo parseLua = parseLuaWith luaChunk
149
parseLua = parseLuaWith luaChunk
32
true
true
0
8
47
38
20
18
null
null
psfblair/freepalace
src/FreePalace/GUI/Gtk.hs
apache-2.0
wrapMainWindow :: GtkGui -> GUI.MainWindow wrapMainWindow gui = let mainWin = mainWindow gui in GUI.MainWindow { GUI.quit = mainQuit, GUI.showMainWindow = windowPresent mainWin, GUI.closeMainWindow = widgetHide mainWin, GUI.onMainWindowClose = \handler -> do _ <- onDestroy mainW...
354
wrapMainWindow :: GtkGui -> GUI.MainWindow wrapMainWindow gui = let mainWin = mainWindow gui in GUI.MainWindow { GUI.quit = mainQuit, GUI.showMainWindow = windowPresent mainWin, GUI.closeMainWindow = widgetHide mainWin, GUI.onMainWindowClose = \handler -> do _ <- onDestroy mainW...
354
wrapMainWindow gui = let mainWin = mainWindow gui in GUI.MainWindow { GUI.quit = mainQuit, GUI.showMainWindow = windowPresent mainWin, GUI.closeMainWindow = widgetHide mainWin, GUI.onMainWindowClose = \handler -> do _ <- onDestroy mainWin handler return () }
311
false
true
0
13
92
101
51
50
null
null
Gurrt/software-testing
week-3/Lab3.hs
mit
isArrowFree (Dsj fs) = all isArrowFree fs
44
isArrowFree (Dsj fs) = all isArrowFree fs
44
isArrowFree (Dsj fs) = all isArrowFree fs
44
false
false
0
6
9
21
9
12
null
null
craffit/flexdb
src/DB/Flex/Query/Typed.hs
bsd-3-clause
notin :: (Eq a, DBType a) => Expr j l a -> Query i (Sub j l) (Expr i (Sub j l) a) -> Expr j l Bool notin e q = binOp "not in" e $ Exp $ fmap snd $ renderSubExp (fmap AbstractVal q)
198
notin :: (Eq a, DBType a) => Expr j l a -> Query i (Sub j l) (Expr i (Sub j l) a) -> Expr j l Bool notin e q = binOp "not in" e $ Exp $ fmap snd $ renderSubExp (fmap AbstractVal q)
198
notin e q = binOp "not in" e $ Exp $ fmap snd $ renderSubExp (fmap AbstractVal q)
81
false
true
0
13
63
121
57
64
null
null
Saulzar/Ants
Ant/GameLoop.hs
bsd-3-clause
processTurn :: Int -> [SquareContent] -> Game [Order] processTurn n content = do updateState content tasks <- gets (fst . gsAnts . gameStats) >>= scheduleAnts --liftIO $ hPrint stderr tasks orders <- moveAnts tasks return orders --orders <- liftM (map toEnum . randomRs (0, 3))...
380
processTurn :: Int -> [SquareContent] -> Game [Order] processTurn n content = do updateState content tasks <- gets (fst . gsAnts . gameStats) >>= scheduleAnts --liftIO $ hPrint stderr tasks orders <- moveAnts tasks return orders --orders <- liftM (map toEnum . randomRs (0, 3))...
380
processTurn n content = do updateState content tasks <- gets (fst . gsAnts . gameStats) >>= scheduleAnts --liftIO $ hPrint stderr tasks orders <- moveAnts tasks return orders --orders <- liftM (map toEnum . randomRs (0, 3)) (liftIO getStdGen) --return $ zip (map fst ants) ...
326
false
true
0
12
100
83
40
43
null
null
NCrashed/bitmap
Data/Bitmap/IO.hs
bsd-3-clause
------------------------------------------------------------------------------- -- | Copies a subrectangle of the source image into a new image. copySubImage :: PixelComponent t => IOBitmap t -- ^ source image -> Offset -- ^ source rectangle offset -> Size -- ^ source rectangle ...
412
copySubImage :: PixelComponent t => IOBitmap t -- ^ source image -> Offset -- ^ source rectangle offset -> Size -- ^ source rectangle size -> IO (IOBitmap t) copySubImage bm ofs1 siz1 = copySubImage' bm ofs1 siz1 siz1 (0,0)
262
copySubImage bm ofs1 siz1 = copySubImage' bm ofs1 siz1 siz1 (0,0)
65
true
true
0
12
97
75
38
37
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
dataClassKey = mkPreludeClassUnique 9
48
dataClassKey = mkPreludeClassUnique 9
48
dataClassKey = mkPreludeClassUnique 9
48
false
false
1
5
14
12
4
8
null
null
christiaanb/ghc
compiler/cmm/PprC.hs
bsd-3-clause
te_Target :: ForeignTarget -> TE () te_Target (ForeignTarget e _) = te_Expr e
82
te_Target :: ForeignTarget -> TE () te_Target (ForeignTarget e _) = te_Expr e
82
te_Target (ForeignTarget e _) = te_Expr e
46
false
true
0
7
17
38
17
21
null
null
f-me/snap-core
test/suite/Snap/Internal/Routing/Tests.hs
bsd-3-clause
getRqPathInfo = liftM rqPathInfo getRequest
46
getRqPathInfo = liftM rqPathInfo getRequest
46
getRqPathInfo = liftM rqPathInfo getRequest
46
false
false
0
5
7
11
5
6
null
null
sashabu/libcspm
src/CSPM/Evaluator/BuiltInFunctions.hs
bsd-3-clause
relationalImage :: S.ValueSet -> Value -> EvaluationMonad S.ValueSet relationalImage s = let tuples = [(hash (arr!0), hash(arr!1), arr!0, arr!1) | VTuple arr <- S.toList s] hashCmp (hx1,_,x1,_) (hx2,_,x2,_) = compare hx1 hx2 `thenCmp` compare x1 x2 hashEq (hx1,_,x1,_) (hx2,_,x2,_) = hx1 == hx2 && x...
766
relationalImage :: S.ValueSet -> Value -> EvaluationMonad S.ValueSet relationalImage s = let tuples = [(hash (arr!0), hash(arr!1), arr!0, arr!1) | VTuple arr <- S.toList s] hashCmp (hx1,_,x1,_) (hx2,_,x2,_) = compare hx1 hx2 `thenCmp` compare x1 x2 hashEq (hx1,_,x1,_) (hx2,_,x2,_) = hx1 == hx2 && x...
766
relationalImage s = let tuples = [(hash (arr!0), hash(arr!1), arr!0, arr!1) | VTuple arr <- S.toList s] hashCmp (hx1,_,x1,_) (hx2,_,x2,_) = compare hx1 hx2 `thenCmp` compare x1 x2 hashEq (hx1,_,x1,_) (hx2,_,x2,_) = hx1 == hx2 && x1 == x2 sortedTuples = sortBy hashCmp tuples groupedT...
697
false
true
0
17
208
348
188
160
null
null
moosingin3space/dailymenu
tests/QueryHelpers.hs
gpl-3.0
extractQueryParam :: B.ByteString -> B.ByteString -> Maybe B.ByteString extractQueryParam qs paramName = lookup paramName (parseSimpleQuery qs)
143
extractQueryParam :: B.ByteString -> B.ByteString -> Maybe B.ByteString extractQueryParam qs paramName = lookup paramName (parseSimpleQuery qs)
143
extractQueryParam qs paramName = lookup paramName (parseSimpleQuery qs)
71
false
true
0
8
15
44
21
23
null
null
vladimir-ipatov/ganeti
test/hs/Test/Ganeti/Utils.hs
gpl-2.0
-- | Tests that the newUUID function produces valid UUIDs. case_new_uuid :: Assertion case_new_uuid = do uuid <- newUUID assertBool "newUUID" $ uuid =~ C.uuidRegex #endif
174
case_new_uuid :: Assertion case_new_uuid = do uuid <- newUUID assertBool "newUUID" $ uuid =~ C.uuidRegex #endif
115
case_new_uuid = do uuid <- newUUID assertBool "newUUID" $ uuid =~ C.uuidRegex #endif
88
true
true
0
9
29
36
18
18
null
null
GaloisInc/halvm-ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
stringE :: String -> ExpQ stringE = litE . stringL
50
stringE :: String -> ExpQ stringE = litE . stringL
50
stringE = litE . stringL
24
false
true
1
7
9
27
11
16
null
null
orchid-hybrid/bee
Bee/DerivRegex.hs
gpl-3.0
cong f (r :^ s) = f (cong f r :^ cong f s)
42
cong f (r :^ s) = f (cong f r :^ cong f s)
42
cong f (r :^ s) = f (cong f r :^ cong f s)
42
false
false
0
7
13
40
18
22
null
null
JoeyEremondi/elm-pattern-effects
src/Type/Effect.hs
bsd-3-clause
makeConstructors :: Environment -> [Module.CanonicalAdt] -> Map.Map String (IO (Int, [AnnVar], [TypeAnnot], TypeAnnot)) makeConstructors env datatypes = Map.fromList builtins where list t = (_types env ! "List") inst :: Int -> ([TypeAnnot] -> ([TypeAnnot], TypeAnnot)) -> IO (Int, [AnnV...
951
makeConstructors :: Environment -> [Module.CanonicalAdt] -> Map.Map String (IO (Int, [AnnVar], [TypeAnnot], TypeAnnot)) makeConstructors env datatypes = Map.fromList builtins where list t = (_types env ! "List") inst :: Int -> ([TypeAnnot] -> ([TypeAnnot], TypeAnnot)) -> IO (Int, [AnnVa...
950
makeConstructors env datatypes = Map.fromList builtins where list t = (_types env ! "List") inst :: Int -> ([TypeAnnot] -> ([TypeAnnot], TypeAnnot)) -> IO (Int, [AnnVar], [TypeAnnot], TypeAnnot) inst numTVars tipe = do vars <- mapM (\_ -> mkVar) [1..numTVars] let (args, result)...
818
false
true
13
13
265
329
185
144
null
null
Haskell-Praxis/core-catcher
test/GameNgTest.hs
mit
gameNgTestCase :: GameConfig -> [Action] -> (Either GameError GameState -> IO ()) -> IO () gameNgTestCase config moves assertions = assertions $ foldM (flip updateState) (GameRunning_ $ initialStateFromConfig config) moves
271
gameNgTestCase :: GameConfig -> [Action] -> (Either GameError GameState -> IO ()) -> IO () gameNgTestCase config moves assertions = assertions $ foldM (flip updateState) (GameRunning_ $ initialStateFromConfig config) moves
271
gameNgTestCase config moves assertions = assertions $ foldM (flip updateState) (GameRunning_ $ initialStateFromConfig config) moves
180
false
true
0
11
78
82
40
42
null
null
jhegedus42/svg-tree
src/Graphics/Svg/PathParser.hs
bsd-3-clause
serializePointPair :: (RPoint, RPoint) -> String serializePointPair (a, b) = serializePoint a ++ " " ++ serializePoint b
120
serializePointPair :: (RPoint, RPoint) -> String serializePointPair (a, b) = serializePoint a ++ " " ++ serializePoint b
120
serializePointPair (a, b) = serializePoint a ++ " " ++ serializePoint b
71
false
true
0
7
17
44
23
21
null
null
kim/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/Types.hs
mpl-2.0
-- | Information about the location of application artifacts that are stored and -- the service to retrieve them from. diRevision :: Lens' DeploymentInfo (Maybe RevisionLocation) diRevision = lens _diRevision (\s a -> s { _diRevision = a })
240
diRevision :: Lens' DeploymentInfo (Maybe RevisionLocation) diRevision = lens _diRevision (\s a -> s { _diRevision = a })
121
diRevision = lens _diRevision (\s a -> s { _diRevision = a })
61
true
true
0
9
38
47
26
21
null
null
verement/etamoo
src/MOO/Connection.hs
bsd-3-clause
coDisableOOB = Option "disable-oob" get set where get = truthValue . optionDisableOOB set _ v options = return options { optionDisableOOB = truthOf v }
161
coDisableOOB = Option "disable-oob" get set where get = truthValue . optionDisableOOB set _ v options = return options { optionDisableOOB = truthOf v }
161
coDisableOOB = Option "disable-oob" get set where get = truthValue . optionDisableOOB set _ v options = return options { optionDisableOOB = truthOf v }
161
false
false
1
9
34
51
25
26
null
null
andrewmichaud/JustSudoku
src/Sudoku/Data/Board/Internal.hs
bsd-3-clause
subgridHelper :: Int -> [Location] subgridHelper 0 = [Loc r c | r <- [0..2], c <- [0..2]]
89
subgridHelper :: Int -> [Location] subgridHelper 0 = [Loc r c | r <- [0..2], c <- [0..2]]
89
subgridHelper 0 = [Loc r c | r <- [0..2], c <- [0..2]]
54
false
true
0
8
17
55
29
26
null
null
markuspf/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
usable True uf depthlimit n ns = do ES ls num b <- get if b then return (False, ns) else case lookup n ls of Just 0 -> return (False, ns) Just i -> return (True, ns) _ -> return (False, ns)
270
usable True uf depthlimit n ns = do ES ls num b <- get if b then return (False, ns) else case lookup n ls of Just 0 -> return (False, ns) Just i -> return (True, ns) _ -> return (False, ns)
270
usable True uf depthlimit n ns = do ES ls num b <- get if b then return (False, ns) else case lookup n ls of Just 0 -> return (False, ns) Just i -> return (True, ns) _ -> return (False, ns)
270
false
false
0
12
123
114
55
59
null
null
NICTA/tickle
src/Data/Tickle/Get.hs
bsd-3-clause
_Integer1TagUnexpectedEof :: Prism' IntegerError () _Integer1TagUnexpectedEof = prism' (\() -> Integer1TagUnexpectedEof) (\x -> case x of Integer1TagUnexpectedEof -> Just () _ -> Nothing)
255
_Integer1TagUnexpectedEof :: Prism' IntegerError () _Integer1TagUnexpectedEof = prism' (\() -> Integer1TagUnexpectedEof) (\x -> case x of Integer1TagUnexpectedEof -> Just () _ -> Nothing)
255
_Integer1TagUnexpectedEof = prism' (\() -> Integer1TagUnexpectedEof) (\x -> case x of Integer1TagUnexpectedEof -> Just () _ -> Nothing)
201
false
true
0
11
90
64
32
32
null
null
JPMoresmau/leksah
src/IDE/Package.hs
gpl-2.0
-- | get executable to run -- no exe activated, take first one exeToRun :: Maybe Text -> [Executable] -> [Executable] exeToRun Nothing (exe:_) = [exe]
152
exeToRun :: Maybe Text -> [Executable] -> [Executable] exeToRun Nothing (exe:_) = [exe]
87
exeToRun Nothing (exe:_) = [exe]
32
true
true
0
7
27
45
25
20
null
null
gumgl/project-euler
92/92.hs
mit
chain n = if (n == 89 || n == 1) then [n] else n : chain (step n)
77
chain n = if (n == 89 || n == 1) then [n] else n : chain (step n)
77
chain n = if (n == 89 || n == 1) then [n] else n : chain (step n)
77
false
false
3
9
30
53
25
28
null
null
nevrenato/Hets_Fork
HasCASL/DataAna.hs
gpl-2.0
subIds :: TypeMap -> Id -> Set.Set Id subIds tm i = foldr ( \ j s -> if Set.member i $ superIds tm j then Set.insert j s else s) Set.empty $ Map.keys tm
191
subIds :: TypeMap -> Id -> Set.Set Id subIds tm i = foldr ( \ j s -> if Set.member i $ superIds tm j then Set.insert j s else s) Set.empty $ Map.keys tm
191
subIds tm i = foldr ( \ j s -> if Set.member i $ superIds tm j then Set.insert j s else s) Set.empty $ Map.keys tm
153
false
true
0
12
73
84
41
43
null
null
luisgepeto/HaskellLearning
02 Starting Out/03_intro_to_lists.hs
mit
maximum' = maximum [1,9,2,3,4]
30
maximum' = maximum [1,9,2,3,4]
30
maximum' = maximum [1,9,2,3,4]
30
false
false
0
6
3
24
14
10
null
null
garykrige/project_euler
Haskell/Math/Combinat/Permutations.hs
gpl-2.0
asc2B_algorithm_L :: (Eq a, Ord a) => [a] -> [[a]] fasc2B_algorithm_L xs = unfold1 next (sort xs) where -- next :: [a] -> Maybe [a] next xs = case findj (reverse xs,[]) of Nothing -> Nothing Just ( (l:ls) , rs) -> Just $ inc l ls (reverse rs,[]) Just ( [] , _ ) -> error "permute: should not happen" ...
929
fasc2B_algorithm_L :: (Eq a, Ord a) => [a] -> [[a]] fasc2B_algorithm_L xs = unfold1 next (sort xs) where -- next :: [a] -> Maybe [a] next xs = case findj (reverse xs,[]) of Nothing -> Nothing Just ( (l:ls) , rs) -> Just $ inc l ls (reverse rs,[]) Just ( [] , _ ) -> error "permute: should not happen" ...
928
fasc2B_algorithm_L xs = unfold1 next (sort xs) where -- next :: [a] -> Maybe [a] next xs = case findj (reverse xs,[]) of Nothing -> Nothing Just ( (l:ls) , rs) -> Just $ inc l ls (reverse rs,[]) Just ( [] , _ ) -> error "permute: should not happen" -- we use simple list zippers: (left,right) -- f...
876
false
true
0
13
253
383
207
176
null
null
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.RequestHeader.hs
bsd-3-clause
parseHeaderLines (firstLine:otherLines) = do (method, path', query, httpversion) <- parseRequestLine firstLine let path = H.extractPath path' hdr = map parseHeader otherLines return (method, path', path, query, httpversion, hdr) ---------------------------------------------------------------- -- |...
783
parseHeaderLines (firstLine:otherLines) = do (method, path', query, httpversion) <- parseRequestLine firstLine let path = H.extractPath path' hdr = map parseHeader otherLines return (method, path', path, query, httpversion, hdr) ---------------------------------------------------------------- -- |...
783
parseHeaderLines (firstLine:otherLines) = do (method, path', query, httpversion) <- parseRequestLine firstLine let path = H.extractPath path' hdr = map parseHeader otherLines return (method, path', path, query, httpversion, hdr) ---------------------------------------------------------------- -- |...
783
false
false
0
11
109
99
58
41
null
null
wjdhamilton/ig-haskell
src/IG/Realtime.hs
bsd-3-clause
-- | Url segment to create a session createSess :: Text createSess = "/create_session.txt"
90
createSess :: Text createSess = "/create_session.txt"
53
createSess = "/create_session.txt"
34
true
true
0
4
13
12
7
5
null
null
christiaanb/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
ideslaveProcess :: FilePath -> Command -> Idris () ideslaveProcess fn Help = process fn Help
92
ideslaveProcess :: FilePath -> Command -> Idris () ideslaveProcess fn Help = process fn Help
92
ideslaveProcess fn Help = process fn Help
41
false
true
0
9
14
38
17
21
null
null
haroldcarr/learn-haskell-coq-ml-etc
math-and-functional-programming/2009-Handbook_of_Practical_Logic_and_Automated_Reasoning/src/X_2_5_Simplification_and_NNF.hs
unlicense
tps1 = U.t "tps1" (pp (psimplify (pr "(T -> (x <-> F)) -> ~(y v F ^ z)"))) "~x -> ~y"
93
tps1 = U.t "tps1" (pp (psimplify (pr "(T -> (x <-> F)) -> ~(y v F ^ z)"))) "~x -> ~y"
93
tps1 = U.t "tps1" (pp (psimplify (pr "(T -> (x <-> F)) -> ~(y v F ^ z)"))) "~x -> ~y"
93
false
false
1
10
28
39
16
23
null
null
jekor/jigplate
jigplate.hs
mit
jig :: Value -> [JigPlate] -> JigPlate -- Find all slots. Check if the object fulfills them. Fill them if so. -- TODO: Check that all slots are matched. jig (Object obj) jps = case matchJig obj jps of [] -> error "no matching templates found" (jp:_) -> fillSlots jp ...
1,167
jig :: Value -> [JigPlate] -> JigPlate jig (Object obj) jps = case matchJig obj jps of [] -> error "no matching templates found" (jp:_) -> fillSlots jp obj where matchJig :: HashMap Text Value -> [JigPlate] -> [JigPlate] matchJig hash = filter (\jp -> (sort ...
1,053
jig (Object obj) jps = case matchJig obj jps of [] -> error "no matching templates found" (jp:_) -> fillSlots jp obj where matchJig :: HashMap Text Value -> [JigPlate] -> [JigPlate] matchJig hash = filter (\jp -> (sort $ slots jp) \\ (sort $ map unpack $ key...
1,014
true
true
3
12
455
402
196
206
null
null
amoerie/labyrinth
Labyrinth/Models.hs
mit
rotateClockWise South = West
28
rotateClockWise South = West
28
rotateClockWise South = West
28
false
false
0
5
3
9
4
5
null
null
xenog/haskoin
src/Network/Haskoin/Network/Types.hs
unlicense
nodeNetwork :: Word64 nodeNetwork = 1
37
nodeNetwork :: Word64 nodeNetwork = 1
37
nodeNetwork = 1
15
false
true
0
4
5
11
6
5
null
null
typedvar/hLand
hcore/GMachine.hs
mit
gmDispatch (Pop n) = pop n
26
gmDispatch (Pop n) = pop n
26
gmDispatch (Pop n) = pop n
26
false
false
0
7
5
18
8
10
null
null
haskell-distributed/distributed-process-client-server
src/Control/Distributed/Process/ManagedProcess/Internal/GenProcess.hs
bsd-3-clause
applyPolicy :: UnhandledMessagePolicy -> s -> Message -> Process (ProcessAction s) applyPolicy p s m = case p of Terminate -> stop $ ExitOther "UnhandledInput" DeadLetter pid -> forward m pid >> continue s Drop -> continue s Log -> logIt >>...
438
applyPolicy :: UnhandledMessagePolicy -> s -> Message -> Process (ProcessAction s) applyPolicy p s m = case p of Terminate -> stop $ ExitOther "UnhandledInput" DeadLetter pid -> forward m pid >> continue s Drop -> continue s Log -> logIt >>...
438
applyPolicy p s m = case p of Terminate -> stop $ ExitOther "UnhandledInput" DeadLetter pid -> forward m pid >> continue s Drop -> continue s Log -> logIt >> continue s where logIt = Log.report Log.info Log.logChannel $ "Unhandled Gen Input Message: " ++ (show m)
319
false
true
5
10
150
113
55
58
null
null
ezyang/ghc
compiler/main/HscTypes.hs
bsd-3-clause
tyThingTyCon other = pprPanic "tyThingTyCon" (ppr other)
62
tyThingTyCon other = pprPanic "tyThingTyCon" (ppr other)
62
tyThingTyCon other = pprPanic "tyThingTyCon" (ppr other)
62
false
false
0
7
12
20
9
11
null
null
drakedevel/wcc
Language/While/Compiler.hs
bsd-3-clause
produceState (Decrement v) = do sSeekRC0 <- newState sSeekRC1 <- newState sSeekL0 <- newState sSeekL <- newState sEnd <- newState modify $ addTransition sSeekRC1 [(Zero, v)] sSeekRC1 [(One, v)] 1 modify $ addTransition sSeekRC1 [(One, v)] sSeekRC0 [(Zero, v)] 1 modify $ addTransition sSeekRC1 [(Hash,...
779
produceState (Decrement v) = do sSeekRC0 <- newState sSeekRC1 <- newState sSeekL0 <- newState sSeekL <- newState sEnd <- newState modify $ addTransition sSeekRC1 [(Zero, v)] sSeekRC1 [(One, v)] 1 modify $ addTransition sSeekRC1 [(One, v)] sSeekRC0 [(Zero, v)] 1 modify $ addTransition sSeekRC1 [(Hash,...
779
produceState (Decrement v) = do sSeekRC0 <- newState sSeekRC1 <- newState sSeekL0 <- newState sSeekL <- newState sEnd <- newState modify $ addTransition sSeekRC1 [(Zero, v)] sSeekRC1 [(One, v)] 1 modify $ addTransition sSeekRC1 [(One, v)] sSeekRC0 [(Zero, v)] 1 modify $ addTransition sSeekRC1 [(Hash,...
779
false
false
0
10
160
384
198
186
null
null
green-haskell/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
-- | Placement behaviour we want for the ticks tickishPlace :: Tickish id -> TickishPlacement tickishPlace n@ProfNote{} | profNoteCount n = PlaceRuntime | otherwise = PlaceCostCentre
206
tickishPlace :: Tickish id -> TickishPlacement tickishPlace n@ProfNote{} | profNoteCount n = PlaceRuntime | otherwise = PlaceCostCentre
159
tickishPlace n@ProfNote{} | profNoteCount n = PlaceRuntime | otherwise = PlaceCostCentre
112
true
true
1
8
49
46
22
24
null
null
creichert/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
nestDec = nestedUpdateOp Subtract
33
nestDec = nestedUpdateOp Subtract
33
nestDec = nestedUpdateOp Subtract
33
false
false
0
5
3
9
4
5
null
null
raichoo/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
unitCon = sUN "MkUnit"
23
unitCon = sUN "MkUnit"
23
unitCon = sUN "MkUnit"
23
false
false
0
5
4
9
4
5
null
null
htquach/HaskellLED
CharsLookup.hs
mit
stringToMatrix s@(c:cs) | isJust (specialStrings s) = fromJust (specialStrings s) | otherwise = concatMatrixWithSeparator (letterToMatrix c) (stringToMatrix cs)
184
stringToMatrix s@(c:cs) | isJust (specialStrings s) = fromJust (specialStrings s) | otherwise = concatMatrixWithSeparator (letterToMatrix c) (stringToMatrix cs)
184
stringToMatrix s@(c:cs) | isJust (specialStrings s) = fromJust (specialStrings s) | otherwise = concatMatrixWithSeparator (letterToMatrix c) (stringToMatrix cs)
184
false
false
0
10
41
69
32
37
null
null
lamefun/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
outRn :: Name -> RnM () outRn name = RnM (const ((),[name]))
60
outRn :: Name -> RnM () outRn name = RnM (const ((),[name]))
60
outRn name = RnM (const ((),[name]))
36
false
true
0
9
11
43
22
21
null
null
rvion/stack
src/Stack/Types/Config.hs
bsd-3-clause
indexNameText :: IndexName -> Text indexNameText = decodeUtf8 . unIndexName
75
indexNameText :: IndexName -> Text indexNameText = decodeUtf8 . unIndexName
75
indexNameText = decodeUtf8 . unIndexName
40
false
true
0
5
9
19
10
9
null
null
danchoi/jsonextfilter
Main.hs
mit
pKeyPath :: AT.Parser KeyPath pKeyPath = KeyPath <$> (AT.sepBy1 pKeyOrIndex (AT.takeWhile1 $ AT.inClass ".["))
115
pKeyPath :: AT.Parser KeyPath pKeyPath = KeyPath <$> (AT.sepBy1 pKeyOrIndex (AT.takeWhile1 $ AT.inClass ".["))
115
pKeyPath = KeyPath <$> (AT.sepBy1 pKeyOrIndex (AT.takeWhile1 $ AT.inClass ".["))
85
false
true
2
11
18
46
22
24
null
null
mgaut72/cbf
src/Language/BrainFuck/Compile.hs
mit
indent = unlines . map ('\t':) . lines
38
indent = unlines . map ('\t':) . lines
38
indent = unlines . map ('\t':) . lines
38
false
false
0
8
7
21
11
10
null
null
AlbinTheander/oden
src/Oden/Lexer.hs
mit
parens :: Parser a -> Parser a parens = Tok.parens lexer
56
parens :: Parser a -> Parser a parens = Tok.parens lexer
56
parens = Tok.parens lexer
25
false
true
0
6
10
26
12
14
null
null
cirquit/Personal-Repository
Haskell/Playground/Criterion/ThiscrashesGHC.hs
mit
treeMap :: (a -> b) -> Tree a -> Tree b treeMap f Empty = Empty
70
treeMap :: (a -> b) -> Tree a -> Tree b treeMap f Empty = Empty
70
treeMap f Empty = Empty
30
false
true
0
7
22
37
18
19
null
null
spacekitteh/compdata
benchmark/Functions/Standard/Eval.hs
bsd-3-clause
evalSugar2 (POr x y) = (\ x y -> SBool (x || y)) (coerceBool2 $ evalSugar2 x) (coerceBool2 $ evalSugar2 y)
106
evalSugar2 (POr x y) = (\ x y -> SBool (x || y)) (coerceBool2 $ evalSugar2 x) (coerceBool2 $ evalSugar2 y)
106
evalSugar2 (POr x y) = (\ x y -> SBool (x || y)) (coerceBool2 $ evalSugar2 x) (coerceBool2 $ evalSugar2 y)
106
false
false
0
10
20
62
31
31
null
null
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs
mpl-2.0
-- | Creates a value of 'User' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'uEtag' -- -- * 'uProject' -- -- * 'uKind' -- -- * 'uSQLserverUserDetails' -- -- * 'uName' -- -- * 'uPassword' -- -- * 'uHost' -- -- * 'uType' -- -- * 'uIns...
598
user :: User user = User' { _uEtag = Nothing , _uProject = Nothing , _uKind = Nothing , _uSQLserverUserDetails = Nothing , _uName = Nothing , _uPassword = Nothing , _uHost = Nothing , _uType = Nothing , _uInstance = Nothing }
271
user = User' { _uEtag = Nothing , _uProject = Nothing , _uKind = Nothing , _uSQLserverUserDetails = Nothing , _uName = Nothing , _uPassword = Nothing , _uHost = Nothing , _uType = Nothing , _uInstance = Nothing }
254
true
true
0
7
154
98
66
32
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrelNames.hs
bsd-3-clause
eq_RDR, ge_RDR, ne_RDR, le_RDR, lt_RDR, gt_RDR, compare_RDR, ltTag_RDR, eqTag_RDR, gtTag_RDR :: RdrName eq_RDR = nameRdrName eqName
152
eq_RDR, ge_RDR, ne_RDR, le_RDR, lt_RDR, gt_RDR, compare_RDR, ltTag_RDR, eqTag_RDR, gtTag_RDR :: RdrName eq_RDR = nameRdrName eqName
152
eq_RDR = nameRdrName eqName
44
false
true
0
5
36
32
25
7
null
null
mitchellwrosen/language-lua2
src/Language/Lua/Token.hs
bsd-3-clause
showToken TkEq = "=="
32
showToken TkEq = "=="
32
showToken TkEq = "=="
32
false
false
0
5
14
9
4
5
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Bare/Expand.hs
bsd-3-clause
expandPred (PAll xs p) = PAll xs <$> expandPred p
51
expandPred (PAll xs p) = PAll xs <$> expandPred p
51
expandPred (PAll xs p) = PAll xs <$> expandPred p
51
false
false
0
7
11
27
12
15
null
null
elieux/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
isUnliftedLPat (L _ (TuplePat _ Unboxed _)) = True
50
isUnliftedLPat (L _ (TuplePat _ Unboxed _)) = True
50
isUnliftedLPat (L _ (TuplePat _ Unboxed _)) = True
50
false
false
0
9
8
27
13
14
null
null
adarqui/99problems-hs
Experimentation/P05.hs
gpl-3.0
p05_tests = TestList [ TestLabel "test_reverse_rec" test_reverse_rec, TestLabel "test_reverse_nat" test_reverse_nat, TestLabel "test_reverse_fold" test_reverse_fold, TestLabel "test_reverse_fold_2" test_reverse_fold_2 ]
224
p05_tests = TestList [ TestLabel "test_reverse_rec" test_reverse_rec, TestLabel "test_reverse_nat" test_reverse_nat, TestLabel "test_reverse_fold" test_reverse_fold, TestLabel "test_reverse_fold_2" test_reverse_fold_2 ]
224
p05_tests = TestList [ TestLabel "test_reverse_rec" test_reverse_rec, TestLabel "test_reverse_nat" test_reverse_nat, TestLabel "test_reverse_fold" test_reverse_fold, TestLabel "test_reverse_fold_2" test_reverse_fold_2 ]
224
false
false
0
7
21
41
20
21
null
null
oldmanmike/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
genLit _ (CmmFloat r w) = return (LMLitVar $ LMFloatLit (fromRational r) (widthToLlvmFloat w), nilOL, [])
121
genLit _ (CmmFloat r w) = return (LMLitVar $ LMFloatLit (fromRational r) (widthToLlvmFloat w), nilOL, [])
121
genLit _ (CmmFloat r w) = return (LMLitVar $ LMFloatLit (fromRational r) (widthToLlvmFloat w), nilOL, [])
121
false
false
1
10
31
56
27
29
null
null
Purview/purview
test/Test/Graphics/Forensics/Image.hs
gpl-3.0
testGroup :: Test testGroup = $(testGroupGenerator)
51
testGroup :: Test testGroup = $(testGroupGenerator)
51
testGroup = $(testGroupGenerator)
33
false
true
0
6
5
15
8
7
null
null
jdreaver/oanda-rest-api
src/OANDA/Instrument.hs
bsd-3-clause
granularityToDiffTime H12 = 12 * 60 * 60
40
granularityToDiffTime H12 = 12 * 60 * 60
40
granularityToDiffTime H12 = 12 * 60 * 60
40
false
false
2
5
7
21
8
13
null
null
albertov/hs-mapnik
bindings/src/Mapnik/Bindings/Map.hs
bsd-3-clause
getBackgroundImageCompOp :: Map -> IO (Maybe CompositeMode) getBackgroundImageCompOp m = fmap (fmap (toEnum . fromIntegral) ) $ newMaybe $ \(has, p) -> [C.block| void { composite_mode_e mode = $fptr-ptr:(Map *m)->background_image_comp_op(); Map def; if (mode != def.background_image_comp_op()) { ...
431
getBackgroundImageCompOp :: Map -> IO (Maybe CompositeMode) getBackgroundImageCompOp m = fmap (fmap (toEnum . fromIntegral) ) $ newMaybe $ \(has, p) -> [C.block| void { composite_mode_e mode = $fptr-ptr:(Map *m)->background_image_comp_op(); Map def; if (mode != def.background_image_comp_op()) { ...
431
getBackgroundImageCompOp m = fmap (fmap (toEnum . fromIntegral) ) $ newMaybe $ \(has, p) -> [C.block| void { composite_mode_e mode = $fptr-ptr:(Map *m)->background_image_comp_op(); Map def; if (mode != def.background_image_comp_op()) { *$(int *has) = 1; *$(int *p) = static_cast<int>(mode);...
371
false
true
0
11
101
68
37
31
null
null
Michaelt293/isotope
src/Isotope/Base.hs
gpl-3.0
-- | Integer masses for all naturally-occurring isotopes for an element. integerMasses :: ElementSymbol -> [IntegerMass] integerMasses = elementIntegerMasses . findElement
171
integerMasses :: ElementSymbol -> [IntegerMass] integerMasses = elementIntegerMasses . findElement
98
integerMasses = elementIntegerMasses . findElement
50
true
true
0
8
20
30
14
16
null
null
nbloomf/carl
src/Carl/Algebra/Ring.hs
gpl-3.0
rIntMeanDev ks = do ts <- sequence $ map rInjInt ks rMeanDev ts
67
rIntMeanDev ks = do ts <- sequence $ map rInjInt ks rMeanDev ts
67
rIntMeanDev ks = do ts <- sequence $ map rInjInt ks rMeanDev ts
67
false
false
0
9
16
31
13
18
null
null
raymoo/needles
src/Needles/Bot/Trigger.hs
gpl-3.0
rank :: MessageInfo -> Char rank (MIChat _ w _) = userRank w
60
rank :: MessageInfo -> Char rank (MIChat _ w _) = userRank w
60
rank (MIChat _ w _) = userRank w
32
false
true
0
7
12
31
15
16
null
null
HIPERFIT/futhark
src/Futhark/Construct.hs
isc
eRoundToMultipleOf :: MonadBuilder m => IntType -> m (Exp (Rep m)) -> m (Exp (Rep m)) -> m (Exp (Rep m)) eRoundToMultipleOf t x d = ePlus x (eMod (eMinus d (eMod x d)) d) where eMod = eBinOp (SMod t Unsafe) eMinus = eBinOp (Sub t OverflowWrap) ePlus = eBinOp (Add t OverflowWrap) -- | Construc...
383
eRoundToMultipleOf :: MonadBuilder m => IntType -> m (Exp (Rep m)) -> m (Exp (Rep m)) -> m (Exp (Rep m)) eRoundToMultipleOf t x d = ePlus x (eMod (eMinus d (eMod x d)) d) where eMod = eBinOp (SMod t Unsafe) eMinus = eBinOp (Sub t OverflowWrap) ePlus = eBinOp (Add t OverflowWrap) -- | Construc...
383
eRoundToMultipleOf t x d = ePlus x (eMod (eMinus d (eMod x d)) d) where eMod = eBinOp (SMod t Unsafe) eMinus = eBinOp (Sub t OverflowWrap) ePlus = eBinOp (Add t OverflowWrap) -- | Construct an 'Index' expressions that slices an array with unit stride.
268
false
true
2
13
93
163
79
84
null
null
locaweb/leela
src/warpdrive/src/Leela/Data/EventTree.hs
apache-2.0
stopDistribution :: Distribution a b -> IO () stopDistribution d = maybe (return ()) killThread =<< tryTakeMVar (dThread d)
123
stopDistribution :: Distribution a b -> IO () stopDistribution d = maybe (return ()) killThread =<< tryTakeMVar (dThread d)
123
stopDistribution d = maybe (return ()) killThread =<< tryTakeMVar (dThread d)
77
false
true
0
9
18
54
25
29
null
null
HJvT/com
System/Win32/Com/Server.hs
bsd-3-clause
unmarshallVTable :: VTable iid objState -> IO [Ptr ()] unmarshallVTable (vtbl, no_meths) = mapM (peekElemOff vtbl) [(0::Int)..no_meths]
137
unmarshallVTable :: VTable iid objState -> IO [Ptr ()] unmarshallVTable (vtbl, no_meths) = mapM (peekElemOff vtbl) [(0::Int)..no_meths]
137
unmarshallVTable (vtbl, no_meths) = mapM (peekElemOff vtbl) [(0::Int)..no_meths]
82
false
true
0
9
18
62
32
30
null
null
Zigazou/Sonnex
src/Text/Sonnex.hs
gpl-3.0
sonx ('a':'u':cs) = 'o':sonx cs
31
sonx ('a':'u':cs) = 'o':sonx cs
31
sonx ('a':'u':cs) = 'o':sonx cs
31
false
false
0
8
4
27
13
14
null
null
graninas/The-Amoeba-World
src/Amoeba/Application/Game/Engine/Runtime.hs
gpl-3.0
mkViewRuntime :: ViewAccessor -> GameLogicAccessor -> ViewRt mkViewRuntime = ViewRt
83
mkViewRuntime :: ViewAccessor -> GameLogicAccessor -> ViewRt mkViewRuntime = ViewRt
83
mkViewRuntime = ViewRt
22
false
true
0
8
9
26
11
15
null
null
roberth/uu-helium
test/runtimeerrors/Index1.hs
gpl-3.0
main = [1,2,3] !! (-10)
23
main = [1,2,3] !! (-10)
23
main = [1,2,3] !! (-10)
23
false
false
0
7
4
24
14
10
null
null
tabemann/amphibian
src_old/Network/IRC/Client/Amphibian/Monad.hs
bsd-3-clause
registerConnectionManager :: ConnectionManager -> AM () registerConnectionManager manager = do intf <- getInterface liftIO . atomically $ I.registerConnectionManager intf manager -- | Unregister connection manager.
219
registerConnectionManager :: ConnectionManager -> AM () registerConnectionManager manager = do intf <- getInterface liftIO . atomically $ I.registerConnectionManager intf manager -- | Unregister connection manager.
219
registerConnectionManager manager = do intf <- getInterface liftIO . atomically $ I.registerConnectionManager intf manager -- | Unregister connection manager.
163
false
true
0
9
29
49
23
26
null
null
glutamate/tnutils
TNUtils.hs
bsd-3-clause
snd4 (_,x,_,_) = x
18
snd4 (_,x,_,_) = x
18
snd4 (_,x,_,_) = x
18
false
false
0
5
3
22
12
10
null
null
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/TexSub.hs
bsd-3-clause
main :: IO () main = do (progName, _args) <- getArgsAndInitialize initialDisplayMode $= [ SingleBuffered, RGBMode, WithDepthBuffer ] initialWindowSize $= Size 250 250 initialWindowPosition $= Position 100 100 createWindow progName -- we have to do this *after* createWindow, otherwise we have no OpenGL...
864
main :: IO () main = do (progName, _args) <- getArgsAndInitialize initialDisplayMode $= [ SingleBuffered, RGBMode, WithDepthBuffer ] initialWindowSize $= Size 250 250 initialWindowPosition $= Position 100 100 createWindow progName -- we have to do this *after* createWindow, otherwise we have no OpenGL...
864
main = do (progName, _args) <- getArgsAndInitialize initialDisplayMode $= [ SingleBuffered, RGBMode, WithDepthBuffer ] initialWindowSize $= Size 250 250 initialWindowPosition $= Position 100 100 createWindow progName -- we have to do this *after* createWindow, otherwise we have no OpenGL context ve...
850
false
true
0
11
178
188
85
103
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_02/hello.hs
mit
main :: IO () main = do (expr:_) <- getArgs putStrLn (readExpr expr) ---- Exercises -- Rewrite parseNumber, without liftM, using do-notation
159
main :: IO () main = do (expr:_) <- getArgs putStrLn (readExpr expr) ---- Exercises -- Rewrite parseNumber, without liftM, using do-notation
159
main = do (expr:_) <- getArgs putStrLn (readExpr expr) ---- Exercises -- Rewrite parseNumber, without liftM, using do-notation
145
false
true
0
10
40
50
23
27
null
null
kmate/imperative-edsl
examples/Concurrent.hs
bsd-3-clause
mapFile :: (CExp Float -> CExp Float) -> FilePath -> Prog () mapFile f i = do c1 <- newCloseableChan (5 :: CExp Word32) c2 <- newCloseableChan (5 :: CExp Word32) fi <- fopen i ReadMode t1 <- fork $ do while (return true) $ do x <- readChan c1 readOK <- lastChanReadOK c1 iff readOK ...
783
mapFile :: (CExp Float -> CExp Float) -> FilePath -> Prog () mapFile f i = do c1 <- newCloseableChan (5 :: CExp Word32) c2 <- newCloseableChan (5 :: CExp Word32) fi <- fopen i ReadMode t1 <- fork $ do while (return true) $ do x <- readChan c1 readOK <- lastChanReadOK c1 iff readOK ...
783
mapFile f i = do c1 <- newCloseableChan (5 :: CExp Word32) c2 <- newCloseableChan (5 :: CExp Word32) fi <- fopen i ReadMode t1 <- fork $ do while (return true) $ do x <- readChan c1 readOK <- lastChanReadOK c1 iff readOK (void $ writeChan c2 (f x)) (closeChan c2 >> break) ...
722
false
true
0
19
269
340
152
188
null
null
dolio/vector
tests/Tests/Vector.hs
bsd-3-clause
testGeneralStorableVector :: forall a. (CommonContext a Data.Vector.Storable.Vector, Data.Vector.Storable.Storable a, Ord a) => Data.Vector.Storable.Vector a -> [Test] testGeneralStorableVector dummy = concatMap ($ dummy) [ testSanity, testPolymorphicFunctions, testOrdFunctions, testMono...
337
testGeneralStorableVector :: forall a. (CommonContext a Data.Vector.Storable.Vector, Data.Vector.Storable.Storable a, Ord a) => Data.Vector.Storable.Vector a -> [Test] testGeneralStorableVector dummy = concatMap ($ dummy) [ testSanity, testPolymorphicFunctions, testOrdFunctions, testMono...
337
testGeneralStorableVector dummy = concatMap ($ dummy) [ testSanity, testPolymorphicFunctions, testOrdFunctions, testMonoidFunctions ]
169
false
true
0
9
63
85
49
36
null
null
vdweegen/UvA-Software_Testing
Lab4/Bauke/Exercises.hs
gpl-3.0
prop_differenceLength (Positive n) = monadicIO $ do result <- run $ validateDifferenceLength n assert (result)
114
prop_differenceLength (Positive n) = monadicIO $ do result <- run $ validateDifferenceLength n assert (result)
114
prop_differenceLength (Positive n) = monadicIO $ do result <- run $ validateDifferenceLength n assert (result)
114
false
false
0
10
18
43
19
24
null
null
phylake/avm3
abc/util.hs
mit
--toBytes {- 0x8A -} --toBytes {- 0x8B -} --toBytes {- 0x8C -} --toBytes {- 0x8D -} --toBytes {- 0x8E -} --toBytes {- 0x8F -} {-negate_p-} toBytes {- 0x90 -} (Negate) = 1
182
toBytes {- 0x90 -} (Negate) = 1
31
toBytes {- 0x90 -} (Negate) = 1
31
true
false
0
6
43
19
13
6
null
null
susoDominguez/eNominalTerms-Alpha
TrmX_Actions.hs
unlicense
atmsTrm (VarTrm asb p _) = allAtmsAsb asb `S.union` atmsPrm p
61
atmsTrm (VarTrm asb p _) = allAtmsAsb asb `S.union` atmsPrm p
61
atmsTrm (VarTrm asb p _) = allAtmsAsb asb `S.union` atmsPrm p
61
false
false
0
7
10
33
16
17
null
null
JustusAdam/servestatic
src/Snap/Snaplet/DocumentServer.hs
bsd-3-clause
serveDocument :: Handler b DocumentServer () serveDocument = do requestedPath <- getDocServerPath absolutePath <- absolutize requestedPath isFile <- liftIO $ doesFileExist absolutePath if isFile then do compiled <- liftIO $ compile absolutePath breadc <- breadcrumbs let embed = respHtml . ...
514
serveDocument :: Handler b DocumentServer () serveDocument = do requestedPath <- getDocServerPath absolutePath <- absolutize requestedPath isFile <- liftIO $ doesFileExist absolutePath if isFile then do compiled <- liftIO $ compile absolutePath breadc <- breadcrumbs let embed = respHtml . ...
514
serveDocument = do requestedPath <- getDocServerPath absolutePath <- absolutize requestedPath isFile <- liftIO $ doesFileExist absolutePath if isFile then do compiled <- liftIO $ compile absolutePath breadc <- breadcrumbs let embed = respHtml . documentPage requestedPath breadc case ...
469
false
true
0
17
130
158
71
87
null
null
antalsz/hs-to-coq
examples/graph/graph/Data/Graph/Inductive/NodeMap.hs
mit
insMapNodeM :: (Ord a, DynGraph g) => a -> NodeMapM a b g (LNode a) insMapNodeM = liftM1' insMapNode
100
insMapNodeM :: (Ord a, DynGraph g) => a -> NodeMapM a b g (LNode a) insMapNodeM = liftM1' insMapNode
100
insMapNodeM = liftM1' insMapNode
32
false
true
0
9
18
48
24
24
null
null
holzensp/ghc
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
-- convert a spill slot number to a *byte* offset, with no sign: -- decide on a per arch basis whether you are spilling above or below -- the C stack pointer. spillSlotToOffset :: Platform -> Int -> Int spillSlotToOffset platform slot = 64 + spillSlotSize platform * slot
274
spillSlotToOffset :: Platform -> Int -> Int spillSlotToOffset platform slot = 64 + spillSlotSize platform * slot
115
spillSlotToOffset platform slot = 64 + spillSlotSize platform * slot
71
true
true
2
6
51
40
20
20
null
null
ndmitchell/safe
Safe.hs
bsd-3-clause
scanr1Note, scanl1Note :: Partial => String -> (a -> a -> a) -> [a] -> [a] scanr1Note note f x = withFrozenCallStack $ fromNote note "scanr1Note []" $ scanr1May f x
164
scanr1Note, scanl1Note :: Partial => String -> (a -> a -> a) -> [a] -> [a] scanr1Note note f x = withFrozenCallStack $ fromNote note "scanr1Note []" $ scanr1May f x
164
scanr1Note note f x = withFrozenCallStack $ fromNote note "scanr1Note []" $ scanr1May f x
89
false
true
0
10
30
72
37
35
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | Required. Carrier, such as \`\"UPS\"\` or \`\"Fedex\"\`. The list of -- supported carriers can be retrieved via the \`listSupportedCarriers\` -- method. wbdtCarrier :: Lens' WarehouseBasedDeliveryTime (Maybe Text) wbdtCarrier = lens _wbdtCarrier (\ s a -> s{_wbdtCarrier = a})
283
wbdtCarrier :: Lens' WarehouseBasedDeliveryTime (Maybe Text) wbdtCarrier = lens _wbdtCarrier (\ s a -> s{_wbdtCarrier = a})
125
wbdtCarrier = lens _wbdtCarrier (\ s a -> s{_wbdtCarrier = a})
64
true
true
0
9
41
50
27
23
null
null
anr/prog-haskell
chapter-07.hs
mit
check_parity :: [Bit] -> [Bit] check_parity bits | add_parity octet == bits = octet | otherwise = error "parity error" where octet = take 8 bits -- and redefine:
197
check_parity :: [Bit] -> [Bit] check_parity bits | add_parity octet == bits = octet | otherwise = error "parity error" where octet = take 8 bits -- and redefine:
197
check_parity bits | add_parity octet == bits = octet | otherwise = error "parity error" where octet = take 8 bits -- and redefine:
166
false
true
0
9
64
63
30
33
null
null
averagehat/hello-workflow
shake/src/Lib.hs
bsd-3-clause
groupFastqs fqs = (unpaired, fwd, rev) where fwd = matching "_R1_" fqs rev = matching "_R2_" fqs unpaired = [x | x <- fqs, not (x `elem` (fwd ++ rev))] -- FilePath is an alias for string
203
groupFastqs fqs = (unpaired, fwd, rev) where fwd = matching "_R1_" fqs rev = matching "_R2_" fqs unpaired = [x | x <- fqs, not (x `elem` (fwd ++ rev))] -- FilePath is an alias for string
203
groupFastqs fqs = (unpaired, fwd, rev) where fwd = matching "_R1_" fqs rev = matching "_R2_" fqs unpaired = [x | x <- fqs, not (x `elem` (fwd ++ rev))] -- FilePath is an alias for string
203
false
false
1
12
53
84
44
40
null
null
kazu-yamamoto/wai
wai-extra/Network/Wai/Middleware/RequestLogger/JSON.hs
mit
requestBodyLengthToJSON (KnownLength l) = toJSON l
50
requestBodyLengthToJSON (KnownLength l) = toJSON l
50
requestBodyLengthToJSON (KnownLength l) = toJSON l
50
false
false
0
7
5
18
8
10
null
null
sgillespie/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
word8TyConKey = mkPreludeTyConUnique 61
65
word8TyConKey = mkPreludeTyConUnique 61
65
word8TyConKey = mkPreludeTyConUnique 61
65
false
false
0
5
29
9
4
5
null
null