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
seckcoder/vector
Data/Vector/Generic.hs
bsd-3-clause
foldM'_ m z = discard . Bundle.foldM' m z . stream
50
foldM'_ m z = discard . Bundle.foldM' m z . stream
50
foldM'_ m z = discard . Bundle.foldM' m z . stream
50
false
false
2
7
10
32
12
20
null
null
dikmax/haskell-blog
src/XmlHtmlWriter.hs
bsd-2-clause
concatBlocks' nodes block@(RawBlock _ _) = do items <- writeBlock block return (nodes ++ items)
99
concatBlocks' nodes block@(RawBlock _ _) = do items <- writeBlock block return (nodes ++ items)
99
concatBlocks' nodes block@(RawBlock _ _) = do items <- writeBlock block return (nodes ++ items)
99
false
false
0
9
18
45
21
24
null
null
nshepperd/funn
AI/Funn/CL/MonadCL.hs
mit
global_kernelcache :: IORef (Map String CL.Kernel) global_kernelcache = unsafePerformIO $ newIORef Map.empty
108
global_kernelcache :: IORef (Map String CL.Kernel) global_kernelcache = unsafePerformIO $ newIORef Map.empty
108
global_kernelcache = unsafePerformIO $ newIORef Map.empty
57
false
true
0
8
11
33
16
17
null
null
keithodulaigh/Hets
HasCASL/Morphism.hs
gpl-2.0
mapAlt :: IdMap -> TypeMap -> IdMap -> FunMap -> IdMap -> [TypeArg] -> Type -> AltDefn -> AltDefn mapAlt jm tm im fm nIm args dt (Construct mi ts p sels) = let newTs = map (mapTypeE jm tm nIm) ts newSels = map (map (mapSel jm tm im fm nIm args dt)) sels in case mi of Just i -> let sc = TypeSchem...
533
mapAlt :: IdMap -> TypeMap -> IdMap -> FunMap -> IdMap -> [TypeArg] -> Type -> AltDefn -> AltDefn mapAlt jm tm im fm nIm args dt (Construct mi ts p sels) = let newTs = map (mapTypeE jm tm nIm) ts newSels = map (map (mapSel jm tm im fm nIm args dt)) sels in case mi of Just i -> let sc = TypeSchem...
533
mapAlt jm tm im fm nIm args dt (Construct mi ts p sels) = let newTs = map (mapTypeE jm tm nIm) ts newSels = map (map (mapSel jm tm im fm nIm args dt)) sels in case mi of Just i -> let sc = TypeScheme args (getFunType dt p ts) nullRange (j, TypeScheme _ ty _) = mapFunSym jm tm im fm (i, sc)...
433
false
true
0
16
144
252
123
129
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Comm.hs
bsd-3-clause
runDie :: ArduinoConnection -> String -> [String] -> IO a runDie c m ms = do let f = bailOut c f m ms
109
runDie :: ArduinoConnection -> String -> [String] -> IO a runDie c m ms = do let f = bailOut c f m ms
109
runDie c m ms = do let f = bailOut c f m ms
51
false
true
0
11
31
61
27
34
null
null
elieux/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
arg_varsW :: [(CmmActual, ForeignHint)] -> ([LlvmVar], LlvmStatements, [LlvmCmmDecl]) -> WriterT LlvmAccum LlvmM [LlvmVar] arg_varsW xs ys = do (vars, stmts, decls) <- lift $ arg_vars xs ys tell $ LlvmAccum stmts decls return vars -- | Conversion of call arguments.
298
arg_varsW :: [(CmmActual, ForeignHint)] -> ([LlvmVar], LlvmStatements, [LlvmCmmDecl]) -> WriterT LlvmAccum LlvmM [LlvmVar] arg_varsW xs ys = do (vars, stmts, decls) <- lift $ arg_vars xs ys tell $ LlvmAccum stmts decls return vars -- | Conversion of call arguments.
298
arg_varsW xs ys = do (vars, stmts, decls) <- lift $ arg_vars xs ys tell $ LlvmAccum stmts decls return vars -- | Conversion of call arguments.
155
false
true
0
10
72
107
55
52
null
null
tomahawkins/improve
Language/ImProve/Code/Simulink.hs
bsd-3-clause
block :: Block -> Net Name block a = do name <- newName modify $ \ net -> net { blocks = (name, a) : blocks net } return name -- New named block.
152
block :: Block -> Net Name block a = do name <- newName modify $ \ net -> net { blocks = (name, a) : blocks net } return name -- New named block.
152
block a = do name <- newName modify $ \ net -> net { blocks = (name, a) : blocks net } return name -- New named block.
125
false
true
0
13
40
73
35
38
null
null
yuttie/fibers
Yarn.hs
bsd-3-clause
close :: Yarn -> IO () close = IO.hClose . unYarn
49
close :: Yarn -> IO () close = IO.hClose . unYarn
49
close = IO.hClose . unYarn
26
false
true
1
8
10
33
14
19
null
null
waterlink/hgo
GenericLexer.hs
mit
imaginaryToken l = imaginary l >>= return . show
48
imaginaryToken l = imaginary l >>= return . show
48
imaginaryToken l = imaginary l >>= return . show
48
false
false
0
7
8
20
9
11
null
null
binesiyu/ifl
ifpt-master/TemplateTest.hs
mit
t1 = pr "pair x y f = f x y ; fst p = p K; snd p = p K1 ; f x y = letrec a = pair x b ; b = pair y a in fst (snd (snd (snd a))); main = f 3 4"
142
t1 = pr "pair x y f = f x y ; fst p = p K; snd p = p K1 ; f x y = letrec a = pair x b ; b = pair y a in fst (snd (snd (snd a))); main = f 3 4"
142
t1 = pr "pair x y f = f x y ; fst p = p K; snd p = p K1 ; f x y = letrec a = pair x b ; b = pair y a in fst (snd (snd (snd a))); main = f 3 4"
142
false
false
1
5
49
12
4
8
null
null
gridaphobe/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
proxyName = mkWiredInIdName gHC_PRIM (fsLit "proxy#") proxyHashKey proxyHashId
101
proxyName = mkWiredInIdName gHC_PRIM (fsLit "proxy#") proxyHashKey proxyHashId
101
proxyName = mkWiredInIdName gHC_PRIM (fsLit "proxy#") proxyHashKey proxyHashId
101
false
false
0
7
30
21
10
11
null
null
mariefarrell/Hets
HasCASL/DataAna.hs
gpl-2.0
genSelVarsAux n (ts : sels) = genTuple n 1 ts : genSelVarsAux (n + 1) sels
78
genSelVarsAux n (ts : sels) = genTuple n 1 ts : genSelVarsAux (n + 1) sels
78
genSelVarsAux n (ts : sels) = genTuple n 1 ts : genSelVarsAux (n + 1) sels
78
false
false
0
8
19
42
20
22
null
null
databrary/databrary
test/Model/Id/TypesTest.hs
agpl-3.0
rawPersonId :: IdType PersonRaw rawPersonId = 1
47
rawPersonId :: IdType PersonRaw rawPersonId = 1
47
rawPersonId = 1
15
false
true
0
6
6
20
8
12
null
null
cirquit/Personal-Repository
Haskell/Playground/AdventOfCode/advent-coding/src/Day05.hs
mit
oneLetterBetween _ = False
26
oneLetterBetween _ = False
26
oneLetterBetween _ = False
26
false
false
0
4
3
10
4
6
null
null
kapilash/ccs2cs
src/Language/CCS/Data.hs
apache-2.0
hwsalt i (StructSize s) = hashWithSalt (hashWithSalt i s) "@$Sizeof"
68
hwsalt i (StructSize s) = hashWithSalt (hashWithSalt i s) "@$Sizeof"
68
hwsalt i (StructSize s) = hashWithSalt (hashWithSalt i s) "@$Sizeof"
68
false
false
0
7
9
31
14
17
null
null
rzil/honours
DeepLearning/Tracking/Tracking.hs
mit
imagesDirectory = "/Users/ruben/Documents/thirdparty/darknet/airplane-formation/"
81
imagesDirectory = "/Users/ruben/Documents/thirdparty/darknet/airplane-formation/"
81
imagesDirectory = "/Users/ruben/Documents/thirdparty/darknet/airplane-formation/"
81
false
false
1
5
2
10
3
7
null
null
siddhanathan/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
mkPromotedListTy :: Type -> Type mkPromotedListTy ty = mkTyConApp promotedListTyCon [ty]
88
mkPromotedListTy :: Type -> Type mkPromotedListTy ty = mkTyConApp promotedListTyCon [ty]
88
mkPromotedListTy ty = mkTyConApp promotedListTyCon [ty]
55
false
true
0
6
10
26
13
13
null
null
shlevy/ghc
compiler/cmm/CmmSink.hs
bsd-3-clause
-- GlobalRegs that are loads from BaseReg are not trivial isTrivial _ (CmmLit _) = True
87
isTrivial _ (CmmLit _) = True
29
isTrivial _ (CmmLit _) = True
29
true
false
0
7
15
18
9
9
null
null
PipocaQuemada/ermine
src/Ermine/Syntax/Term.hs
bsd-2-clause
bindTerm f g (Remember i b) = Remember i (bindTerm f g b)
57
bindTerm f g (Remember i b) = Remember i (bindTerm f g b)
57
bindTerm f g (Remember i b) = Remember i (bindTerm f g b)
57
false
false
0
7
12
36
17
19
null
null
MP2E/XMonadContrib
XMonad/Layout/BinarySpacePartition.hs
bsd-3-clause
shrinkTreeFrom :: Direction2D -> Zipper Split -> Maybe (Zipper Split) shrinkTreeFrom _ z@(_, []) = Just z
105
shrinkTreeFrom :: Direction2D -> Zipper Split -> Maybe (Zipper Split) shrinkTreeFrom _ z@(_, []) = Just z
105
shrinkTreeFrom _ z@(_, []) = Just z
35
false
true
0
9
16
50
25
25
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x2F8A4' = "\x226D4"
35
decomposeChar '\x2F8A4' = "\x226D4"
35
decomposeChar '\x2F8A4' = "\x226D4"
35
false
false
0
4
3
10
4
6
null
null
TomMD/cryptol
src/Cryptol/TypeCheck/AST.hs
bsd-3-clause
splitWhile :: (a -> Maybe (b,a)) -> a -> ([b],a) splitWhile f e = case f e of Nothing -> ([], e) Just (x,e1) -> let (xs,e2) = splitWhile f e1 in (x:xs,e2)
230
splitWhile :: (a -> Maybe (b,a)) -> a -> ([b],a) splitWhile f e = case f e of Nothing -> ([], e) Just (x,e1) -> let (xs,e2) = splitWhile f e1 in (x:xs,e2)
230
splitWhile f e = case f e of Nothing -> ([], e) Just (x,e1) -> let (xs,e2) = splitWhile f e1 in (x:xs,e2)
181
false
true
0
12
108
123
64
59
null
null
ChrisCoffey/rwh
src/RW/Chap5/Prettify.hs
bsd-3-clause
oneChar :: Char -> Doc oneChar c = case lookup c simpleEscapes of Just r -> text r Nothing | mustEscape c -> hexEscape c | otherwise -> char c where mustEscape x = x < ' ' || x == '\x7f' || x > '\xff'
249
oneChar :: Char -> Doc oneChar c = case lookup c simpleEscapes of Just r -> text r Nothing | mustEscape c -> hexEscape c | otherwise -> char c where mustEscape x = x < ' ' || x == '\x7f' || x > '\xff'
249
oneChar c = case lookup c simpleEscapes of Just r -> text r Nothing | mustEscape c -> hexEscape c | otherwise -> char c where mustEscape x = x < ' ' || x == '\x7f' || x > '\xff'
226
false
true
0
11
94
106
46
60
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/HTML/Helpers.hs
bsd-2-clause
-- | Div tag wrapper divTag :: [String] -> Doc -> Doc divTag = wrap "div"
73
divTag :: [String] -> Doc -> Doc divTag = wrap "div"
52
divTag = wrap "div"
19
true
true
0
8
15
32
15
17
null
null
kaoskorobase/mescaline
tools/sts/Main.hs
gpl-3.0
mkPlotData :: DB.DescriptorMap -> DB.UnitMap -> [SoundFile] -> PlotData mkPlotData ds us sfs = PlotData sfs ids um Set.empty fileStats featStats where mkFeatureMap = Map.fromList . map (\f -> (DB.featureDescriptor f, f)) um = Map.foldrWithKey (\ui (u, fs) -> Map.alter...
803
mkPlotData :: DB.DescriptorMap -> DB.UnitMap -> [SoundFile] -> PlotData mkPlotData ds us sfs = PlotData sfs ids um Set.empty fileStats featStats where mkFeatureMap = Map.fromList . map (\f -> (DB.featureDescriptor f, f)) um = Map.foldrWithKey (\ui (u, fs) -> Map.alter...
803
mkPlotData ds us sfs = PlotData sfs ids um Set.empty fileStats featStats where mkFeatureMap = Map.fromList . map (\f -> (DB.featureDescriptor f, f)) um = Map.foldrWithKey (\ui (u, fs) -> Map.alter (Just . maybe (Map.singleton ui (u, mkFeatureMap fs)) ...
731
false
true
4
15
289
297
145
152
null
null
wilbowma/accelerate
Data/Array/Accelerate/Pretty/Traverse.hs
bsd-3-clause
labelForPrimFun (PrimFDiv _) = "PrimFDiv"
51
labelForPrimFun (PrimFDiv _) = "PrimFDiv"
51
labelForPrimFun (PrimFDiv _) = "PrimFDiv"
51
false
false
0
6
14
16
7
9
null
null
AndyShiue/ende
frontend/src/Parsing.hs
lgpl-3.0
opToElement :: Operator -> Expr.Operator Parser (TaggedTerm Position) opToElement op = Expr.InfixL $ opToFunc op <$ (symbol $ opToString op)
140
opToElement :: Operator -> Expr.Operator Parser (TaggedTerm Position) opToElement op = Expr.InfixL $ opToFunc op <$ (symbol $ opToString op)
140
opToElement op = Expr.InfixL $ opToFunc op <$ (symbol $ opToString op)
70
false
true
2
9
19
60
27
33
null
null
postgres-haskell/postgres-wire
src/Database/PostgreSQL/Protocol/Codecs/PgTypes.hs
mit
jsonb :: Oids jsonb = mkOids 3802 3807
38
jsonb :: Oids jsonb = mkOids 3802 3807
38
jsonb = mkOids 3802 3807
24
false
true
0
6
7
24
9
15
null
null
yusent/cfdis
src/CFDI/Types/Currency.hs
mit
decimalPlaces CUR_UYU = 2
25
decimalPlaces CUR_UYU = 2
25
decimalPlaces CUR_UYU = 2
25
false
false
0
5
3
9
4
5
null
null
fpco/hlint
src/Settings.hs
bsd-3-clause
readFuncs (Var _ (Qual _ (ModuleName _ mod) name)) = [(mod, fromNamed name)]
76
readFuncs (Var _ (Qual _ (ModuleName _ mod) name)) = [(mod, fromNamed name)]
76
readFuncs (Var _ (Qual _ (ModuleName _ mod) name)) = [(mod, fromNamed name)]
76
false
false
0
11
12
47
24
23
null
null
legoscia/hsxmpp
Werewolf.hs
bsd-3-clause
startDay lang nick room participantList werewolves villagers = do case checkVictory werewolves villagers of Just x -> do t <- liftIO $ translate lang "As the sun rises over the little village, the people realize that there is only one side left. " t' <- liftIO $ translate lang $ case ...
936
startDay lang nick room participantList werewolves villagers = do case checkVictory werewolves villagers of Just x -> do t <- liftIO $ translate lang "As the sun rises over the little village, the people realize that there is only one side left. " t' <- liftIO $ translate lang $ case ...
936
startDay lang nick room participantList werewolves villagers = do case checkVictory werewolves villagers of Just x -> do t <- liftIO $ translate lang "As the sun rises over the little village, the people realize that there is only one side left. " t' <- liftIO $ translate lang $ case ...
936
false
false
0
16
310
167
75
92
null
null
peti/postmaster
src/Postmaster/Esmtpd.hs
agpl-3.0
esmtpdFSM (MailFrom addr) = use session >>= \case Initial -> respond 5 0 3 ["please send HELO or EHLO first"] HaveEhlo {..} -> session .= (HaveMailFrom {_envelope = addr, ..}) >> respond 2 5 0 ["OK"] HaveMailFrom {..} -> respond 5 0 3 ["nested MAIL command"] HaveRcptTo {..} -> respond 5 0 3 ["ne...
339
esmtpdFSM (MailFrom addr) = use session >>= \case Initial -> respond 5 0 3 ["please send HELO or EHLO first"] HaveEhlo {..} -> session .= (HaveMailFrom {_envelope = addr, ..}) >> respond 2 5 0 ["OK"] HaveMailFrom {..} -> respond 5 0 3 ["nested MAIL command"] HaveRcptTo {..} -> respond 5 0 3 ["ne...
339
esmtpdFSM (MailFrom addr) = use session >>= \case Initial -> respond 5 0 3 ["please send HELO or EHLO first"] HaveEhlo {..} -> session .= (HaveMailFrom {_envelope = addr, ..}) >> respond 2 5 0 ["OK"] HaveMailFrom {..} -> respond 5 0 3 ["nested MAIL command"] HaveRcptTo {..} -> respond 5 0 3 ["ne...
339
false
false
0
13
79
136
69
67
null
null
JoseD92/EasyGL
test/test.hs
bsd-3-clause
vecSum (Vertex3 x1 y1 z1) (Vertex3 x2 y2 z2) = Vertex3 (x1+x2) (y1+y2) (z1+z2)
78
vecSum (Vertex3 x1 y1 z1) (Vertex3 x2 y2 z2) = Vertex3 (x1+x2) (y1+y2) (z1+z2)
78
vecSum (Vertex3 x1 y1 z1) (Vertex3 x2 y2 z2) = Vertex3 (x1+x2) (y1+y2) (z1+z2)
78
false
false
0
7
13
59
30
29
null
null
nikki-and-the-robots/nikki
src/Sorts/Robots/Jetpack.hs
lgpl-3.0
-- | loads a pixmap with the special size and padding of jetpack pixmaps loadJetpackPixmap :: FilePath -> IO Pixmap loadJetpackPixmap file = do loadPixmap (Position 9 1) (Size (fromUber 27) (fromUber 21)) file
213
loadJetpackPixmap :: FilePath -> IO Pixmap loadJetpackPixmap file = do loadPixmap (Position 9 1) (Size (fromUber 27) (fromUber 21)) file
140
loadJetpackPixmap file = do loadPixmap (Position 9 1) (Size (fromUber 27) (fromUber 21)) file
97
true
true
0
12
37
64
30
34
null
null
fmapfmapfmap/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/GetApplication.hs
mpl-2.0
-- | The name of an existing AWS CodeDeploy application associated with the -- applicable IAM user or AWS account. gaApplicationName :: Lens' GetApplication Text gaApplicationName = lens _gaApplicationName (\ s a -> s{_gaApplicationName = a})
242
gaApplicationName :: Lens' GetApplication Text gaApplicationName = lens _gaApplicationName (\ s a -> s{_gaApplicationName = a})
127
gaApplicationName = lens _gaApplicationName (\ s a -> s{_gaApplicationName = a})
80
true
true
0
9
35
48
24
24
null
null
tekul/cryptonite
Crypto/Cipher/CAST5/Primitive.hs
bsd-3-clause
sbox_s8 :: Word8 -> Word32 sbox_s8 i = arrayRead32 t (fromIntegral i) where t = array32FromAddrBE 256 "\xe2\x16\x30\x0d\xbb\xdd\xff\xfc\xa7\xeb\xda\xbd\x35\x64\x80\x95\x77\x89\xf8\xb7\xe6\xc1\x12\x1b\x0e\x24\x16\x00\x05\x2c\xe8\xb5\ \\x11\xa9\xcf\xb0\xe5\x95\x2f\x11\xec\xe7\x99\x0a\x93\x86...
4,684
sbox_s8 :: Word8 -> Word32 sbox_s8 i = arrayRead32 t (fromIntegral i) where t = array32FromAddrBE 256 "\xe2\x16\x30\x0d\xbb\xdd\xff\xfc\xa7\xeb\xda\xbd\x35\x64\x80\x95\x77\x89\xf8\xb7\xe6\xc1\x12\x1b\x0e\x24\x16\x00\x05\x2c\xe8\xb5\ \\x11\xa9\xcf\xb0\xe5\x95\x2f\x11\xec\xe7\x99\x0a\x93\x86...
4,684
sbox_s8 i = arrayRead32 t (fromIntegral i) where t = array32FromAddrBE 256 "\xe2\x16\x30\x0d\xbb\xdd\xff\xfc\xa7\xeb\xda\xbd\x35\x64\x80\x95\x77\x89\xf8\xb7\xe6\xc1\x12\x1b\x0e\x24\x16\x00\x05\x2c\xe8\xb5\ \\x11\xa9\xcf\xb0\xe5\x95\x2f\x11\xec\xe7\x99\x0a\x93\x86\xd1\x74\x2a\x42\x93\x1c\x7...
4,657
false
true
1
7
438
48
21
27
null
null
mainland/dph
dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/USegd/Split.hs
bsd-3-clause
-- NOINLINE because it won't fuse with anything. ------------------------------------------------------------------------------- -- | Split a segment descriptor across the gang, element wise. -- We try to put the same number of elements on each thread, which means -- that segments are sometimes split across thre...
2,531
splitSegdOnElemsD :: Gang -> USegd -> Dist ((USegd,Int),Int) splitSegdOnElemsD g !segd = {-# SCC "splitSegdOnElemsD" #-} traceEvent ("dph-prim-par: USegd.splitSegdOnElemsD") $ imapD (What "USegd.splitSegdOnElemsD/splitLenIdx") g mk (splitLenIdxD g (USegd.takeElements segd)) where -- N...
950
splitSegdOnElemsD g !segd = {-# SCC "splitSegdOnElemsD" #-} traceEvent ("dph-prim-par: USegd.splitSegdOnElemsD") $ imapD (What "USegd.splitSegdOnElemsD/splitLenIdx") g mk (splitLenIdxD g (USegd.takeElements segd)) where -- Number of threads in gang. !nThreads = gangSize g ...
889
true
true
3
11
885
236
143
93
null
null
haskell-distributed/distributed-process-execution
src/Control/Distributed/Process/Execution/Exchange/Internal.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Starting/Running an Exchange -- -------------------------------------------------------------------------------- -- | Starts an /exchange process/ with the given 'ExchangeType'. startExchan...
402
startExchange :: forall s. ExchangeType s -> Process Exchange startExchange = doStart Nothing
93
startExchange = doStart Nothing
31
true
true
0
8
76
38
19
19
null
null
573/leksah
src/IDE/Statusbar.hs
gpl-2.0
getSBErrors :: PaneMonad alpha => alpha Statusbar getSBErrors = widgetGet ["Leksah Main Window", "topBox","statusBox","statusBarErrors"] castToStatusbar
159
getSBErrors :: PaneMonad alpha => alpha Statusbar getSBErrors = widgetGet ["Leksah Main Window", "topBox","statusBox","statusBarErrors"] castToStatusbar
159
getSBErrors = widgetGet ["Leksah Main Window", "topBox","statusBox","statusBarErrors"] castToStatusbar
109
false
true
0
6
21
38
20
18
null
null
AndreasPK/stack
src/Stack/Types/StackT.hs
bsd-3-clause
-- | This will print out the given message with a newline and disable -- any further stickiness of the line until a new call to 'logSticky' -- happens. -- -- It might be better at some point to have a 'runSticky' function -- that encompasses the logSticky->logStickyDone pairing. logStickyDone :: Q Exp logStickyDone = ...
345
logStickyDone :: Q Exp logStickyDone = logOther "sticky-done"
65
logStickyDone = logOther "sticky-done"
42
true
true
0
5
60
23
14
9
null
null
brendanhay/gogol
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). udsuUploadType :: Lens' UsersDataSourcesUpdate (Maybe Text) udsuUploadType = lens _udsuUploadType (\ s a -> s{_udsuUploadType = a})
210
udsuUploadType :: Lens' UsersDataSourcesUpdate (Maybe Text) udsuUploadType = lens _udsuUploadType (\ s a -> s{_udsuUploadType = a})
139
udsuUploadType = lens _udsuUploadType (\ s a -> s{_udsuUploadType = a})
79
true
true
0
9
34
48
25
23
null
null
matthieubulte/sequent
src/Sequent/Inference.hs
bsd-3-clause
{- Gamma, A[y/x] |- Delta -------------------------------- forall left Gamma, forall x. A |- Delta -} iForAllAntecedent :: InferenceRule iForAllAntecedent (P.ForAllAntecedent y rest) (T.ForAll f:gamma, delta) = check rest (f y:gamma, delta)
252
iForAllAntecedent :: InferenceRule iForAllAntecedent (P.ForAllAntecedent y rest) (T.ForAll f:gamma, delta) = check rest (f y:gamma, delta)
142
iForAllAntecedent (P.ForAllAntecedent y rest) (T.ForAll f:gamma, delta) = check rest (f y:gamma, delta)
107
true
true
0
9
42
60
31
29
null
null
plumlife/cabal
Cabal/Distribution/Package.hs
bsd-3-clause
packageVersion :: Package pkg => pkg -> Version packageVersion = pkgVersion . packageId
88
packageVersion :: Package pkg => pkg -> Version packageVersion = pkgVersion . packageId
88
packageVersion = pkgVersion . packageId
40
false
true
0
6
13
26
13
13
null
null
MihaiVisu/HaskellStuff
tutorial3 week5/tutorial3.hs
mit
elongsToStr n (x:xs) | n /= x = belongsToStr n xs | otherwise = True
91
belongsToStr n (x:xs) | n /= x = belongsToStr n xs | otherwise = True
91
belongsToStr n (x:xs) | n /= x = belongsToStr n xs | otherwise = True
91
false
false
1
8
37
42
19
23
null
null
pfq/PFQ
user/pfqd/src/Main.hs
gpl-2.0
where bindEgress q gid dev queue = do infoM "daemon" (" egress bind on dev " ++ dev ++ ", port " ++ show queue ++ ", class " ++ show cl) Q.joinGroup q gid cl (mkPolicy pol) Q.egressBind q dev queue Q.setWeight q w
264
where bindEgress q gid dev queue = do infoM "daemon" (" egress bind on dev " ++ dev ++ ", port " ++ show queue ++ ", class " ++ show cl) Q.joinGroup q gid cl (mkPolicy pol) Q.egressBind q dev queue Q.setWeight q w
264
where bindEgress q gid dev queue = do infoM "daemon" (" egress bind on dev " ++ dev ++ ", port " ++ show queue ++ ", class " ++ show cl) Q.joinGroup q gid cl (mkPolicy pol) Q.egressBind q dev queue Q.setWeight q w
264
false
false
0
13
95
96
43
53
null
null
rzil/honours
LeavittPathAlgebras/LPA.hs
mit
collectNormalFormAtoms nf = filter ((/= 0) . normalFormAtomCoefficient) (map (\xs -> (head xs) {normalFormAtomCoefficient = sum (map normalFormAtomCoefficient xs)}) (groupBy (\a b -> normalFormAtomVertex a == normalFormAtomVertex b && normalFormAtomPath a == normalFormAtomPath b && normalFormAtomGhostPath a == normalFo...
350
collectNormalFormAtoms nf = filter ((/= 0) . normalFormAtomCoefficient) (map (\xs -> (head xs) {normalFormAtomCoefficient = sum (map normalFormAtomCoefficient xs)}) (groupBy (\a b -> normalFormAtomVertex a == normalFormAtomVertex b && normalFormAtomPath a == normalFormAtomPath b && normalFormAtomGhostPath a == normalFo...
350
collectNormalFormAtoms nf = filter ((/= 0) . normalFormAtomCoefficient) (map (\xs -> (head xs) {normalFormAtomCoefficient = sum (map normalFormAtomCoefficient xs)}) (groupBy (\a b -> normalFormAtomVertex a == normalFormAtomVertex b && normalFormAtomPath a == normalFormAtomPath b && normalFormAtomGhostPath a == normalFo...
350
false
false
0
17
41
128
64
64
null
null
arekfu/project_euler
p0086/p0086.hs
mit
countSplits (aPlusB, c, _) = if lo <= hi then hi - lo + 1 else 0 where lo = max (aPlusB - c) 1 aPlusBOver2 = aPlusB `div` 2 hi = aPlusBOver2
164
countSplits (aPlusB, c, _) = if lo <= hi then hi - lo + 1 else 0 where lo = max (aPlusB - c) 1 aPlusBOver2 = aPlusB `div` 2 hi = aPlusBOver2
164
countSplits (aPlusB, c, _) = if lo <= hi then hi - lo + 1 else 0 where lo = max (aPlusB - c) 1 aPlusBOver2 = aPlusB `div` 2 hi = aPlusBOver2
164
false
false
2
8
56
77
41
36
null
null
cullina/Extractor
src/LempelZiv.hs
bsd-3-clause
bitsNeeded' n m logM = logM : if n < m then bitsNeeded' (n+1) m logM else bitsNeeded' (n+1) (2*m) (logM+1)
133
bitsNeeded' n m logM = logM : if n < m then bitsNeeded' (n+1) m logM else bitsNeeded' (n+1) (2*m) (logM+1)
133
bitsNeeded' n m logM = logM : if n < m then bitsNeeded' (n+1) m logM else bitsNeeded' (n+1) (2*m) (logM+1)
133
false
false
3
8
47
77
37
40
null
null
Gwin73/Schemini
src/one-file-version/Schemini.hs
mit
eval (List [Atom "def", Atom var, expr]) = eval expr
52
eval (List [Atom "def", Atom var, expr]) = eval expr
52
eval (List [Atom "def", Atom var, expr]) = eval expr
52
false
false
0
9
9
33
16
17
null
null
snoyberg/data-object-json
runtests.hs
bsd-2-clause
caseInputOutput :: Assertion caseInputOutput = do so <- decode $ S8.pack input output @=? so
100
caseInputOutput :: Assertion caseInputOutput = do so <- decode $ S8.pack input output @=? so
100
caseInputOutput = do so <- decode $ S8.pack input output @=? so
71
false
true
0
10
22
34
16
18
null
null
melted/idris-java
src/IRTS/Java/JTypes.hs
bsd-3-clause
opName :: PrimFn -> String opName x | (LSExt _ to) <- x = "LSExt" ++ (suffixFor to) | (LZExt _ to) <- x = "LZExt" ++ (suffixFor to) | (LTrunc _ to) <- x = "LTrunc" ++ (suffixFor to) | (LFloatInt to) <- x = "LFloatInt" ++ (suffixFor to) | (LStrInt to) <- x = "LStrInt" ++ (suffixFor to) | (LChInt to) ...
1,623
opName :: PrimFn -> String opName x | (LSExt _ to) <- x = "LSExt" ++ (suffixFor to) | (LZExt _ to) <- x = "LZExt" ++ (suffixFor to) | (LTrunc _ to) <- x = "LTrunc" ++ (suffixFor to) | (LFloatInt to) <- x = "LFloatInt" ++ (suffixFor to) | (LStrInt to) <- x = "LStrInt" ++ (suffixFor to) | (LChInt to) ...
1,623
opName x | (LSExt _ to) <- x = "LSExt" ++ (suffixFor to) | (LZExt _ to) <- x = "LZExt" ++ (suffixFor to) | (LTrunc _ to) <- x = "LTrunc" ++ (suffixFor to) | (LFloatInt to) <- x = "LFloatInt" ++ (suffixFor to) | (LStrInt to) <- x = "LStrInt" ++ (suffixFor to) | (LChInt to) <- x = "LChInt" ++ (suffi...
1,596
false
true
0
10
695
625
294
331
null
null
d12frosted/hakyll
src/Hakyll/Core/Compiler.hs
bsd-3-clause
reloadMetadata :: Item String -> Compiler (Item String) reloadMetadata item = do read <- compilerAsk let identifier = itemIdentifier item provider = compilerProvider read unsafeCompiler $ resourceReloadMetadata provider identifier (itemBody item) return item
284
reloadMetadata :: Item String -> Compiler (Item String) reloadMetadata item = do read <- compilerAsk let identifier = itemIdentifier item provider = compilerProvider read unsafeCompiler $ resourceReloadMetadata provider identifier (itemBody item) return item
284
reloadMetadata item = do read <- compilerAsk let identifier = itemIdentifier item provider = compilerProvider read unsafeCompiler $ resourceReloadMetadata provider identifier (itemBody item) return item
228
false
true
0
10
58
83
37
46
null
null
sternenseemann/large-hashable
test/Data/LargeHashable/Tests/Class.hs
bsd-3-clause
prop_hashMapUniqueness :: HM.HashMap Int Bool -> HM.HashMap Int Bool -> Bool prop_hashMapUniqueness = generic_uniquenessProp
124
prop_hashMapUniqueness :: HM.HashMap Int Bool -> HM.HashMap Int Bool -> Bool prop_hashMapUniqueness = generic_uniquenessProp
124
prop_hashMapUniqueness = generic_uniquenessProp
47
false
true
0
8
13
33
16
17
null
null
tel/hs-nanomsg
src/Network/Nanomsg/C/Priorities.hs
apache-2.0
prio7 = Priority 7
24
prio7 = Priority 7
24
prio7 = Priority 7
24
false
false
0
5
9
9
4
5
null
null
fmthoma/ghc
libraries/template-haskell/Language/Haskell/TH/Quote.hs
bsd-3-clause
dataToExpQ :: Data a => (forall b . Data b => b -> Maybe (Q Exp)) -> a -> Q Exp dataToExpQ = dataToQa conE litE (foldl appE)
165
dataToExpQ :: Data a => (forall b . Data b => b -> Maybe (Q Exp)) -> a -> Q Exp dataToExpQ = dataToQa conE litE (foldl appE)
165
dataToExpQ = dataToQa conE litE (foldl appE)
44
false
true
0
14
68
76
35
41
null
null
romanb/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/UpdateDeploymentGroup.hs
mpl-2.0
-- | The replacement set of Amazon EC2 tags to filter on, if you want to change -- them. udgEc2TagFilters :: Lens' UpdateDeploymentGroup [EC2TagFilter] udgEc2TagFilters = lens _udgEc2TagFilters (\s a -> s { _udgEc2TagFilters = a }) . _List
239
udgEc2TagFilters :: Lens' UpdateDeploymentGroup [EC2TagFilter] udgEc2TagFilters = lens _udgEc2TagFilters (\s a -> s { _udgEc2TagFilters = a }) . _List
150
udgEc2TagFilters = lens _udgEc2TagFilters (\s a -> s { _udgEc2TagFilters = a }) . _List
87
true
true
1
10
38
53
27
26
null
null
xkollar/handy-haskell
other/pt-2012-02/aaa.hs
gpl-3.0
main :: IO () main = do System.IO.hSetBuffering System.IO.stdout System.IO.NoBuffering main2
100
main :: IO () main = do System.IO.hSetBuffering System.IO.stdout System.IO.NoBuffering main2
100
main = do System.IO.hSetBuffering System.IO.stdout System.IO.NoBuffering main2
86
false
true
0
8
18
36
18
18
null
null
NightRa/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
carith (FCon i) | i == sUN "C_IntChar" = "char" | i == sUN "C_IntNative" = "int"
84
carith (FCon i) | i == sUN "C_IntChar" = "char" | i == sUN "C_IntNative" = "int"
84
carith (FCon i) | i == sUN "C_IntChar" = "char" | i == sUN "C_IntNative" = "int"
84
false
false
0
9
20
47
20
27
null
null
nikita-volkov/graph-db
library/GraphDB/Util/FileSystem.hs
mit
-- | -- Execute an IO action while using a file as an interprocess lock, -- thus ensuring that only a single action executes across all processes -- of the running system. -- -- If a file exists already it checks whether it is locked on by any running process, -- including the current one, -- and acquires it if it...
532
withLock :: FilePath -> IO a -> IO a withLock file io = bracket (acquireLock file) releaseLock (const io)
105
withLock file io = bracket (acquireLock file) releaseLock (const io)
68
true
true
0
7
105
59
33
26
null
null
edsko/hackage-server
Distribution/Server/Features/Security/State.hs
bsd-3-clause
initialSecurityState :: SecurityState initialSecurityState = SecurityState { securityStateFiles = Nothing, securityTarGzFileInfo = tarGzFileInfo, securityTarFileInfo = tarFileInfo, securitySnapshotVersion = Sec.versionInitial, securityTimestampVersion = Sec.versionInitia...
823
initialSecurityState :: SecurityState initialSecurityState = SecurityState { securityStateFiles = Nothing, securityTarGzFileInfo = tarGzFileInfo, securityTarFileInfo = tarFileInfo, securitySnapshotVersion = Sec.versionInitial, securityTimestampVersion = Sec.versionInitia...
823
initialSecurityState = SecurityState { securityStateFiles = Nothing, securityTarGzFileInfo = tarGzFileInfo, securityTarFileInfo = tarFileInfo, securitySnapshotVersion = Sec.versionInitial, securityTimestampVersion = Sec.versionInitial, securityTimestampTime = ep...
785
false
true
4
7
156
119
66
53
null
null
nushio3/ghc
compiler/utils/Outputable.hs
bsd-3-clause
alwaysQualifyModules :: QueryQualifyModule alwaysQualifyModules _ = True
72
alwaysQualifyModules :: QueryQualifyModule alwaysQualifyModules _ = True
72
alwaysQualifyModules _ = True
29
false
true
0
5
6
14
7
7
null
null
tibbe/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
mkEMPTY_MVAR_infoLabel = CmmLabel rtsPackageId (fsLit "stg_EMPTY_MVAR") CmmInfo
95
mkEMPTY_MVAR_infoLabel = CmmLabel rtsPackageId (fsLit "stg_EMPTY_MVAR") CmmInfo
95
mkEMPTY_MVAR_infoLabel = CmmLabel rtsPackageId (fsLit "stg_EMPTY_MVAR") CmmInfo
95
false
false
0
7
22
19
9
10
null
null
spechub/Hets
SoftFOL/MathServParsing.hs
gpl-2.0
-- ** functions for handling with soap soapenvS :: String soapenvS = "soapenv"
79
soapenvS :: String soapenvS = "soapenv"
39
soapenvS = "soapenv"
20
true
true
0
4
13
12
7
5
null
null
pgj/bead
src/Bead/Persistence/NoSQLDirFile.hs
bsd-3-clause
dataDir = "data"
16
dataDir = "data"
16
dataDir = "data"
16
false
false
1
5
2
10
3
7
null
null
sdiehl/ghc
testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs
bsd-3-clause
findNameBinds :: String -> [CoreBind] -> First Name findNameBinds target = mconcat . map (findNameBind target)
110
findNameBinds :: String -> [CoreBind] -> First Name findNameBinds target = mconcat . map (findNameBind target)
110
findNameBinds target = mconcat . map (findNameBind target)
58
false
true
0
8
15
41
20
21
null
null
k0001/gtk2hs
tools/c2hs/base/general/UNames.hs
gpl-3.0
saveRootNameSupply :: IO Name saveRootNameSupply = case rootSupply of NameSupply ref -> do val <- readIORef ref writeIORef ref 0 return (Name val)
170
saveRootNameSupply :: IO Name saveRootNameSupply = case rootSupply of NameSupply ref -> do val <- readIORef ref writeIORef ref 0 return (Name val)
170
saveRootNameSupply = case rootSupply of NameSupply ref -> do val <- readIORef ref writeIORef ref 0 return (Name val)
140
false
true
0
12
46
57
25
32
null
null
jspahrsummers/RxHaskell
Disposable.hs
mit
dispose :: Disposable -> IO () dispose EmptyDisposable = return ()
66
dispose :: Disposable -> IO () dispose EmptyDisposable = return ()
66
dispose EmptyDisposable = return ()
35
false
true
0
7
10
28
13
15
null
null
bgamari/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
block :: LP Blocks block = (mempty <$ comment) <|> (mempty <$ ((spaceChar <|> newline) *> spaces)) <|> environment <|> macro <|> blockCommand <|> paragraph <|> grouped block <|> (mempty <$ char '&')
226
block :: LP Blocks block = (mempty <$ comment) <|> (mempty <$ ((spaceChar <|> newline) *> spaces)) <|> environment <|> macro <|> blockCommand <|> paragraph <|> grouped block <|> (mempty <$ char '&')
226
block = (mempty <$ comment) <|> (mempty <$ ((spaceChar <|> newline) *> spaces)) <|> environment <|> macro <|> blockCommand <|> paragraph <|> grouped block <|> (mempty <$ char '&')
207
false
true
21
10
60
110
58
52
null
null
gumgl/project-euler
33/33.hs
mit
candidates (a:as) = (map (\i -> (a,i)) as) ++ (candidates as)
61
candidates (a:as) = (map (\i -> (a,i)) as) ++ (candidates as)
61
candidates (a:as) = (map (\i -> (a,i)) as) ++ (candidates as)
61
false
false
0
10
10
49
26
23
null
null
alexander-at-github/eta
compiler/ETA/CodeGen/Rts.hs
bsd-3-clause
funType = obj stgFun
30
funType = obj stgFun
30
funType = obj stgFun
30
false
false
0
5
13
9
4
5
null
null
siddhanathan/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
isVecExpr (CmmMachOp (MO_VF_Quot {}) _) = True
49
isVecExpr (CmmMachOp (MO_VF_Quot {}) _) = True
49
isVecExpr (CmmMachOp (MO_VF_Quot {}) _) = True
49
false
false
0
9
9
24
12
12
null
null
spatial-reasoning/zeno
src/Helpful/General.hs
bsd-2-clause
-- a purely functional implementation of if-then-else ite :: Bool -> a -> a -> a ite True x _ = x
98
ite :: Bool -> a -> a -> a ite True x _ = x
44
ite True x _ = x
17
true
true
0
9
22
37
17
20
null
null
MasseR/xmonadcontrib
XMonad/Actions/PhysicalScreens.hs
bsd-3-clause
onNextNeighbour :: (WorkspaceId -> WindowSet -> WindowSet) -> X () onNextNeighbour = neighbourWindows 1
103
onNextNeighbour :: (WorkspaceId -> WindowSet -> WindowSet) -> X () onNextNeighbour = neighbourWindows 1
103
onNextNeighbour = neighbourWindows 1
36
false
true
0
9
13
39
18
21
null
null
abuiles/turbinado-blog
tmp/dependencies/utf8-string-0.3.3/System/IO/UTF8.hs
bsd-3-clause
-- | Write a UTF8 string to a Handle. hPutStr :: Handle -> String -> IO () hPutStr h s = IO.hPutStr h (encodeString s)
118
hPutStr :: Handle -> String -> IO () hPutStr h s = IO.hPutStr h (encodeString s)
80
hPutStr h s = IO.hPutStr h (encodeString s)
43
true
true
0
8
24
43
21
22
null
null
PavelClaudiuStefan/FMI
An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator2/PicturesSVG.hs
cc0-1.0
preamble = "<svg width=\"100%\" height=\"100%\" version=\"1.1\"\n" ++ "xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" ++ "<filter id=\"negative\">\n" ++ "<feColorMatrix type=\"matrix\"\n"++ "values=\"-1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 1 1 1 0 0\" />\n" +...
338
preamble = "<svg width=\"100%\" height=\"100%\" version=\"1.1\"\n" ++ "xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" ++ "<filter id=\"negative\">\n" ++ "<feColorMatrix type=\"matrix\"\n"++ "values=\"-1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 1 1 1 0 0\" />\n" +...
338
preamble = "<svg width=\"100%\" height=\"100%\" version=\"1.1\"\n" ++ "xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" ++ "<filter id=\"negative\">\n" ++ "<feColorMatrix type=\"matrix\"\n"++ "values=\"-1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 1 1 1 0 0\" />\n" +...
338
false
false
5
6
69
32
13
19
null
null
brendanhay/gogol
gogol-admin-datatransfer/gen/Network/Google/Resource/DataTransfer/Applications/List.hs
mpl-2.0
-- | V1 error format. alXgafv :: Lens' ApplicationsList (Maybe Xgafv) alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})
120
alXgafv :: Lens' ApplicationsList (Maybe Xgafv) alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})
98
alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})
50
true
true
0
9
21
46
25
21
null
null
ml9951/ghc
compiler/simplCore/SimplUtils.hs
bsd-3-clause
argInfoAppArgs (TyArg { as_arg_ty = ty } : as) = Type ty : argInfoAppArgs as
76
argInfoAppArgs (TyArg { as_arg_ty = ty } : as) = Type ty : argInfoAppArgs as
76
argInfoAppArgs (TyArg { as_arg_ty = ty } : as) = Type ty : argInfoAppArgs as
76
false
false
0
10
14
35
17
18
null
null
brendanhay/gogol
gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs
mpl-2.0
-- | [Output Only] The error type identifier for this error. rueeiCode :: Lens' ResourceUpdateErrorErrorsItem (Maybe Text) rueeiCode = lens _rueeiCode (\ s a -> s{_rueeiCode = a})
181
rueeiCode :: Lens' ResourceUpdateErrorErrorsItem (Maybe Text) rueeiCode = lens _rueeiCode (\ s a -> s{_rueeiCode = a})
120
rueeiCode = lens _rueeiCode (\ s a -> s{_rueeiCode = a})
58
true
true
0
9
29
48
25
23
null
null
vipo/TicTacToe
test/Spec.hs
bsd-3-clause
bencode :: TestTree bencode = testGroup "Bencode" [ QC.testProperty "array of maps" $ testArrayOfMaps readBencode renderBencode , QC.testProperty "map of maps" $ testMapOfMaps readBencode renderBencode , QC.testProperty "arrays of arrays" $ testArrayOfArrays ...
653
bencode :: TestTree bencode = testGroup "Bencode" [ QC.testProperty "array of maps" $ testArrayOfMaps readBencode renderBencode , QC.testProperty "map of maps" $ testMapOfMaps readBencode renderBencode , QC.testProperty "arrays of arrays" $ testArrayOfArrays ...
653
bencode = testGroup "Bencode" [ QC.testProperty "array of maps" $ testArrayOfMaps readBencode renderBencode , QC.testProperty "map of maps" $ testMapOfMaps readBencode renderBencode , QC.testProperty "arrays of arrays" $ testArrayOfArrays readBencode renderBe...
633
false
true
0
13
170
166
80
86
null
null
jhartikainen/hs-language-php
Evaluator.hs
bsd-3-clause
isInFunctionContext :: PHPEval Bool isInFunctionContext = liftM globalRef ask >>= return . isJust
97
isInFunctionContext :: PHPEval Bool isInFunctionContext = liftM globalRef ask >>= return . isJust
97
isInFunctionContext = liftM globalRef ask >>= return . isJust
61
false
true
0
7
12
27
13
14
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 462346 = 1918
33
getValueFromProduct 462346 = 1918
33
getValueFromProduct 462346 = 1918
33
false
false
0
5
3
9
4
5
null
null
termite2/tsl
Frontend/NS.hs
bsd-3-clause
objLookup (ObjTxInput t i) n = objLookup (ObjType $ Type ScopeTop (tspec i)) n
79
objLookup (ObjTxInput t i) n = objLookup (ObjType $ Type ScopeTop (tspec i)) n
79
objLookup (ObjTxInput t i) n = objLookup (ObjType $ Type ScopeTop (tspec i)) n
79
false
false
0
10
14
42
20
22
null
null
mzini/qlogic
Qlogic/Test/ArcSat.hs
gpl-3.0
correctEncoding _ = False
33
correctEncoding _ = False
33
correctEncoding _ = False
33
false
false
0
5
11
9
4
5
null
null
derekmcloughlin/BridgeBuddyServer
library/BridgeBuddy/OpeningBids.hs
apache-2.0
biddableHands :: TableHands -> [Hand] biddableHands table_hands = filter (\h -> isBiddable h || isNearlyBiddable h ) hands where hands = [h table_hands | h <- [north, east, south, west] ] bid h = fst (openingBid h) isBiddable hand = bid hand /= Pass isNearlyBiddable hand = hcp hand == ...
389
biddableHands :: TableHands -> [Hand] biddableHands table_hands = filter (\h -> isBiddable h || isNearlyBiddable h ) hands where hands = [h table_hands | h <- [north, east, south, west] ] bid h = fst (openingBid h) isBiddable hand = bid hand /= Pass isNearlyBiddable hand = hcp hand == ...
389
biddableHands table_hands = filter (\h -> isBiddable h || isNearlyBiddable h ) hands where hands = [h table_hands | h <- [north, east, south, west] ] bid h = fst (openingBid h) isBiddable hand = bid hand /= Pass isNearlyBiddable hand = hcp hand == 11 && bid hand == Pass -- Randomly ge...
351
false
true
3
13
98
136
69
67
null
null
nevrenato/Hets_Fork
CASL/Morphism.hs
gpl-2.0
checkSymbList :: [SYMB_OR_MAP] -> [Diagnosis] checkSymbList l = case l of Symb (Symb_id a) : Symb (Qual_id b t _) : r -> mkDiag Warning ("profile '" ++ showDoc t "' does not apply to '" ++ showId a "' but only to") b : checkSymbList r _ : r -> checkSymbList r [] -> []
318
checkSymbList :: [SYMB_OR_MAP] -> [Diagnosis] checkSymbList l = case l of Symb (Symb_id a) : Symb (Qual_id b t _) : r -> mkDiag Warning ("profile '" ++ showDoc t "' does not apply to '" ++ showId a "' but only to") b : checkSymbList r _ : r -> checkSymbList r [] -> []
318
checkSymbList l = case l of Symb (Symb_id a) : Symb (Qual_id b t _) : r -> mkDiag Warning ("profile '" ++ showDoc t "' does not apply to '" ++ showId a "' but only to") b : checkSymbList r _ : r -> checkSymbList r [] -> []
272
false
true
0
13
105
122
59
63
null
null
pdmurray/haskell-book-ex
src/ch9/Exercises9.11.hs
bsd-3-clause
zip' x [] = []
14
zip' x [] = []
14
zip' x [] = []
14
false
false
1
6
4
20
7
13
null
null
bgamari/unordered-containers
Data/HashMap/Array.hs
bsd-3-clause
unsafeThaw :: Array a -> ST s (MArray s a) unsafeThaw ary = ST $ \s -> case unsafeThawArray# (unArray ary) s of (# s', mary #) -> (# s', marray mary (length ary) #)
188
unsafeThaw :: Array a -> ST s (MArray s a) unsafeThaw ary = ST $ \s -> case unsafeThawArray# (unArray ary) s of (# s', mary #) -> (# s', marray mary (length ary) #)
188
unsafeThaw ary = ST $ \s -> case unsafeThawArray# (unArray ary) s of (# s', mary #) -> (# s', marray mary (length ary) #)
145
false
true
2
12
58
90
43
47
null
null
siddhanathan/yi
yi-core/src/Yi/History.hs
gpl-2.0
dynKeyA :: (Default v, Ord k) => k -> Lens' (M.Map k v) v dynKeyA key = lens (M.findWithDefault def key) (flip (M.insert key))
126
dynKeyA :: (Default v, Ord k) => k -> Lens' (M.Map k v) v dynKeyA key = lens (M.findWithDefault def key) (flip (M.insert key))
126
dynKeyA key = lens (M.findWithDefault def key) (flip (M.insert key))
68
false
true
0
11
23
82
39
43
null
null
anttisalonen/freekick
haskell/libfreekick/Freekick/Libsoccer/Database.hs
agpl-3.0
parseID :: Node -> Integer parseID n = read (fromMaybe "-1" (lookup "id" (eAttrs n)))
85
parseID :: Node -> Integer parseID n = read (fromMaybe "-1" (lookup "id" (eAttrs n)))
85
parseID n = read (fromMaybe "-1" (lookup "id" (eAttrs n)))
58
false
true
0
11
14
49
22
27
null
null
graninas/The-Amoeba-World
src/Amoeba/View/View.hs
gpl-3.0
modifyView _ (StopViewPointMoving scrPt) view@(Runtime a vPlane mbShift) = let point' = toUserViewPoint scrPt in maybe view (\(p1, p2) -> (Runtime a (vPlane +! p2 -! p1) Nothing)) mbShift
195
modifyView _ (StopViewPointMoving scrPt) view@(Runtime a vPlane mbShift) = let point' = toUserViewPoint scrPt in maybe view (\(p1, p2) -> (Runtime a (vPlane +! p2 -! p1) Nothing)) mbShift
195
modifyView _ (StopViewPointMoving scrPt) view@(Runtime a vPlane mbShift) = let point' = toUserViewPoint scrPt in maybe view (\(p1, p2) -> (Runtime a (vPlane +! p2 -! p1) Nothing)) mbShift
195
false
false
2
12
36
95
45
50
null
null
ghorn/ois-input-manager
src/Key.hs
bsd-3-clause
decodeKey 81 = KC_NUMPAD3
25
decodeKey 81 = KC_NUMPAD3
25
decodeKey 81 = KC_NUMPAD3
25
false
false
1
5
3
13
4
9
null
null
DavidAlphaFox/ghc
libraries/pretty/src/Text/PrettyPrint/HughesPJ.hs
bsd-3-clause
display :: Mode -> Int -> Int -> (TextDetails -> a -> a) -> a -> Doc -> a display m !page_width !ribbon_width txt end doc = case page_width - ribbon_width of { gap_width -> case gap_width `quot` 2 of { shift -> let lay k _ | k `seq` False = undefined lay k (Nest k1 p) = lay (k + k1...
1,923
display :: Mode -> Int -> Int -> (TextDetails -> a -> a) -> a -> Doc -> a display m !page_width !ribbon_width txt end doc = case page_width - ribbon_width of { gap_width -> case gap_width `quot` 2 of { shift -> let lay k _ | k `seq` False = undefined lay k (Nest k1 p) = lay (k + k1...
1,923
display m !page_width !ribbon_width txt end doc = case page_width - ribbon_width of { gap_width -> case gap_width `quot` 2 of { shift -> let lay k _ | k `seq` False = undefined lay k (Nest k1 p) = lay (k + k1) p lay _ Empty = end lay k (NilAbove p) = nlText `...
1,849
false
true
0
26
952
693
352
341
null
null
maciej-wichrowski/HsCharts
demo/Main.hs
bsd-3-clause
main :: IO () main = do let disp = InWindow "HsCharts Demo" (windowW, windowH) (50, 50) display disp white $ pictures [ q 0 0 pointChart , q 1 0 lineChart , q 2 0 bubbleChart , q 3 0 logScaleChart ...
553
main :: IO () main = do let disp = InWindow "HsCharts Demo" (windowW, windowH) (50, 50) display disp white $ pictures [ q 0 0 pointChart , q 1 0 lineChart , q 2 0 bubbleChart , q 3 0 logScaleChart ...
553
main = do let disp = InWindow "HsCharts Demo" (windowW, windowH) (50, 50) display disp white $ pictures [ q 0 0 pointChart , q 1 0 lineChart , q 2 0 bubbleChart , q 3 0 logScaleChart ...
539
false
true
0
11
342
141
70
71
null
null
ShigekiKarita/haskellSDL2Examples
src/lesson12.hs
gpl-2.0
runApplication :: SDL.Renderer -> [Asset] -> IO () runApplication renderer assets = repeatUntilGameover applyAndDraw initialApplication where applyIntents = updateSource collectEvents drawApplication = draw renderer assets applyAndDraw = runstuff (applyIntents, drawApplication)
302
runApplication :: SDL.Renderer -> [Asset] -> IO () runApplication renderer assets = repeatUntilGameover applyAndDraw initialApplication where applyIntents = updateSource collectEvents drawApplication = draw renderer assets applyAndDraw = runstuff (applyIntents, drawApplication)
302
runApplication renderer assets = repeatUntilGameover applyAndDraw initialApplication where applyIntents = updateSource collectEvents drawApplication = draw renderer assets applyAndDraw = runstuff (applyIntents, drawApplication)
251
false
true
2
8
53
74
37
37
null
null
begriffs/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
executeJS :: (WebDriver wd, FromJSON a) => [JSArg] -> Text -> wd a executeJS a s = fromJSON' =<< getResult where getResult = doSessCommand methodPost "/execute" . pair ("args", "script") $ (a,s) {- |Executes a snippet of Javascript code asynchronously. This function works similarly to 'executeJS', except that th...
631
executeJS :: (WebDriver wd, FromJSON a) => [JSArg] -> Text -> wd a executeJS a s = fromJSON' =<< getResult where getResult = doSessCommand methodPost "/execute" . pair ("args", "script") $ (a,s) {- |Executes a snippet of Javascript code asynchronously. This function works similarly to 'executeJS', except that th...
631
executeJS a s = fromJSON' =<< getResult where getResult = doSessCommand methodPost "/execute" . pair ("args", "script") $ (a,s) {- |Executes a snippet of Javascript code asynchronously. This function works similarly to 'executeJS', except that the Javascript is passed a callback function as its final argument. T...
564
false
true
0
8
106
86
45
41
null
null
leshchevds/ganeti
src/Ganeti/WConfd/Core.hs
bsd-2-clause
-- | Tell whether a given owner has pending requests. hasPendingRequest :: ClientId -> WConfdMonad Bool hasPendingRequest cid = liftM (LW.hasPendingRequest cid) readLockWaiting
176
hasPendingRequest :: ClientId -> WConfdMonad Bool hasPendingRequest cid = liftM (LW.hasPendingRequest cid) readLockWaiting
122
hasPendingRequest cid = liftM (LW.hasPendingRequest cid) readLockWaiting
72
true
true
0
8
22
35
17
18
null
null
melted/llvm-pretty
src/Text/LLVM.hs
bsd-3-clause
int :: Int -> Value int = toValue
34
int :: Int -> Value int = toValue
34
int = toValue
14
false
true
0
5
8
15
8
7
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Update.hs
mpl-2.0
-- | OAuth access token. cfuAccessToken :: Lens' CreativeFieldsUpdate (Maybe Text) cfuAccessToken = lens _cfuAccessToken (\ s a -> s{_cfuAccessToken = a})
162
cfuAccessToken :: Lens' CreativeFieldsUpdate (Maybe Text) cfuAccessToken = lens _cfuAccessToken (\ s a -> s{_cfuAccessToken = a})
137
cfuAccessToken = lens _cfuAccessToken (\ s a -> s{_cfuAccessToken = a})
79
true
true
0
9
29
48
25
23
null
null
ideas-edu/ideas
src/Ideas/Encoding/NewEncoderJSON.hs
apache-2.0
exerciseInfo :: Exercise a -> JSONBuilder exerciseInfo ex = tagJSON "exercise" $ Object [ ("exerciseid", toJSON (showId ex)) , ("description", toJSON (description ex)) , ("status", toJSON (show (status ex))) ]
223
exerciseInfo :: Exercise a -> JSONBuilder exerciseInfo ex = tagJSON "exercise" $ Object [ ("exerciseid", toJSON (showId ex)) , ("description", toJSON (description ex)) , ("status", toJSON (show (status ex))) ]
223
exerciseInfo ex = tagJSON "exercise" $ Object [ ("exerciseid", toJSON (showId ex)) , ("description", toJSON (description ex)) , ("status", toJSON (show (status ex))) ]
181
false
true
0
11
43
91
47
44
null
null
pparkkin/eta
compiler/ETA/Utils/GraphOps.hs
bsd-3-clause
-- | Add a coalescence edge to the graph, creating nodes if requried. -- It is considered adventageous to assign the same color to nodes in a coalesence. addCoalesce :: Uniquable k => (k, cls) -> (k, cls) -> Graph k cls color -> Graph k cls color addCoalesce (u1, c1) (u2, c2) = let addCo...
654
addCoalesce :: Uniquable k => (k, cls) -> (k, cls) -> Graph k cls color -> Graph k cls color addCoalesce (u1, c1) (u2, c2) = let addCoalesce u c u' = adjustWithDefaultUFM (\node -> node { nodeCoalesce = addOneToUniqSet (nodeCoalesce node) u' }) ...
494
addCoalesce (u1, c1) (u2, c2) = let addCoalesce u c u' = adjustWithDefaultUFM (\node -> node { nodeCoalesce = addOneToUniqSet (nodeCoalesce node) u' }) (newNode u c) { nodeCoalesce = unitUniqSet u' } u in graphMapModify ...
377
true
true
0
16
234
170
88
82
null
null