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
damoxc/ganeti
test/hs/Test/Ganeti/Hypervisor/Xen/XmParser.hs
gpl-2.0
-- | Function to serialize LispConfigs in such a way that they can be rebuilt -- again by the lispConfigParser. serializeConf :: LispConfig -> String serializeConf (LCList c) = "(" ++ unwords (map serializeConf c) ++ ")"
220
serializeConf :: LispConfig -> String serializeConf (LCList c) = "(" ++ unwords (map serializeConf c) ++ ")"
108
serializeConf (LCList c) = "(" ++ unwords (map serializeConf c) ++ ")"
70
true
true
0
9
36
49
24
25
null
null
rudymatela/leancheck
test/types.hs
bsd-3-clause
(x:xs) `permutation` ys = x `elem` ys && xs `permutation` delete x ys
74
(x:xs) `permutation` ys = x `elem` ys && xs `permutation` delete x ys
74
(x:xs) `permutation` ys = x `elem` ys && xs `permutation` delete x ys
74
false
false
0
7
17
42
23
19
null
null
anttisalonen/freekick2
src/Match/State/MatchState.hs
gpl-3.0
getRestartPoint (GoalKick r) = r
32
getRestartPoint (GoalKick r) = r
32
getRestartPoint (GoalKick r) = r
32
false
false
0
7
4
15
7
8
null
null
chpatrick/codec
src/Control/Monad/Codec.hs
bsd-3-clause
-- | Modify a serializer function so that it also returns the serialized value, -- Useful for implementing codecs. fmapArg :: Functor f => (a -> f ()) -> a -> f a fmapArg f x = x <$ f x
185
fmapArg :: Functor f => (a -> f ()) -> a -> f a fmapArg f x = x <$ f x
70
fmapArg f x = x <$ f x
22
true
true
2
11
40
61
28
33
null
null
jhance/gba-hs
src/Game/GBA/Memory.hs
mit
-- | Write to a virtual address. (in 8-bit mode) writeVirtual8 :: VirtualAddress -> Word8 -> GBA s () writeVirtual8 addr = case M.lookup addr writeMap of Nothing -> writeReal8 $ virtual addr Just k -> case writeAction8 k of Nothing -> const $ error $ "memory fault: illegal 8-bit write at 0x"...
410
writeVirtual8 :: VirtualAddress -> Word8 -> GBA s () writeVirtual8 addr = case M.lookup addr writeMap of Nothing -> writeReal8 $ virtual addr Just k -> case writeAction8 k of Nothing -> const $ error $ "memory fault: illegal 8-bit write at 0x" ++ showHex addr "" Just f -> f -- | Wri...
361
writeVirtual8 addr = case M.lookup addr writeMap of Nothing -> writeReal8 $ virtual addr Just k -> case writeAction8 k of Nothing -> const $ error $ "memory fault: illegal 8-bit write at 0x" ++ showHex addr "" Just f -> f -- | Write to a virtual address. (in 16-bit mode)
308
true
true
0
13
107
103
49
54
null
null
aufheben/lambda-arduino
packages/hArduino-0.9/System/Hardware/Arduino/Parts/LCD.hs
mit
getController :: LCD -> Arduino LCDController getController lcd = do bs <- gets boardState err <- gets bailOut liftIO $ withMVar bs $ \bst -> case lcd `M.lookup` lcds bst of Nothing -> err ("hArduino: Cannot locate " ++ show lcd) [] Just ld ->...
389
getController :: LCD -> Arduino LCDController getController lcd = do bs <- gets boardState err <- gets bailOut liftIO $ withMVar bs $ \bst -> case lcd `M.lookup` lcds bst of Nothing -> err ("hArduino: Cannot locate " ++ show lcd) [] Just ld ->...
389
getController lcd = do bs <- gets boardState err <- gets bailOut liftIO $ withMVar bs $ \bst -> case lcd `M.lookup` lcds bst of Nothing -> err ("hArduino: Cannot locate " ++ show lcd) [] Just ld -> return $ lcdController ld -- | Send a comman...
343
false
true
0
16
135
120
55
65
null
null
kojiromike/Idris-dev
src/Idris/Imports.hs
bsd-3-clause
-- | Get the index file name for a package name pkgIndex :: PkgName -> FilePath pkgIndex s = "00" ++ unPkgName s ++ "-idx.ibc"
126
pkgIndex :: PkgName -> FilePath pkgIndex s = "00" ++ unPkgName s ++ "-idx.ibc"
78
pkgIndex s = "00" ++ unPkgName s ++ "-idx.ibc"
46
true
true
4
7
24
38
16
22
null
null
utwente-fmt/scoop
src/StepPA.hs
bsd-3-clause
unfoldSummation :: Bool -> PSpecification -> ConfluentSummands -> DataSpec -> State -> Mapping -> (Variable,Type) -> [Constant] -> PSummand -> [Transition] unfoldSummation followConfluent spec confluent dataspec sourceState mapping (var,sort) [] summand = []
258
unfoldSummation :: Bool -> PSpecification -> ConfluentSummands -> DataSpec -> State -> Mapping -> (Variable,Type) -> [Constant] -> PSummand -> [Transition] unfoldSummation followConfluent spec confluent dataspec sourceState mapping (var,sort) [] summand = []
258
unfoldSummation followConfluent spec confluent dataspec sourceState mapping (var,sort) [] summand = []
102
false
true
0
16
32
94
48
46
null
null
GaloisInc/halvm-ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprParendExpr :: OutputableBndr id => HsExpr id -> SDoc pprParendExpr expr | hsExprNeedsParens expr = parens (pprExpr expr) | otherwise = pprExpr expr
167
pprParendExpr :: OutputableBndr id => HsExpr id -> SDoc pprParendExpr expr | hsExprNeedsParens expr = parens (pprExpr expr) | otherwise = pprExpr expr
167
pprParendExpr expr | hsExprNeedsParens expr = parens (pprExpr expr) | otherwise = pprExpr expr
111
false
true
1
8
39
56
25
31
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_MAX_SHININESS_NV :: GLenum gl_MAX_SHININESS_NV = 0x8504
58
gl_MAX_SHININESS_NV :: GLenum gl_MAX_SHININESS_NV = 0x8504
58
gl_MAX_SHININESS_NV = 0x8504
28
false
true
0
4
5
11
6
5
null
null
ahmadsalim/p3-tool
p3-tool/TVL/Pretty.hs
gpl-3.0
prettyAttributeValue (AvIs e) = text "is" <+> prettyExpr e
58
prettyAttributeValue (AvIs e) = text "is" <+> prettyExpr e
58
prettyAttributeValue (AvIs e) = text "is" <+> prettyExpr e
58
false
false
0
7
8
25
11
14
null
null
FranklinChen/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized)
61
intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized)
61
intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized)
61
false
false
0
8
8
29
13
16
null
null
kim/amazonka
amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types.hs
mpl-2.0
loSourceField :: Lens' LiteralOptions (Maybe Text) loSourceField = lens _loSourceField (\s a -> s { _loSourceField = a })
121
loSourceField :: Lens' LiteralOptions (Maybe Text) loSourceField = lens _loSourceField (\s a -> s { _loSourceField = a })
121
loSourceField = lens _loSourceField (\s a -> s { _loSourceField = a })
70
false
true
0
9
18
45
24
21
null
null
chrisdone/corebot
src/Main.hs
bsd-3-clause
ppalt :: Alt CoreBndr -> String ppalt (con,vars,exp) = ppcon con ++ concat (map (" "++) (map showppr vars)) ++ "→" ++ ppexp exp
127
ppalt :: Alt CoreBndr -> String ppalt (con,vars,exp) = ppcon con ++ concat (map (" "++) (map showppr vars)) ++ "→" ++ ppexp exp
127
ppalt (con,vars,exp) = ppcon con ++ concat (map (" "++) (map showppr vars)) ++ "→" ++ ppexp exp
95
false
true
0
12
23
71
36
35
null
null
acharal/parsec-prolog
src/Language/Prolog/Parser.hs
lgpl-3.0
opDirective1 _ = return ()
26
opDirective1 _ = return ()
26
opDirective1 _ = return ()
26
false
false
0
6
4
14
6
8
null
null
sinelaw/lamdu
Lamdu/Data/Expression/Infer/Conflicts.hs
gpl-3.0
inferWithConflicts :: Ord def => Infer.Loaded def a -> Infer.Node def -> State (Infer.Context def) ( Bool , Expr.Expression def (InferredWithConflicts def, a) ) inferWithConflicts loaded node = do (exprInferred, conflictsMap) <- mapStateT (toRes . runWriter) $ Infer.inferLoaded (Infer.InferActions r...
798
inferWithConflicts :: Ord def => Infer.Loaded def a -> Infer.Node def -> State (Infer.Context def) ( Bool , Expr.Expression def (InferredWithConflicts def, a) ) inferWithConflicts loaded node = do (exprInferred, conflictsMap) <- mapStateT (toRes . runWriter) $ Infer.inferLoaded (Infer.InferActions r...
798
inferWithConflicts loaded node = do (exprInferred, conflictsMap) <- mapStateT (toRes . runWriter) $ Infer.inferLoaded (Infer.InferActions reportConflict) loaded node let conflicts getRef x = getConflicts ((getRef . Infer.nRefs . Infer.iNode) x) conflictsMap toIWC x = InferredWithCo...
627
false
true
0
16
192
280
142
138
null
null
kajigor/uKanren_transformations
src/Util/ToProlog.hs
bsd-3-clause
sepRules (x@((n,_),_):xs) = let (g,r) = partition ((n==) . fst . fst) xs in (x:g) : sepRules r
122
sepRules (x@((n,_),_):xs) = let (g,r) = partition ((n==) . fst . fst) xs in (x:g) : sepRules r
122
sepRules (x@((n,_),_):xs) = let (g,r) = partition ((n==) . fst . fst) xs in (x:g) : sepRules r
122
false
false
0
13
45
83
45
38
null
null
cartazio/omega
src/PrimParser.hs
bsd-3-clause
backwards :: V -> (V -> V) backwards fun v = help ((getf fun) v) where help (FIO w) = case unsafePerformIO w of Ok (v@(Vlazy _ _)) -> help(analyzeWith return v) Ok v -> v Fail loc _ _ mess -> error("Near "++show loc++"\n"++mess) getf (Vf f _ _) = f ...
854
backwards :: V -> (V -> V) backwards fun v = help ((getf fun) v) where help (FIO w) = case unsafePerformIO w of Ok (v@(Vlazy _ _)) -> help(analyzeWith return v) Ok v -> v Fail loc _ _ mess -> error("Near "++show loc++"\n"++mess) getf (Vf f _ _) = f ...
854
backwards fun v = help ((getf fun) v) where help (FIO w) = case unsafePerformIO w of Ok (v@(Vlazy _ _)) -> help(analyzeWith return v) Ok v -> v Fail loc _ _ mess -> error("Near "++show loc++"\n"++mess) getf (Vf f _ _) = f getf (Vprimfun _ f)...
827
false
true
3
14
251
202
99
103
null
null
dec9ue/jhc_copygc
src/Interactive.hs
gpl-2.0
nameTag _ = '?'
15
nameTag _ = '?'
15
nameTag _ = '?'
15
false
false
0
4
3
10
4
6
null
null
GaloisInc/ivory
ivory/src/Ivory/Language/Syntax/Concrete/QQ/ExprQQ.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Expressions -- | Top-level constant definition. fromConstDef :: ConstDef -> Q [Dec] fromConstDef def = case def of #if __GLASGOW_HASKELL__ >= 709 ConstDef sym e mtype srcloc -> do n <- newName sym let def' = ValD (VarP n) (No...
1,045
fromConstDef :: ConstDef -> Q [Dec] fromConstDef def = case def of #if __GLASGOW_HASKELL__ >= 709 ConstDef sym e mtype srcloc -> do n <- newName sym let def' = ValD (VarP n) (NormalB $ toExp [] e) [] case mtype of Nothing -> return [def'] Just ty -> do tyQ <- runToQ (fromType ty) ...
912
fromConstDef def = case def of #if __GLASGOW_HASKELL__ >= 709 ConstDef sym e mtype srcloc -> do n <- newName sym let def' = ValD (VarP n) (NormalB $ toExp [] e) [] case mtype of Nothing -> return [def'] Just ty -> do tyQ <- runToQ (fromType ty) -- Ignore possible type varia...
876
true
true
0
21
338
182
89
93
null
null
kylcarte/wangtiles
src/Data/Points.hs
bsd-3-clause
zipWithV2 :: (Additive f) => (a -> b -> c) -> f a -> f b -> f c zipWithV2 = liftI2
82
zipWithV2 :: (Additive f) => (a -> b -> c) -> f a -> f b -> f c zipWithV2 = liftI2
82
zipWithV2 = liftI2
18
false
true
0
10
21
58
27
31
null
null
rahulmutt/ghcvm
libraries/base/GHC/Foreign.hs
bsd-3-clause
-- exported functions -- ------------------ -- | Marshal a NUL terminated C string into a Haskell string. -- peekCString :: TextEncoding -> CString -> IO String peekCString enc cp = do sz <- lengthArray0 nUL cp peekEncodedCString enc (cp, sz * cCharSize) -- | Marshal a C string with explicit length into a ...
338
peekCString :: TextEncoding -> CString -> IO String peekCString enc cp = do sz <- lengthArray0 nUL cp peekEncodedCString enc (cp, sz * cCharSize) -- | Marshal a C string with explicit length into a Haskell string. --
228
peekCString enc cp = do sz <- lengthArray0 nUL cp peekEncodedCString enc (cp, sz * cCharSize) -- | Marshal a C string with explicit length into a Haskell string. --
173
true
true
0
9
68
63
33
30
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/fromDouble_1.hs
mit
primMulInt :: MyInt -> MyInt -> MyInt; primMulInt (Pos x) (Pos y) = Pos (primMulNat x y)
92
primMulInt :: MyInt -> MyInt -> MyInt primMulInt (Pos x) (Pos y) = Pos (primMulNat x y)
91
primMulInt (Pos x) (Pos y) = Pos (primMulNat x y)
49
false
true
1
10
20
54
25
29
null
null
kmate/HaRe
old/testing/simplifyExpr/GuardsIn2.hs
bsd-3-clause
p x@(y:ys) = case x of [] -> error "Error!" (x:xs) -> x
83
p x@(y:ys) = case x of [] -> error "Error!" (x:xs) -> x
83
p x@(y:ys) = case x of [] -> error "Error!" (x:xs) -> x
83
false
false
1
9
40
53
24
29
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Delete.hs
mpl-2.0
-- | JSONP ccdCallback :: Lens' ContentCategoriesDelete (Maybe Text) ccdCallback = lens _ccdCallback (\ s a -> s{_ccdCallback = a})
133
ccdCallback :: Lens' ContentCategoriesDelete (Maybe Text) ccdCallback = lens _ccdCallback (\ s a -> s{_ccdCallback = a})
122
ccdCallback = lens _ccdCallback (\ s a -> s{_ccdCallback = a})
64
true
true
0
9
21
48
25
23
null
null
keera-studios/hsQt
Qtc/Core/QCoreApplication.hs
bsd-2-clause
qCoreApplicationClosingDown :: (()) -> IO (Bool) qCoreApplicationClosingDown () = withBoolResult $ qtc_QCoreApplication_closingDown
137
qCoreApplicationClosingDown :: (()) -> IO (Bool) qCoreApplicationClosingDown () = withBoolResult $ qtc_QCoreApplication_closingDown
137
qCoreApplicationClosingDown () = withBoolResult $ qtc_QCoreApplication_closingDown
88
false
true
0
7
17
35
18
17
null
null
vrom911/Compiler
src/Compiler/Rum/Compiler/Emitter.hs
mit
cgenExpr Rum.LogicOper{..} = case Map.lookup lop logicOps of Just f -> cgenExpr l >>= \x -> cgenExpr r >>= \y -> f x y Nothing -> error "No such logic operator"
171
cgenExpr Rum.LogicOper{..} = case Map.lookup lop logicOps of Just f -> cgenExpr l >>= \x -> cgenExpr r >>= \y -> f x y Nothing -> error "No such logic operator"
171
cgenExpr Rum.LogicOper{..} = case Map.lookup lop logicOps of Just f -> cgenExpr l >>= \x -> cgenExpr r >>= \y -> f x y Nothing -> error "No such logic operator"
171
false
false
0
12
41
75
35
40
null
null
edsko/JsonGrammar2
src/Language/JsonGrammar/TypeScript.hs
bsd-3-clause
toType :: GrammarMap -> Grammar Val t1 t2 -> Maybe Type toType gm = go where go :: Grammar Val t1 t2 -> Maybe Type go = \case Id -> Nothing g1 :. g2 -> -- Produce the leftmost grammar case go g1 of Just ty -> Just ty Nothing -> go g2 Empty -> Nothing ...
831
toType :: GrammarMap -> Grammar Val t1 t2 -> Maybe Type toType gm = go where go :: Grammar Val t1 t2 -> Maybe Type go = \case Id -> Nothing g1 :. g2 -> -- Produce the leftmost grammar case go g1 of Just ty -> Just ty Nothing -> go g2 Empty -> Nothing ...
831
toType gm = go where go :: Grammar Val t1 t2 -> Maybe Type go = \case Id -> Nothing g1 :. g2 -> -- Produce the leftmost grammar case go g1 of Just ty -> Just ty Nothing -> go g2 Empty -> Nothing g1 :<> g2 -> unify <$> go g1 <*> go g2 Pure _ _...
775
false
true
2
20
283
353
168
185
null
null
chriseidhof/Basil
src/Basil/Data/TBoolean.hs
bsd-3-clause
tOr :: TBool x -> TBool y -> TBool (Or x y) tOr = undefined
59
tOr :: TBool x -> TBool y -> TBool (Or x y) tOr = undefined
59
tOr = undefined
15
false
true
0
10
14
42
18
24
null
null
ingemaradahl/bilder
src/TypeChecker/Renamer.hs
lgpl-3.0
renameExp (EIndexDouble cid e1 e2) = setCIdentAssigned cid >> EIndexDouble <$> renameCIdent cid <*> renameExp e1 <*> renameExp e2
129
renameExp (EIndexDouble cid e1 e2) = setCIdentAssigned cid >> EIndexDouble <$> renameCIdent cid <*> renameExp e1 <*> renameExp e2
129
renameExp (EIndexDouble cid e1 e2) = setCIdentAssigned cid >> EIndexDouble <$> renameCIdent cid <*> renameExp e1 <*> renameExp e2
129
false
false
0
9
18
47
21
26
null
null
damianfral/clay
src/Clay/Geometry.hs
bsd-3-clause
marginRight = key "margin-right"
34
marginRight = key "margin-right"
34
marginRight = key "margin-right"
34
false
false
0
5
5
9
4
5
null
null
vTurbine/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt] lookupGRE_RdrName rdr_name env = case lookupOccEnv env (rdrNameOcc rdr_name) of Nothing -> [] Just gres -> pickGREs rdr_name gres
204
lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt] lookupGRE_RdrName rdr_name env = case lookupOccEnv env (rdrNameOcc rdr_name) of Nothing -> [] Just gres -> pickGREs rdr_name gres
204
lookupGRE_RdrName rdr_name env = case lookupOccEnv env (rdrNameOcc rdr_name) of Nothing -> [] Just gres -> pickGREs rdr_name gres
141
false
true
0
9
37
69
32
37
null
null
ku-fpg/remote-monad-examples
classic-examples/Applicative/Main.hs
bsd-3-clause
isCommand (Procedure _) = False
31
isCommand (Procedure _) = False
31
isCommand (Procedure _) = False
31
false
false
0
7
4
15
7
8
null
null
apyrgio/snf-ganeti
test/hs/Test/Ganeti/Hypervisor/Xen/XmParser.hs
bsd-2-clause
isAlmostEqual (LCDouble d1) (LCDouble d2) = printTestCase msg $ rel <= 1e-12 where rel = relativeError d1 d2 msg = "Relative error " ++ show rel ++ " not smaller than 1e-12\n" ++ "expected: " ++ show d2 ++ "\n but got: " ++ show d1
261
isAlmostEqual (LCDouble d1) (LCDouble d2) = printTestCase msg $ rel <= 1e-12 where rel = relativeError d1 d2 msg = "Relative error " ++ show rel ++ " not smaller than 1e-12\n" ++ "expected: " ++ show d2 ++ "\n but got: " ++ show d1
261
isAlmostEqual (LCDouble d1) (LCDouble d2) = printTestCase msg $ rel <= 1e-12 where rel = relativeError d1 d2 msg = "Relative error " ++ show rel ++ " not smaller than 1e-12\n" ++ "expected: " ++ show d2 ++ "\n but got: " ++ show d1
261
false
false
2
11
75
89
40
49
null
null
typelead/epm
Cabal/Distribution/Version.hs
bsd-3-clause
isVersion0 :: Version -> Bool isVersion0 (Version [0] _) = True
63
isVersion0 :: Version -> Bool isVersion0 (Version [0] _) = True
63
isVersion0 (Version [0] _) = True
33
false
true
0
10
10
35
16
19
null
null
Javran/misc
gaussian-elim/src/Solver.hs
mit
solveMat :: Integral i => i -> [[i]] -> Either (Err i) [i] solveMat = solveMat' (\_ _ -> Left Underdetermined)
110
solveMat :: Integral i => i -> [[i]] -> Either (Err i) [i] solveMat = solveMat' (\_ _ -> Left Underdetermined)
110
solveMat = solveMat' (\_ _ -> Left Underdetermined)
51
false
true
0
11
20
68
33
35
null
null
benekastah/tj
lib/TJ/CodeGen.hs
mit
functionBlock (EStatement (SBlock exprs)) = SBlock $ returnLast exprs
69
functionBlock (EStatement (SBlock exprs)) = SBlock $ returnLast exprs
69
functionBlock (EStatement (SBlock exprs)) = SBlock $ returnLast exprs
69
false
false
0
8
8
29
13
16
null
null
d0kt0r0/estuary
client/src/Estuary/Help/MiniTidal.hs
gpl-3.0
referenceText "vowel"= "turns a Text pattern into a control pattern that creates a formant filter to produce vowel sounds on samples. Use values a, e, i, o, and u to add the effect."
182
referenceText "vowel"= "turns a Text pattern into a control pattern that creates a formant filter to produce vowel sounds on samples. Use values a, e, i, o, and u to add the effect."
182
referenceText "vowel"= "turns a Text pattern into a control pattern that creates a formant filter to produce vowel sounds on samples. Use values a, e, i, o, and u to add the effect."
182
false
false
0
5
32
9
4
5
null
null
GaloisInc/halvm-ghc
compiler/utils/Outputable.hs
bsd-3-clause
-- | @doublePrec p n@ shows a floating point number @n@ with @p@ -- digits of precision after the decimal point. doublePrec :: Int -> Double -> SDoc doublePrec p n = text (showFFloat (Just p) n "")
197
doublePrec :: Int -> Double -> SDoc doublePrec p n = text (showFFloat (Just p) n "")
84
doublePrec p n = text (showFFloat (Just p) n "")
48
true
true
0
9
37
45
23
22
null
null
NCrashed/sinister
src/client/Graphics/Render/Quad.hs
mit
quadWithNormal :: Camera2D -- ^ Camera -- | Diffuse texture -> Texture2D RGBAFormat -- | Normal texture -> Texture2D RGBAFormat -- | Ambient color, alpha is entensity -> Vec4 Float -- | Color modifier, alpha is intensity -> Vec4 Float -- | Lights that is used for enlighting -> [Light Float] -- | ...
987
quadWithNormal :: Camera2D -- ^ Camera -- | Diffuse texture -> Texture2D RGBAFormat -- | Normal texture -> Texture2D RGBAFormat -- | Ambient color, alpha is entensity -> Vec4 Float -- | Color modifier, alpha is intensity -> Vec4 Float -- | Lights that is used for enlighting -> [Light Float] -- | ...
987
quadWithNormal cam2d@(Camera2D cam) tex ntex ambient clr lights trans2d rot2d depth size = storeDepth . texturise <$> rasterizeFront (transform <$> screenQuad depth) where storeDepth = (, fragDepth) vpMat = vpMatrix cam size vpMatInv = fromMaybe Vec.identity . Vec.invert $ vpMat transform = camera...
428
false
true
12
16
215
214
111
103
null
null
plclub/cis670-16fa
projects/DynamicLang/src/StaticEval.hs
mit
staticEval env (UniSnd e) = snd (staticEval env e)
50
staticEval env (UniSnd e) = snd (staticEval env e)
50
staticEval env (UniSnd e) = snd (staticEval env e)
50
false
false
0
7
8
28
13
15
null
null
lally/libmet
src/Ppt/Generate/CpPrim.hs
bsd-3-clause
-- |Make member declarations out of a single literal (layed out) input member. makeMember :: OutputCfg -> LayoutMember -> MemberData makeMember cfg mem | has (lKind . _LKSeqno) mem || has (lKind . _LKTypeDescrim) mem = let (LMember (PIntegral ty _) _ _ _ _ nm) = mem declType = case ty of PPInt ...
5,165
makeMember :: OutputCfg -> LayoutMember -> MemberData makeMember cfg mem | has (lKind . _LKSeqno) mem || has (lKind . _LKTypeDescrim) mem = let (LMember (PIntegral ty _) _ _ _ _ nm) = mem declType = case ty of PPInt -> "int" in PrivateMem (dataMember declType nm) [] [] | has (lKind . _LK...
5,086
makeMember cfg mem | has (lKind . _LKSeqno) mem || has (lKind . _LKTypeDescrim) mem = let (LMember (PIntegral ty _) _ _ _ _ nm) = mem declType = case ty of PPInt -> "int" in PrivateMem (dataMember declType nm) [] [] | has (lKind . _LKPadding) mem = let (LMember (PIntegral PPByte _) _...
5,032
true
true
6
28
2,337
1,467
732
735
null
null
nevrenato/Hets_Fork
RelationalScheme/ParseRS.hs
gpl-2.0
parseRSColumn :: AParser st [RSColumn] parseRSColumn = do iid <- sepBy1 parseEntry commaT colonT dt <- parseRSDatatypes return $ map (\(x, y) -> RSColumn (simpleIdToId x) dt y) iid
216
parseRSColumn :: AParser st [RSColumn] parseRSColumn = do iid <- sepBy1 parseEntry commaT colonT dt <- parseRSDatatypes return $ map (\(x, y) -> RSColumn (simpleIdToId x) dt y) iid
216
parseRSColumn = do iid <- sepBy1 parseEntry commaT colonT dt <- parseRSDatatypes return $ map (\(x, y) -> RSColumn (simpleIdToId x) dt y) iid
177
false
true
0
13
64
80
39
41
null
null
svenssonjoel/ObsidianGFX
Obsidian/Mutable.hs
bsd-3-clause
atomicExch :: forall mloc a s. AtomicExch a => EWord32 -> Exp a -> Mutable mloc s (Exp a) -> TProgram () atomicExch ix v (Mutable n (Single nom)) = f nom where f nom = atomicOp nom ix (AtomicExch v) {- ------------------------...
3,231
atomicExch :: forall mloc a s. AtomicExch a => EWord32 -> Exp a -> Mutable mloc s (Exp a) -> TProgram () atomicExch ix v (Mutable n (Single nom)) = f nom where f nom = atomicOp nom ix (AtomicExch v) {- ------------------------...
3,231
atomicExch ix v (Mutable n (Single nom)) = f nom where f nom = atomicOp nom ix (AtomicExch v) {- --------------------------------------------------------------------------- atomicExch() int atomicExch(int* address, int val); unsigned int atomicExch(unsigned int* address, ...
3,070
false
true
0
12
887
107
52
55
null
null
msakai/ptq
src/PDict.hs
lgpl-2.1
a, every :: P Det a = B cat_Det "a"
39
a, every :: P Det a = B cat_Det "a"
39
a = B cat_Det "a"
21
false
true
2
6
13
32
12
20
null
null
ArturB/Multilinear
test/all/ConstructorsTests.hs
gpl-3.0
-- | Test generic NForm constructor indices error nFormConstructorError :: forall a t . ( NFData a, NFData (t a), Multilinear t a, Num a ) => Char -> Char -> Positive (Small Int) -> Positive (Small Int) -> t a -> Property nFormConstructorError c1 c2 s1 s2 _ = let size1 = getSmall $ getPosi...
508
nFormConstructorError :: forall a t . ( NFData a, NFData (t a), Multilinear t a, Num a ) => Char -> Char -> Positive (Small Int) -> Positive (Small Int) -> t a -> Property nFormConstructorError c1 c2 s1 s2 _ = let size1 = getSmall $ getPositive s1 size2 = getSmall $ getPositive s2 ...
458
nFormConstructorError c1 c2 s1 s2 _ = let size1 = getSmall $ getPositive s1 size2 = getSmall $ getPositive s2 v = NForm.fromIndices [c1,c2,'a'] [size1,size2] (\[x,y] -> fromIntegral x + fromIntegral y) :: t a in expectFailure (total v)
261
true
true
0
14
132
205
104
101
null
null
juretta/haskell-jwt
tests/src/Web/JWTTests.hs
mit
case_encodeJWTNoMac = do let cs = def { iss = stringOrURI "Foo" , unregisteredClaims = Map.fromList [("http://example.com/is_root", Bool True)] } jwt = encodeUnsigned cs -- Verify the shape of the JWT, ensure the shape of the triple of -- <header>.<claims>.<signature> let (h:c:...
413
case_encodeJWTNoMac = do let cs = def { iss = stringOrURI "Foo" , unregisteredClaims = Map.fromList [("http://example.com/is_root", Bool True)] } jwt = encodeUnsigned cs -- Verify the shape of the JWT, ensure the shape of the triple of -- <header>.<claims>.<signature> let (h:c:...
413
case_encodeJWTNoMac = do let cs = def { iss = stringOrURI "Foo" , unregisteredClaims = Map.fromList [("http://example.com/is_root", Bool True)] } jwt = encodeUnsigned cs -- Verify the shape of the JWT, ensure the shape of the triple of -- <header>.<claims>.<signature> let (h:c:...
413
false
false
0
15
112
127
62
65
null
null
AndrewRademacher/acumen
src/Data/Neural/FeedForward.hs
mit
notLast [x] = ([], [x])
26
notLast [x] = ([], [x])
26
notLast [x] = ([], [x])
26
false
false
0
6
7
23
13
10
null
null
guibou/AdventOfCode2016
src/Day11.hs
bsd-3-clause
reduceProblem (Status n l) = let allnames = getGenS (mconcat l) allnames2 = sortOn bli allnames bli s = (blu Map.! (Generator s), blu Map.! (Chip s), s) blu = Map.fromList (mconcat (fmap (\(item, idx) -> fmap (,idx) it...
767
reduceProblem (Status n l) = let allnames = getGenS (mconcat l) allnames2 = sortOn bli allnames bli s = (blu Map.! (Generator s), blu Map.! (Chip s), s) blu = Map.fromList (mconcat (fmap (\(item, idx) -> fmap (,idx) it...
767
reduceProblem (Status n l) = let allnames = getGenS (mconcat l) allnames2 = sortOn bli allnames bli s = (blu Map.! (Generator s), blu Map.! (Chip s), s) blu = Map.fromList (mconcat (fmap (\(item, idx) -> fmap (,idx) it...
767
false
false
0
17
380
256
130
126
null
null
kishoredbn/barrelfish
tools/flounder/GHBackend.hs
mit
intf_vtbl_param :: String -> MessageDef -> Direction -> C.Param intf_vtbl_param ifn m d = C.Param (C.Ptr $ C.TypeName $ msg_sig_type ifn m d) (msg_name m)
155
intf_vtbl_param :: String -> MessageDef -> Direction -> C.Param intf_vtbl_param ifn m d = C.Param (C.Ptr $ C.TypeName $ msg_sig_type ifn m d) (msg_name m)
155
intf_vtbl_param ifn m d = C.Param (C.Ptr $ C.TypeName $ msg_sig_type ifn m d) (msg_name m)
90
false
true
0
9
25
67
33
34
null
null
tehgeekmeister/apters-web
Controller.hs
agpl-3.0
-- our code starts here echo :: ToJSON a => a -> GHandler sub master RepJson echo = jsonToRepJson . toJSON
107
echo :: ToJSON a => a -> GHandler sub master RepJson echo = jsonToRepJson . toJSON
82
echo = jsonToRepJson . toJSON
29
true
true
1
8
21
41
18
23
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x2F94D' = "\x2541D"
35
decomposeChar '\x2F94D' = "\x2541D"
35
decomposeChar '\x2F94D' = "\x2541D"
35
false
false
1
5
3
13
4
9
null
null
rvion/ride
jetpack/src/Data/Map/Strict/AsMap.hs
bsd-3-clause
-- map_elems :: forall k a. Map k a -> [a] map_elems = I.elems
62
map_elems = I.elems
19
map_elems = I.elems
19
true
false
1
6
13
13
5
8
null
null
daniel-ziegler/provability
src/Modal/Formulas.hs
bsd-3-clause
generalGLEvalSeq :: (Show v, Ord v) => Map v (ModalFormula v)-> [Map v Bool] generalGLEvalSeq formulaMap = map level [0..] where level n = M.map (!!n) result result = generalFixpointGLEval formulaMap
209
generalGLEvalSeq :: (Show v, Ord v) => Map v (ModalFormula v)-> [Map v Bool] generalGLEvalSeq formulaMap = map level [0..] where level n = M.map (!!n) result result = generalFixpointGLEval formulaMap
209
generalGLEvalSeq formulaMap = map level [0..] where level n = M.map (!!n) result result = generalFixpointGLEval formulaMap
132
false
true
0
9
40
90
45
45
null
null
aslatter/parsec
src/Text/Parsec/Char.hs
bsd-2-clause
-- | Parses an ASCII digit. Returns the parsed character. digit :: (Stream s m Char) => ParsecT s u m Char digit = satisfy isDigit <?> "digit"
163
digit :: (Stream s m Char) => ParsecT s u m Char digit = satisfy isDigit <?> "digit"
104
digit = satisfy isDigit <?> "digit"
55
true
true
0
6
48
41
21
20
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Delete.hs
mpl-2.0
-- | An optional request ID to identify requests. Specify a unique request ID -- so that if you must retry your request, the server will know to ignore -- the request if it has already been completed. For example, consider a -- situation where you make an initial request and the request times out. -- If you make the re...
837
igmdRequestId :: Lens' InstanceGroupManagersDelete (Maybe Text) igmdRequestId = lens _igmdRequestId (\ s a -> s{_igmdRequestId = a})
140
igmdRequestId = lens _igmdRequestId (\ s a -> s{_igmdRequestId = a})
76
true
true
0
9
144
57
34
23
null
null
themoritz/cabal
Cabal/Distribution/Simple/PreProcess.hs
bsd-3-clause
runSimplePreProcessor :: PreProcessor -> FilePath -> FilePath -> Verbosity -> IO () runSimplePreProcessor pp inFile outFile verbosity = runPreProcessor pp (".", inFile) (".", outFile) verbosity
217
runSimplePreProcessor :: PreProcessor -> FilePath -> FilePath -> Verbosity -> IO () runSimplePreProcessor pp inFile outFile verbosity = runPreProcessor pp (".", inFile) (".", outFile) verbosity
217
runSimplePreProcessor pp inFile outFile verbosity = runPreProcessor pp (".", inFile) (".", outFile) verbosity
111
false
true
0
11
48
69
33
36
null
null
samscott89/tamarin-prover
lib/theory/src/Theory/Model/Fact.hs
gpl-3.0
-- Constructing facts --------------------- -- | A fact denoting a message sent by the protocol to the intruder. outFact :: t -> Fact t outFact = Fact OutFact . return
168
outFact :: t -> Fact t outFact = Fact OutFact . return
54
outFact = Fact OutFact . return
31
true
true
0
6
30
28
15
13
null
null
beloglazov/haskell-course
hw2.hs
apache-2.0
-- testWhatWentWrong parse whatWentWrong "sample.log" whatWentWrong :: [LogMessage] -> [String] whatWentWrong = map getMessage . inOrder . build . filter isErrorSeverity50
171
whatWentWrong :: [LogMessage] -> [String] whatWentWrong = map getMessage . inOrder . build . filter isErrorSeverity50
117
whatWentWrong = map getMessage . inOrder . build . filter isErrorSeverity50
75
true
true
0
8
20
46
22
24
null
null
dmbarbour/awelon
hsrc_util/ShowEnv.hs
bsd-3-clause
showNamedStacks (P (P (valToText -> Just name) stack) ns') = showString name . showString ": " . shows (stackCount stack) . showChar '\n' . showNamedStacks ns'
173
showNamedStacks (P (P (valToText -> Just name) stack) ns') = showString name . showString ": " . shows (stackCount stack) . showChar '\n' . showNamedStacks ns'
173
showNamedStacks (P (P (valToText -> Just name) stack) ns') = showString name . showString ": " . shows (stackCount stack) . showChar '\n' . showNamedStacks ns'
173
false
false
3
11
39
76
33
43
null
null
anttisalonen/freekick
haskell/addutil/Libaddutil/ListUtils.hs
agpl-3.0
findList :: Ord k => [k] -> Data.Map.Map k a -> [a] findList [] _ = []
74
findList :: Ord k => [k] -> Data.Map.Map k a -> [a] findList [] _ = []
74
findList [] _ = []
22
false
true
0
9
20
49
25
24
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateUserProfile.hs
mpl-2.0
-- | 'CreateUserProfileResponse' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'cuprIamUserArn' @::@ 'Maybe' 'Text' -- createUserProfileResponse :: CreateUserProfileResponse createUserProfileResponse = CreateUserProfileResponse { _cuprIamUserArn = Nothing }
302
createUserProfileResponse :: CreateUserProfileResponse createUserProfileResponse = CreateUserProfileResponse { _cuprIamUserArn = Nothing }
146
createUserProfileResponse = CreateUserProfileResponse { _cuprIamUserArn = Nothing }
91
true
true
0
7
39
35
19
16
null
null
expipiplus1/vulkan
src/Vulkan/Core10/Event.hs
bsd-3-clause
-- | vkResetEvent - Reset an event to non-signaled state -- -- = Description -- -- When 'resetEvent' is executed on the host, it defines an /event unsignal -- operation/ which resets the event to the unsignaled state. -- -- If @event@ is already in the unsignaled state when 'resetEvent' is -- executed, then 'resetEvent...
3,246
resetEvent :: forall io . (MonadIO io) => -- | @device@ is the logical device that owns the event. Device -> -- | @event@ is the event to reset. Event -> io () resetEvent device event = liftIO $ do let vkResetEventPtr = pVkResetEvent (case devic...
1,089
resetEvent device event = liftIO $ do let vkResetEventPtr = pVkResetEvent (case device of Device{deviceCmds} -> deviceCmds) unless (vkResetEventPtr /= nullFunPtr) $ throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkResetEvent is null" Nothing Nothing let vkResetEvent' = mkVkResetEvent v...
856
true
true
0
17
515
251
157
94
null
null
fmapfmapfmap/amazonka
amazonka-ses/gen/Network/AWS/SES/GetIdentityPolicies.hs
mpl-2.0
-- | Creates a value of 'GetIdentityPolicies' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gipIdentity' -- -- * 'gipPolicyNames' getIdentityPolicies :: Text -- ^ 'gipIdentity' -> GetIdentityPolicies getIdentityPolicies pIde...
422
getIdentityPolicies :: Text -- ^ 'gipIdentity' -> GetIdentityPolicies getIdentityPolicies pIdentity_ = GetIdentityPolicies' { _gipIdentity = pIdentity_ , _gipPolicyNames = mempty }
204
getIdentityPolicies pIdentity_ = GetIdentityPolicies' { _gipIdentity = pIdentity_ , _gipPolicyNames = mempty }
126
true
true
0
7
82
49
28
21
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/succ_2.hs
mit
toEnumRatio :: MyInt -> Ratio MyInt toEnumRatio = fromIntRatio
64
toEnumRatio :: MyInt -> Ratio MyInt toEnumRatio = fromIntRatio
64
toEnumRatio = fromIntRatio
26
false
true
0
6
10
18
9
9
null
null
tippenein/scrape_the_truth
src/Server.hs
mit
app :: Application app = middlewares $ serve Api.truthApi server
64
app :: Application app = middlewares $ serve Api.truthApi server
64
app = middlewares $ serve Api.truthApi server
45
false
true
0
7
9
22
11
11
null
null
marcellussiegburg/autotool
collection/src/Rewriting/Termination.hs
gpl-2.0
signature sys = S.unions $ do u <- rules sys ; [ syms $ lhs u, syms $ rhs u ]
81
signature sys = S.unions $ do u <- rules sys ; [ syms $ lhs u, syms $ rhs u ]
81
signature sys = S.unions $ do u <- rules sys ; [ syms $ lhs u, syms $ rhs u ]
81
false
false
0
10
24
49
23
26
null
null
peterokagey/haskellOEIS
src/Helpers/ChessSequences.hs
apache-2.0
queenNW n k = map (\m -> (n-m, k-m)) [1..min n k - 1]
53
queenNW n k = map (\m -> (n-m, k-m)) [1..min n k - 1]
53
queenNW n k = map (\m -> (n-m, k-m)) [1..min n k - 1]
53
false
false
1
9
13
57
27
30
null
null
shlevy/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
-- | Returns @True@ for value arguments, false for type args -- NB: coercions are value arguments (zero width, to be sure, -- like State#, but still value args). isValArg :: Expr b -> Bool isValArg e = not (isTypeArg e)
219
isValArg :: Expr b -> Bool isValArg e = not (isTypeArg e)
57
isValArg e = not (isTypeArg e)
30
true
true
0
7
40
33
17
16
null
null
joom/Guguk
tests/Main.hs
mit
runTests :: IO () runTests = do _ <- mapM runTestTT tests return ()
72
runTests :: IO () runTests = do _ <- mapM runTestTT tests return ()
72
runTests = do _ <- mapM runTestTT tests return ()
53
false
true
0
8
18
36
16
20
null
null
stefan-hoeck/labeled-graph
Data/Graph/Simple/Query/Dfs.hs
bsd-3-clause
---------------------------------------------------------------------- -- Algorithms runDfs ∷ Graph → [Vertex] → [[Vertex]] runDfs g vs = filter (not . null) $ runM (order g) False $ runAll vs where runAll = mapM runSingle runSingle v = run [v] run [] = return [] run (v:t) = let t' = neighbors g ...
432
runDfs ∷ Graph → [Vertex] → [[Vertex]] runDfs g vs = filter (not . null) $ runM (order g) False $ runAll vs where runAll = mapM runSingle runSingle v = run [v] run [] = return [] run (v:t) = let t' = neighbors g v ++ t nvis = visit v >> fmap (v:) (run t') in if...
346
runDfs g vs = filter (not . null) $ runM (order g) False $ runAll vs where runAll = mapM runSingle runSingle v = run [v] run [] = return [] run (v:t) = let t' = neighbors g v ++ t nvis = visit v >> fmap (v:) (run t') in ifM (visited v) (run t) nvis
307
true
true
3
12
127
202
95
107
null
null
mettekou/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
isQual_maybe _ = Nothing
33
isQual_maybe _ = Nothing
33
isQual_maybe _ = Nothing
33
false
false
0
5
12
9
4
5
null
null
Sgoettschkes/learning
haskell/ProjectEuler/tests/Problems/Problem004Spec.hs
mit
main :: IO() main = hspec spec
30
main :: IO() main = hspec spec
30
main = hspec spec
17
false
true
1
6
6
22
9
13
null
null
BartAdv/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCFunctionErrorHandler fn a n) f = return f { ibc_function_errorhandlers = (fn, a, n) : ibc_function_errorhandlers f }
128
ibc i (IBCFunctionErrorHandler fn a n) f = return f { ibc_function_errorhandlers = (fn, a, n) : ibc_function_errorhandlers f }
128
ibc i (IBCFunctionErrorHandler fn a n) f = return f { ibc_function_errorhandlers = (fn, a, n) : ibc_function_errorhandlers f }
128
false
false
1
9
21
59
27
32
null
null
danr/tfp1
Lang/PrettyRich.hs
gpl-3.0
ppPat :: Kit a -> Pattern a -> Doc ppPat (p,q) pat = case pat of Default -> "_" ConPat c ts bs -> hang (p c) 2 (sep ([ "@" <+> ppType 1 p t | t <- ts ] ++ map q bs)) LitPat i _ -> integer i
212
ppPat :: Kit a -> Pattern a -> Doc ppPat (p,q) pat = case pat of Default -> "_" ConPat c ts bs -> hang (p c) 2 (sep ([ "@" <+> ppType 1 p t | t <- ts ] ++ map q bs)) LitPat i _ -> integer i
212
ppPat (p,q) pat = case pat of Default -> "_" ConPat c ts bs -> hang (p c) 2 (sep ([ "@" <+> ppType 1 p t | t <- ts ] ++ map q bs)) LitPat i _ -> integer i
177
false
true
6
14
73
129
61
68
null
null
Fuuzetsu/yi-agda
src/Yi/Mode/Agda.hs
gpl-3.0
parser ∷ Agda → IO () parser ag = forever $ do l ← hGetContents (_stdOut ag) mapM_ (parseCommand . Tx.pack >=> print) (lines l)
131
parser ∷ Agda → IO () parser ag = forever $ do l ← hGetContents (_stdOut ag) mapM_ (parseCommand . Tx.pack >=> print) (lines l)
131
parser ag = forever $ do l ← hGetContents (_stdOut ag) mapM_ (parseCommand . Tx.pack >=> print) (lines l)
109
false
true
0
13
28
75
34
41
null
null
dstruthers/Agate
VM.hs
mit
exec (Test consequence alternative) = do vm <- get if isTrue (accumulator vm) then exec consequence else exec alternative
133
exec (Test consequence alternative) = do vm <- get if isTrue (accumulator vm) then exec consequence else exec alternative
133
exec (Test consequence alternative) = do vm <- get if isTrue (accumulator vm) then exec consequence else exec alternative
133
false
false
0
10
30
50
23
27
null
null
fredokun/piexplorer
src/Parser.hs
gpl-3.0
identifier :: Parser String identifier = Tok.identifier lexer
61
identifier :: Parser String identifier = Tok.identifier lexer
61
identifier = Tok.identifier lexer
33
false
true
0
6
7
25
10
15
null
null
atsukotakahashi/wi
sketches/IncrementalParser.hs
gpl-2.0
delete at len (Err s x p) = Err (deleteStr at len s) x p
56
delete at len (Err s x p) = Err (deleteStr at len s) x p
56
delete at len (Err s x p) = Err (deleteStr at len s) x p
56
false
false
0
7
14
44
19
25
null
null
nomeata/ghc
compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
bsd-3-clause
oFreeRegs :: FreeRegs noFreeRegs = 0
37
noFreeRegs :: FreeRegs noFreeRegs = 0
37
noFreeRegs = 0
14
false
true
0
4
6
11
6
5
null
null
bitemyapp/mustache
src/bin/Main.hs
bsd-3-clause
commandArgs ∷ Arguments commandArgs = Arguments { template = def &= argPos 0 &= typ "TEMPLATE" , dataFile = def &= argPos 1 &= typ "DATAFILE" , outputFile = Nothing &= help "Name of the resulting file" &= typFile , templateDirs = ["."] &= help "The directories in whic...
494
commandArgs ∷ Arguments commandArgs = Arguments { template = def &= argPos 0 &= typ "TEMPLATE" , dataFile = def &= argPos 1 &= typ "DATAFILE" , outputFile = Nothing &= help "Name of the resulting file" &= typFile , templateDirs = ["."] &= help "The directories in whic...
494
commandArgs = Arguments { template = def &= argPos 0 &= typ "TEMPLATE" , dataFile = def &= argPos 1 &= typ "DATAFILE" , outputFile = Nothing &= help "Name of the resulting file" &= typFile , templateDirs = ["."] &= help "The directories in which to search for the temp...
470
false
true
2
9
141
118
60
58
null
null
dicomgrid/dicom-haskell-library
src/Data/DICOM/Object.hs
gpl-3.0
writeSequence :: VL -> Sequence -> Put writeSequence _vl s = do traverse_ put (runSequence s) case _vl of UndefinedValueLength -> do put SequenceDelimitationItem putWord32le 0 _ -> return ()
214
writeSequence :: VL -> Sequence -> Put writeSequence _vl s = do traverse_ put (runSequence s) case _vl of UndefinedValueLength -> do put SequenceDelimitationItem putWord32le 0 _ -> return ()
214
writeSequence _vl s = do traverse_ put (runSequence s) case _vl of UndefinedValueLength -> do put SequenceDelimitationItem putWord32le 0 _ -> return ()
175
false
true
0
13
53
75
33
42
null
null
julienschmaltz/madl
test/app/Parser/TypeCheckerTest.hs
mit
showSource :: String -> String showSource text = "--- network ---\n" ++ text ++ "\n---------------"
99
showSource :: String -> String showSource text = "--- network ---\n" ++ text ++ "\n---------------"
99
showSource text = "--- network ---\n" ++ text ++ "\n---------------"
68
false
true
0
7
14
32
14
18
null
null
jwiegley/ghc-release
libraries/terminfo/System/Console/Terminfo/Base.hs
gpl-3.0
-- | An operator version of 'mappend'. (<#>) :: Monoid m => m -> m -> m (<#>) = mappend
87
(<#>) :: Monoid m => m -> m -> m (<#>) = mappend
48
(<#>) = mappend
15
true
true
0
7
19
31
18
13
null
null
da-x/lamdu
Lamdu/GUI/ParamEdit.hs
gpl-3.0
chooseAddResultEntityId (Sugar.ParamAddResultNewVar entityId _) = eventResultFromEntityId entityId
102
chooseAddResultEntityId (Sugar.ParamAddResultNewVar entityId _) = eventResultFromEntityId entityId
102
chooseAddResultEntityId (Sugar.ParamAddResultNewVar entityId _) = eventResultFromEntityId entityId
102
false
false
0
7
10
23
10
13
null
null
blippy/sifi
src/Browser.hs
gpl-3.0
-- url is of form: "file:///C:/Users/mcarter/AppData/Local/MarkCarter/sifi/sifi.htm" rawUrl = do url1 <- outFile "sifi.htm" return ("file:///" ++ url1)
156
rawUrl = do url1 <- outFile "sifi.htm" return ("file:///" ++ url1)
71
rawUrl = do url1 <- outFile "sifi.htm" return ("file:///" ++ url1)
71
true
false
0
9
21
30
14
16
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/Get.hs
mpl-2.0
-- | Creates a value of 'InstancesGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'igProject' -- -- * 'igZone' -- -- * 'igInstance' instancesGet :: Text -- ^ 'igProject' -> Text -- ^ 'igZone' -> Text -- ^ 'igInstance' ...
501
instancesGet :: Text -- ^ 'igProject' -> Text -- ^ 'igZone' -> Text -- ^ 'igInstance' -> InstancesGet instancesGet pIgProject_ pIgZone_ pIgInstance_ = InstancesGet' { _igProject = pIgProject_ , _igZone = pIgZone_ , _igInstance = pIgInstance_ }
279
instancesGet pIgProject_ pIgZone_ pIgInstance_ = InstancesGet' { _igProject = pIgProject_ , _igZone = pIgZone_ , _igInstance = pIgInstance_ }
161
true
true
0
7
114
62
40
22
null
null
damianfral/clay
src/Clay/Media.hs
bsd-3-clause
braille = MediaType "braille"
32
braille = MediaType "braille"
32
braille = MediaType "braille"
32
false
false
0
5
6
9
4
5
null
null
sdiehl/ghc
testsuite/tests/driver/T16511/C.hs
bsd-3-clause
name :: String name = "Samantha"
32
name :: String name = "Samantha"
32
name = "Samantha"
17
false
true
0
4
5
11
6
5
null
null
phillc/agentvsagent
cards-agents-in-a-box/hearts/haskell/MyAgent.hs
mit
noPointsInFirstTrick :: Round -> [Card] -> [Card] noPointsInFirstTrick round cards = if (length (tricks round)) == 1 then noPoints cards else cards
149
noPointsInFirstTrick :: Round -> [Card] -> [Card] noPointsInFirstTrick round cards = if (length (tricks round)) == 1 then noPoints cards else cards
149
noPointsInFirstTrick round cards = if (length (tricks round)) == 1 then noPoints cards else cards
99
false
true
0
10
23
62
31
31
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'V.sequence_' v_sequence_ = V.sequence_
43
v_sequence_ = V.sequence_
25
v_sequence_ = V.sequence_
25
true
false
0
5
4
9
5
4
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Node daemon setup ndsClusterName :: String ndsClusterName = "cluster_name"
80
ndsClusterName :: String ndsClusterName = "cluster_name"
56
ndsClusterName = "cluster_name"
31
true
true
0
6
11
19
8
11
null
null
adz/real_world_haskell
ch04/FixLines.hs
mit
main = mainWith myFunction where mainWith f = do args <- getArgs case args of [input, output] -> interactWith f input output _ -> putStrLn "error: exactly 2 args needed" myFunction = fixLines
246
main = mainWith myFunction where mainWith f = do args <- getArgs case args of [input, output] -> interactWith f input output _ -> putStrLn "error: exactly 2 args needed" myFunction = fixLines
246
main = mainWith myFunction where mainWith f = do args <- getArgs case args of [input, output] -> interactWith f input output _ -> putStrLn "error: exactly 2 args needed" myFunction = fixLines
246
false
false
1
11
87
68
32
36
null
null
spechub/Hets
OWL2/ParseAS.hs
gpl-2.0
parseSameIndividual :: GA.PrefixMap -> CharParser st Assertion parseSameIndividual pm = parseEnclosedWithKeyword "SameIndividual" $ SameIndividual <$> (parseAnnotations pm) <*> manyN 2 (parseIndividual pm)
217
parseSameIndividual :: GA.PrefixMap -> CharParser st Assertion parseSameIndividual pm = parseEnclosedWithKeyword "SameIndividual" $ SameIndividual <$> (parseAnnotations pm) <*> manyN 2 (parseIndividual pm)
217
parseSameIndividual pm = parseEnclosedWithKeyword "SameIndividual" $ SameIndividual <$> (parseAnnotations pm) <*> manyN 2 (parseIndividual pm)
154
false
true
0
8
33
57
27
30
null
null
genos/online_problems
advent_of_code_2016/day5/src/Main.hs
mit
main :: IO () main = do print test1 print test2 BC.putStrLn part1 BC.putStrLn part2
91
main :: IO () main = do print test1 print test2 BC.putStrLn part1 BC.putStrLn part2
91
main = do print test1 print test2 BC.putStrLn part1 BC.putStrLn part2
77
false
true
1
9
22
48
18
30
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/BuildTarget.hs
bsd-3-clause
matchPlus a@(ExactMatch _ _ ) (InexactMatch _ _ ) = a
60
matchPlus a@(ExactMatch _ _ ) (InexactMatch _ _ ) = a
60
matchPlus a@(ExactMatch _ _ ) (InexactMatch _ _ ) = a
60
false
false
0
7
17
34
15
19
null
null
jmtd/rdifffs
RDiffFS.hs
bsd-3-clause
rdiffRead :: RdiffContext -> FilePath -> HT -> ByteCount -> FileOffset -> IO (Either Errno B.ByteString) rdiffRead repo fpath ht byteCount offset = do which <- whichBackup repo path case which of CurrentBackup -> rdiffCurrentRead repo path ht byteCount offset IncrementBackup -> rdiffIncremen...
485
rdiffRead :: RdiffContext -> FilePath -> HT -> ByteCount -> FileOffset -> IO (Either Errno B.ByteString) rdiffRead repo fpath ht byteCount offset = do which <- whichBackup repo path case which of CurrentBackup -> rdiffCurrentRead repo path ht byteCount offset IncrementBackup -> rdiffIncremen...
485
rdiffRead repo fpath ht byteCount offset = do which <- whichBackup repo path case which of CurrentBackup -> rdiffCurrentRead repo path ht byteCount offset IncrementBackup -> rdiffIncrementRead repo path ht byteCount offset Neither -> return $ Left eNOENT where (_:...
380
false
true
0
13
121
137
66
71
null
null
andyfriesen/buffer-builder-aeson
test/Main.hs
bsd-3-clause
case_serialize_simple_things :: IO () case_serialize_simple_things = do ae "false" (encodeJson $ Aeson.Bool False) ae "true" (encodeJson $ Aeson.Bool True) ae "null" (encodeJson $ Aeson.Null) ae "9" (encodeJson $ Aeson.Number 9) ae "-9" (encodeJson $ Aeson.Number (-9))
289
case_serialize_simple_things :: IO () case_serialize_simple_things = do ae "false" (encodeJson $ Aeson.Bool False) ae "true" (encodeJson $ Aeson.Bool True) ae "null" (encodeJson $ Aeson.Null) ae "9" (encodeJson $ Aeson.Number 9) ae "-9" (encodeJson $ Aeson.Number (-9))
289
case_serialize_simple_things = do ae "false" (encodeJson $ Aeson.Bool False) ae "true" (encodeJson $ Aeson.Bool True) ae "null" (encodeJson $ Aeson.Null) ae "9" (encodeJson $ Aeson.Number 9) ae "-9" (encodeJson $ Aeson.Number (-9))
251
false
true
0
12
55
118
55
63
null
null
frantisekfarka/ghc-dsi
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ [res] IndexSmallArrayOp [obj,ix] = doReadSmallPtrArrayOp res obj ix
85
emitPrimOp _ [res] IndexSmallArrayOp [obj,ix] = doReadSmallPtrArrayOp res obj ix
85
emitPrimOp _ [res] IndexSmallArrayOp [obj,ix] = doReadSmallPtrArrayOp res obj ix
85
false
false
1
6
14
35
16
19
null
null
bbangert/hermes-hs
hermes-cn/Hermes/ConnectionNode/Types.hs
mpl-2.0
-- | Count all the clients currently being tracked. numClients :: ServerState -> STM Int numClients state = M.size <$> readClientMap state
138
numClients :: ServerState -> STM Int numClients state = M.size <$> readClientMap state
86
numClients state = M.size <$> readClientMap state
49
true
true
0
6
21
34
16
18
null
null