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
tjakway/ghcjvm
compiler/hsSyn/HsUtils.hs
bsd-3-clause
nlNullaryConPat :: id -> LPat id nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon []))
98
nlNullaryConPat :: id -> LPat id nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon []))
98
nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon []))
65
false
true
0
10
14
46
22
24
null
null
TomMD/llvm-pretty
src/Text/LLVM/AST.hs
bsd-3-clause
ppArgList False ds = parens (commas ds)
39
ppArgList False ds = parens (commas ds)
39
ppArgList False ds = parens (commas ds)
39
false
false
0
7
6
20
9
11
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_TEXTURE_CUBE_MAP_POSITIVE_Y_OES :: GLenum gl_TEXTURE_CUBE_MAP_POSITIVE_Y_OES = 0x8517
88
gl_TEXTURE_CUBE_MAP_POSITIVE_Y_OES :: GLenum gl_TEXTURE_CUBE_MAP_POSITIVE_Y_OES = 0x8517
88
gl_TEXTURE_CUBE_MAP_POSITIVE_Y_OES = 0x8517
43
false
true
0
4
5
11
6
5
null
null
rickerbh/GenerativeArtHaskell
GenerativeArt.hsproj/GenerativeArtC2.hs
mit
black = PixelRGBA8 0 0 0 255
28
black = PixelRGBA8 0 0 0 255
28
black = PixelRGBA8 0 0 0 255
28
false
false
1
5
6
22
7
15
null
null
jrockway/c2hs
src/Data/Attributes.hs
gpl-2.0
-- errLoc :: Attr a => AttrTable a -> Position -> String errLoc at pos = " table `" ++ tableDesc at ++ "' for construct at\n\ \ position " ++ show pos ++ "!" where tableDesc (SoftTable _ desc) = desc tableDesc (FrozenTable _ desc) = desc -- | freeze a soft table; afterwards no mo...
383
errLoc :: Attr a => AttrTable a -> Position -> String errLoc at pos = " table `" ++ tableDesc at ++ "' for construct at\n\ \ position " ++ show pos ++ "!" where tableDesc (SoftTable _ desc) = desc tableDesc (FrozenTable _ desc) = desc -- | freeze a soft table; afterwards no more ...
380
errLoc at pos = " table `" ++ tableDesc at ++ "' for construct at\n\ \ position " ++ show pos ++ "!" where tableDesc (SoftTable _ desc) = desc tableDesc (FrozenTable _ desc) = desc -- | freeze a soft table; afterwards no more changes are possible until the -- table is softened again --
319
true
true
0
9
107
96
47
49
null
null
ucam-cl-dtg/naps-camfort
Main.hs
mit
loops inSrc excludes _ _ = do putStrLn $ "Analysing loops for " ++ show inSrc ++ "\n" doAnalysis loopAnalyse inSrc excludes
151
loops inSrc excludes _ _ = do putStrLn $ "Analysing loops for " ++ show inSrc ++ "\n" doAnalysis loopAnalyse inSrc excludes
151
loops inSrc excludes _ _ = do putStrLn $ "Analysing loops for " ++ show inSrc ++ "\n" doAnalysis loopAnalyse inSrc excludes
151
false
false
1
10
49
46
19
27
null
null
osa1/rho-torrent
test/Rho/ClientSpec.hs
bsd-3-clause
mkPeerId :: Int -> PeerId mkPeerId i = let str = show i in PeerId $ BC.pack $ replicate (20 - length str) '0' ++ str
124
mkPeerId :: Int -> PeerId mkPeerId i = let str = show i in PeerId $ BC.pack $ replicate (20 - length str) '0' ++ str
124
mkPeerId i = let str = show i in PeerId $ BC.pack $ replicate (20 - length str) '0' ++ str
98
false
true
0
12
33
61
29
32
null
null
aleator/bindings-dc1394
Examples/HelloWorld.hs
bsd-3-clause
-- | Join flags CF a &+ CF b = CF (a .&. b)
43
CF a &+ CF b = CF (a .&. b)
27
CF a &+ CF b = CF (a .&. b)
27
true
false
2
7
13
29
13
16
null
null
noinia/virtual-persistent-fs
src/Data/FileSystem/Internal.hs
bsd-3-clause
toDir' :: FSTree D m a -> Directory' m a toDir' (Directory n m a chs) = Directory' n m a chs' where chs' = map (fmapBoth toFile' toDir') . M.elems . pack $ chs
187
toDir' :: FSTree D m a -> Directory' m a toDir' (Directory n m a chs) = Directory' n m a chs' where chs' = map (fmapBoth toFile' toDir') . M.elems . pack $ chs
187
toDir' (Directory n m a chs) = Directory' n m a chs' where chs' = map (fmapBoth toFile' toDir') . M.elems . pack $ chs
124
false
true
0
10
62
84
40
44
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxTEXT_ATTR_PARA_SPACING_AFTER :: Int wxTEXT_ATTR_PARA_SPACING_AFTER = 0x00000800
85
wxTEXT_ATTR_PARA_SPACING_AFTER :: Int wxTEXT_ATTR_PARA_SPACING_AFTER = 0x00000800
85
wxTEXT_ATTR_PARA_SPACING_AFTER = 0x00000800
45
false
true
0
4
9
11
6
5
null
null
leichunfeng/learnyouahaskell
For-a-Few-Monads-More.hs
mit
gcdReverse :: Int -> Int -> Writer [String] Int gcdReverse a b | b == 0 = do tell ["Finished with " ++ show a] return a | otherwise = do result <- gcdReverse b (a `mod` b) tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)] return result
297
gcdReverse :: Int -> Int -> Writer [String] Int gcdReverse a b | b == 0 = do tell ["Finished with " ++ show a] return a | otherwise = do result <- gcdReverse b (a `mod` b) tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)] return result
297
gcdReverse a b | b == 0 = do tell ["Finished with " ++ show a] return a | otherwise = do result <- gcdReverse b (a `mod` b) tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)] return result
249
false
true
0
15
106
151
69
82
null
null
johntyree/traduisons-hs
executables/MainCLI.hs
bsd-3-clause
interpretCommands :: Maybe AppState -> [Command] -> IO (Maybe AppState) interpretCommands appState commands = do let render = msgBody result <- runExceptT $ runCommands appState commands case result of Left err -> putStrLn (renderError err) >> return Nothing Right (msg, s) -> do when (isJust msg) $ ...
376
interpretCommands :: Maybe AppState -> [Command] -> IO (Maybe AppState) interpretCommands appState commands = do let render = msgBody result <- runExceptT $ runCommands appState commands case result of Left err -> putStrLn (renderError err) >> return Nothing Right (msg, s) -> do when (isJust msg) $ ...
376
interpretCommands appState commands = do let render = msgBody result <- runExceptT $ runCommands appState commands case result of Left err -> putStrLn (renderError err) >> return Nothing Right (msg, s) -> do when (isJust msg) $ putStrLn . render . fromJust $ msg return $ Just s
304
false
true
0
18
83
149
69
80
null
null
sumitsahrawat/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
mit
defaultBoundedIntRangeWidget :: FieldType S.ViewName -> FieldType S.ModelName -> Rec Attr BoundedIntRangeClass defaultBoundedIntRangeWidget viewName modelName = defaultIntRangeWidget viewName modelName <+> boundedIntRangeAttrs where boundedIntRangeAttrs = (StepInt =:+ 1) :& (MinInt =:: ...
474
defaultBoundedIntRangeWidget :: FieldType S.ViewName -> FieldType S.ModelName -> Rec Attr BoundedIntRangeClass defaultBoundedIntRangeWidget viewName modelName = defaultIntRangeWidget viewName modelName <+> boundedIntRangeAttrs where boundedIntRangeAttrs = (StepInt =:+ 1) :& (MinInt =:: ...
474
defaultBoundedIntRangeWidget viewName modelName = defaultIntRangeWidget viewName modelName <+> boundedIntRangeAttrs where boundedIntRangeAttrs = (StepInt =:+ 1) :& (MinInt =:: 0) :& (MaxInt =:: 100) :& RNil -- | A record representin...
363
false
true
0
9
136
90
45
45
null
null
jrclogic/SMCDEL
src/SMCDEL/Examples/SimpleK.hs
gpl-2.0
exampleResult :: PointedModel exampleResult = update examplePointedModel examplePointedActM
91
exampleResult :: PointedModel exampleResult = update examplePointedModel examplePointedActM
91
exampleResult = update examplePointedModel examplePointedActM
61
false
true
0
5
7
16
8
8
null
null
ProLambda/PureChat
Server/Database/Internal/Model.hs
gpl-3.0
-- picture confAddr :: S.Text confAddr = "./Database/message.sqlite3"
70
confAddr :: S.Text confAddr = "./Database/message.sqlite3"
58
confAddr = "./Database/message.sqlite3"
39
true
true
0
5
8
14
8
6
null
null
allegroCoder/scenco-1
Test.hs
bsd-3-clause
shouldMeet [] ys = error $ "Missing codes for " ++ show ys
58
shouldMeet [] ys = error $ "Missing codes for " ++ show ys
58
shouldMeet [] ys = error $ "Missing codes for " ++ show ys
58
false
false
0
6
12
24
11
13
null
null
d0kt0r0/Tidal
src/Sound/Tidal/old/Scales.hs
gpl-3.0
aeolian :: Num a => [a] aeolian = [0,2,3,5,7,8,10]
50
aeolian :: Num a => [a] aeolian = [0,2,3,5,7,8,10]
50
aeolian = [0,2,3,5,7,8,10]
26
false
true
0
6
8
42
25
17
null
null
pikajude/explain
src/Main.hs
mit
explainP (PApp qn ps) = fillSep $ explainQname False qn : map explainP ps
80
explainP (PApp qn ps) = fillSep $ explainQname False qn : map explainP ps
80
explainP (PApp qn ps) = fillSep $ explainQname False qn : map explainP ps
80
false
false
0
7
20
35
16
19
null
null
NightRa/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCCG n) f = case lookupCtxtExact n (idris_callgraph i) of Just v -> return f { ibc_cg = (n,v) : ibc_cg f } _ -> ifail "IBC write failed"
196
ibc i (IBCCG n) f = case lookupCtxtExact n (idris_callgraph i) of Just v -> return f { ibc_cg = (n,v) : ibc_cg f } _ -> ifail "IBC write failed"
196
ibc i (IBCCG n) f = case lookupCtxtExact n (idris_callgraph i) of Just v -> return f { ibc_cg = (n,v) : ibc_cg f } _ -> ifail "IBC write failed"
196
false
false
1
12
82
81
37
44
null
null
weissi/astar
src/Data/Graph/AStar.hs
bsd-3-clause
planeHole :: (Integer, Integer) -> HashSet (Integer, Integer) planeHole (x,y) = Set.filter (\(u,v) -> planeDist (u,v) (0,0) > 10) (plane (x,y))
143
planeHole :: (Integer, Integer) -> HashSet (Integer, Integer) planeHole (x,y) = Set.filter (\(u,v) -> planeDist (u,v) (0,0) > 10) (plane (x,y))
143
planeHole (x,y) = Set.filter (\(u,v) -> planeDist (u,v) (0,0) > 10) (plane (x,y))
81
false
true
0
10
20
93
53
40
null
null
jeroenk/iTRSsVisualised
visualization.hs
agpl-3.0
keyboardMouse environment (SpecialKey KeyDown) Down _ _ = do env <- get environment let (x, y) = visLU env (x', y') = visRD env move = (y' - y) * moveFac environment $= env { visLU = (x, y + move), visRD = (x', y' + move) } updateView environment
308
keyboardMouse environment (SpecialKey KeyDown) Down _ _ = do env <- get environment let (x, y) = visLU env (x', y') = visRD env move = (y' - y) * moveFac environment $= env { visLU = (x, y + move), visRD = (x', y' + move) } updateView environment
308
keyboardMouse environment (SpecialKey KeyDown) Down _ _ = do env <- get environment let (x, y) = visLU env (x', y') = visRD env move = (y' - y) * moveFac environment $= env { visLU = (x, y + move), visRD = (x', y' + move) } updateView environment
308
false
false
0
12
111
130
67
63
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x0205' = "\x0065\x030F"
39
decomposeChar '\x0205' = "\x0065\x030F"
39
decomposeChar '\x0205' = "\x0065\x030F"
39
false
false
0
4
3
10
4
6
null
null
kojiromike/Idris-dev
src/Idris/Output.hs
bsd-3-clause
pshow :: IState -> Err -> String pshow ist err = displayDecorated (consoleDecorate ist) . renderPretty 1.0 80 . fmap (fancifyAnnots ist True) $ pprintErr ist err
193
pshow :: IState -> Err -> String pshow ist err = displayDecorated (consoleDecorate ist) . renderPretty 1.0 80 . fmap (fancifyAnnots ist True) $ pprintErr ist err
193
pshow ist err = displayDecorated (consoleDecorate ist) . renderPretty 1.0 80 . fmap (fancifyAnnots ist True) $ pprintErr ist err
160
false
true
0
10
58
66
31
35
null
null
kowey/GenI
src/NLP/GenI/Builder.hs
gpl-2.0
num_comparisons = "comparisons"
31
num_comparisons = "comparisons"
31
num_comparisons = "comparisons"
31
false
false
0
4
2
6
3
3
null
null
Mikolaj/miniutter
NLP/Miniutter/English.hs
bsd-3-clause
nonPremodifying "He" = "His"
30
nonPremodifying "He" = "His"
30
nonPremodifying "He" = "His"
30
false
false
1
5
5
13
4
9
null
null
diku-dk/futhark
src/Futhark/Construct.hs
isc
eSignum :: MonadBuilder m => m (Exp (Rep m)) -> m (Exp (Rep m)) eSignum em = do e <- em e' <- letSubExp "signum_arg" e t <- subExpType e' case t of Prim (IntType int_t) -> return $ BasicOp $ UnOp (SSignum int_t) e' _ -> error $ "eSignum: operand " ++ pretty e ++ " has invalid type."
317
eSignum :: MonadBuilder m => m (Exp (Rep m)) -> m (Exp (Rep m)) eSignum em = do e <- em e' <- letSubExp "signum_arg" e t <- subExpType e' case t of Prim (IntType int_t) -> return $ BasicOp $ UnOp (SSignum int_t) e' _ -> error $ "eSignum: operand " ++ pretty e ++ " has invalid type."
317
eSignum em = do e <- em e' <- letSubExp "signum_arg" e t <- subExpType e' case t of Prim (IntType int_t) -> return $ BasicOp $ UnOp (SSignum int_t) e' _ -> error $ "eSignum: operand " ++ pretty e ++ " has invalid type."
247
false
true
0
13
93
146
67
79
null
null
ocramz/optimization
src/Optimization/Constrained/ProjectedSubgradient.hs
bsd-3-clause
-- | @projSubgrad stepSizes proj a b x0@ minimizes the objective @A -- x - b@ potentially projecting iterates into a feasible space with -- @proj@ with the given step-size schedule projSubgrad :: (Additive f, Traversable f, Metric f, Ord a, Fractional a) => StepSched f a -- ^ A step size schedule ...
1,027
projSubgrad :: (Additive f, Traversable f, Metric f, Ord a, Fractional a) => StepSched f a -- ^ A step size schedule -> (f a -> f a) -- ^ Function projecting into the feasible space -> (f a -> f a) -- ^ Gradient of objective function -> (f a -> a) -- ^ The object...
846
projSubgrad stepSizes proj df f = go stepSizes where go (alpha:rest) x0 = let p = negated $ df x0 step = alpha (df x0) (f x0) x1 = proj $ x0 ^+^ step *^ p in x1 : go rest x1 go [] _ = [] -- | @linearProjSubgrad stepSizes proj a b x0@ minimizes the objec...
440
true
true
1
12
335
236
121
115
null
null
meoblast001/dresdner-verkehrsbetriebe
src/Network/Transportation/Germany/DVB/Route.hs
mit
-- |Take an HTTP connection error and convert it into an error which can be -- returned in a RouteResult. connErrToResultErr :: ConnError -> Error connErrToResultErr ErrorReset = HttpResetError
193
connErrToResultErr :: ConnError -> Error connErrToResultErr ErrorReset = HttpResetError
87
connErrToResultErr ErrorReset = HttpResetError
46
true
true
0
7
28
26
12
14
null
null
josefs/autosar
ARSim/arsim/Tricky.hs
bsd-3-clause
-- This module should not typecheck due to a leaked inter-runnable variable rmethod rport excl irv = do Ok v <- rteRead rport rteEnter excl Ok s <- rteIrvRead irv rteIrvWrite irv (s+v) rteExit excl
238
rmethod rport excl irv = do Ok v <- rteRead rport rteEnter excl Ok s <- rteIrvRead irv rteIrvWrite irv (s+v) rteExit excl
161
rmethod rport excl irv = do Ok v <- rteRead rport rteEnter excl Ok s <- rteIrvRead irv rteIrvWrite irv (s+v) rteExit excl
161
true
false
0
9
75
69
28
41
null
null
eb-gh-cr/XMonadContrib1
XMonad/Hooks/UrgencyHook.hs
bsd-3-clause
adjustReminders :: ([Reminder] -> [Reminder]) -> X () adjustReminders = XS.modify
81
adjustReminders :: ([Reminder] -> [Reminder]) -> X () adjustReminders = XS.modify
81
adjustReminders = XS.modify
27
false
true
0
8
10
35
19
16
null
null
pparkkin/eta
compiler/ETA/BasicTypes/OccName.hs
bsd-3-clause
mkDFunOcc :: String -- ^ Typically the class and type glommed together e.g. @OrdMaybe@. -- Only used in debug mode, for extra clarity -> Bool -- ^ Is this a hs-boot instance DFun? -> OccSet -- ^ avoid these Occs -> OccNa...
817
mkDFunOcc :: String -- ^ Typically the class and type glommed together e.g. @OrdMaybe@. -- Only used in debug mode, for extra clarity -> Bool -- ^ Is this a hs-boot instance DFun? -> OccSet -- ^ avoid these Occs -> OccNa...
583
mkDFunOcc info_str is_boot set = chooseUniqueOcc VarName (prefix ++ info_str) set where prefix | is_boot = "$fx" | otherwise = "$f" {- Sometimes we need to pick an OccName that has not already been used, given a set of in-use OccNames. -}
260
true
true
0
7
260
76
41
35
null
null
urbanslug/ghc
compiler/coreSyn/PprCore.hs
bsd-3-clause
pprRule (Rule { ru_name = name, ru_act = act, ru_fn = fn, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs }) = hang (doubleQuotes (ftext name) <+> ppr act) 4 (sep [ptext (sLit "forall") <+> sep (map (pprCoreBinder LambdaBind) tpl_vars) <> dot, ...
446
pprRule (Rule { ru_name = name, ru_act = act, ru_fn = fn, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs }) = hang (doubleQuotes (ftext name) <+> ppr act) 4 (sep [ptext (sLit "forall") <+> sep (map (pprCoreBinder LambdaBind) tpl_vars) <> dot, ...
446
pprRule (Rule { ru_name = name, ru_act = act, ru_fn = fn, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs }) = hang (doubleQuotes (ftext name) <+> ppr act) 4 (sep [ptext (sLit "forall") <+> sep (map (pprCoreBinder LambdaBind) tpl_vars) <> dot, ...
446
false
false
0
14
161
179
91
88
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
showClassKey = mkPreludeClassUnique 17
49
showClassKey = mkPreludeClassUnique 17
49
showClassKey = mkPreludeClassUnique 17
49
false
false
0
5
14
9
4
5
null
null
snoyberg/ghc
compiler/main/HscTypes.hs
bsd-3-clause
implicitTyConThings :: TyCon -> [TyThing] implicitTyConThings tc = class_stuff ++ -- fields (names of selectors) -- (possibly) implicit newtype axioms -- or type family axioms implicitCoTyCon tc ++ -- for each data constructor in order, -- the constructor, worker, and (possibly) ...
792
implicitTyConThings :: TyCon -> [TyThing] implicitTyConThings tc = class_stuff ++ -- fields (names of selectors) -- (possibly) implicit newtype axioms -- or type family axioms implicitCoTyCon tc ++ -- for each data constructor in order, -- the constructor, worker, and (possibly) ...
792
implicitTyConThings tc = class_stuff ++ -- fields (names of selectors) -- (possibly) implicit newtype axioms -- or type family axioms implicitCoTyCon tc ++ -- for each data constructor in order, -- the constructor, worker, and (possibly) wrapper [ thing | dc <- tyConDataCo...
750
false
true
5
11
200
123
59
64
null
null
feliposz/spoj-solutions
haskell/_gen_INTEST.hs
mit
minX = 0 :: Int
15
minX = 0 :: Int
15
minX = 0 :: Int
15
false
false
0
4
4
12
6
6
null
null
seagreen/station
src/Station/Implementation/PlainFilesystem.hs
mit
buildBytes :: FilePath -> IO (HashMap ST.Hash ByteString) buildBytes dir = PP.fold (\acc (x,y) -> HM.insert x y acc) mempty identity $ f P.<-< forDirectoryContents dir where f :: P.Pipe FilePath (ST.Hash, ByteString) IO () f = PP.mapM $ \path -> do bts <- stripTrailingEOL' path =<< ...
845
buildBytes :: FilePath -> IO (HashMap ST.Hash ByteString) buildBytes dir = PP.fold (\acc (x,y) -> HM.insert x y acc) mempty identity $ f P.<-< forDirectoryContents dir where f :: P.Pipe FilePath (ST.Hash, ByteString) IO () f = PP.mapM $ \path -> do bts <- stripTrailingEOL' path =<< ...
845
buildBytes dir = PP.fold (\acc (x,y) -> HM.insert x y acc) mempty identity $ f P.<-< forDirectoryContents dir where f :: P.Pipe FilePath (ST.Hash, ByteString) IO () f = PP.mapM $ \path -> do bts <- stripTrailingEOL' path =<< BS.readFile path case ST.bytesMatchHash (T.pac...
787
false
true
6
14
233
287
135
152
null
null
kearnh/HToyRayTracer
src/Vec.hs
bsd-3-clause
atZVec3 f (V3 x y z) = V3 x y (f z)
35
atZVec3 f (V3 x y z) = V3 x y (f z)
35
atZVec3 f (V3 x y z) = V3 x y (f z)
35
false
false
0
7
11
34
16
18
null
null
alang9/deque
Data/Deque/NonCat/LessTyped.hs
bsd-3-clause
toFringe a@B0{} b@B1{} = RX a b
31
toFringe a@B0{} b@B1{} = RX a b
31
toFringe a@B0{} b@B1{} = RX a b
31
false
false
2
6
6
39
15
24
null
null
diku-kmc/repg
src/KMC/SymbolicSST.hs
mit
valuate s (Right d:xs) = d ++ valuate s xs
42
valuate s (Right d:xs) = d ++ valuate s xs
42
valuate s (Right d:xs) = d ++ valuate s xs
42
false
false
0
8
9
30
14
16
null
null
plcplc/hie
src/Graphics/HIE/Session.hs
agpl-3.0
sessionAddBinding :: Session -> Identifier -> Dynamic -> UI -> STM () sessionAddBinding (Session{..}) identifier value ui = void $ do store <- readTVar sessionMap let (oldVal, store') = M.insertLookupWithKey (\_ _ v -> v) identifier (value, ui) store (if isJust oldVal then writeTChan sessionUpdateBi...
440
sessionAddBinding :: Session -> Identifier -> Dynamic -> UI -> STM () sessionAddBinding (Session{..}) identifier value ui = void $ do store <- readTVar sessionMap let (oldVal, store') = M.insertLookupWithKey (\_ _ v -> v) identifier (value, ui) store (if isJust oldVal then writeTChan sessionUpdateBi...
440
sessionAddBinding (Session{..}) identifier value ui = void $ do store <- readTVar sessionMap let (oldVal, store') = M.insertLookupWithKey (\_ _ v -> v) identifier (value, ui) store (if isJust oldVal then writeTChan sessionUpdateBindingEvents else writeTChan sessionAddBindingEvents) (iden...
370
false
true
1
14
89
158
77
81
null
null
jatinshah/autonomous_systems
project/fvision.hugs/fxvision2.hs
mit
rackBlob :: ImageRGB {- sampled sub-image -} -> FVColor {- really a set of colors -} -> (Point2, Int, Int, Int) {- Center of blob, number of pixels, height, width -} trackBlob = undefined
256
trackBlob :: ImageRGB {- sampled sub-image -} -> FVColor {- really a set of colors -} -> (Point2, Int, Int, Int) trackBlob = undefined
160
trackBlob = undefined
21
true
true
0
9
102
40
22
18
null
null
keithodulaigh/Hets
OWL2/XMLConversion.hs
gpl-2.0
{- | sets the name of an element to a given string and the namespace to <http://www.w3.org/2002/07/owl#> -} setName :: String -> Element -> Element setName s e = e {elName = nullQN {qName = s, qURI = Just "http://www.w3.org/2002/07/owl#"} }
245
setName :: String -> Element -> Element setName s e = e {elName = nullQN {qName = s, qURI = Just "http://www.w3.org/2002/07/owl#"} }
136
setName s e = e {elName = nullQN {qName = s, qURI = Just "http://www.w3.org/2002/07/owl#"} }
96
true
true
0
9
45
50
28
22
null
null
michaelficarra/purescript
src/Language/PureScript/AST/SourcePos.hs
mit
displayStartEndPos :: SourceSpan -> String displayStartEndPos sp = displaySourcePos (spanStart sp) ++ " - " ++ displaySourcePos (spanEnd sp)
144
displayStartEndPos :: SourceSpan -> String displayStartEndPos sp = displaySourcePos (spanStart sp) ++ " - " ++ displaySourcePos (spanEnd sp)
144
displayStartEndPos sp = displaySourcePos (spanStart sp) ++ " - " ++ displaySourcePos (spanEnd sp)
101
false
true
2
7
22
51
22
29
null
null
jhickner/haskell-modbus
test/Data/ModbusSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "singleEncode" $ it "should check serialization of requests to make sure there aren't breaking changes" $ singleEncode`shouldBe` singleEncodeResult describe "singleDecode" $ it "should Decode to a list of modbus requests of the same length" $ lefts singleDecode `shoul...
675
spec :: Spec spec = do describe "singleEncode" $ it "should check serialization of requests to make sure there aren't breaking changes" $ singleEncode`shouldBe` singleEncodeResult describe "singleDecode" $ it "should Decode to a list of modbus requests of the same length" $ lefts singleDecode `shoul...
675
spec = do describe "singleEncode" $ it "should check serialization of requests to make sure there aren't breaking changes" $ singleEncode`shouldBe` singleEncodeResult describe "singleDecode" $ it "should Decode to a list of modbus requests of the same length" $ lefts singleDecode `shouldBe` [] des...
662
false
true
0
10
126
120
55
65
null
null
fmapfmapfmap/amazonka
amazonka-dynamodb-streams/gen/Network/AWS/DynamoDBStreams/Types/Product.hs
mpl-2.0
-- | The type of data from the modified DynamoDB item that was captured in -- this stream record: -- -- - 'KEYS_ONLY' - only the key attributes of the modified item. -- -- - 'NEW_IMAGE' - the entire item, as it appears after it was modified. -- -- - 'OLD_IMAGE' - the entire item, as it appeared before it was -- ...
565
srStreamViewType :: Lens' StreamRecord (Maybe StreamViewType) srStreamViewType = lens _srStreamViewType (\ s a -> s{_srStreamViewType = a})
139
srStreamViewType = lens _srStreamViewType (\ s a -> s{_srStreamViewType = a})
77
true
true
0
9
113
58
37
21
null
null
thomaseding/cgs
src/Transform/Merge.hs
bsd-3-clause
withOpenStack :: ([OpenKind] -> [OpenKind]) -> Merger () withOpenStack f = modify $ \st -> st { openStack = f $ openStack st }
126
withOpenStack :: ([OpenKind] -> [OpenKind]) -> Merger () withOpenStack f = modify $ \st -> st { openStack = f $ openStack st }
126
withOpenStack f = modify $ \st -> st { openStack = f $ openStack st }
69
false
true
0
10
23
60
32
28
null
null
sdiehl/ghc
compiler/parser/ApiAnnotation.hs
bsd-3-clause
-- | Retrieve a list of annotation 'SrcSpan's based on the 'SrcSpan' -- of the annotated AST element, and the known type of the annotation. getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan] getAnnotation (anns,_) span ann = case Map.lookup (span,ann) anns of Nothing -> [] Just ss -> ss ...
504
getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan] getAnnotation (anns,_) span ann = case Map.lookup (span,ann) anns of Nothing -> [] Just ss -> ss -- | Retrieve a list of annotation 'SrcSpan's based on the 'SrcSpan' -- of the annotated AST element, and the known type of the annotation. ...
364
getAnnotation (anns,_) span ann = case Map.lookup (span,ann) anns of Nothing -> [] Just ss -> ss -- | Retrieve a list of annotation 'SrcSpan's based on the 'SrcSpan' -- of the annotated AST element, and the known type of the annotation. -- The list is removed from the annotations.
299
true
true
0
10
101
84
44
40
null
null
Hofmaier/robertson
demo/src/example.hs
mit
composed4 = print2stdout `mappend` logto
40
composed4 = print2stdout `mappend` logto
40
composed4 = print2stdout `mappend` logto
40
false
false
0
5
4
12
7
5
null
null
brendanhay/gogol
gogol-dns/gen/Network/Google/DNS/Types/Product.hs
mpl-2.0
-- | For privately visible zones, the set of Virtual Private Cloud resources -- that the zone is visible from. mzPrivateVisibilityConfig :: Lens' ManagedZone (Maybe ManagedZonePrivateVisibilityConfig) mzPrivateVisibilityConfig = lens _mzPrivateVisibilityConfig (\ s a -> s{_mzPrivateVisibilityConfig = a})
313
mzPrivateVisibilityConfig :: Lens' ManagedZone (Maybe ManagedZonePrivateVisibilityConfig) mzPrivateVisibilityConfig = lens _mzPrivateVisibilityConfig (\ s a -> s{_mzPrivateVisibilityConfig = a})
202
mzPrivateVisibilityConfig = lens _mzPrivateVisibilityConfig (\ s a -> s{_mzPrivateVisibilityConfig = a})
112
true
true
0
8
44
50
26
24
null
null
ezyang/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isBootUnfolding :: Unfolding -> Bool isBootUnfolding BootUnfolding = True
73
isBootUnfolding :: Unfolding -> Bool isBootUnfolding BootUnfolding = True
73
isBootUnfolding BootUnfolding = True
36
false
true
0
5
8
18
9
9
null
null
beni55/haste-compiler
libraries/ghc-7.10/ghc-prim/GHC/Prim.hs
bsd-3-clause
-- | Reads vector; offset in bytes. indexWord16X32OffAddr# :: Addr# -> Int# -> Word16X32# indexWord16X32OffAddr# = let x = x in x
131
indexWord16X32OffAddr# :: Addr# -> Int# -> Word16X32# indexWord16X32OffAddr# = let x = x in x
93
indexWord16X32OffAddr# = let x = x in x
39
true
true
0
8
23
38
17
21
null
null
Drezil/neat
test/Handler/ProfitItemsSpec.hs
gpl-3.0
spec :: Spec spec = withApp $ do describe "getProfitItemsR" $ do error "Spec not implemented: getProfitItemsR"
123
spec :: Spec spec = withApp $ do describe "getProfitItemsR" $ do error "Spec not implemented: getProfitItemsR"
123
spec = withApp $ do describe "getProfitItemsR" $ do error "Spec not implemented: getProfitItemsR"
110
false
true
0
11
29
31
14
17
null
null
benekastah/ebitor
test/Ebitor/RopeTest.hs
bsd-3-clause
prop_unpack :: String -> Bool prop_unpack s = unpack (packRope s) == s
70
prop_unpack :: String -> Bool prop_unpack s = unpack (packRope s) == s
70
prop_unpack s = unpack (packRope s) == s
40
false
true
0
8
12
31
15
16
null
null
mrmonday/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
c_negFloat _ = Nothing
27
c_negFloat _ = Nothing
27
c_negFloat _ = Nothing
27
false
false
0
4
8
10
4
6
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | Mond's waiting time for requesting the current configuration. mondConfigTimeInterval :: Int mondConfigTimeInterval = 15
124
mondConfigTimeInterval :: Int mondConfigTimeInterval = 15
57
mondConfigTimeInterval = 15
27
true
true
0
6
15
19
8
11
null
null
siddhanathan/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
isClassOpId_maybe id = case Var.idDetails id of ClassOpId cls -> Just cls _other -> Nothing
146
isClassOpId_maybe id = case Var.idDetails id of ClassOpId cls -> Just cls _other -> Nothing
146
isClassOpId_maybe id = case Var.idDetails id of ClassOpId cls -> Just cls _other -> Nothing
146
false
false
0
8
69
36
16
20
null
null
DaMSL/K3
src/Language/K3/Analysis/HMTypes/DataTypes.hs
apache-2.0
isQTLower _ = False
19
isQTLower _ = False
19
isQTLower _ = False
19
false
false
0
5
3
9
4
5
null
null
caneroj1/Crypto-hs
app/Challenges/Challenge3.hs
bsd-3-clause
-- Challenge 3 is to break single-character XOR encryption input :: HexString input = hexString "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
166
input :: HexString input = hexString "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
107
input = hexString "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
88
true
true
0
5
15
15
8
7
null
null
agocorona/ghcjs-perch
src/Internal/Perch.hs
mit
-- | A declarative synonym of @flip forElements@. withElems_ :: Perch -> JSString -> IO () withElems_ = flip forElems_
118
withElems_ :: Perch -> JSString -> IO () withElems_ = flip forElems_
68
withElems_ = flip forElems_
27
true
true
0
9
19
34
15
19
null
null
da-x/lamdu
bottlelib/Data/CurAndPrev.hs
gpl-3.0
current :: Lens' (CurAndPrev a) a current f CurAndPrev{..} = f _current <&> \_current -> CurAndPrev{..}
103
current :: Lens' (CurAndPrev a) a current f CurAndPrev{..} = f _current <&> \_current -> CurAndPrev{..}
103
current f CurAndPrev{..} = f _current <&> \_current -> CurAndPrev{..}
69
false
true
0
7
15
50
25
25
null
null
CulpaBS/wbBach
src/Futhark/Representation/Primitive.hs
bsd-3-clause
doConvOp (UIToFP _ to) (IntValue v) = Just $ FloatValue $ doUIToFP v to
71
doConvOp (UIToFP _ to) (IntValue v) = Just $ FloatValue $ doUIToFP v to
71
doConvOp (UIToFP _ to) (IntValue v) = Just $ FloatValue $ doUIToFP v to
71
false
false
0
7
13
41
19
22
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
isSpellCaster ZergQueensNest = False
36
isSpellCaster ZergQueensNest = False
36
isSpellCaster ZergQueensNest = False
36
false
false
0
5
3
9
4
5
null
null
valis/hoq
src/Syntax/PrettyPrinter.hs
gpl-2.0
precTerm :: Term Syntax a -> Int precTerm (Var _ []) = 110
58
precTerm :: Term Syntax a -> Int precTerm (Var _ []) = 110
58
precTerm (Var _ []) = 110
25
false
true
0
8
12
33
16
17
null
null
elieux/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
nlList exprs = noLoc (ExplicitList placeHolderType Nothing exprs)
75
nlList exprs = noLoc (ExplicitList placeHolderType Nothing exprs)
75
nlList exprs = noLoc (ExplicitList placeHolderType Nothing exprs)
75
false
false
1
6
17
25
10
15
null
null
raymoo/shmuppy
src/Game.hs
gpl-3.0
clearGarbage :: [Behavior Bullet] -> Behavior [Behavior Bullet] clearGarbage bbs = filterM (inRectangle (screenLeft, screenBottom) (screenRight, screenTop) <$>) bbs where screenLeft = -gameW/2 screenRight = gameW/2 screenTop = gameH/2 screenBottom = -gameH/2
284
clearGarbage :: [Behavior Bullet] -> Behavior [Behavior Bullet] clearGarbage bbs = filterM (inRectangle (screenLeft, screenBottom) (screenRight, screenTop) <$>) bbs where screenLeft = -gameW/2 screenRight = gameW/2 screenTop = gameH/2 screenBottom = -gameH/2
284
clearGarbage bbs = filterM (inRectangle (screenLeft, screenBottom) (screenRight, screenTop) <$>) bbs where screenLeft = -gameW/2 screenRight = gameW/2 screenTop = gameH/2 screenBottom = -gameH/2
220
false
true
3
10
57
108
54
54
null
null
kindohm/tidal-midi
Sound/Tidal/MIDI/System1M.hs
gpl-3.0
(rnoisetype, rnoisetype_p) = pF "rnoisetype" (Just 0)
53
(rnoisetype, rnoisetype_p) = pF "rnoisetype" (Just 0)
53
(rnoisetype, rnoisetype_p) = pF "rnoisetype" (Just 0)
53
false
false
0
7
6
24
12
12
null
null
synsem/texhs
src/Text/Doc/Writer/Epub.hs
gpl-3.0
prepDoc :: Doc -> MultiFileDoc prepDoc = toMultiFileDoc 3 . addBibliography . addNotes . doc2secdoc . setHtmlVersion XHTML1
125
prepDoc :: Doc -> MultiFileDoc prepDoc = toMultiFileDoc 3 . addBibliography . addNotes . doc2secdoc . setHtmlVersion XHTML1
125
prepDoc = toMultiFileDoc 3 . addBibliography . addNotes . doc2secdoc . setHtmlVersion XHTML1
94
false
true
0
9
19
37
18
19
null
null
emaphis/Haskell-Practice
cis194/src/Week01/Lecture01.hs
bsd-3-clause
foo 1 | "Haskell" > "C++" = 3 | otherwise = 4
57
foo 1 | "Haskell" > "C++" = 3 | otherwise = 4
57
foo 1 | "Haskell" > "C++" = 3 | otherwise = 4
57
false
false
0
8
23
34
14
20
null
null
seereason/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
displayRawVersionRange :: VersionRange -> String displayRawVersionRange = Disp.render . fst . foldVersionRange' -- precedence: -- All the same as the usual pretty printer, except for the parens ( Disp.text "-any" , 0 :: Int) (\v -> (Disp.te...
1,133
displayRawVersionRange :: VersionRange -> String displayRawVersionRange = Disp.render . fst . foldVersionRange' -- precedence: -- All the same as the usual pretty printer, except for the parens ( Disp.text "-any" , 0 :: Int) (\v -> (Disp.te...
1,133
displayRawVersionRange = Disp.render . fst . foldVersionRange' -- precedence: -- All the same as the usual pretty printer, except for the parens ( Disp.text "-any" , 0 :: Int) (\v -> (Disp.text "==" <> disp v , 0)) (\...
1,084
false
true
2
11
470
460
237
223
null
null
text-utf8/text
benchmarks/haskell/Benchmarks/Programs/Sort.hs
bsd-2-clause
text :: T.Text -> T.Text text = T.unlines . L.sort . T.lines
60
text :: T.Text -> T.Text text = T.unlines . L.sort . T.lines
60
text = T.unlines . L.sort . T.lines
35
false
true
0
7
11
33
17
16
null
null
ecaustin/haskhol-core
src/HaskHOL/Core/Kernel.hs
bsd-2-clause
-- Beta Reduction {-|@ (\\ x . t) x ---------------------------- |- (\\ x . t) x = t @ Fails with 'Left' in the following cases: * The term is not a valid application. * The reduction is not a trivial one, i.e. the argument term is not equivalent to the bound variable. -} primBETA :: Mon...
555
primBETA :: MonadThrow m => HOLTerm -> m HOLThm primBETA t@(CombIn (AbsIn bv bod) arg) | arg == bv = return . ThmIn [] $ safeMkEq t bod | otherwise = throwM $! HOLTermError t "primBETA_PRIM: not a trivial beta reduction"
250
primBETA t@(CombIn (AbsIn bv bod) arg) | arg == bv = return . ThmIn [] $ safeMkEq t bod | otherwise = throwM $! HOLTermError t "primBETA_PRIM: not a trivial beta reduction"
202
true
true
1
10
156
93
45
48
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | Serialized EventId of the request which produced this response. comEventId :: Lens' CommentListResponse (Maybe Text) comEventId = lens _comEventId (\ s a -> s{_comEventId = a})
183
comEventId :: Lens' CommentListResponse (Maybe Text) comEventId = lens _comEventId (\ s a -> s{_comEventId = a})
114
comEventId = lens _comEventId (\ s a -> s{_comEventId = a})
61
true
true
0
9
29
48
25
23
null
null
abooij/cubicaltt
CTT.hs
mit
upds :: [(Ident,Val)] -> Env -> Env upds xus rho = foldl (flip upd) rho xus
75
upds :: [(Ident,Val)] -> Env -> Env upds xus rho = foldl (flip upd) rho xus
75
upds xus rho = foldl (flip upd) rho xus
39
false
true
0
8
15
51
25
26
null
null
mettekou/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
-- | Creates a 'Literal' of type @Float#@ mkMachFloat :: Rational -> Literal mkMachFloat = MachFloat
100
mkMachFloat :: Rational -> Literal mkMachFloat = MachFloat
58
mkMachFloat = MachFloat
23
true
true
0
5
15
16
9
7
null
null
conal/hermit
src/HERMIT/PrettyPrinter/Clean.hs
bsd-2-clause
ppBinderMode :: PrettyH Var ppBinderMode = do v <- idR opts <- prettyC_options ^<< contextT if | isTyVar v -> case po_exprTypes opts of Omit -> return empty Abstract -> return typeBindSymbol Detailed -> ppDetailedVar ...
1,114
ppBinderMode :: PrettyH Var ppBinderMode = do v <- idR opts <- prettyC_options ^<< contextT if | isTyVar v -> case po_exprTypes opts of Omit -> return empty Abstract -> return typeBindSymbol Detailed -> ppDetailedVar ...
1,114
ppBinderMode = do v <- idR opts <- prettyC_options ^<< contextT if | isTyVar v -> case po_exprTypes opts of Omit -> return empty Abstract -> return typeBindSymbol Detailed -> ppDetailedVar _ -> ppVa...
1,086
false
true
0
19
549
208
94
114
null
null
sseefried/shady-graphics
src/Shady/CompileSurface.hs
agpl-3.0
-- | Surface shader program surfBProg :: EyePosE -> SurfB -> GLSL R1 R2 surfBProg eyePos s = shaderProgram (wrapSurf eyePos (s . pureD))
136
surfBProg :: EyePosE -> SurfB -> GLSL R1 R2 surfBProg eyePos s = shaderProgram (wrapSurf eyePos (s . pureD))
108
surfBProg eyePos s = shaderProgram (wrapSurf eyePos (s . pureD))
64
true
true
0
9
23
48
24
24
null
null
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Databases/Sessions/List.hs
mpl-2.0
-- | If non-empty, \`page_token\` should contain a next_page_token from a -- previous ListSessionsResponse. pidslPageToken :: Lens' ProjectsInstancesDatabasesSessionsList (Maybe Text) pidslPageToken = lens _pidslPageToken (\ s a -> s{_pidslPageToken = a})
263
pidslPageToken :: Lens' ProjectsInstancesDatabasesSessionsList (Maybe Text) pidslPageToken = lens _pidslPageToken (\ s a -> s{_pidslPageToken = a})
155
pidslPageToken = lens _pidslPageToken (\ s a -> s{_pidslPageToken = a})
79
true
true
0
9
38
49
26
23
null
null
d-strickland/dailyprogrammer
haskell/test/DailyProgrammer/Test118.hs
gpl-3.0
testRead5 = testTime @=? getDate "Nov 22, 61"
45
testRead5 = testTime @=? getDate "Nov 22, 61"
45
testRead5 = testTime @=? getDate "Nov 22, 61"
45
false
false
3
6
7
20
8
12
null
null
talanis85/rechord
haScales/src/Data/Music/Chords.hs
gpl-3.0
-- | A pentachord. pentachord :: Scale -> Chord pentachord s = mkChord s [Degree I natural, Degree III natural, Degree V natural, Degree VII natural, Degree II natural]
168
pentachord :: Scale -> Chord pentachord s = mkChord s [Degree I natural, Degree III natural, Degree V natural, Degree VII natural, Degree II natural]
149
pentachord s = mkChord s [Degree I natural, Degree III natural, Degree V natural, Degree VII natural, Degree II natural]
120
true
true
0
7
28
69
33
36
null
null
awbraunstein/emonad
src/Buffer.hs
mit
columnAtPoint :: Buffer -> Int columnAtPoint b = foldl (\p (_, mc) -> p + fromMaybe 0 mc) 0 (getLinesForPage b)
111
columnAtPoint :: Buffer -> Int columnAtPoint b = foldl (\p (_, mc) -> p + fromMaybe 0 mc) 0 (getLinesForPage b)
111
columnAtPoint b = foldl (\p (_, mc) -> p + fromMaybe 0 mc) 0 (getLinesForPage b)
80
false
true
0
9
20
62
30
32
null
null
gafiatulin/codewars
src/6 kyu/WhenGreatestIsLessThanSmallest.hs
mit
smallest :: Integer -> Integer -> Integer -> Integer smallest x y n = ((n `div` (lcm x y)) + 1) * lcm x y
105
smallest :: Integer -> Integer -> Integer -> Integer smallest x y n = ((n `div` (lcm x y)) + 1) * lcm x y
105
smallest x y n = ((n `div` (lcm x y)) + 1) * lcm x y
52
false
true
0
11
24
68
34
34
null
null
ocus/TinyASM_Haskell
library/TinyASM/Parser.hs
bsd-3-clause
digits :: ReadP String digits = munch1 (\chr -> chr >= '0' && chr <= '9')
73
digits :: ReadP String digits = munch1 (\chr -> chr >= '0' && chr <= '9')
73
digits = munch1 (\chr -> chr >= '0' && chr <= '9')
50
false
true
0
10
15
37
19
18
null
null
nyson/haste-compiler
src/hastec.hs
bsd-3-clause
-- | How should we run the compiler for this command line? runMode :: Bool -> [String] -> RunMode runMode booting as | "--help" `elem` as = Run Haste | "--install-executable" `elem` as = Run InstallJSExe | "--build-runner" `elem` as = Run BuildRunner | "--info" `elem` as ...
1,319
runMode :: Bool -> [String] -> RunMode runMode booting as | "--help" `elem` as = Run Haste | "--install-executable" `elem` as = Run InstallJSExe | "--build-runner" `elem` as = Run BuildRunner | "--info" `elem` as = DontRun ghcInfo | "--print-libdir" `elem`...
1,260
runMode booting as | "--help" `elem` as = Run Haste | "--install-executable" `elem` as = Run InstallJSExe | "--build-runner" `elem` as = Run BuildRunner | "--info" `elem` as = DontRun ghcInfo | "--print-libdir" `elem` as = DontRun hasteGhcLibDir...
1,221
true
true
10
12
358
352
178
174
null
null
ygale/yesod
yesod-core/Yesod/Core/Widget.hs
mit
whamlet :: QuasiQuoter whamlet = NP.hamletWithSettings rules NP.defaultHamletSettings
85
whamlet :: QuasiQuoter whamlet = NP.hamletWithSettings rules NP.defaultHamletSettings
85
whamlet = NP.hamletWithSettings rules NP.defaultHamletSettings
62
false
true
0
6
7
26
11
15
null
null
patperry/permutation
tests/Choose.hs
bsd-3-clause
prop_prev_choose (Index n1 k) = let n = n1-1 in prev (choose n k) == Nothing
80
prop_prev_choose (Index n1 k) = let n = n1-1 in prev (choose n k) == Nothing
80
prop_prev_choose (Index n1 k) = let n = n1-1 in prev (choose n k) == Nothing
80
false
false
0
10
19
47
22
25
null
null
modeswitch/barrelfish
hake/RuleDefs.hs
mit
cToAssembler :: Options -> String -> String -> String -> String -> [ RuleToken ] cToAssembler opts phase src afile objdepfile | optArch opts == "x86_64" = X86_64.cToAssembler opts phase src afile objdepfile | optArch opts == "x86_32" = X86_32.cToAssembler opts phase src afile objdepfile | optArch opts == ...
795
cToAssembler :: Options -> String -> String -> String -> String -> [ RuleToken ] cToAssembler opts phase src afile objdepfile | optArch opts == "x86_64" = X86_64.cToAssembler opts phase src afile objdepfile | optArch opts == "x86_32" = X86_32.cToAssembler opts phase src afile objdepfile | optArch opts == ...
795
cToAssembler opts phase src afile objdepfile | optArch opts == "x86_64" = X86_64.cToAssembler opts phase src afile objdepfile | optArch opts == "x86_32" = X86_32.cToAssembler opts phase src afile objdepfile | optArch opts == "scc" = SCC.cToAssembler opts phase src afile objdepfile | optArch opts =...
714
false
true
1
11
160
284
132
152
null
null
mrkkrp/stack
src/Stack/Build/Cache.hs
bsd-3-clause
tryGetFlagCache :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Installed -> m (Maybe ConfigCache) tryGetFlagCache gid = do fp <- flagCacheFile gid $(versionedDecodeFile configCacheVC) fp
286
tryGetFlagCache :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Installed -> m (Maybe ConfigCache) tryGetFlagCache gid = do fp <- flagCacheFile gid $(versionedDecodeFile configCacheVC) fp
286
tryGetFlagCache gid = do fp <- flagCacheFile gid $(versionedDecodeFile configCacheVC) fp
96
false
true
0
11
72
98
45
53
null
null
y-usuzumi/survive-the-course
advent-of-code/app/Year2021/Day2/Part2/Main.hs
bsd-3-clause
readInput :: IO [Command Int] readInput = map read . lines <$> readFile inputFile
81
readInput :: IO [Command Int] readInput = map read . lines <$> readFile inputFile
81
readInput = map read . lines <$> readFile inputFile
51
false
true
0
7
13
34
16
18
null
null
gridaphobe/ghc
compiler/utils/Util.hs
bsd-3-clause
snd3 :: (b -> d) -> (a, b, c) -> (a, d, c) snd3 f (a, b, c) = (a, f b, c)
73
snd3 :: (b -> d) -> (a, b, c) -> (a, d, c) snd3 f (a, b, c) = (a, f b, c)
73
snd3 f (a, b, c) = (a, f b, c)
30
false
true
0
9
22
76
42
34
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Parser.hs
mit
prop_readSubshell = isOk readSubshell "( cd /foo; tar cf stuff.tar * )"
71
prop_readSubshell = isOk readSubshell "( cd /foo; tar cf stuff.tar * )"
71
prop_readSubshell = isOk readSubshell "( cd /foo; tar cf stuff.tar * )"
71
false
false
0
5
11
11
5
6
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/UnbalancedSet.hs
mit
filterGE _ E = E
16
filterGE _ E = E
16
filterGE _ E = E
16
false
false
0
5
4
11
5
6
null
null
creichert/persistent
persistent-sqlite/Database/Persist/Sqlite.hs
mit
wrapConnection :: Sqlite.Connection -> LogFunc -> IO SqlBackend wrapConnection = wrapConnectionInfo (mkSqliteConnectionInfo "")
127
wrapConnection :: Sqlite.Connection -> LogFunc -> IO SqlBackend wrapConnection = wrapConnectionInfo (mkSqliteConnectionInfo "")
127
wrapConnection = wrapConnectionInfo (mkSqliteConnectionInfo "")
63
false
true
0
8
12
38
17
21
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Fresh.hs
bsd-3-clause
refreshRefType (RAllP π t) = RAllP π <$> refresh t
52
refreshRefType (RAllP π t) = RAllP π <$> refresh t
52
refreshRefType (RAllP π t) = RAllP π <$> refresh t
52
false
false
0
7
11
27
12
15
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_H_SGML_COMMENT :: Int wxSTC_H_SGML_COMMENT = 29
53
wxSTC_H_SGML_COMMENT :: Int wxSTC_H_SGML_COMMENT = 29
53
wxSTC_H_SGML_COMMENT = 29
25
false
true
0
6
5
18
7
11
null
null
ohua-dev/ohua-core
core/src/Ohua/DFLang/Refs.hs
epl-1.0
ctrl :: DFFnRef ctrl = DFFunction Refs.ctrl
43
ctrl :: DFFnRef ctrl = DFFunction Refs.ctrl
43
ctrl = DFFunction Refs.ctrl
27
false
true
0
6
6
22
9
13
null
null
ddssff/rdf4h
testsuite/tests/Text/RDF/RDF4H/TurtleParser_ConformanceTest.hs
bsd-3-clause
doGoodConformanceTest :: Either ParseFailure TriplesGraph -> Either ParseFailure TriplesGraph -> String -> IO Test doGoodConformanceTest expGr inGr testname = do let t1 = assertLoadSuccess (printf "expected (%s): " testname) expGr t2 = assertLoadSucc...
595
doGoodConformanceTest :: Either ParseFailure TriplesGraph -> Either ParseFailure TriplesGraph -> String -> IO Test doGoodConformanceTest expGr inGr testname = do let t1 = assertLoadSuccess (printf "expected (%s): " testname) expGr t2 = assertLoadSucc...
595
doGoodConformanceTest expGr inGr testname = do let t1 = assertLoadSuccess (printf "expected (%s): " testname) expGr t2 = assertLoadSuccess (printf " input (%s): " testname) inGr t3 = assertEquivalent testname expGr inGr return $ testGroup (printf "Conformance %s" testname) $ map (uncurry testC...
422
false
true
0
13
153
160
79
81
null
null
UWNetworksLab/arrakis
hake/RuleDefs.hs
mit
------------------------------------------------------------------------- -- -- Functions to create useful filenames -- dependFilePath :: String -> String dependFilePath obj = obj ++ ".depend"
193
dependFilePath :: String -> String dependFilePath obj = obj ++ ".depend"
72
dependFilePath obj = obj ++ ".depend"
37
true
true
0
5
20
26
15
11
null
null
anton-dessiatov/stack
src/Stack/Config.hs
bsd-3-clause
-- Load the configuration, using environment variables, and defaults as -- necessary. loadConfigMaybeProject :: HasRunner env => ConfigMonoid -- ^ Config monoid from parsed command-line arguments -> Maybe AbstractResolver -- ^ Override resolver -> LocalConfigStatus (Project, Path Abs File, Confi...
2,726
loadConfigMaybeProject :: HasRunner env => ConfigMonoid -- ^ Config monoid from parsed command-line arguments -> Maybe AbstractResolver -- ^ Override resolver -> LocalConfigStatus (Project, Path Abs File, ConfigMonoid) -- ^ Project config to use, if any -> RIO env LoadConfig loadConfigMa...
2,640
loadConfigMaybeProject configArgs mresolver mproject = do (stackRoot, userOwnsStackRoot) <- determineStackRootAndOwnership configArgs let loadHelper mproject' = do userConfigPath <- getDefaultUserConfigPath stackRoot extraConfigs0 <- getExtraConfigs userConfigPath >>= mapM (\f...
2,332
true
true
0
22
778
554
279
275
null
null
begriffs/hscope
HScope.hs
bsd-3-clause
buildOne :: Config -> FilePath -> WriteCDB IO () buildOne cfg f = do when (verbose cfg) $ liftIO $ putStrLn $ "Processing " ++ f addBS (B.pack "0_hs_files") (B.pack f) e'preprocessed <- liftIO $ preprocess (cCPPIncludes cfg) f case e'preprocessed of Left cppErr -> warning $ "CPP er...
826
buildOne :: Config -> FilePath -> WriteCDB IO () buildOne cfg f = do when (verbose cfg) $ liftIO $ putStrLn $ "Processing " ++ f addBS (B.pack "0_hs_files") (B.pack f) e'preprocessed <- liftIO $ preprocess (cCPPIncludes cfg) f case e'preprocessed of Left cppErr -> warning $ "CPP er...
826
buildOne cfg f = do when (verbose cfg) $ liftIO $ putStrLn $ "Processing " ++ f addBS (B.pack "0_hs_files") (B.pack f) e'preprocessed <- liftIO $ preprocess (cCPPIncludes cfg) f case e'preprocessed of Left cppErr -> warning $ "CPP error: " ++ cppErr Right (fstr, lns) -> eit...
777
false
true
0
14
280
255
119
136
null
null
deadfoxygrandpa/Elm
compiler/Type/ExtraChecks.hs
bsd-3-clause
occurs :: (String, TT.Variable) -> StateT TS.SolverState IO () occurs (name, variable) = do vars <- liftIO $ infiniteVars [] variable case vars of [] -> return () var:_ -> do desc <- liftIO $ UF.descriptor var case TT.structure desc of Nothing -> modify $...
1,362
occurs :: (String, TT.Variable) -> StateT TS.SolverState IO () occurs (name, variable) = do vars <- liftIO $ infiniteVars [] variable case vars of [] -> return () var:_ -> do desc <- liftIO $ UF.descriptor var case TT.structure desc of Nothing -> modify $...
1,362
occurs (name, variable) = do vars <- liftIO $ infiniteVars [] variable case vars of [] -> return () var:_ -> do desc <- liftIO $ UF.descriptor var case TT.structure desc of Nothing -> modify $ \state -> state { TS.sErrors = fallback : TS.sErrors state } ...
1,299
false
true
1
24
518
527
252
275
null
null