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
astynax/enhask
draft.hs
mit
match (?) = undefined
21
match (?) = undefined
21
match (?) = undefined
21
false
false
1
5
3
15
6
9
null
null
davideGiovannini/scheme-repl
src/Evaluation/Primitives.hs
bsd-3-clause
isList [_] = return $ Bool False
37
isList [_] = return $ Bool False
37
isList [_] = return $ Bool False
37
false
false
0
6
11
20
9
11
null
null
ony/hledger
hledger-lib/Hledger/Data/Dates.hs
gpl-3.0
spanDefaultsFrom (DateSpan a1 b1) (DateSpan a2 b2) = DateSpan a b where a = if isJust a1 then a1 else a2 b = if isJust b1 then b1 else b2 -- | Calculate the union of a number of datespans.
203
spanDefaultsFrom (DateSpan a1 b1) (DateSpan a2 b2) = DateSpan a b where a = if isJust a1 then a1 else a2 b = if isJust b1 then b1 else b2 -- | Calculate the union of a number of datespans.
203
spanDefaultsFrom (DateSpan a1 b1) (DateSpan a2 b2) = DateSpan a b where a = if isJust a1 then a1 else a2 b = if isJust b1 then b1 else b2 -- | Calculate the union of a number of datespans.
203
false
false
1
8
54
70
35
35
null
null
BartAdv/hoogle
travis.hs
bsd-3-clause
main :: IO () main = do let timed x = do putStrLn $ "\n\nSearching for " ++ x (time,_) <- duration $ system_ $ "hoogle +RTS -T -M1.8G -RTS " ++ (if x == "" then "" else show x) putStrLn $ "Search " ++ show x ++ " took " ++ showDuration time putStrLn "\n\n" retry 3 $ timed "genera...
440
main :: IO () main = do let timed x = do putStrLn $ "\n\nSearching for " ++ x (time,_) <- duration $ system_ $ "hoogle +RTS -T -M1.8G -RTS " ++ (if x == "" then "" else show x) putStrLn $ "Search " ++ show x ++ " took " ++ showDuration time putStrLn "\n\n" retry 3 $ timed "genera...
440
main = do let timed x = do putStrLn $ "\n\nSearching for " ++ x (time,_) <- duration $ system_ $ "hoogle +RTS -T -M1.8G -RTS " ++ (if x == "" then "" else show x) putStrLn $ "Search " ++ show x ++ " took " ++ showDuration time putStrLn "\n\n" retry 3 $ timed "generate" timed ...
426
false
true
0
16
138
156
69
87
null
null
keera-studios/hsQt
Qtc/Gui/QDial.hs
bsd-2-clause
notchSize :: QDial a -> (()) -> IO (Int) notchSize x0 () = withIntResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QDial_notchSize cobj_x0
143
notchSize :: QDial a -> (()) -> IO (Int) notchSize x0 () = withIntResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QDial_notchSize cobj_x0
143
notchSize x0 () = withIntResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QDial_notchSize cobj_x0
102
false
true
0
8
31
59
29
30
null
null
shlevy/ghc
testsuite/tests/programs/galois_raytrace/Geometry.hs
bsd-3-clause
zComponent (V x y z) = z
24
zComponent (V x y z) = z
24
zComponent (V x y z) = z
24
false
false
0
7
6
19
9
10
null
null
mmakowski/ambc
src/UntypedLambda/Parser.hs
mit
pConst :: Parser Term pConst = do n <- T.integer lexer return $ Const n
75
pConst :: Parser Term pConst = do n <- T.integer lexer return $ Const n
75
pConst = do n <- T.integer lexer return $ Const n
53
false
true
0
9
18
36
16
20
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGMatrix.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix.scale Mozilla SVGMatrix.scale documentation> scale :: (MonadDOM m) => SVGMatrix -> Float -> m SVGMatrix scale self scaleFactor = liftDOM ((self ^. jsf "scale" [toJSVal scaleFactor]) >>= fromJSValUnchecked)
288
scale :: (MonadDOM m) => SVGMatrix -> Float -> m SVGMatrix scale self scaleFactor = liftDOM ((self ^. jsf "scale" [toJSVal scaleFactor]) >>= fromJSValUnchecked)
177
scale self scaleFactor = liftDOM ((self ^. jsf "scale" [toJSVal scaleFactor]) >>= fromJSValUnchecked)
118
true
true
0
12
47
70
34
36
null
null
scvalex/logorrhea
lib/IRC.hs
bsd-3-clause
withConnection :: (Applicative m, MonadIO m) => UserName -> m IRCInfo -> IRCT m () -> m () withConnection un conn act = do i <- conn runIRCT un i $ do sendMessage $ nick un sendMessage $ user un "*" "*" un act sendMessage $ quit Nothing return ()
294
withConnection :: (Applicative m, MonadIO m) => UserName -> m IRCInfo -> IRCT m () -> m () withConnection un conn act = do i <- conn runIRCT un i $ do sendMessage $ nick un sendMessage $ user un "*" "*" un act sendMessage $ quit Nothing return ()
294
withConnection un conn act = do i <- conn runIRCT un i $ do sendMessage $ nick un sendMessage $ user un "*" "*" un act sendMessage $ quit Nothing return ()
203
false
true
0
12
97
131
57
74
null
null
philopon/arib
src/Data/Arib/String/Internal/Types.hs
bsd-3-clause
g3To g s = debug " G3 ->" s { g3 = g }
39
g3To g s = debug " G3 ->" s { g3 = g }
39
g3To g s = debug " G3 ->" s { g3 = g }
39
false
false
1
7
14
29
12
17
null
null
alang9/deque
Data/Deque/NonCat/LessTyped.hs
bsd-3-clause
fixup2' (BigR (XR (B4 a b c d) (B0)) N (TinyL (B3 (P s t) (P u v) (P w x)))) = go10 a b c d s t u v w x
125
fixup2' (BigR (XR (B4 a b c d) (B0)) N (TinyL (B3 (P s t) (P u v) (P w x)))) = go10 a b c d s t u v w x
125
fixup2' (BigR (XR (B4 a b c d) (B0)) N (TinyL (B3 (P s t) (P u v) (P w x)))) = go10 a b c d s t u v w x
125
false
false
0
12
54
104
51
53
null
null
gregorias/pixelosolver
src/PixeloSolver/AI/OCR.hs
bsd-3-clause
fourBottom :: DigitRecognizer [()] fourBottom = many1 $ do width <- ask blackGroupToken (predicate width) where predicate width [(xBeg, _)] = xBeg >= (width `div` 2) predicate _ _ = False -- recognizeFive
219
fourBottom :: DigitRecognizer [()] fourBottom = many1 $ do width <- ask blackGroupToken (predicate width) where predicate width [(xBeg, _)] = xBeg >= (width `div` 2) predicate _ _ = False -- recognizeFive
219
fourBottom = many1 $ do width <- ask blackGroupToken (predicate width) where predicate width [(xBeg, _)] = xBeg >= (width `div` 2) predicate _ _ = False -- recognizeFive
184
false
true
3
9
47
97
47
50
null
null
maciej-bendkowski/blaz
src/CommonUtils.hs
mit
leq _ 0 = False
15
leq _ 0 = False
15
leq _ 0 = False
15
false
false
0
5
4
11
5
6
null
null
rfranek/duckling
Duckling/Time/DE/Rules.hs
bsd-3-clause
ruleAboutTimeofday :: Rule ruleAboutTimeofday = Rule { name = "about <time-of-day>" , pattern = [ regex "(um )?zirka|ca\\.?|ungef(\x00e4)hr|etwa|gegen" , Predicate isATimeOfDay ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ notLatent td _ -> Nothing }
301
ruleAboutTimeofday :: Rule ruleAboutTimeofday = Rule { name = "about <time-of-day>" , pattern = [ regex "(um )?zirka|ca\\.?|ungef(\x00e4)hr|etwa|gegen" , Predicate isATimeOfDay ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ notLatent td _ -> Nothing }
301
ruleAboutTimeofday = Rule { name = "about <time-of-day>" , pattern = [ regex "(um )?zirka|ca\\.?|ungef(\x00e4)hr|etwa|gegen" , Predicate isATimeOfDay ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ notLatent td _ -> Nothing }
274
false
true
0
15
73
91
48
43
null
null
NatureShade/SymbolicHaskell
src/Math/Symbolic/Simplify.hs
mit
reduce (Op "*" [x]) = reduce x
30
reduce (Op "*" [x]) = reduce x
30
reduce (Op "*" [x]) = reduce x
30
false
false
0
7
6
24
11
13
null
null
kim/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/UpdateLayer.hs
mpl-2.0
-- | A 'VolumeConfigurations' object that describes the layer's Amazon EBS volumes. ulVolumeConfigurations :: Lens' UpdateLayer [VolumeConfiguration] ulVolumeConfigurations = lens _ulVolumeConfigurations (\s a -> s { _ulVolumeConfigurations = a }) . _List
267
ulVolumeConfigurations :: Lens' UpdateLayer [VolumeConfiguration] ulVolumeConfigurations = lens _ulVolumeConfigurations (\s a -> s { _ulVolumeConfigurations = a }) . _List
183
ulVolumeConfigurations = lens _ulVolumeConfigurations (\s a -> s { _ulVolumeConfigurations = a }) . _List
117
true
true
1
9
43
50
26
24
null
null
barrucadu/irc-ctcp
Network/IRC/CTCP.hs
mit
-- |Apply one of two functions depending on whether the bytestring -- looks like a CTCP or not. -- -- This uses 'asCTCP', and so is lenient with escapes. orCTCP :: (ByteString -> a) -> (CTCPByteString -> a) -> ByteString -> a orCTCP f g bs = maybe (f bs) g (asCTCP bs)
268
orCTCP :: (ByteString -> a) -> (CTCPByteString -> a) -> ByteString -> a orCTCP f g bs = maybe (f bs) g (asCTCP bs)
114
orCTCP f g bs = maybe (f bs) g (asCTCP bs)
42
true
true
0
9
52
75
37
38
null
null
google-research/dex-lang
src/lib/LLVMExec.hs
bsd-3-clause
compileAndBench :: Bool -> Logger [Output] -> [ObjectFile n] -> L.Module -> String -> [LitVal] -> [BaseType] -> IO [LitVal] compileAndBench shouldSyncCUDA logger objFiles ast fname args resultTypes = do withPipeToLogger logger \fd -> allocaCells (length args) \argsPtr -> allocaCells (length ...
1,564
compileAndBench :: Bool -> Logger [Output] -> [ObjectFile n] -> L.Module -> String -> [LitVal] -> [BaseType] -> IO [LitVal] compileAndBench shouldSyncCUDA logger objFiles ast fname args resultTypes = do withPipeToLogger logger \fd -> allocaCells (length args) \argsPtr -> allocaCells (length ...
1,564
compileAndBench shouldSyncCUDA logger objFiles ast fname args resultTypes = do withPipeToLogger logger \fd -> allocaCells (length args) \argsPtr -> allocaCells (length resultTypes) \resultPtr -> do storeLitVals argsPtr args compileOneOff logger objFiles ast fname \fPtr -> do ((avgT...
1,424
false
true
0
33
499
466
221
245
null
null
emwap/feldspar-language
src/Feldspar/Core/Types.hs
bsd-3-clause
defaultSize (Tup4Type ta tb tc td) = ( defaultSize ta , defaultSize tb , defaultSize tc , defaultSize td )
254
defaultSize (Tup4Type ta tb tc td) = ( defaultSize ta , defaultSize tb , defaultSize tc , defaultSize td )
254
defaultSize (Tup4Type ta tb tc td) = ( defaultSize ta , defaultSize tb , defaultSize tc , defaultSize td )
254
false
false
0
7
167
45
22
23
null
null
urbanslug/ghc
compiler/nativeGen/Format.hs
bsd-3-clause
floatFormat :: Width -> Format floatFormat width = case width of W32 -> FF32 W64 -> FF64 other -> pprPanic "Format.floatFormat" (ppr other) -- | Check if a format represents a floating point value.
234
floatFormat :: Width -> Format floatFormat width = case width of W32 -> FF32 W64 -> FF64 other -> pprPanic "Format.floatFormat" (ppr other) -- | Check if a format represents a floating point value.
234
floatFormat width = case width of W32 -> FF32 W64 -> FF64 other -> pprPanic "Format.floatFormat" (ppr other) -- | Check if a format represents a floating point value.
203
false
true
0
10
70
57
27
30
null
null
CindyLinz/Haskell.js
trans/src/Desugar/PatBind.hs
mit
dePatBindAsst (IParam l iPName type0) = IParam (id l) (dePatBindIPName iPName) (dePatBindType type0)
100
dePatBindAsst (IParam l iPName type0) = IParam (id l) (dePatBindIPName iPName) (dePatBindType type0)
100
dePatBindAsst (IParam l iPName type0) = IParam (id l) (dePatBindIPName iPName) (dePatBindType type0)
100
false
false
0
7
12
44
21
23
null
null
phischu/fragnix
builtins/base/GHC.List.hs
bsd-3-clause
maximum [] = errorEmptyList "maximum"
51
maximum [] = errorEmptyList "maximum"
51
maximum [] = errorEmptyList "maximum"
51
false
false
1
5
18
18
6
12
null
null
GaloisInc/ivory
ivory-model-check/src/Ivory/ModelCheck.hs
bsd-3-clause
isError :: Result -> Bool isError (Error{}) = True
50
isError :: Result -> Bool isError (Error{}) = True
50
isError (Error{}) = True
24
false
true
0
7
8
25
13
12
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ApiGatewayStageAccessLogSetting.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-stage-accesslogsetting.html#cfn-apigateway-stage-accesslogsetting-destinationarn agsalsDestinationArn :: Lens' ApiGatewayStageAccessLogSetting (Maybe (Val Text)) agsalsDestinationArn = lens _apiGatewayStageAccessLogSettingDesti...
396
agsalsDestinationArn :: Lens' ApiGatewayStageAccessLogSetting (Maybe (Val Text)) agsalsDestinationArn = lens _apiGatewayStageAccessLogSettingDestinationArn (\s a -> s { _apiGatewayStageAccessLogSettingDestinationArn = a })
222
agsalsDestinationArn = lens _apiGatewayStageAccessLogSettingDestinationArn (\s a -> s { _apiGatewayStageAccessLogSettingDestinationArn = a })
141
true
true
0
9
22
52
28
24
null
null
owickstrom/owickstrom.github.io
diagrams/src/TimelineDiagrams.hs
mit
leftAlignedLabelAbove settings lbl d = if containerLabels settings then alignL lbl === alignL d else alignL d
119
leftAlignedLabelAbove settings lbl d = if containerLabels settings then alignL lbl === alignL d else alignL d
119
leftAlignedLabelAbove settings lbl d = if containerLabels settings then alignL lbl === alignL d else alignL d
119
false
false
0
7
26
37
17
20
null
null
thielema/wxhaskell
wxdirect/src/CompileClasses.hs
lgpl-2.1
haskellToCResult decl tp call = unsafeIO $ case tp of Fun f -> traceWarning "function as result" decl $ call EventId -> "withIntResult $" ++ nl ++ call Id -> "withIntResult $" ++ nl ++ call Int _ -> "withIntResult $" ++ nl ++ call Bool -> "withBoolResult $" ++ nl ++ call C...
2,700
haskellToCResult decl tp call = unsafeIO $ case tp of Fun f -> traceWarning "function as result" decl $ call EventId -> "withIntResult $" ++ nl ++ call Id -> "withIntResult $" ++ nl ++ call Int _ -> "withIntResult $" ++ nl ++ call Bool -> "withBoolResult $" ++ nl ++ call C...
2,700
haskellToCResult decl tp call = unsafeIO $ case tp of Fun f -> traceWarning "function as result" decl $ call EventId -> "withIntResult $" ++ nl ++ call Id -> "withIntResult $" ++ nl ++ call Int _ -> "withIntResult $" ++ nl ++ call Bool -> "withBoolResult $" ++ nl ++ call C...
2,700
false
false
4
14
823
608
293
315
null
null
JLiangWaterloo/sat
Haskell/Sat.hs
mit
isUnit _ = False
18
isUnit _ = False
18
isUnit _ = False
18
false
false
0
5
5
9
4
5
null
null
massysett/pipes-cliff
pipes-cliff/lib/Pipes/Cliff/Core.hs
bsd-3-clause
-- | Create a 'CreateProcess' record with default settings. The -- default settings are: -- -- * a raw command (as opposed to a shell command) is created -- -- * the current working directory is not changed from the parent process -- -- * the environment is not changed from the parent process -- -- * the parent's file...
1,137
procSpec :: String -- ^ The name of the program to run, such as @less@. -> [String] -- ^ Command-line arguments -> CreateProcess procSpec prog args = CreateProcess { cmdspec = RawCommand prog args , cwd = Nothing , env = Nothing , close_fds = False , create_group = False , delegate_ctlc = False ...
483
procSpec prog args = CreateProcess { cmdspec = RawCommand prog args , cwd = Nothing , env = Nothing , close_fds = False , create_group = False , delegate_ctlc = False , detach_console = False , create_new_console = False , new_session = False , child_group = Nothing , child_user = Nothing , hand...
344
true
true
0
8
225
137
89
48
null
null
salenaer/functionProject
try.hs
mit
delete :: [a]->Int->[a] delete xs n = let (ys,zs) = splitAt n xs in ys ++ (tail zs)
91
delete :: [a]->Int->[a] delete xs n = let (ys,zs) = splitAt n xs in ys ++ (tail zs)
91
delete xs n = let (ys,zs) = splitAt n xs in ys ++ (tail zs)
67
false
true
0
9
25
63
32
31
null
null
rgaiacs/pandoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
enclosedInlines :: OrgParser a -> OrgParser b -> OrgParser (F Inlines) enclosedInlines start end = try $ trimInlinesF . mconcat <$> enclosed start end inline
191
enclosedInlines :: OrgParser a -> OrgParser b -> OrgParser (F Inlines) enclosedInlines start end = try $ trimInlinesF . mconcat <$> enclosed start end inline
191
enclosedInlines start end = try $ trimInlinesF . mconcat <$> enclosed start end inline
88
false
true
0
9
58
58
27
31
null
null
oldmanmike/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp dflags WordMulOp = Just (mo_wordMul dflags)
60
translateOp dflags WordMulOp = Just (mo_wordMul dflags)
60
translateOp dflags WordMulOp = Just (mo_wordMul dflags)
60
false
false
0
7
11
20
9
11
null
null
UBMLtonGroup/timberc
src/Decls.hs
bsd-3-clause
tenvSelCon ke0 _ = []
44
tenvSelCon ke0 _ = []
44
tenvSelCon ke0 _ = []
44
false
false
0
5
27
13
6
7
null
null
hsyl20/ViperVM
haskus-system/src/lib/Haskus/Arch/X86_64/ISA/Immediate.hs
bsd-3-clause
-- | Operand-sized immediate (size-extendable if the bit is set or in 64-bit -- mode) immFamOpSizeSE :: X86ImmFamP immFamOpSizeSE = ImmFam { immFamSize = orderedNonTerminal [ (pForce8bit , Terminal OpSize8) , (pSignExtendBit , Terminal OpSize8) , (pOverri...
1,031
immFamOpSizeSE :: X86ImmFamP immFamOpSizeSE = ImmFam { immFamSize = orderedNonTerminal [ (pForce8bit , Terminal OpSize8) , (pSignExtendBit , Terminal OpSize8) , (pOverriddenOperationSize64 OpSize16, Terminal OpSize16) , (pOverriddenOperationSize64 O...
945
immFamOpSizeSE = ImmFam { immFamSize = orderedNonTerminal [ (pForce8bit , Terminal OpSize8) , (pSignExtendBit , Terminal OpSize8) , (pOverriddenOperationSize64 OpSize16, Terminal OpSize16) , (pOverriddenOperationSize64 OpSize32, Terminal OpSize32) ...
916
true
true
8
11
306
215
116
99
null
null
kim/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/StartGateway.hs
mpl-2.0
sgrGatewayARN :: Lens' StartGatewayResponse (Maybe Text) sgrGatewayARN = lens _sgrGatewayARN (\s a -> s { _sgrGatewayARN = a })
127
sgrGatewayARN :: Lens' StartGatewayResponse (Maybe Text) sgrGatewayARN = lens _sgrGatewayARN (\s a -> s { _sgrGatewayARN = a })
127
sgrGatewayARN = lens _sgrGatewayARN (\s a -> s { _sgrGatewayARN = a })
70
false
true
0
9
18
45
24
21
null
null
cchalmers/geometry
src/Geometry/ThreeD/Camera.hs
bsd-3-clause
cameraView :: RealFloat n => Camera l n -> M44 n cameraView cam = mkTransformationMat m v where -- To get the view matrix we want the inverse of translating and then -- rotating the camera. The inverse of a rotation matrix is its -- transpose and the camera location is negated. m = transpose (rotationMatrix c...
359
cameraView :: RealFloat n => Camera l n -> M44 n cameraView cam = mkTransformationMat m v where -- To get the view matrix we want the inverse of translating and then -- rotating the camera. The inverse of a rotation matrix is its -- transpose and the camera location is negated. m = transpose (rotationMatrix c...
359
cameraView cam = mkTransformationMat m v where -- To get the view matrix we want the inverse of translating and then -- rotating the camera. The inverse of a rotation matrix is its -- transpose and the camera location is negated. m = transpose (rotationMatrix cam) v = m !* (-cam^.cameraLoc._Point)
310
false
true
2
9
73
85
39
46
null
null
musixmatch/thrift
test/hs/Client.hs
apache-2.0
main = do to <- topen t let p = TBinaryProtocol to let ps = (p,p) print =<< testString ps "bya" print =<< testByte ps 8 print =<< testByte ps (-8) print =<< testI32 ps 32 print =<< testI32 ps (-32) print =<< testI64 ps 64 print =...
689
main = do to <- topen t let p = TBinaryProtocol to let ps = (p,p) print =<< testString ps "bya" print =<< testByte ps 8 print =<< testByte ps (-8) print =<< testI32 ps 32 print =<< testI32 ps (-32) print =<< testI64 ps 64 print =...
689
main = do to <- topen t let p = TBinaryProtocol to let ps = (p,p) print =<< testString ps "bya" print =<< testByte ps 8 print =<< testByte ps (-8) print =<< testI32 ps 32 print =<< testI32 ps (-32) print =<< testI64 ps 64 print =...
689
false
false
1
13
252
332
160
172
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_DOT_PRODUCT_TEXTURE_RECTANGLE_NV :: GLenum gl_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E
90
gl_DOT_PRODUCT_TEXTURE_RECTANGLE_NV :: GLenum gl_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E
90
gl_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E
44
false
true
0
4
5
11
6
5
null
null
ghcjs/ghcjs
src/Compiler/JMacro/Base.hs
mit
defRenderJsV r (JHash m) | M.null m = text "{}" | otherwise = braceNest . fillSep . punctuate comma . map (\(x,y) -> squotes (text (TL.fromStrict x)) <> colon <+> jsToDocR r y) $ M.toList m
239
defRenderJsV r (JHash m) | M.null m = text "{}" | otherwise = braceNest . fillSep . punctuate comma . map (\(x,y) -> squotes (text (TL.fromStrict x)) <> colon <+> jsToDocR r y) $ M.toList m
239
defRenderJsV r (JHash m) | M.null m = text "{}" | otherwise = braceNest . fillSep . punctuate comma . map (\(x,y) -> squotes (text (TL.fromStrict x)) <> colon <+> jsToDocR r y) $ M.toList m
239
false
false
1
17
85
111
52
59
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/PmExpr.hs
bsd-3-clause
checkNegation :: Name -> PmPprM (Maybe SDoc) -- the clean name if it is negated checkNegation x = do negated <- gets fst return $ case lookup x negated of Just (new, _) -> Just new Nothing -> Nothing -- | Pretty print a pmexpr, but remember to prettify the names of the variables -- that refer to neg-...
390
checkNegation :: Name -> PmPprM (Maybe SDoc) checkNegation x = do negated <- gets fst return $ case lookup x negated of Just (new, _) -> Just new Nothing -> Nothing -- | Pretty print a pmexpr, but remember to prettify the names of the variables -- that refer to neg-literals. The ones that cannot be s...
355
checkNegation x = do negated <- gets fst return $ case lookup x negated of Just (new, _) -> Just new Nothing -> Nothing -- | Pretty print a pmexpr, but remember to prettify the names of the variables -- that refer to neg-literals. The ones that cannot be shown are printed as -- underscores.
310
true
true
0
12
88
81
40
41
null
null
puffnfresh/language-scala
src/Language/Scala.hs
mit
prettyType (TypeFunction params res) = ScalaDoc TypeGroupType (params' <+> "=>" <+> parensLeft TypeGroupType (prettyType res)) where params' = case params of [param] | not (isTuple param) -> parensLeft TypeGroupAnyInfixType (prettyType param) _ -> tu...
447
prettyType (TypeFunction params res) = ScalaDoc TypeGroupType (params' <+> "=>" <+> parensLeft TypeGroupType (prettyType res)) where params' = case params of [param] | not (isTuple param) -> parensLeft TypeGroupAnyInfixType (prettyType param) _ -> tu...
447
prettyType (TypeFunction params res) = ScalaDoc TypeGroupType (params' <+> "=>" <+> parensLeft TypeGroupType (prettyType res)) where params' = case params of [param] | not (isTuple param) -> parensLeft TypeGroupAnyInfixType (prettyType param) _ -> tu...
447
false
false
0
13
138
137
65
72
null
null
tjakway/ghcjvm
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
---------------------------------------------------------- -- * Lowercase pattern syntax functions ---------------------------------------------------------- intPrimL :: Integer -> Lit intPrimL = IntPrimL
211
intPrimL :: Integer -> Lit intPrimL = IntPrimL
52
intPrimL = IntPrimL
22
true
true
0
7
22
25
12
13
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/List.hs
bsd-3-clause
dropWhile p xs@(x:xs') | p x = dropWhile p xs' | otherwise = xs
95
dropWhile p xs@(x:xs') | p x = dropWhile p xs' | otherwise = xs
95
dropWhile p xs@(x:xs') | p x = dropWhile p xs' | otherwise = xs
95
false
false
2
7
45
45
20
25
null
null
duplode/threepenny-gui
samples/DragNDropExample.hs
bsd-3-clause
mkDragPair :: Color -> Int -> UI (Element, Element) mkDragPair color position = do elDrag <- UI.new #. "box-drag" # set UI.style [("left", show position ++ "px"), ("color",color)] # set text "Drag me!" # set UI.draggable True # set UI.dragData color elDrop <- UI.new #. "box-dro...
1,090
mkDragPair :: Color -> Int -> UI (Element, Element) mkDragPair color position = do elDrag <- UI.new #. "box-drag" # set UI.style [("left", show position ++ "px"), ("color",color)] # set text "Drag me!" # set UI.draggable True # set UI.dragData color elDrop <- UI.new #. "box-dro...
1,090
mkDragPair color position = do elDrag <- UI.new #. "box-drag" # set UI.style [("left", show position ++ "px"), ("color",color)] # set text "Drag me!" # set UI.draggable True # set UI.dragData color elDrop <- UI.new #. "box-drop" # set UI.style [("border","2px solid " ++...
1,038
false
true
0
18
369
399
190
209
null
null
spockwangs/scheme.in.haskell
list10.hs
unlicense
boolBoolBinop = boolBinop unpackBool
36
boolBoolBinop = boolBinop unpackBool
36
boolBoolBinop = boolBinop unpackBool
36
false
false
1
5
3
12
4
8
null
null
erikd/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Provide a pure value for the response body. -- -- > respond ct = return . TypedContent ct . toContent -- -- Since 1.2.0 respond :: (Monad m, ToContent a) => ContentType -> a -> m TypedContent respond ct = return . TypedContent ct . toContent
246
respond :: (Monad m, ToContent a) => ContentType -> a -> m TypedContent respond ct = return . TypedContent ct . toContent
121
respond ct = return . TypedContent ct . toContent
49
true
true
0
8
47
56
30
26
null
null
travitch/ddmin
src/Data/ByteString/Num.hs
bsd-3-clause
normalized :: (BS.ByteString -> BS.ByteString -> a) -> -- The op BS.ByteString -> BS.ByteString -> a -- lps to normalize normalized op a b = let (a', b') = normalize a b in op a' b'
198
normalized :: (BS.ByteString -> BS.ByteString -> a) -> -- The op BS.ByteString -> BS.ByteString -> a normalized op a b = let (a', b') = normalize a b in op a' b'
176
normalized op a b = let (a', b') = normalize a b in op a' b'
60
true
true
0
9
52
79
40
39
null
null
dancor/melang
src/Util/CoverZip.hs
mit
coverZipWith5 :: (Maybe a -> Maybe b -> Maybe c -> Maybe d -> Maybe e -> f) -> [Maybe a] -> [Maybe b] -> [Maybe c] -> [Maybe d] -> [Maybe e] -> [f] coverZipWith5 f [] [] [] [] l5 = map (f Nothing Nothing Nothing Nothing) l5
246
coverZipWith5 :: (Maybe a -> Maybe b -> Maybe c -> Maybe d -> Maybe e -> f) -> [Maybe a] -> [Maybe b] -> [Maybe c] -> [Maybe d] -> [Maybe e] -> [f] coverZipWith5 f [] [] [] [] l5 = map (f Nothing Nothing Nothing Nothing) l5
246
coverZipWith5 f [] [] [] [] l5 = map (f Nothing Nothing Nothing Nothing) l5
79
false
true
0
13
72
149
71
78
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/RegisterImage.hs
mpl-2.0
-- | The full path to your AMI manifest in Amazon S3 storage. ri1ImageLocation :: Lens' RegisterImage (Maybe Text) ri1ImageLocation = lens _ri1ImageLocation (\s a -> s { _ri1ImageLocation = a })
194
ri1ImageLocation :: Lens' RegisterImage (Maybe Text) ri1ImageLocation = lens _ri1ImageLocation (\s a -> s { _ri1ImageLocation = a })
132
ri1ImageLocation = lens _ri1ImageLocation (\s a -> s { _ri1ImageLocation = a })
79
true
true
1
9
31
49
25
24
null
null
limaner2002/EPC-tools
USACScripts/src/Scripts/Common.hs
bsd-3-clause
foldGridField :: Monad m => (b -> a -> AppianT m b) -> Text -> b -> GridField a -> AppianT m b foldGridField f column b gf = do let col = gf ^.. gfColumns . at column . traverse F.foldlM f b col
198
foldGridField :: Monad m => (b -> a -> AppianT m b) -> Text -> b -> GridField a -> AppianT m b foldGridField f column b gf = do let col = gf ^.. gfColumns . at column . traverse F.foldlM f b col
198
foldGridField f column b gf = do let col = gf ^.. gfColumns . at column . traverse F.foldlM f b col
103
false
true
0
12
48
103
48
55
null
null
selectel/mongoDB-haskell
Database/MongoDB/Internal/Protocol.hs
apache-2.0
rBit QueryError = 1
19
rBit QueryError = 1
19
rBit QueryError = 1
19
false
false
0
4
3
10
4
6
null
null
mulderr/haskell-wamp
wamp-router/Network/Wamp/Broker.hs
mit
deleteSubscriptionBySessId :: SubscriptionStore -> SessId -> IO () deleteSubscriptionBySessId (SubscriptionStore m) sessId = do store <- takeMVar m let ds = toList $ store @= sessId putMVar m $ foldr delete store ds -- | Return current registration count
264
deleteSubscriptionBySessId :: SubscriptionStore -> SessId -> IO () deleteSubscriptionBySessId (SubscriptionStore m) sessId = do store <- takeMVar m let ds = toList $ store @= sessId putMVar m $ foldr delete store ds -- | Return current registration count
264
deleteSubscriptionBySessId (SubscriptionStore m) sessId = do store <- takeMVar m let ds = toList $ store @= sessId putMVar m $ foldr delete store ds -- | Return current registration count
197
false
true
0
12
48
85
38
47
null
null
coghex/abridgefaraway
src/GLUtil/ShaderProgram.hs
bsd-3-clause
-- |Load a 'ShaderProgram' from vertex and fragment shader source -- strings. See 'simpleShaderProgramWith' for more information. simpleShaderProgramWithBS :: BS.ByteString -> BS.ByteString -> (Program -> IO ()) -> IO ShaderProgram simpleShaderProgramWithBS vsrc fsrc m = loadShaderProgramWit...
372
simpleShaderProgramWithBS :: BS.ByteString -> BS.ByteString -> (Program -> IO ()) -> IO ShaderProgram simpleShaderProgramWithBS vsrc fsrc m = loadShaderProgramWithBS [(VertexShader, vsrc), (FragmentShader, fsrc)] m
242
simpleShaderProgramWithBS vsrc fsrc m = loadShaderProgramWithBS [(VertexShader, vsrc), (FragmentShader, fsrc)] m
114
true
true
0
11
68
74
40
34
null
null
adityagupta1089/Project-Euler-Haskell
src/problems/Problem692.hs
bsd-3-clause
main :: IO () {- - caseof fibonacci nim - we need the last digit in fibonacci encoding - represent n as fibonacci encoding - will be of the form 101... where there is atleast one zero between any two 1s otherwise we combine them to get next fibonacci number - so for nth fibonnaci we can have all zeros or fibona...
746
main :: IO () main = print $ g ! (n - 1) + last f where f = takeWhile (<= lim) $ map fst $ iterate (\(a, b) -> (b, a + b)) (1, 2) n = length f f' = listArray (1, n) f g = listArray (1, n) (1 : 3 : [ g ! (i - 1) + g ! (i - 2) + f' ! i | i <- [3 ..] ])
287
main = print $ g ! (n - 1) + last f where f = takeWhile (<= lim) $ map fst $ iterate (\(a, b) -> (b, a + b)) (1, 2) n = length f f' = listArray (1, n) f g = listArray (1, n) (1 : 3 : [ g ! (i - 1) + g ! (i - 2) + f' ! i | i <- [3 ..] ])
273
true
true
0
15
218
200
109
91
null
null
silverweed/ketchup
Ketchup/Utils.hs
mit
-- |Send an OK reply with given mime and content sendWithMime :: Socket -> B.ByteString -> B.ByteString -> IO () sendWithMime hnd mime = sendReply hnd 200 [("Content-Type", [mime])]
183
sendWithMime :: Socket -> B.ByteString -> B.ByteString -> IO () sendWithMime hnd mime = sendReply hnd 200 [("Content-Type", [mime])]
132
sendWithMime hnd mime = sendReply hnd 200 [("Content-Type", [mime])]
68
true
true
0
9
30
57
30
27
null
null
ArturB/Multilinear
src/Multilinear/Generic/GPU.hs
gpl-3.0
fromVector [i] v = SimpleFinite (Finite.fromTIndex i) v
55
fromVector [i] v = SimpleFinite (Finite.fromTIndex i) v
55
fromVector [i] v = SimpleFinite (Finite.fromTIndex i) v
55
false
false
0
8
7
27
13
14
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_MAX_ELEMENT_INDEX :: GLenum gl_MAX_ELEMENT_INDEX = 0x8D6B
60
gl_MAX_ELEMENT_INDEX :: GLenum gl_MAX_ELEMENT_INDEX = 0x8D6B
60
gl_MAX_ELEMENT_INDEX = 0x8D6B
29
false
true
0
4
5
11
6
5
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/basicIORun_1.hs
mit
loop (Cons Hugs_DeadThread r) = loop r
38
loop (Cons Hugs_DeadThread r) = loop r
38
loop (Cons Hugs_DeadThread r) = loop r
38
false
false
0
7
6
20
9
11
null
null
tabemann/amphibian
src/Network/IRC/Client/Amphibian/Utility.hs
bsd-3-clause
-- | Get prefix character for user type. userTypePrefix :: UserType -> T.Text userTypePrefix OwnerUser = "~"
108
userTypePrefix :: UserType -> T.Text userTypePrefix OwnerUser = "~"
67
userTypePrefix OwnerUser = "~"
30
true
true
0
6
16
21
11
10
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getOrbitMeanAnomalyStreamReq :: KRPCHS.SpaceCenter.Orbit -> KRPCStreamReq (Double) getOrbitMeanAnomalyStreamReq thisArg = let req = makeRequest "SpaceCenter" "Orbit_get_MeanAnomaly" [makeArgument 0 thisArg] in makeStream req
233
getOrbitMeanAnomalyStreamReq :: KRPCHS.SpaceCenter.Orbit -> KRPCStreamReq (Double) getOrbitMeanAnomalyStreamReq thisArg = let req = makeRequest "SpaceCenter" "Orbit_get_MeanAnomaly" [makeArgument 0 thisArg] in makeStream req
233
getOrbitMeanAnomalyStreamReq thisArg = let req = makeRequest "SpaceCenter" "Orbit_get_MeanAnomaly" [makeArgument 0 thisArg] in makeStream req
150
false
true
0
11
29
60
28
32
null
null
dsorokin/aivika-experiment-chart
examples/InspectionAdjustmentStations/Model.hs
bsd-3-clause
-- how many are adjustment stations? adjustmentStationCount = 1
63
adjustmentStationCount = 1
26
adjustmentStationCount = 1
26
true
false
0
4
8
7
4
3
null
null
joshsz/raskell
src/Raskell/Evaluator/ProgramContext.hs
mit
emptyProgramContext :: ProgramContext emptyProgramContext = ProgramContext M.empty
82
emptyProgramContext :: ProgramContext emptyProgramContext = ProgramContext M.empty
82
emptyProgramContext = ProgramContext M.empty
44
false
true
0
6
6
16
8
8
null
null
Concomitant/LambdaHack
Game/LambdaHack/Common/ItemStrongest.hs
bsd-3-clause
computeTrajectory :: Int -> Int -> Int -> [Point] -> ([Vector], (Speed, Int)) computeTrajectory weight throwVelocity throwLinger path = let speed = speedFromWeight weight throwVelocity trange = rangeFromSpeedAndLinger speed throwLinger btrajectory = take trange $ pathToTrajectory path in (btrajectory, (...
335
computeTrajectory :: Int -> Int -> Int -> [Point] -> ([Vector], (Speed, Int)) computeTrajectory weight throwVelocity throwLinger path = let speed = speedFromWeight weight throwVelocity trange = rangeFromSpeedAndLinger speed throwLinger btrajectory = take trange $ pathToTrajectory path in (btrajectory, (...
335
computeTrajectory weight throwVelocity throwLinger path = let speed = speedFromWeight weight throwVelocity trange = rangeFromSpeedAndLinger speed throwLinger btrajectory = take trange $ pathToTrajectory path in (btrajectory, (speed, trange))
257
false
true
0
10
56
107
57
50
null
null
spechub/Hets
RelationalScheme/Keywords.hs
gpl-2.0
rs1to1 :: String rs1to1 = "one_to_one"
38
rs1to1 :: String rs1to1 = "one_to_one"
38
rs1to1 = "one_to_one"
21
false
true
0
6
5
18
7
11
null
null
ambiata/tinfoil
src/Tinfoil/KDF.hs
bsd-3-clause
newScrypt :: Scrypt.ScryptParams -> KDF newScrypt params = KDF (Scrypt.hashCredential params) Scrypt.verifyCredential (Scrypt.verifyNoCredential params) Scrypt0 (Scrypt.paramsUpToDate params)
213
newScrypt :: Scrypt.ScryptParams -> KDF newScrypt params = KDF (Scrypt.hashCredential params) Scrypt.verifyCredential (Scrypt.verifyNoCredential params) Scrypt0 (Scrypt.paramsUpToDate params)
213
newScrypt params = KDF (Scrypt.hashCredential params) Scrypt.verifyCredential (Scrypt.verifyNoCredential params) Scrypt0 (Scrypt.paramsUpToDate params)
173
false
true
0
7
38
61
28
33
null
null
pparkkin/eta
compiler/ETA/TypeCheck/TcRnTypes.hs
bsd-3-clause
ctEvCoercion :: CtEvidence -> TcCoercion -- ctEvCoercion ev = evTermCoercion (ctEvTerm ev) ctEvCoercion (CtGiven { ctev_evtm = tm }) = evTermCoercion tm
154
ctEvCoercion :: CtEvidence -> TcCoercion ctEvCoercion (CtGiven { ctev_evtm = tm }) = evTermCoercion tm
104
ctEvCoercion (CtGiven { ctev_evtm = tm }) = evTermCoercion tm
63
true
true
0
9
23
34
18
16
null
null
tel/hs-nanomsg
src/Network/Nanomsg/C.hs
apache-2.0
-- | All good. eOK :: Errno eOK = Errno $ 0
67
eOK :: Errno eOK = Errno $ 0
52
eOK = Errno $ 0
27
true
true
0
6
35
23
10
13
null
null
shlevy/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprImm (ImmConstantDiff a b) = pprImm a <> char '-' <> lparen <> pprImm b <> rparen
111
pprImm (ImmConstantDiff a b) = pprImm a <> char '-' <> lparen <> pprImm b <> rparen
111
pprImm (ImmConstantDiff a b) = pprImm a <> char '-' <> lparen <> pprImm b <> rparen
111
false
false
0
9
44
43
19
24
null
null
hbrouwer/pdrt-sandbox
src/Data/DRS/Input/String.hs
apache-2.0
-- | Implication operators (case insensitive): @imp, ->, =>, then@. opImpString :: [String] opImpString = ["imp", "->", "=>", "then"]
137
opImpString :: [String] opImpString = ["imp", "->", "=>", "then"]
69
opImpString = ["imp", "->", "=>", "then"]
45
true
true
0
5
22
27
17
10
null
null
Javran/misc
max-flow/src/Javran/MaxFlow/Algorithm/Dinitz.hs
mit
-- (<vertex set, arc set>) buildLayered :: Int -> (Int -> IS.IntSet) -> [Layer] buildLayered nrSource nextNodes = initLayer : unfoldr expand (srcSet, srcSet) where srcSet = IS.singleton nrSource {- - frontVertices are vertices in the current (front) layer, that we need to expand from. - discovere...
901
buildLayered :: Int -> (Int -> IS.IntSet) -> [Layer] buildLayered nrSource nextNodes = initLayer : unfoldr expand (srcSet, srcSet) where srcSet = IS.singleton nrSource {- - frontVertices are vertices in the current (front) layer, that we need to expand from. - discovered are set of vertices that w...
873
buildLayered nrSource nextNodes = initLayer : unfoldr expand (srcSet, srcSet) where srcSet = IS.singleton nrSource {- - frontVertices are vertices in the current (front) layer, that we need to expand from. - discovered are set of vertices that we have discovered (for BFS) -} expand (front...
820
true
true
0
22
305
244
130
114
null
null
kjgorman/melchior
comparison/bobble/resources/melchior/application.hs
mit
frame = 17
10
frame = 17
10
frame = 17
10
false
false
1
5
2
10
3
7
null
null
bgamari/text
scripts/Arsec.hs
bsd-2-clause
comment :: Parser Comment comment = (char '#' *> manyTill anyToken (char '\n')) <|> string "\n"
95
comment :: Parser Comment comment = (char '#' *> manyTill anyToken (char '\n')) <|> string "\n"
95
comment = (char '#' *> manyTill anyToken (char '\n')) <|> string "\n"
69
false
true
0
10
15
42
20
22
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/PredType.hs
bsd-3-clause
substPred _ _ t = t
35
substPred _ _ t = t
35
substPred _ _ t = t
35
false
false
1
5
21
12
5
7
null
null
snoyberg/yesodwiki
Handler/Root.hs
bsd-2-clause
getRootR :: Handler RepHtml getRootR = do mpage <- runDB $ getBy $ UniquePage "" mcontent <- case mpage of Nothing -> return Nothing Just (_, Page { pageTopic = tid }) -> runDB $ do x <- selectList [TopicContentTopic ==. tid] [Desc TopicContentChanged, LimitTo 1] ...
767
getRootR :: Handler RepHtml getRootR = do mpage <- runDB $ getBy $ UniquePage "" mcontent <- case mpage of Nothing -> return Nothing Just (_, Page { pageTopic = tid }) -> runDB $ do x <- selectList [TopicContentTopic ==. tid] [Desc TopicContentChanged, LimitTo 1] ...
767
getRootR = do mpage <- runDB $ getBy $ UniquePage "" mcontent <- case mpage of Nothing -> return Nothing Just (_, Page { pageTopic = tid }) -> runDB $ do x <- selectList [TopicContentTopic ==. tid] [Desc TopicContentChanged, LimitTo 1] case x of ...
739
false
true
0
20
262
225
113
112
null
null
tolysz/prepare-ghcjs
spec-lts8/base-pure/GHC/Event/Manager.hs
bsd-3-clause
closeFd :: EventManager -> (Fd -> IO ()) -> Fd -> IO () closeFd mgr close fd = do fds <- withMVar (callbackTableVar mgr fd) $ \tbl -> do prev <- IT.delete (fromIntegral fd) tbl case prev of Nothing -> close fd >> return [] Just fds -> do let oldEls = eventsOf fds when (I.elEvent o...
809
closeFd :: EventManager -> (Fd -> IO ()) -> Fd -> IO () closeFd mgr close fd = do fds <- withMVar (callbackTableVar mgr fd) $ \tbl -> do prev <- IT.delete (fromIntegral fd) tbl case prev of Nothing -> close fd >> return [] Just fds -> do let oldEls = eventsOf fds when (I.elEvent o...
809
closeFd mgr close fd = do fds <- withMVar (callbackTableVar mgr fd) $ \tbl -> do prev <- IT.delete (fromIntegral fd) tbl case prev of Nothing -> close fd >> return [] Just fds -> do let oldEls = eventsOf fds when (I.elEvent oldEls /= mempty) $ do _ <- I.modifyFd (emBacke...
753
false
true
0
25
216
266
123
143
null
null
hspec/hspec
doc/_includes/match/Spec.hs
mit
main :: IO () main = hspec $ do describe "Prelude" $ do describe "reverse" $ do it "reverses a list" False describe "show" $ do it "shows its argument" True
178
main :: IO () main = hspec $ do describe "Prelude" $ do describe "reverse" $ do it "reverses a list" False describe "show" $ do it "shows its argument" True
178
main = hspec $ do describe "Prelude" $ do describe "reverse" $ do it "reverses a list" False describe "show" $ do it "shows its argument" True
164
false
true
0
14
52
66
28
38
null
null
dolio/primitive
Data/Primitive/UnliftedArray.hs
bsd-3-clause
-- | Freezes a 'MutableUnliftedArray', yielding an 'UnliftedArray'. This simply -- marks the array as frozen in place, so it should only be used when no further -- modifications to the mutable array will be performed. unsafeFreezeUnliftedArray :: (PrimMonad m) => MutableUnliftedArray (PrimState m) a -> m (Unlifte...
496
unsafeFreezeUnliftedArray :: (PrimMonad m) => MutableUnliftedArray (PrimState m) a -> m (UnliftedArray a) unsafeFreezeUnliftedArray (MutableUnliftedArray maa#) = primitive $ \s -> case unsafeFreezeArrayArray# maa# s of (# s', aa# #) -> (# s', UnliftedArray aa# #)
278
unsafeFreezeUnliftedArray (MutableUnliftedArray maa#) = primitive $ \s -> case unsafeFreezeArrayArray# maa# s of (# s', aa# #) -> (# s', UnliftedArray aa# #)
166
true
true
0
11
86
97
49
48
null
null
wxwxwwxxx/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
evVarsOfTerm (EvSuperClass v _) = evVarsOfTerm v
50
evVarsOfTerm (EvSuperClass v _) = evVarsOfTerm v
50
evVarsOfTerm (EvSuperClass v _) = evVarsOfTerm v
50
false
false
0
6
8
21
9
12
null
null
ocramz/petsc-hs
examples/Test2.hs
gpl-3.0
-- * PETSc misc -- PETSC_EXTERN PetscErrorCode PetscLogStageRegister(const char[],PetscLogStage*); -- PETSC_EXTERN PetscErrorCode PetscLogStagePush(PetscLogStage); -- petscLogStageRegister :: String -> PetscLogStage_ -> IO CInt petscLogStageRegister s ls = withCString s $ \c -> with ls $ \lls -> [C.exp|int...
395
petscLogStageRegister s ls = withCString s $ \c -> with ls $ \lls -> [C.exp|int{PetscLogStageRegister($(char *c), $(PetscLogStage* lls ))}|] >>= handleErr
164
petscLogStageRegister s ls = withCString s $ \c -> with ls $ \lls -> [C.exp|int{PetscLogStageRegister($(char *c), $(PetscLogStage* lls ))}|] >>= handleErr
164
true
false
2
7
55
51
28
23
null
null
wdanilo/container
src/Data/Container/Opts.hs
apache-2.0
unchecked = queryBuilder $ transFunc .: extendOptBuilder (Query :: Query '[] '[ Unchecked ])
103
unchecked = queryBuilder $ transFunc .: extendOptBuilder (Query :: Query '[] '[ Unchecked ])
103
unchecked = queryBuilder $ transFunc .: extendOptBuilder (Query :: Query '[] '[ Unchecked ])
103
false
false
3
10
24
41
19
22
null
null
cocreature/leksah
src/IDE/Find.hs
gpl-2.0
matchFunc :: ListStore Text -> Text -> TreeIter -> IO Bool matchFunc model str iter = do tp <- treeModelGetPath model iter case tp of (i:_) -> do row <- listStoreGetValue model i return (T.isPrefixOf (T.toLower str) (T.toLower row) && T.length str < T.length row) otherwise -> ...
332
matchFunc :: ListStore Text -> Text -> TreeIter -> IO Bool matchFunc model str iter = do tp <- treeModelGetPath model iter case tp of (i:_) -> do row <- listStoreGetValue model i return (T.isPrefixOf (T.toLower str) (T.toLower row) && T.length str < T.length row) otherwise -> ...
332
matchFunc model str iter = do tp <- treeModelGetPath model iter case tp of (i:_) -> do row <- listStoreGetValue model i return (T.isPrefixOf (T.toLower str) (T.toLower row) && T.length str < T.length row) otherwise -> return False
273
false
true
0
19
91
139
64
75
null
null
nikita-volkov/postgresql-error-codes
library/PostgreSQL/ErrorCodes.hs
mit
-- * Class 22 — Data Exception ------------------------- -- | Code \"22000\". data_exception :: ErrorCode = "22000"
154
data_exception :: ErrorCode = "22000"
75
data_exception :: ErrorCode = "22000"
75
true
false
0
5
55
14
8
6
null
null
JPMoresmau/leksah
src/IDE/Pane/PackageFlags.hs
gpl-2.0
-- | Parse any (escaped) character (ignoring a prefixed @\@) quotedArgCharParser :: CharParser () Char quotedArgCharParser = try (do char '\\' anyChar) <|> try ( noneOf "\"") <?> "argsParser"
223
quotedArgCharParser :: CharParser () Char quotedArgCharParser = try (do char '\\' anyChar) <|> try ( noneOf "\"") <?> "argsParser"
162
quotedArgCharParser = try (do char '\\' anyChar) <|> try ( noneOf "\"") <?> "argsParser"
120
true
true
0
11
60
51
24
27
null
null
mxswd/ylj-2014
2_proof/TypeNegation.hs
bsd-3-clause
notInt :: Not Int a => a -> a notInt = id
41
notInt :: Not Int a => a -> a notInt = id
41
notInt = id
11
false
true
0
6
11
24
12
12
null
null
GaloisInc/verification-game
web-prover/exes/Server.hs
bsd-3-clause
getConfigBool :: Text -> Config.Value -> Bool getConfigBool x cfg = fromMaybe False $ preview (Config.key x . Config.atom . bool) cfg
155
getConfigBool :: Text -> Config.Value -> Bool getConfigBool x cfg = fromMaybe False $ preview (Config.key x . Config.atom . bool) cfg
155
getConfigBool x cfg = fromMaybe False $ preview (Config.key x . Config.atom . bool) cfg
109
false
true
0
11
43
56
27
29
null
null
rimmington/cabal
Cabal/tests/PackageTests/PackageTester.hs
bsd-3-clause
------------------------------------------------------------------------ -- * Running cabal commands recordRun :: (String, ExitCode, String) -> Success -> Result -> Result recordRun (cmd, exitCode, exeOutput) thisSucc res = res { successful = successful res && exitCode == ExitSuccess , success = if exit...
541
recordRun :: (String, ExitCode, String) -> Success -> Result -> Result recordRun (cmd, exitCode, exeOutput) thisSucc res = res { successful = successful res && exitCode == ExitSuccess , success = if exitCode == ExitSuccess then thisSucc else success res , outputText = ...
439
recordRun (cmd, exitCode, exeOutput) thisSucc res = res { successful = successful res && exitCode == ExitSuccess , success = if exitCode == ExitSuccess then thisSucc else success res , outputText = (if null $ outputText res then "" else outputText res ++ "\n") +...
368
true
true
0
14
146
142
76
66
null
null
jml/haverer
lib/Haverer/Round.hs
apache-2.0
applyEvent round (Eliminated pid) = modifyActivePlayer round pid eliminate
74
applyEvent round (Eliminated pid) = modifyActivePlayer round pid eliminate
74
applyEvent round (Eliminated pid) = modifyActivePlayer round pid eliminate
74
false
false
0
7
8
24
11
13
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/MinHeap.hs
mit
toSeq E = S.empty
17
toSeq E = S.empty
17
toSeq E = S.empty
17
false
false
0
5
3
11
5
6
null
null
Jiggins/Matrix
Math/Matrix.hs
gpl-3.0
{- | Creates an n x m matrix of Ints in ascending order. >>> inOrderMatrix 4 4 | 1 2 3 4 | | 5 6 7 8 | | 9 10 11 12 | | 13 14 15 16 | -} inOrderMatrix :: Int -> Int -> Matrix Int inOrderMatrix n m = matrix n m $ \(i,j) -> i*m + j+1
242
inOrderMatrix :: Int -> Int -> Matrix Int inOrderMatrix n m = matrix n m $ \(i,j) -> i*m + j+1
94
inOrderMatrix n m = matrix n m $ \(i,j) -> i*m + j+1
52
true
true
0
9
73
60
31
29
null
null
cartazio/arithmoi
Math/NumberTheory/Utils.hs
mit
shiftOCInteger n@(Jp# bn#) = case bigNatZeroCount bn# of 0## -> (0, n) z# -> (W# z#, bigNatToInteger (bn# `shiftRBigNat` word2Int# z#))
202
shiftOCInteger n@(Jp# bn#) = case bigNatZeroCount bn# of 0## -> (0, n) z# -> (W# z#, bigNatToInteger (bn# `shiftRBigNat` word2Int# z#))
202
shiftOCInteger n@(Jp# bn#) = case bigNatZeroCount bn# of 0## -> (0, n) z# -> (W# z#, bigNatToInteger (bn# `shiftRBigNat` word2Int# z#))
202
false
false
0
12
87
67
35
32
null
null
UCSD-PL/RefScript
src/Language/Rsc/Typecheck/Sub.hs
bsd-3-clause
subOrs [x] = x
17
subOrs [x] = x
17
subOrs [x] = x
17
false
false
0
6
6
12
6
6
null
null
kylcarte/threepenny-extra
src/Graphics/UI/Threepenny/Extra.hs
bsd-3-clause
(&*) :: forall a. a -> [a -> a] -> a (&*) = flip $ foldr (flip (.)) id
70
(&*) :: forall a. a -> [a -> a] -> a (&*) = flip $ foldr (flip (.)) id
70
(&*) = flip $ foldr (flip (.)) id
33
false
true
2
10
18
60
31
29
null
null
glguy/5puzzle
src/Parallel.hs
isc
parallelSearch :: Int {- ^ number of tasks to run in parallel -} -> (a -> Bool) {- ^ predicate for success -} -> [IO a] {- ^ list of all tasks -} -> (IntMap (TaskStatus a) -> IO ()) -> IO () parallelSearch n isDone tasks onChange = do let (startup, delayed) = splitAt n (zip [0..] tasks) c...
1,696
parallelSearch :: Int {- ^ number of tasks to run in parallel -} -> (a -> Bool) {- ^ predicate for success -} -> [IO a] {- ^ list of all tasks -} -> (IntMap (TaskStatus a) -> IO ()) -> IO () parallelSearch n isDone tasks onChange = do let (startup, delayed) = splitAt n (zip [0..] tasks) c...
1,696
parallelSearch n isDone tasks onChange = do let (startup, delayed) = splitAt n (zip [0..] tasks) chan <- newChan statuses <- foldM (launch chan) IntMap.empty startup loop chan delayed statuses where isDoneStatus (Completed x) = isDone x isDoneStatus _ = False -- handle a...
1,482
false
true
0
15
492
545
257
288
null
null
bixuanzju/fcore
lib/archive/CoreNew.hs
bsd-2-clause
join (Mu n t f) = Mu n (join t) (join . f . Var "_")
54
join (Mu n t f) = Mu n (join t) (join . f . Var "_")
54
join (Mu n t f) = Mu n (join t) (join . f . Var "_")
54
false
false
0
8
17
47
22
25
null
null
joelburget/frankenstein
src/Planetary/Support/Parser.hs
bsd-3-clause
parseTmNoApp :: MonadicParsing m => m Tm' parseTmNoApp = choice [ parens parseTmOrAnnot , parseValue , parseCase , parseHandle , parseLet , parseLetrec , parseCommandOrIdent ] <?> "Tm (no app)"
209
parseTmNoApp :: MonadicParsing m => m Tm' parseTmNoApp = choice [ parens parseTmOrAnnot , parseValue , parseCase , parseHandle , parseLet , parseLetrec , parseCommandOrIdent ] <?> "Tm (no app)"
209
parseTmNoApp = choice [ parens parseTmOrAnnot , parseValue , parseCase , parseHandle , parseLet , parseLetrec , parseCommandOrIdent ] <?> "Tm (no app)"
167
false
true
2
6
45
54
28
26
null
null
GaloisInc/halvm-ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
eqTag_RDR = dataQual_RDR gHC_TYPES (fsLit "EQ")
61
eqTag_RDR = dataQual_RDR gHC_TYPES (fsLit "EQ")
61
eqTag_RDR = dataQual_RDR gHC_TYPES (fsLit "EQ")
61
false
false
1
7
19
20
8
12
null
null
lattenwald/humblebundle.hs
src/HB/Session.hs
mit
cookiesFile = "cookies"
23
cookiesFile = "cookies"
23
cookiesFile = "cookies"
23
false
false
0
4
2
6
3
3
null
null
input-output-hk/cardano-sl
scripts/analyze/logs.hs
apache-2.0
isValidRun (map snd -> (x:xs)) = and [ x == NodeStart , count WalletStart xs <= 1 , dedup [a | Adoption a <- xs] `elem` [[], [One], [Many], [Many,One]] ]
181
isValidRun (map snd -> (x:xs)) = and [ x == NodeStart , count WalletStart xs <= 1 , dedup [a | Adoption a <- xs] `elem` [[], [One], [Many], [Many,One]] ]
181
isValidRun (map snd -> (x:xs)) = and [ x == NodeStart , count WalletStart xs <= 1 , dedup [a | Adoption a <- xs] `elem` [[], [One], [Many], [Many,One]] ]
181
false
false
0
12
58
100
55
45
null
null
C-Elegans/linear
Main.hs
mit
main :: IO () main = do args <- getArgs print args {-let flags = S.fromList $ mapMaybe flagFor $ concatMap words args-} let flags = allFlags (result,_) <- runCompilerM (passes funcs) (emptyCs {_flags=flags} ) case result of Right funcs' -> do putStrLn $ banner "Output" ...
648
main :: IO () main = do args <- getArgs print args {-let flags = S.fromList $ mapMaybe flagFor $ concatMap words args-} let flags = allFlags (result,_) <- runCompilerM (passes funcs) (emptyCs {_flags=flags} ) case result of Right funcs' -> do putStrLn $ banner "Output" ...
648
main = do args <- getArgs print args {-let flags = S.fromList $ mapMaybe flagFor $ concatMap words args-} let flags = allFlags (result,_) <- runCompilerM (passes funcs) (emptyCs {_flags=flags} ) case result of Right funcs' -> do putStrLn $ banner "Output" mapM_ ...
634
false
true
0
15
215
217
101
116
null
null
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs
mpl-2.0
-- | A rolling time period, semantically \"in the past \". Must be an integer -- multiple of 1 day no larger than 30 days. sloRollingPeriod :: Lens' ServiceLevelObjective (Maybe Scientific) sloRollingPeriod = lens _sloRollingPeriod (\ s a -> s{_sloRollingPeriod = a}) . mapping _GDuration
302
sloRollingPeriod :: Lens' ServiceLevelObjective (Maybe Scientific) sloRollingPeriod = lens _sloRollingPeriod (\ s a -> s{_sloRollingPeriod = a}) . mapping _GDuration
179
sloRollingPeriod = lens _sloRollingPeriod (\ s a -> s{_sloRollingPeriod = a}) . mapping _GDuration
112
true
true
1
8
58
58
29
29
null
null
gleachkr/Carnap
Carnap/src/Carnap/Core/ModelChecking/ModelFinder.hs
gpl-3.0
cross :: (Domain a, Domain b) => MTerm nm (Set a) -> MTerm nm (Set b) -> MTerm nm (Set (a, b)) cross = MCross
109
cross :: (Domain a, Domain b) => MTerm nm (Set a) -> MTerm nm (Set b) -> MTerm nm (Set (a, b)) cross = MCross
109
cross = MCross
14
false
true
0
11
24
73
37
36
null
null