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
nau/lasca-compiler
src/lib/Lasca/Type.hs
bsd-3-clause
isAny _ = False
15
isAny _ = False
15
isAny _ = False
15
false
false
0
4
3
10
4
6
null
null
Daniel-Diaz/arrow-par
bench/bench.hs
bsd-3-clause
-- FUNCTIONS sum' :: [Integer] -> Integer sum' = foldl' (+) 0
62
sum' :: [Integer] -> Integer sum' = foldl' (+) 0
48
sum' = foldl' (+) 0
19
true
true
0
6
12
26
15
11
null
null
NorfairKing/eden
src/Constants.hs
gpl-2.0
publishLibraryImportsFileName :: String publishLibraryImportsFileName = "libraries" <.> defaultWriteupExtenstion
112
publishLibraryImportsFileName :: String publishLibraryImportsFileName = "libraries" <.> defaultWriteupExtenstion
112
publishLibraryImportsFileName = "libraries" <.> defaultWriteupExtenstion
72
false
true
0
5
7
15
8
7
null
null
mgiles/fit
src/Fit/Internal/Parse.hs
bsd-3-clause
parseValue :: BaseType -> FitParser Value parseValue bt = case bt of FitEnum -> EnumValue <$> word8 FitSInt8 -> SInt8Value <$> int8 FitUInt8 -> UInt8Value <$> word8 FitSInt16 -> SInt16Value <$> archInt16 FitUInt16 -> UInt16Value <$> archWord16 FitSInt32 -> SInt32Value <$> archInt32 FitUInt32 -> U...
839
parseValue :: BaseType -> FitParser Value parseValue bt = case bt of FitEnum -> EnumValue <$> word8 FitSInt8 -> SInt8Value <$> int8 FitUInt8 -> UInt8Value <$> word8 FitSInt16 -> SInt16Value <$> archInt16 FitUInt16 -> UInt16Value <$> archWord16 FitSInt32 -> SInt32Value <$> archInt32 FitUInt32 -> U...
839
parseValue bt = case bt of FitEnum -> EnumValue <$> word8 FitSInt8 -> SInt8Value <$> int8 FitUInt8 -> UInt8Value <$> word8 FitSInt16 -> SInt16Value <$> archInt16 FitUInt16 -> UInt16Value <$> archWord16 FitSInt32 -> SInt32Value <$> archInt32 FitUInt32 -> UInt32Value <$> archWord32 FitString -> ...
797
false
true
0
9
158
171
86
85
null
null
brendanhay/gogol
gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs
mpl-2.0
-- | Inclusive day in YYYY-MM-DD format. When provided, this overrides the -- overall time range of the report for this column only. Must be provided -- together with \`startDate\`. racsEndDate :: Lens' ReportAPIColumnSpec (Maybe Text) racsEndDate = lens _racsEndDate (\ s a -> s{_racsEndDate = a})
300
racsEndDate :: Lens' ReportAPIColumnSpec (Maybe Text) racsEndDate = lens _racsEndDate (\ s a -> s{_racsEndDate = a})
118
racsEndDate = lens _racsEndDate (\ s a -> s{_racsEndDate = a})
64
true
true
0
9
48
50
27
23
null
null
PuZZleDucK/Hls
GOptions.hs
gpl-3.0
timeToFloat :: GnuTime -> Float timeToFloat (GnuTime unit Seconds) = unit
73
timeToFloat :: GnuTime -> Float timeToFloat (GnuTime unit Seconds) = unit
73
timeToFloat (GnuTime unit Seconds) = unit
41
false
true
0
7
10
26
13
13
null
null
diku-dk/futhark
src/Language/Futhark/Interpreter.hs
isc
emptyShape _ = False
20
emptyShape _ = False
20
emptyShape _ = False
20
false
false
0
5
3
9
4
5
null
null
tjakway/ghcjvm
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprCtO (LiteralOrigin lit) = hsep [text "the literal", quotes (ppr lit)]
74
pprCtO (LiteralOrigin lit) = hsep [text "the literal", quotes (ppr lit)]
74
pprCtO (LiteralOrigin lit) = hsep [text "the literal", quotes (ppr lit)]
74
false
false
0
9
12
37
17
20
null
null
orchid-hybrid/absint-study
Ch1_Sign.hs
gpl-2.0
p Neg Zero = Neg
16
p Neg Zero = Neg
16
p Neg Zero = Neg
16
false
false
0
5
4
13
5
8
null
null
damianfral/clay
src/Clay/Display.hs
bsd-3-clause
static, absolute, fixed, relative :: Position static = Position "static"
75
static, absolute, fixed, relative :: Position static = Position "static"
74
static = Position "static"
28
false
true
0
5
12
20
13
7
null
null
ku-fpg/sunroof-compiler
Language/Sunroof/JS/Date.hs
bsd-3-clause
-- | Returns the seconds (from 0-59). -- See: <http://www.w3schools.com/jsref/jsref_getseconds.asp> getSeconds :: JSDate -> JS t JSNumber getSeconds = invoke "getSeconds" ()
175
getSeconds :: JSDate -> JS t JSNumber getSeconds = invoke "getSeconds" ()
73
getSeconds = invoke "getSeconds" ()
35
true
true
0
7
23
34
16
18
null
null
dmjio/hgrev
src/Development/HgRev.hs
mit
hgIsDirty Clean = False
23
hgIsDirty Clean = False
23
hgIsDirty Clean = False
23
false
false
1
5
3
13
4
9
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
specWraps = betweenMany (liquidBeginP >> whiteSpace) (whiteSpace >> liquidEndP)
79
specWraps = betweenMany (liquidBeginP >> whiteSpace) (whiteSpace >> liquidEndP)
79
specWraps = betweenMany (liquidBeginP >> whiteSpace) (whiteSpace >> liquidEndP)
79
false
false
0
7
8
25
13
12
null
null
ryantm/ghc
libraries/base/Foreign/C/String.hs
bsd-3-clause
newCAStringLen :: String -> IO CStringLen newCAStringLen str = do ptr <- mallocArray0 len let go [] n = n `seq` return () -- make it strict in n go (c:cs) n = do pokeElemOff ptr n (castCharToCChar c); go cs (n+1) go str 0 return (ptr, len) where len = length str -- | Marshal a Has...
640
newCAStringLen :: String -> IO CStringLen newCAStringLen str = do ptr <- mallocArray0 len let go [] n = n `seq` return () -- make it strict in n go (c:cs) n = do pokeElemOff ptr n (castCharToCChar c); go cs (n+1) go str 0 return (ptr, len) where len = length str -- | Marshal a Has...
640
newCAStringLen str = do ptr <- mallocArray0 len let go [] n = n `seq` return () -- make it strict in n go (c:cs) n = do pokeElemOff ptr n (castCharToCChar c); go cs (n+1) go str 0 return (ptr, len) where len = length str -- | Marshal a Haskell string into a NUL terminated C string usi...
594
false
true
0
14
156
148
75
73
null
null
lostbean/Hammer
src/Hammer/Math/Array.hs
gpl-3.0
isMatrixSameShape :: Matrix2D -> Matrix2D -> Bool isMatrixSameShape mtr1 mtr2 = (ixSize $ shape mtr1) == (ixSize $ shape mtr2)
126
isMatrixSameShape :: Matrix2D -> Matrix2D -> Bool isMatrixSameShape mtr1 mtr2 = (ixSize $ shape mtr1) == (ixSize $ shape mtr2)
126
isMatrixSameShape mtr1 mtr2 = (ixSize $ shape mtr1) == (ixSize $ shape mtr2)
76
false
true
0
9
19
53
25
28
null
null
mumuki/mulang
src/Language/Mulang/Ast/Visitor.hs
gpl-3.0
extractTerminal (MuChar _) = True
42
extractTerminal (MuChar _) = True
42
extractTerminal (MuChar _) = True
42
false
false
0
7
13
15
7
8
null
null
sfindeisen/algebra-toys
toys.hs
gpl-3.0
gen f start g n = reverse (xcalc start []) where xcalc a t = let b=(f g a) `mod` n in if b `elem` t then t else xcalc b (b:t)
249
gen f start g n = reverse (xcalc start []) where xcalc a t = let b=(f g a) `mod` n in if b `elem` t then t else xcalc b (b:t)
249
gen f start g n = reverse (xcalc start []) where xcalc a t = let b=(f g a) `mod` n in if b `elem` t then t else xcalc b (b:t)
249
false
false
0
11
155
92
47
45
null
null
AndrewRademacher/hs-paypal-rest
src/PayPal/Invoicing.hs
mit
cancelInvoice = undefined
25
cancelInvoice = undefined
25
cancelInvoice = undefined
25
false
false
1
5
2
10
3
7
null
null
myuon/haste-jQuery
Haste/JQuery.hs
mit
setCss :: PropName -> String -> JQuery -> IO JQuery setCss prop v (JQuery q) = JQuery <$> chain "css" prop v q
110
setCss :: PropName -> String -> JQuery -> IO JQuery setCss prop v (JQuery q) = JQuery <$> chain "css" prop v q
110
setCss prop v (JQuery q) = JQuery <$> chain "css" prop v q
58
false
true
0
8
22
52
25
27
null
null
dimara/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pForceFailover :: Field pForceFailover = withDoc "Disallow migration moves and always use failovers" $ defaultFalse "force_failover"
136
pForceFailover :: Field pForceFailover = withDoc "Disallow migration moves and always use failovers" $ defaultFalse "force_failover"
136
pForceFailover = withDoc "Disallow migration moves and always use failovers" $ defaultFalse "force_failover"
112
false
true
0
6
19
21
10
11
null
null
LumiGuide/blaze-react
src/Text/Blaze/Renderer/String.hs
mit
enderMap :: HMS.HashMap T.Text T.Text -> T.Text renderMap = HMS.foldlWithKey' (\acc key val -> acc <> key <> ": " <> val <> "; ") ""
137
renderMap :: HMS.HashMap T.Text T.Text -> T.Text renderMap = HMS.foldlWithKey' (\acc key val -> acc <> key <> ": " <> val <> "; ") ""
137
renderMap = HMS.foldlWithKey' (\acc key val -> acc <> key <> ": " <> val <> "; ") ""
88
false
true
0
11
30
70
33
37
null
null
pierzchalski/cs3161a2
tests/driver/Check.hs
mit
getFlags filename = do v <- doesFileExist filename if v then do str <- concatMap words <$> lines <$> readFile filename return ("expect-fail" `elem` str, delete "expect-fail" str) else return (False, [])
231
getFlags filename = do v <- doesFileExist filename if v then do str <- concatMap words <$> lines <$> readFile filename return ("expect-fail" `elem` str, delete "expect-fail" str) else return (False, [])
231
getFlags filename = do v <- doesFileExist filename if v then do str <- concatMap words <$> lines <$> readFile filename return ("expect-fail" `elem` str, delete "expect-fail" str) else return (False, [])
231
false
false
0
13
60
85
41
44
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
prop_checkPS14a= verify checkPS1Assignments "export PS1=$'\\e[3m; '"
68
prop_checkPS14a= verify checkPS1Assignments "export PS1=$'\\e[3m; '"
68
prop_checkPS14a= verify checkPS1Assignments "export PS1=$'\\e[3m; '"
68
false
false
0
5
5
11
5
6
null
null
bixuanzju/fcore
lib/typeCheck/TypeCheck.hs
bsd-2-clause
checkExpr (L loc (JMethod receiver m args _)) = case receiver of Static c -> do (arg_cs, args') <- mapAndUnzipM inferAgainstAnyJClass args ret_c <- checkMethodCall (Static c) m arg_cs let ret_type = case ret_c of "java.lang.Void" -> Unit -- "char" -> J...
924
checkExpr (L loc (JMethod receiver m args _)) = case receiver of Static c -> do (arg_cs, args') <- mapAndUnzipM inferAgainstAnyJClass args ret_c <- checkMethodCall (Static c) m arg_cs let ret_type = case ret_c of "java.lang.Void" -> Unit -- "char" -> J...
924
checkExpr (L loc (JMethod receiver m args _)) = case receiver of Static c -> do (arg_cs, args') <- mapAndUnzipM inferAgainstAnyJClass args ret_c <- checkMethodCall (Static c) m arg_cs let ret_type = case ret_c of "java.lang.Void" -> Unit -- "char" -> J...
924
false
false
0
16
355
269
128
141
null
null
termite2/tsl
Solver/SMTLib2.hs
bsd-3-clause
subtypes :: Type -> [Type] subtypes (Bool _) = []
54
subtypes :: Type -> [Type] subtypes (Bool _) = []
54
subtypes (Bool _) = []
27
false
true
0
9
14
35
16
19
null
null
diku-dk/futhark
src/Futhark/CodeGen/ImpGen/Multicore/SegHist.hs
isc
updateHisto :: HistOp MCMem -> [VName] -> [Imp.TExp Int64] -> MulticoreGen () updateHisto op arrs bucket = do let acc_params = take (length arrs) $ lambdaParams $ histOp op bind_acc_params = forM_ (zip acc_params arrs) $ \(acc_p, arr) -> copyDWIMFix (paramName acc_p) [] (Var arr) bucket ...
919
updateHisto :: HistOp MCMem -> [VName] -> [Imp.TExp Int64] -> MulticoreGen () updateHisto op arrs bucket = do let acc_params = take (length arrs) $ lambdaParams $ histOp op bind_acc_params = forM_ (zip acc_params arrs) $ \(acc_p, arr) -> copyDWIMFix (paramName acc_p) [] (Var arr) bucket ...
919
updateHisto op arrs bucket = do let acc_params = take (length arrs) $ lambdaParams $ histOp op bind_acc_params = forM_ (zip acc_params arrs) $ \(acc_p, arr) -> copyDWIMFix (paramName acc_p) [] (Var arr) bucket op_body = compileBody' [] $ lambdaBody $ histOp op writeArray arr val = ...
841
false
true
0
14
201
237
115
122
null
null
bombpersons/HaskellAsteroids
src/World.hs
bsd-3-clause
-- Update updateWorld :: Float -> WorldState () updateWorld dt = do return () -- Render
90
updateWorld :: Float -> WorldState () updateWorld dt = do return () -- Render
80
updateWorld dt = do return () -- Render
42
true
true
0
8
18
33
16
17
null
null
maoe/tkyprof
Handler/Reports/Helpers.hs
bsd-2-clause
postProfilingReport :: ProfilingReport -> Handler ReportID postProfilingReport prof = do rs <- getReports' runReports $ insertReport prof rs
144
postProfilingReport :: ProfilingReport -> Handler ReportID postProfilingReport prof = do rs <- getReports' runReports $ insertReport prof rs
144
postProfilingReport prof = do rs <- getReports' runReports $ insertReport prof rs
85
false
true
0
8
21
40
18
22
null
null
nicball/orlin
src/Main.hs
mit
dumpObject :: AST.Module -> IO () dumpObject ast = L.withContext $ \ctx -> do res <- runExceptT . L.withModuleFromAST ctx ast $ \mod -> runExceptT . L.withHostTargetMachine $ \tm -> runExceptT $ L.moduleObject tm mod case res of Left err -> hPutStrLn stderr err Right (Left err) -> hPutStrLn stderr...
424
dumpObject :: AST.Module -> IO () dumpObject ast = L.withContext $ \ctx -> do res <- runExceptT . L.withModuleFromAST ctx ast $ \mod -> runExceptT . L.withHostTargetMachine $ \tm -> runExceptT $ L.moduleObject tm mod case res of Left err -> hPutStrLn stderr err Right (Left err) -> hPutStrLn stderr...
424
dumpObject ast = L.withContext $ \ctx -> do res <- runExceptT . L.withModuleFromAST ctx ast $ \mod -> runExceptT . L.withHostTargetMachine $ \tm -> runExceptT $ L.moduleObject tm mod case res of Left err -> hPutStrLn stderr err Right (Left err) -> hPutStrLn stderr err Right (Right (Left err)) ...
390
false
true
0
17
95
187
87
100
null
null
Schpin/schpin-chassis
schpin_robot_lib/src/Data/SCAD.hs
gpl-3.0
renderSTL :: Filename -> Filename -> IO GHC.IO.Exception.ExitCode renderSTL scad_source stl_file = do system ("openscad -o " ++ stl_file ++ " " ++ scad_source) system ("admesh --write-binary-stl=" ++ stl_file ++ " --no-check " ++ stl_file)
255
renderSTL :: Filename -> Filename -> IO GHC.IO.Exception.ExitCode renderSTL scad_source stl_file = do system ("openscad -o " ++ stl_file ++ " " ++ scad_source) system ("admesh --write-binary-stl=" ++ stl_file ++ " --no-check " ++ stl_file)
255
renderSTL scad_source stl_file = do system ("openscad -o " ++ stl_file ++ " " ++ scad_source) system ("admesh --write-binary-stl=" ++ stl_file ++ " --no-check " ++ stl_file)
189
false
true
0
12
50
78
37
41
null
null
leshchevds/ganeti
test/hs/Test/Ganeti/Types.hs
bsd-2-clause
-- | Tests verify optional checks serialisation. prop_VerifyOptionalChecks_serialisation :: VerifyOptionalChecks -> Property prop_VerifyOptionalChecks_serialisation = testSerialisation
184
prop_VerifyOptionalChecks_serialisation :: VerifyOptionalChecks -> Property prop_VerifyOptionalChecks_serialisation = testSerialisation
135
prop_VerifyOptionalChecks_serialisation = testSerialisation
59
true
true
0
5
14
16
9
7
null
null
paluh/systemd-config
src/System/Systemd/Config/Networkd/Network.hs
bsd-3-clause
showArchitecture S390x = "s390x"
32
showArchitecture S390x = "s390x"
32
showArchitecture S390x = "s390x"
32
false
false
1
5
3
13
4
9
null
null
wskplho/stack
src/Stack/Types/BuildPlan.hs
bsd-3-clause
-- | Parse the short representation of a 'SnapName'. parseSnapName :: MonadThrow m => Text -> m SnapName parseSnapName t0 = case lts <|> nightly of Nothing -> throwM $ ParseSnapNameException t0 Just sn -> return sn where lts = do t1 <- T.stripPrefix "lts-" t0 Right (x, t2) <- J...
540
parseSnapName :: MonadThrow m => Text -> m SnapName parseSnapName t0 = case lts <|> nightly of Nothing -> throwM $ ParseSnapNameException t0 Just sn -> return sn where lts = do t1 <- T.stripPrefix "lts-" t0 Right (x, t2) <- Just $ decimal t1 t3 <- T.stripPrefix "." t2 ...
487
parseSnapName t0 = case lts <|> nightly of Nothing -> throwM $ ParseSnapNameException t0 Just sn -> return sn where lts = do t1 <- T.stripPrefix "lts-" t0 Right (x, t2) <- Just $ decimal t1 t3 <- T.stripPrefix "." t2 Right (y, "") <- Just $ decimal t3 re...
435
true
true
1
12
170
195
89
106
null
null
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/Graphics/UI/GLUT/Constants.hs
bsd-3-clause
glut_SINGLE = 0x0000
47
glut_SINGLE = 0x0000
47
glut_SINGLE = 0x0000
47
false
false
0
4
29
6
3
3
null
null
OS2World/DEV-UTIL-HUGS
oldlib/BankersQueue.hs
bsd-3-clause
rtail q@(Q _ [] [] _) = q
25
rtail q@(Q _ [] [] _) = q
25
rtail q@(Q _ [] [] _) = q
25
false
false
1
9
7
33
14
19
null
null
GaloisInc/hpb
hpb/Data/HPB/Resolver.hs
apache-2.0
resolveIdentType :: MonadFail m => Map Ident FileDef -> A.CompoundName -> m FileDef resolveIdentType m0 cnm@(A.CompoundName l0) = go m0 l0 where go _ [] = error $ "internal: Could not resolve " ++ show (pretty cnm) ++ "." go m (nm:l) = do d <- go1 m...
837
resolveIdentType :: MonadFail m => Map Ident FileDef -> A.CompoundName -> m FileDef resolveIdentType m0 cnm@(A.CompoundName l0) = go m0 l0 where go _ [] = error $ "internal: Could not resolve " ++ show (pretty cnm) ++ "." go m (nm:l) = do d <- go1 m...
837
resolveIdentType m0 cnm@(A.CompoundName l0) = go m0 l0 where go _ [] = error $ "internal: Could not resolve " ++ show (pretty cnm) ++ "." go m (nm:l) = do d <- go1 m nm case (d,l) of (_,[]) -> return d (EnumDef{}, _) -> A.failAt (A.pos nm) $ "Could not resolve " ++ ...
702
false
true
25
15
315
322
162
160
null
null
weiningl/tic-tac-toe
Board.hs
bsd-3-clause
allDiagonals b = fmap (diagonal b) [False, True]
48
allDiagonals b = fmap (diagonal b) [False, True]
48
allDiagonals b = fmap (diagonal b) [False, True]
48
false
false
1
7
7
30
13
17
null
null
zachsully/hakaru
haskell/Language/Hakaru/Syntax/AST/Sing.hs
bsd-3-clause
sing_MeasureOp Normal = (sing `Cons1` sing `Cons1` Nil1, sing)
67
sing_MeasureOp Normal = (sing `Cons1` sing `Cons1` Nil1, sing)
67
sing_MeasureOp Normal = (sing `Cons1` sing `Cons1` Nil1, sing)
67
false
false
0
7
13
28
16
12
null
null
unthingable/Tidal
Sound/Tidal/Dirt.hs
gpl-3.0
offset = makeF dirt "offset"
34
offset = makeF dirt "offset"
34
offset = makeF dirt "offset"
34
false
false
1
5
10
16
5
11
null
null
spechub/Hets
Comorphisms/Prop2QBF.hs
gpl-2.0
-- | Translation of morphisms mapMor :: PMor.Morphism -> Result QMor.Morphism mapMor mor = return QMor.Morphism { QMor.source = PMor.source mor , QMor.target = PMor.target mor , QMor.propMap = PMor.propMap mor }
217
mapMor :: PMor.Morphism -> Result QMor.Morphism mapMor mor = return QMor.Morphism { QMor.source = PMor.source mor , QMor.target = PMor.target mor , QMor.propMap = PMor.propMap mor }
187
mapMor mor = return QMor.Morphism { QMor.source = PMor.source mor , QMor.target = PMor.target mor , QMor.propMap = PMor.propMap mor }
139
true
true
0
9
37
80
39
41
null
null
akisystems/stomp-hs
src/Stomp.hs
mit
connect :: HostName -> PortNumber -> Headers -> IO Client connect host port headers = withSocketsDo $ do h <- connectTo host (PortNumber port) hSetBuffering h NoBuffering netSend h CONNECT headers "" (cmd, _, _) <- parse h if cmd == "CONNECTED" then return $ Client h else fail "connec...
333
connect :: HostName -> PortNumber -> Headers -> IO Client connect host port headers = withSocketsDo $ do h <- connectTo host (PortNumber port) hSetBuffering h NoBuffering netSend h CONNECT headers "" (cmd, _, _) <- parse h if cmd == "CONNECTED" then return $ Client h else fail "connec...
333
connect host port headers = withSocketsDo $ do h <- connectTo host (PortNumber port) hSetBuffering h NoBuffering netSend h CONNECT headers "" (cmd, _, _) <- parse h if cmd == "CONNECTED" then return $ Client h else fail "connection failed"
275
false
true
0
11
86
119
56
63
null
null
ocharles/virtual-dom
src/VirtualDom/HTML/Attributes.hs
bsd-3-clause
itemRef_ :: Traversal' HTMLElement (Maybe JSString) itemRef_ = attributes . at "itemref"
88
itemRef_ :: Traversal' HTMLElement (Maybe JSString) itemRef_ = attributes . at "itemref"
88
itemRef_ = attributes . at "itemref"
36
false
true
2
7
11
34
14
20
null
null
fumieval/machines
src/Data/Machine/Pipe.hs
bsd-3-clause
-- | Run a self-contained 'Effect', converting it back to the base monad. runEffect :: Monad m => Effect m o -> m [o] runEffect (MachineT m) = m >>= \v -> case v of Stop -> return [] Yield o n -> liftM (o:) (runEffect n) Await _ y _ -> absurdExchange y -- | Like 'runEffect' but discarding any produ...
330
runEffect :: Monad m => Effect m o -> m [o] runEffect (MachineT m) = m >>= \v -> case v of Stop -> return [] Yield o n -> liftM (o:) (runEffect n) Await _ y _ -> absurdExchange y -- | Like 'runEffect' but discarding any produced value.
256
runEffect (MachineT m) = m >>= \v -> case v of Stop -> return [] Yield o n -> liftM (o:) (runEffect n) Await _ y _ -> absurdExchange y -- | Like 'runEffect' but discarding any produced value.
212
true
true
2
11
83
116
56
60
null
null
ocharles/hadoom
hadoom-editor/Hadoom/Editor/Render.hs
bsd-3-clause
trailWithEdgeDirections :: D.Located (D.Trail D.R2) -> Diagram trailWithEdgeDirections sectorPolygon = D.strokeLocTrail sectorPolygon <> foldMap (\wall -> D.moveTo ((wall :: D.Located (D.Trail D.R2)) `D.atParam` 0.5) (D.strokeLine (D...
509
trailWithEdgeDirections :: D.Located (D.Trail D.R2) -> Diagram trailWithEdgeDirections sectorPolygon = D.strokeLocTrail sectorPolygon <> foldMap (\wall -> D.moveTo ((wall :: D.Located (D.Trail D.R2)) `D.atParam` 0.5) (D.strokeLine (D...
509
trailWithEdgeDirections sectorPolygon = D.strokeLocTrail sectorPolygon <> foldMap (\wall -> D.moveTo ((wall :: D.Located (D.Trail D.R2)) `D.atParam` 0.5) (D.strokeLine (D.lineFromVertices [D.origin ...
446
false
true
0
21
189
156
80
76
null
null
cartazio/omega
mosaic/finally-predicative.hs
bsd-3-clause
limMin l Utmost = l
19
limMin l Utmost = l
19
limMin l Utmost = l
19
false
false
1
5
4
16
5
11
null
null
rahulmutt/codec-jvm
src/Codec/JVM/ASM/Code.hs
apache-2.0
sconst :: Text -> Code sconst = gldc jstring . cstring
54
sconst :: Text -> Code sconst = gldc jstring . cstring
54
sconst = gldc jstring . cstring
31
false
true
1
7
10
30
12
18
null
null
svalaskevicius/hob
test/Hob/Command/FindTextSpec.hs
gpl-3.0
spec :: Spec spec = do describe "search command handler" $ do it "focuses editor on execute" $ do (ctx, _) <- loadGuiAndExecuteSearch editorFocused <- widgetGetIsFocus . fromJust =<< getActiveEditor ctx editorFocused `shouldBe` True it "enters the search mode" $ do (ctx, _) <- loadGui...
846
spec :: Spec spec = do describe "search command handler" $ do it "focuses editor on execute" $ do (ctx, _) <- loadGuiAndExecuteSearch editorFocused <- widgetGetIsFocus . fromJust =<< getActiveEditor ctx editorFocused `shouldBe` True it "enters the search mode" $ do (ctx, _) <- loadGui...
846
spec = do describe "search command handler" $ do it "focuses editor on execute" $ do (ctx, _) <- loadGuiAndExecuteSearch editorFocused <- widgetGetIsFocus . fromJust =<< getActiveEditor ctx editorFocused `shouldBe` True it "enters the search mode" $ do (ctx, _) <- loadGuiAndExecuteSea...
833
false
true
0
17
202
256
120
136
null
null
plaprade/haskoin-wallet
Network/Haskoin/Wallet/Transaction.hs
unlicense
splitDelete :: MonadIO m => [t] -> ([t] -> SqlQuery ()) -> SqlPersistT m () splitDelete ts deleteF = forM_ vals $ E.delete . deleteF where vals = chunksOf paramLimit ts
178
splitDelete :: MonadIO m => [t] -> ([t] -> SqlQuery ()) -> SqlPersistT m () splitDelete ts deleteF = forM_ vals $ E.delete . deleteF where vals = chunksOf paramLimit ts
178
splitDelete ts deleteF = forM_ vals $ E.delete . deleteF where vals = chunksOf paramLimit ts
102
false
true
0
11
40
82
40
42
null
null
Peaker/git-mediate
src/Opts.hs
gpl-2.0
parser :: O.Parser CmdArgs parser = O.flag' CmdVersion (O.long "version" <> O.help "Print the version and quit") <|> CmdOptions <$> ( Options <$> O.switch ( O.long "editor" <> O.short 'e' <> O.help "Execute $EDITOR for each conflicted file that remains confl...
1,879
parser :: O.Parser CmdArgs parser = O.flag' CmdVersion (O.long "version" <> O.help "Print the version and quit") <|> CmdOptions <$> ( Options <$> O.switch ( O.long "editor" <> O.short 'e' <> O.help "Execute $EDITOR for each conflicted file that remains confl...
1,879
parser = O.flag' CmdVersion (O.long "version" <> O.help "Print the version and quit") <|> CmdOptions <$> ( Options <$> O.switch ( O.long "editor" <> O.short 'e' <> O.help "Execute $EDITOR for each conflicted file that remains conflicted" ) ...
1,852
false
true
5
20
823
451
208
243
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_41 x = happyTcHack x happyReduce_196
43
action_41 x = happyTcHack x happyReduce_196
43
action_41 x = happyTcHack x happyReduce_196
43
false
false
0
5
5
14
6
8
null
null
andygill/er-systemf
Language/SystemF/Eval.hs
bsd-3-clause
-- TODO: include the type in this eval env (LAM n e) = ValTyApp n $ \ t -> eval env e
89
eval env (LAM n e) = ValTyApp n $ \ t -> eval env e
55
eval env (LAM n e) = ValTyApp n $ \ t -> eval env e
55
true
false
0
7
25
39
18
21
null
null
GaloisInc/halvm-ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Primitive types and values gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
80
gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
50
gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
50
true
false
1
7
15
19
8
11
null
null
prt2121/haskell-practice
ch6-11-17-25/src/Chapter11.hs
apache-2.0
flatMap f = concatMap (toList . f)
34
flatMap f = concatMap (toList . f)
34
flatMap f = concatMap (toList . f)
34
false
false
0
7
6
19
9
10
null
null
MatheusFaria/ExperimentalLanguage
Interpreter.hs
mit
-- Multiply two NumV and returns the resulting NumV mulC :: ExprV -> ExprV -> ExprV mulC (NumV a) (NumV b) = (NumV (a * b))
123
mulC :: ExprV -> ExprV -> ExprV mulC (NumV a) (NumV b) = (NumV (a * b))
71
mulC (NumV a) (NumV b) = (NumV (a * b))
39
true
true
0
10
25
56
27
29
null
null
bergey/panther
src/Ray/Core.hs
bsd-3-clause
radiance :: Ray -> M Spectrum radiance ray = do x <- getIntersection ray n <- view $ algorithms . samplesPerCameraRay integrator <- view $ algorithms . surfaceIntegrator case getOption x of Nothing -> view $ scene . background Just isect -> (ray ^. raySpectrum * ) <$> integrator n ray isect
317
radiance :: Ray -> M Spectrum radiance ray = do x <- getIntersection ray n <- view $ algorithms . samplesPerCameraRay integrator <- view $ algorithms . surfaceIntegrator case getOption x of Nothing -> view $ scene . background Just isect -> (ray ^. raySpectrum * ) <$> integrator n ray isect
317
radiance ray = do x <- getIntersection ray n <- view $ algorithms . samplesPerCameraRay integrator <- view $ algorithms . surfaceIntegrator case getOption x of Nothing -> view $ scene . background Just isect -> (ray ^. raySpectrum * ) <$> integrator n ray isect
287
false
true
0
12
77
113
53
60
null
null
christian-marie/time-qq
lib/Data/Time/QQ.hs
bsd-3-clause
-- | Build a 'UTCTime' QuasiQuoter for a given format string, as per -- 'readTime'. utcFormat :: String -> QuasiQuoter utcFormat = timeFormat utcExp
148
utcFormat :: String -> QuasiQuoter utcFormat = timeFormat utcExp
64
utcFormat = timeFormat utcExp
29
true
true
0
5
23
20
11
9
null
null
rcls/sdr
fir.hs
gpl-3.0
at :: FilterDesc f a -> Int -> Int -> Bool at c i j = (j + i) == (latency c) || (j + i) == (latency c + cycles c)
113
at :: FilterDesc f a -> Int -> Int -> Bool at c i j = (j + i) == (latency c) || (j + i) == (latency c + cycles c)
113
at c i j = (j + i) == (latency c) || (j + i) == (latency c + cycles c)
70
false
true
0
9
31
80
40
40
null
null
svenssonjoel/GCDObsidian
Obsidian/GCDObsidian/CodeGen/SPMDC.hs
bsd-3-clause
performCSEPass' cm cp (CDeclAssign _ _ _) = error "performCSEPass': CDeclAssign found during CSEPass"
101
performCSEPass' cm cp (CDeclAssign _ _ _) = error "performCSEPass': CDeclAssign found during CSEPass"
101
performCSEPass' cm cp (CDeclAssign _ _ _) = error "performCSEPass': CDeclAssign found during CSEPass"
101
false
false
0
6
13
29
12
17
null
null
pparkkin/eta
compiler/ETA/BasicTypes/Var.hs
bsd-3-clause
setIdNotExported :: Id -> Id -- ^ We can only do this to LocalIds setIdNotExported id = ASSERT( isLocalId id ) id { idScope = LocalId NotExported }
169
setIdNotExported :: Id -> Id setIdNotExported id = ASSERT( isLocalId id ) id { idScope = LocalId NotExported }
132
setIdNotExported id = ASSERT( isLocalId id ) id { idScope = LocalId NotExported }
103
true
true
0
8
49
41
21
20
null
null
fmapfmapfmap/amazonka
amazonka-efs/gen/Network/AWS/EFS/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Tag' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'tagKey' -- -- * 'tagValue' tag :: Text -- ^ 'tagKey' -> Text -- ^ 'tagValue' -> Tag tag pKey_ pValue_ = Tag' { _tagKey = pKey_ , _ta...
342
tag :: Text -- ^ 'tagKey' -> Text -- ^ 'tagValue' -> Tag tag pKey_ pValue_ = Tag' { _tagKey = pKey_ , _tagValue = pValue_ }
151
tag pKey_ pValue_ = Tag' { _tagKey = pKey_ , _tagValue = pValue_ }
82
true
true
0
8
92
56
32
24
null
null
erochest/whatisdh
Handler/Home.hs
bsd-2-clause
-- This is a handler function for the GET request method on the HomeR -- resource pattern. All of your resource patterns are defined in -- config/routes -- -- The majority of the code you will write in Yesod lives in these handler -- functions. You can spread them across multiple files if you are so -- inclined, or cre...
679
getHomeR :: Handler RepHtml getHomeR = do trigrams <- (M.keys . accumTrigrams . map entityVal) <$> (runDB $ selectList [] []) tokens <- liftIO $ dissociate trigrams let press = T.intercalate " " $ L.take 500 tokens defaultLayout $ do setTitle "What is DH?" $(widgetFile "h...
329
getHomeR = do trigrams <- (M.keys . accumTrigrams . map entityVal) <$> (runDB $ selectList [] []) tokens <- liftIO $ dissociate trigrams let press = T.intercalate " " $ L.take 500 tokens defaultLayout $ do setTitle "What is DH?" $(widgetFile "homepage")
301
true
true
0
13
157
132
62
70
null
null
lukexi/rumpus
pristine/Painting/ZeroGPaint.hs
bsd-3-clause
start :: Start start = do initialPosition <- getPosition setState (initialPosition, Seq.empty :: Seq EntityID) myDragContinues ==> \_ -> withState $ \(lastPosition, blots) -> do newPose <- getPose let newPosition = newPose ^. translation when (distance lastPosition newPositi...
879
start :: Start start = do initialPosition <- getPosition setState (initialPosition, Seq.empty :: Seq EntityID) myDragContinues ==> \_ -> withState $ \(lastPosition, blots) -> do newPose <- getPose let newPosition = newPose ^. translation when (distance lastPosition newPositio...
878
start = do initialPosition <- getPosition setState (initialPosition, Seq.empty :: Seq EntityID) myDragContinues ==> \_ -> withState $ \(lastPosition, blots) -> do newPose <- getPose let newPosition = newPose ^. translation when (distance lastPosition newPosition > 0.05) $ do ...
863
false
true
0
24
393
231
106
125
null
null
facebookincubator/duckling
Duckling/Numeral/Helpers.hs
bsd-3-clause
withGrain :: Int -> Token -> Maybe Token withGrain g (Token Numeral x@NumeralData{}) = Just $ Token Numeral $ x {grain = Just g}
130
withGrain :: Int -> Token -> Maybe Token withGrain g (Token Numeral x@NumeralData{}) = Just $ Token Numeral $ x {grain = Just g}
130
withGrain g (Token Numeral x@NumeralData{}) = Just $ Token Numeral $ x {grain = Just g}
89
false
true
0
9
25
64
32
32
null
null
treeowl/GADTSeq
Data/Sequence.hs
bsd-3-clause
fromList :: [a] -> Seq a fromList = Data.List.foldl' (|>) empty
78
fromList :: [a] -> Seq a fromList = Data.List.foldl' (|>) empty
78
fromList = Data.List.foldl' (|>) empty
46
false
true
0
6
25
31
17
14
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/recip_2.hs
mit
primMulNat (Succ x) Zero = Zero
31
primMulNat (Succ x) Zero = Zero
31
primMulNat (Succ x) Zero = Zero
31
false
false
0
7
5
17
8
9
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F20.hs
bsd-3-clause
ptr_glPopName :: FunPtr (IO ()) ptr_glPopName = unsafePerformIO $ getCommand "glPopName"
88
ptr_glPopName :: FunPtr (IO ()) ptr_glPopName = unsafePerformIO $ getCommand "glPopName"
88
ptr_glPopName = unsafePerformIO $ getCommand "glPopName"
56
false
true
0
8
10
29
14
15
null
null
jeroennoels/exact-real
src/Ternary/Core/Normalize.hs
mit
initNormalizeRev :: [T2] -> [T1] initNormalizeRev [] = []
57
initNormalizeRev :: [T2] -> [T1] initNormalizeRev [] = []
57
initNormalizeRev [] = []
24
false
true
0
6
8
28
15
13
null
null
axman6/TernaryTrees
Data/Set/TernarySet.hs
bsd-3-clause
member xss@(x:xs) (Node ele l e h) = case compare x ele of LT -> member xss l EQ -> member xs e GT -> member xss h -- | Counts how many entries there are in the tree.
198
member xss@(x:xs) (Node ele l e h) = case compare x ele of LT -> member xss l EQ -> member xs e GT -> member xss h -- | Counts how many entries there are in the tree.
198
member xss@(x:xs) (Node ele l e h) = case compare x ele of LT -> member xss l EQ -> member xs e GT -> member xss h -- | Counts how many entries there are in the tree.
198
false
false
0
8
70
76
37
39
null
null
runjak/projectEuler
src/Problem96.hs
mit
concludeAble :: SudokuTile -> Bool concludeAble x = not (concluded x) && ((==1) . length $ possibleNumbers x)
109
concludeAble :: SudokuTile -> Bool concludeAble x = not (concluded x) && ((==1) . length $ possibleNumbers x)
109
concludeAble x = not (concluded x) && ((==1) . length $ possibleNumbers x)
74
false
true
0
9
17
49
25
24
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_DRAW_BUFFER3_NV :: GLenum gl_DRAW_BUFFER3_NV = 0x8828
56
gl_DRAW_BUFFER3_NV :: GLenum gl_DRAW_BUFFER3_NV = 0x8828
56
gl_DRAW_BUFFER3_NV = 0x8828
27
false
true
0
4
5
11
6
5
null
null
JamesSullivan1/Minisculus
src/MinisculusParser.hs
mit
stmtlist ((p,T_While):ts) = doStmt ((p,T_While):ts)
61
stmtlist ((p,T_While):ts) = doStmt ((p,T_While):ts)
61
stmtlist ((p,T_While):ts) = doStmt ((p,T_While):ts)
61
false
false
0
8
14
39
21
18
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Analytics account reference. arKind :: Lens' AccountRef Text arKind = lens _arKind (\ s a -> s{_arKind = a})
113
arKind :: Lens' AccountRef Text arKind = lens _arKind (\ s a -> s{_arKind = a})
79
arKind = lens _arKind (\ s a -> s{_arKind = a})
47
true
true
0
9
20
40
22
18
null
null
charleso/intellij-haskforce
tests/gold/codeInsight/GoToSymbolFunction_CaretOnFunctionInstance.hs
apache-2.0
test :: Int t<caret>est = let seven = 7 in seven + 1
62
test :: Int t<caret>est = let seven = 7 in seven + 1
62
test :: Int t<caret>est = let seven = 7 in seven + 1
62
false
false
0
8
22
37
17
20
null
null
mainland/dph
dph-prim-seq/Data/Array/Parallel/Unlifted/Sequential/USSegd.hs
bsd-3-clause
here :: String -> String here s = "Data.Array.Parallel.Unlifted.Sequential.USSegd." ++ s
89
here :: String -> String here s = "Data.Array.Parallel.Unlifted.Sequential.USSegd." ++ s
88
here s = "Data.Array.Parallel.Unlifted.Sequential.USSegd." ++ s
63
false
true
0
7
11
28
12
16
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_KINYARWANDA :: Int wxLANGUAGE_KINYARWANDA = 117
58
wxLANGUAGE_KINYARWANDA :: Int wxLANGUAGE_KINYARWANDA = 117
58
wxLANGUAGE_KINYARWANDA = 117
28
false
true
0
4
5
11
6
5
null
null
Javran/misc
irc/TestIRC.hs
mit
interactWorker :: Handle -> IO () interactWorker h = do s <- BSC.getLine if s == BSC.pack "quit" then do hClose h return () else do BSC.hPutStrLn h s interactWorker h
240
interactWorker :: Handle -> IO () interactWorker h = do s <- BSC.getLine if s == BSC.pack "quit" then do hClose h return () else do BSC.hPutStrLn h s interactWorker h
240
interactWorker h = do s <- BSC.getLine if s == BSC.pack "quit" then do hClose h return () else do BSC.hPutStrLn h s interactWorker h
206
false
true
0
11
104
82
36
46
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
1576 = 1575
11
1576 = 1575
11
1576 = 1575
11
false
false
1
5
2
10
3
7
null
null
naushadh/persistent
persistent-sqlite/Database/Persist/Sqlite.hs
mit
-- | @since 2.6.2 withSqliteConnInfo :: (MonadUnliftIO m, MonadLogger m) => SqliteConnectionInfo -> (SqlBackend -> m a) -> m a withSqliteConnInfo = withSqlConn . openWith const
195
withSqliteConnInfo :: (MonadUnliftIO m, MonadLogger m) => SqliteConnectionInfo -> (SqlBackend -> m a) -> m a withSqliteConnInfo = withSqlConn . openWith const
177
withSqliteConnInfo = withSqlConn . openWith const
49
true
true
0
10
44
55
28
27
null
null
BartAdv/Idris-dev
src/Idris/Core/Elaborate.hs
bsd-3-clause
end_unify :: Elab' aux () end_unify = processTactic' EndUnify
61
end_unify :: Elab' aux () end_unify = processTactic' EndUnify
61
end_unify = processTactic' EndUnify
35
false
true
1
6
8
24
10
14
null
null
AriaFallah/leetcode
haskell/ReverseVowels.hs
mit
reverseOnly :: (Char -> Bool) -> String -> String reverseOnly f s = replace reversed s where reversed = reverse $ filter f s replace x [] = x replace [] y = y replace (x:xs) (y:ys) = if f y then x : replace xs ys else y : replace (x:xs) ys
299
reverseOnly :: (Char -> Bool) -> String -> String reverseOnly f s = replace reversed s where reversed = reverse $ filter f s replace x [] = x replace [] y = y replace (x:xs) (y:ys) = if f y then x : replace xs ys else y : replace (x:xs) ys
299
reverseOnly f s = replace reversed s where reversed = reverse $ filter f s replace x [] = x replace [] y = y replace (x:xs) (y:ys) = if f y then x : replace xs ys else y : replace (x:xs) ys
249
false
true
3
11
112
137
69
68
null
null
enolive/exercism
haskell/matrix/src/Matrix.hs
mit
reshape :: Dimensions -> Matrix a -> Matrix a reshape (height, width) matrix = Matrix {contentRows = reshapedRows} where reshapedRows = Vector.generate width rowSlice flattened = flatten matrix rowSlice rowNum = Vector.slice (rowNum * height) height flattened
273
reshape :: Dimensions -> Matrix a -> Matrix a reshape (height, width) matrix = Matrix {contentRows = reshapedRows} where reshapedRows = Vector.generate width rowSlice flattened = flatten matrix rowSlice rowNum = Vector.slice (rowNum * height) height flattened
273
reshape (height, width) matrix = Matrix {contentRows = reshapedRows} where reshapedRows = Vector.generate width rowSlice flattened = flatten matrix rowSlice rowNum = Vector.slice (rowNum * height) height flattened
227
false
true
2
7
50
90
46
44
null
null
vTurbine/ghc
libraries/base/GHC/Conc/Sync.hs
bsd-3-clause
readTVarIO :: TVar a -> IO a readTVarIO (TVar tvar#) = IO $ \s# -> readTVarIO# tvar# s#
87
readTVarIO :: TVar a -> IO a readTVarIO (TVar tvar#) = IO $ \s# -> readTVarIO# tvar# s#
87
readTVarIO (TVar tvar#) = IO $ \s# -> readTVarIO# tvar# s#
58
false
true
2
9
17
49
22
27
null
null
kosmoskatten/nats-client
src/Network/Nats/Types.hs
mit
toUSec Infinity = -1
20
toUSec Infinity = -1
20
toUSec Infinity = -1
20
false
false
0
5
3
11
5
6
null
null
ucsd-progsys/nanomaly
src/NanoML/Gen.hs
bsd-3-clause
genList :: MonadEval m => Type -> TypeEnv -> m Value genList t env = withCurrentProvM $ \prv -> (\x -> VL prv x (Just t)) <$> listOf (genValue t env)
149
genList :: MonadEval m => Type -> TypeEnv -> m Value genList t env = withCurrentProvM $ \prv -> (\x -> VL prv x (Just t)) <$> listOf (genValue t env)
149
genList t env = withCurrentProvM $ \prv -> (\x -> VL prv x (Just t)) <$> listOf (genValue t env)
96
false
true
0
12
30
79
39
40
null
null
ezyang/ghc
hadrian/src/Base.hs
bsd-3-clause
-- | Path to hsc2hs template. templateHscPath :: FilePath templateHscPath = "inplace/lib/template-hsc.h"
104
templateHscPath :: FilePath templateHscPath = "inplace/lib/template-hsc.h"
74
templateHscPath = "inplace/lib/template-hsc.h"
46
true
true
0
4
11
12
7
5
null
null
KevinCotrone/stm-notify
test/Control/Concurrent/STM/NotifySpec.hs
bsd-3-clause
spec :: Spec spec = do specModifyingValue
43
spec :: Spec spec = do specModifyingValue
43
spec = do specModifyingValue
30
false
true
0
6
8
14
7
7
null
null
haskellbr/missingh
missingh-all/src/Data/Compression/Inflate.hs
mit
make_lit_dist_lengths :: Table -> Word32 -> Word32 -> InfM [Word32] make_lit_dist_lengths _ i _ | i < 0 = error "make_lit_dist_lengths i < 0"
141
make_lit_dist_lengths :: Table -> Word32 -> Word32 -> InfM [Word32] make_lit_dist_lengths _ i _ | i < 0 = error "make_lit_dist_lengths i < 0"
141
make_lit_dist_lengths _ i _ | i < 0 = error "make_lit_dist_lengths i < 0"
73
false
true
0
10
23
53
24
29
null
null
alexander-at-github/eta
compiler/ETA/SimplCore/CoreMonad.hs
bsd-3-clause
pprTickCts (EtaExpansion v) = ppr v
47
pprTickCts (EtaExpansion v) = ppr v
47
pprTickCts (EtaExpansion v) = ppr v
47
false
false
0
6
17
19
8
11
null
null
ggVGc/hircules
src/Lib.hs
bsd-3-clause
write :: String -> String -> Net () write s t = do h <- asks socket liftIO $ hPrintf h "%s %s\r\n" s t liftIO $ printf "%s %s\r\n" s t
140
write :: String -> String -> Net () write s t = do h <- asks socket liftIO $ hPrintf h "%s %s\r\n" s t liftIO $ printf "%s %s\r\n" s t
140
write s t = do h <- asks socket liftIO $ hPrintf h "%s %s\r\n" s t liftIO $ printf "%s %s\r\n" s t
104
false
true
0
8
37
69
31
38
null
null
ku-fpg/kansas-amber
tests/TransTests/TransRecurLetTest.hs
bsd-3-clause
recurProg2 :: Arduino () recurProg2 = do setPinMode led OUTPUT setPinMode button1 INPUT setPinMode button2 INPUT wait blink 4 wait blink 7 return () where wait :: Arduino () wait = do b <- digitalRead (button1 + 1) if b then return () else wait ...
580
recurProg2 :: Arduino () recurProg2 = do setPinMode led OUTPUT setPinMode button1 INPUT setPinMode button2 INPUT wait blink 4 wait blink 7 return () where wait :: Arduino () wait = do b <- digitalRead (button1 + 1) if b then return () else wait w...
579
recurProg2 = do setPinMode led OUTPUT setPinMode button1 INPUT setPinMode button2 INPUT wait blink 4 wait blink 7 return () where wait :: Arduino () wait = do b <- digitalRead (button1 + 1) if b then return () else wait where wait' = del...
554
false
true
0
10
216
207
91
116
null
null
urbanslug/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
{- ************************************************************************ * * Predicates * * ***********************************************************************...
793
isTouchableOrFmv :: TcLevel -> TcTyVar -> Bool isTouchableOrFmv ctxt_tclvl tv = ASSERT2( isTcTyVar tv, ppr tv ) case tcTyVarDetails tv of MetaTv { mtv_tclvl = tv_tclvl, mtv_info = info } -> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl, ppr tv $$ ppr tv_tclvl $$ ppr ctxt_tcl...
467
isTouchableOrFmv ctxt_tclvl tv = ASSERT2( isTcTyVar tv, ppr tv ) case tcTyVarDetails tv of MetaTv { mtv_tclvl = tv_tclvl, mtv_info = info } -> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl, ppr tv $$ ppr tv_tclvl $$ ppr ctxt_tclvl ) case info of FlatM...
420
true
true
0
12
322
132
66
66
null
null
sdiehl/ghc
testsuite/tests/plugins/static-plugins.hs
bsd-3-clause
plugin_fp0 = plugin { pluginRecompile = \_ -> pure $ MaybeRecompile $ Fingerprint 0 0 }
91
plugin_fp0 = plugin { pluginRecompile = \_ -> pure $ MaybeRecompile $ Fingerprint 0 0 }
91
plugin_fp0 = plugin { pluginRecompile = \_ -> pure $ MaybeRecompile $ Fingerprint 0 0 }
91
false
false
0
9
19
32
17
15
null
null
hpacheco/HAAP
src/HAAP/Compiler/GHC.hs
mit
useAndRunGhcExec :: (MonadIO m,HaapStack t m) => GHCArgs -> FilePath -> (IOResult -> Haap (ReaderT GHCArgs :..: t) m a) -> Haap t m (a) useAndRunGhcExec args ghcexec m = usePlugin_ (return args) $ runGhcExec ghcexec m
217
useAndRunGhcExec :: (MonadIO m,HaapStack t m) => GHCArgs -> FilePath -> (IOResult -> Haap (ReaderT GHCArgs :..: t) m a) -> Haap t m (a) useAndRunGhcExec args ghcexec m = usePlugin_ (return args) $ runGhcExec ghcexec m
217
useAndRunGhcExec args ghcexec m = usePlugin_ (return args) $ runGhcExec ghcexec m
81
false
true
0
14
36
99
49
50
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 4767521 = 2776
34
getValueFromProduct 4767521 = 2776
34
getValueFromProduct 4767521 = 2776
34
false
false
0
5
3
9
4
5
null
null
databrary/databrary
src/Model/Party.hs
agpl-3.0
lookupAvatar :: MonadDB c m => Id Party -> m (Maybe Asset) lookupAvatar p = dbQuery1 $ (`Asset` coreVolume) <$> $(selectQuery selectAssetRow $ "$JOIN avatar ON asset.id = avatar.asset WHERE avatar.party = ${p} AND asset.volume = " ++ pgLiteralString (volumeId $ volumeRow coreVolume))
286
lookupAvatar :: MonadDB c m => Id Party -> m (Maybe Asset) lookupAvatar p = dbQuery1 $ (`Asset` coreVolume) <$> $(selectQuery selectAssetRow $ "$JOIN avatar ON asset.id = avatar.asset WHERE avatar.party = ${p} AND asset.volume = " ++ pgLiteralString (volumeId $ volumeRow coreVolume))
286
lookupAvatar p = dbQuery1 $ (`Asset` coreVolume) <$> $(selectQuery selectAssetRow $ "$JOIN avatar ON asset.id = avatar.asset WHERE avatar.party = ${p} AND asset.volume = " ++ pgLiteralString (volumeId $ volumeRow coreVolume))
227
false
true
0
12
44
81
40
41
null
null
dicomgrid/dicom-haskell-library
src/Data/DICOM/Dictionary.hs
gpl-3.0
group6000commentsret :: String -> Element group6000commentsret = sh $ tag (TagGroup 0x6000) (TagElement 0x4000)
111
group6000commentsret :: String -> Element group6000commentsret = sh $ tag (TagGroup 0x6000) (TagElement 0x4000)
111
group6000commentsret = sh $ tag (TagGroup 0x6000) (TagElement 0x4000)
69
false
true
2
7
13
43
19
24
null
null
wouwouwou/module_8
src/main/haskell/series1/exercise6.hs
apache-2.0
myreverse :: [a] -> [a] myreverse [] = []
41
myreverse :: [a] -> [a] myreverse [] = []
41
myreverse [] = []
17
false
true
0
6
8
28
15
13
null
null
23Skidoo/erp
ERP.hs
gpl-3.0
filter_ :: AST -> AST -> AST filter_ f l = builtinApp "filter" [f, l]
69
filter_ :: AST -> AST -> AST filter_ f l = builtinApp "filter" [f, l]
69
filter_ f l = builtinApp "filter" [f, l]
40
false
true
0
8
14
40
19
21
null
null
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
a243 :: IO (); a243 = forever $ putStrLn "a243"
47
a243 :: IO () a243 = forever $ putStrLn "a243"
46
a243 = forever $ putStrLn "a243"
32
false
true
0
6
9
24
12
12
null
null
charleso/intellij-haskforce
tests/gold/parser/InternalLexer.hs
apache-2.0
lexHarpToken :: Lex a Token lexHarpToken = do -- if we ever end up here, then RegularPatterns must be on. s <- getInput case s of ']':'>':_ -> do discard 2 popExtContextL "lexHarpToken" return XRPatClose _ -> lexStdToken
300
lexHarpToken :: Lex a Token lexHarpToken = do -- if we ever end up here, then RegularPatterns must be on. s <- getInput case s of ']':'>':_ -> do discard 2 popExtContextL "lexHarpToken" return XRPatClose _ -> lexStdToken
300
lexHarpToken = do -- if we ever end up here, then RegularPatterns must be on. s <- getInput case s of ']':'>':_ -> do discard 2 popExtContextL "lexHarpToken" return XRPatClose _ -> lexStdToken
272
false
true
0
13
117
76
32
44
null
null