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
gridaphobe/ghc
compiler/utils/Outputable.hs
bsd-3-clause
larrowt = unicodeSyntax (char '⤙') (docToSDoc $ Pretty.text "-<")
68
larrowt = unicodeSyntax (char '⤙') (docToSDoc $ Pretty.text "-<")
68
larrowt = unicodeSyntax (char '⤙') (docToSDoc $ Pretty.text "-<")
68
false
false
0
9
11
29
14
15
null
null
michalkonecny/aern2
aern2-fun-plot/server/src/AERN2/RealFun/PlotService/App.hs
bsd-3-clause
intervalFunctionUsingEval :: (HasDomain fn, Domain fn ~ DyadicInterval, CanApply fn DyadicInterval, ApplyType fn DyadicInterval ~ Interval MPBall MPBall) => (FunctionName, fn) -> Function intervalFunctionUsingEval (name, fn) = Function { function_name = name , function_dom = getDomain fn , function_colo...
385
intervalFunctionUsingEval :: (HasDomain fn, Domain fn ~ DyadicInterval, CanApply fn DyadicInterval, ApplyType fn DyadicInterval ~ Interval MPBall MPBall) => (FunctionName, fn) -> Function intervalFunctionUsingEval (name, fn) = Function { function_name = name , function_dom = getDomain fn , function_colo...
385
intervalFunctionUsingEval (name, fn) = Function { function_name = name , function_dom = getDomain fn , function_colour = functionColour (0,0,0) , function_getBounds = apply fn }
189
false
true
0
9
67
126
66
60
null
null
lukexi/ghc-7.8-arm64
compiler/nativeGen/X86/Regs.hs
bsd-3-clause
addrModeRegs :: AddrMode -> [Reg] addrModeRegs (AddrBaseIndex b i _) = b_regs ++ i_regs where b_regs = case b of { EABaseReg r -> [r]; _ -> [] } i_regs = case i of { EAIndex r _ -> [r]; _ -> [] }
204
addrModeRegs :: AddrMode -> [Reg] addrModeRegs (AddrBaseIndex b i _) = b_regs ++ i_regs where b_regs = case b of { EABaseReg r -> [r]; _ -> [] } i_regs = case i of { EAIndex r _ -> [r]; _ -> [] }
204
addrModeRegs (AddrBaseIndex b i _) = b_regs ++ i_regs where b_regs = case b of { EABaseReg r -> [r]; _ -> [] } i_regs = case i of { EAIndex r _ -> [r]; _ -> [] }
170
false
true
2
8
52
114
57
57
null
null
pxqr/krpc
tests/Network/KRPC/MethodSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "ping method" $ do it "name is ping" $ do (method :: Method Ping Ping) `shouldBe` "ping" it "has pretty Show instance" $ do show (method :: Method Ping Ping) `shouldBe` "ping :: Ping -> Ping" describe "echo method" $ do it "is overloadable" $ do (metho...
596
spec :: Spec spec = do describe "ping method" $ do it "name is ping" $ do (method :: Method Ping Ping) `shouldBe` "ping" it "has pretty Show instance" $ do show (method :: Method Ping Ping) `shouldBe` "ping :: Ping -> Ping" describe "echo method" $ do it "is overloadable" $ do (metho...
596
spec = do describe "ping method" $ do it "name is ping" $ do (method :: Method Ping Ping) `shouldBe` "ping" it "has pretty Show instance" $ do show (method :: Method Ping Ping) `shouldBe` "ping :: Ping -> Ping" describe "echo method" $ do it "is overloadable" $ do (method :: Method (...
583
false
true
0
27
159
216
105
111
null
null
tamarin-prover/tamarin-prover
lib/term/src/Term/Term.hs
gpl-3.0
-- | 'True' iff the term is a well-formed emap. isEMap :: Show a => Term a -> Bool isEMap (viewTerm2 -> FEMap _ _) = True
121
isEMap :: Show a => Term a -> Bool isEMap (viewTerm2 -> FEMap _ _) = True
73
isEMap (viewTerm2 -> FEMap _ _) = True
38
true
true
0
11
26
47
21
26
null
null
seereason/unicode-properties
Data/Char/Properties/GeneralCategory.hs
bsd-3-clause
gcMajorClass GcCs = ClOther
27
gcMajorClass GcCs = ClOther
27
gcMajorClass GcCs = ClOther
27
false
false
0
5
3
9
4
5
null
null
hazel-el/hazel
Hazel/Parser/OWL/Functional.hs
gpl-3.0
objectPropertyDomain :: Parser ObjectPropertyAxiom objectPropertyDomain = bracketed "ObjectPropertyDomain" $ ObjectPropertyDomain <$> axiomAnnotations <*> objectPropertyExpression <*> classExpression
310
objectPropertyDomain :: Parser ObjectPropertyAxiom objectPropertyDomain = bracketed "ObjectPropertyDomain" $ ObjectPropertyDomain <$> axiomAnnotations <*> objectPropertyExpression <*> classExpression
310
objectPropertyDomain = bracketed "ObjectPropertyDomain" $ ObjectPropertyDomain <$> axiomAnnotations <*> objectPropertyExpression <*> classExpression
259
false
true
0
8
126
39
17
22
null
null
jwiegley/lambdabot
Plugin/Free/FreeTheorem.hs
mit
freeTheorem' env e1 e2 t'@(TyCons _ []) = do return (ThEqual e1 e2)
81
freeTheorem' env e1 e2 t'@(TyCons _ []) = do return (ThEqual e1 e2)
81
freeTheorem' env e1 e2 t'@(TyCons _ []) = do return (ThEqual e1 e2)
81
false
false
0
9
26
45
20
25
null
null
mplamann/magic-spieler
src/State/Operations.hs
mit
damagePlayer :: Monad m => PlayerID -> Int -> StateT GameState m () damagePlayer pID amount = do prevent <- use $ playerWithID pID.playerDamageToPrevent process prevent where process prevent | prevent >= amount = playerWithID pID.playerDamageToPrevent -= amount | prevent == 0 = do ...
595
damagePlayer :: Monad m => PlayerID -> Int -> StateT GameState m () damagePlayer pID amount = do prevent <- use $ playerWithID pID.playerDamageToPrevent process prevent where process prevent | prevent >= amount = playerWithID pID.playerDamageToPrevent -= amount | prevent == 0 = do ...
595
damagePlayer pID amount = do prevent <- use $ playerWithID pID.playerDamageToPrevent process prevent where process prevent | prevent >= amount = playerWithID pID.playerDamageToPrevent -= amount | prevent == 0 = do playerWithID pID.hp -= amount playerWithID pID.turnDamageTak...
527
false
true
0
10
149
191
86
105
null
null
brodyberg/Notes
csv/csv1/src/Prettify.hs
mit
fsep :: [Doc] -> Doc fsep = fold (</>)
38
fsep :: [Doc] -> Doc fsep = fold (</>)
38
fsep = fold (</>)
17
false
true
0
7
8
29
14
15
null
null
li-zhirui/JSAnalyzer
JSEvaluator.hs
mit
jsGreaterThan (JSFloat x) (JSInt y) = return . JSBool $ x > fromInteger y
85
jsGreaterThan (JSFloat x) (JSInt y) = return . JSBool $ x > fromInteger y
85
jsGreaterThan (JSFloat x) (JSInt y) = return . JSBool $ x > fromInteger y
85
false
false
0
7
25
40
18
22
null
null
peddie/libconfig-haskell
src/Language/Libconfig/Encode.hs
bsd-3-clause
addValue :: Text -> C.Setting -> Value -> Encoder C.Setting addValue nm parent value = do newset <- ExceptT $ (`withErr` AddSetting "" value) <$> add addTrace newset $ setValue newset value return newset where add = C.configSettingAdd parent (T.unpack nm) (valueType value)
285
addValue :: Text -> C.Setting -> Value -> Encoder C.Setting addValue nm parent value = do newset <- ExceptT $ (`withErr` AddSetting "" value) <$> add addTrace newset $ setValue newset value return newset where add = C.configSettingAdd parent (T.unpack nm) (valueType value)
285
addValue nm parent value = do newset <- ExceptT $ (`withErr` AddSetting "" value) <$> add addTrace newset $ setValue newset value return newset where add = C.configSettingAdd parent (T.unpack nm) (valueType value)
225
false
true
1
11
54
123
56
67
null
null
andorp/hs-bluesnap
src/Bluesnap/API/Request.hs
gpl-3.0
elementToXMLMinimum_length :: Xsd.Decimal -> [Content ()] elementToXMLMinimum_length = schemaTypeToXML "minimum-length"
119
elementToXMLMinimum_length :: Xsd.Decimal -> [Content ()] elementToXMLMinimum_length = schemaTypeToXML "minimum-length"
119
elementToXMLMinimum_length = schemaTypeToXML "minimum-length"
61
false
true
0
8
9
28
14
14
null
null
acowley/ghc
compiler/typecheck/TcTypeNats.hs
bsd-3-clause
genRoot x0 1 = Just (x0, True)
33
genRoot x0 1 = Just (x0, True)
33
genRoot x0 1 = Just (x0, True)
33
false
false
0
6
9
22
10
12
null
null
zrho/pylon
src/Language/Pylon/Core/AST.hs
bsd-3-clause
appFun :: Exp -> Exp appFun (EApp f _) = appFun f
49
appFun :: Exp -> Exp appFun (EApp f _) = appFun f
49
appFun (EApp f _) = appFun f
28
false
true
0
7
11
29
14
15
null
null
jthornber/XMonadContrib
XMonad/Hooks/DebugEvents.hs
bsd-3-clause
propTypeErr :: Atom -> Atom -> Decoder Bool propTypeErr a e = do e' <- inX $ atomName e a' <- inX $ atomName a failure $ "(bad type " ++ a' ++"; expected " ++ e' ++ ")" -- for stubs
193
propTypeErr :: Atom -> Atom -> Decoder Bool propTypeErr a e = do e' <- inX $ atomName e a' <- inX $ atomName a failure $ "(bad type " ++ a' ++"; expected " ++ e' ++ ")" -- for stubs
193
propTypeErr a e = do e' <- inX $ atomName e a' <- inX $ atomName a failure $ "(bad type " ++ a' ++"; expected " ++ e' ++ ")" -- for stubs
145
false
true
0
11
53
84
38
46
null
null
mtlstats/mtlstats
src/Mtlstats/Control/CreatePlayer.hs
gpl-3.0
getPlayerPosC :: Controller getPlayerPosC = promptController playerPosPrompt
76
getPlayerPosC :: Controller getPlayerPosC = promptController playerPosPrompt
76
getPlayerPosC = promptController playerPosPrompt
48
false
true
0
5
6
14
7
7
null
null
input-output-hk/cardano-sl
chain/src/Pos/Chain/Update/Poll/Types.hs
apache-2.0
-- | Check whether proposal which generated given 'BlockVersionState' -- is confirmed. bvsIsConfirmed :: BlockVersionState -> Bool bvsIsConfirmed = isJust . bvsConfirmedEpoch
174
bvsIsConfirmed :: BlockVersionState -> Bool bvsIsConfirmed = isJust . bvsConfirmedEpoch
87
bvsIsConfirmed = isJust . bvsConfirmedEpoch
43
true
true
0
5
21
21
12
9
null
null
kmate/HaRe
test/testdata/Demote/D2.hs
bsd-3-clause
main = sumSquares [1..4]
24
main = sumSquares [1..4]
24
main = sumSquares [1..4]
24
false
false
0
6
3
14
7
7
null
null
seereason/haskell-unixutils
System/Unix/Mount.hs
bsd-3-clause
isMountPoint :: FilePath -> IO Bool -- This implements the functionality of mountpoint(1), deciding -- whether a path is a mountpoint by seeing whether it is on a -- different device from its parent. It would fail if a file system -- is mounted directly inside itself, but I think maybe that isn't -- allowed. isMountPo...
881
isMountPoint :: FilePath -> IO Bool isMountPoint path = do exists <- doesDirectoryExist (path ++ "/.") parentExists <- doesDirectoryExist (path ++ "/..") case (exists, parentExists) of (True, True) -> do id <- getFileStatus (path ++ "/.") >>= return . deviceID ...
606
isMountPoint path = do exists <- doesDirectoryExist (path ++ "/.") parentExists <- doesDirectoryExist (path ++ "/..") case (exists, parentExists) of (True, True) -> do id <- getFileStatus (path ++ "/.") >>= return . deviceID parentID <- getFileStatus...
570
true
true
0
17
262
157
80
77
null
null
lolepezy/hajs
testScanner.hs
unlicense
main = runTestTT literalTest
28
main = runTestTT literalTest
28
main = runTestTT literalTest
28
false
false
0
5
3
9
4
5
null
null
treeowl/trifecta
src/Text/Trifecta/Highlight.hs
bsd-3-clause
withHighlight Operator = yellow
50
withHighlight Operator = yellow
50
withHighlight Operator = yellow
50
false
false
0
5
22
9
4
5
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2LaunchTemplateLaunchTemplateData.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-iaminstanceprofile ecltltdIamInstanceProfile :: Lens' EC2LaunchTemplateLaunchTemplateData (Maybe EC2LaunchTemplateIamInstanceProfile) ecltltdIamInstanceP...
463
ecltltdIamInstanceProfile :: Lens' EC2LaunchTemplateLaunchTemplateData (Maybe EC2LaunchTemplateIamInstanceProfile) ecltltdIamInstanceProfile = lens _eC2LaunchTemplateLaunchTemplateDataIamInstanceProfile (\s a -> s { _eC2LaunchTemplateLaunchTemplateDataIamInstanceProfile = a })
277
ecltltdIamInstanceProfile = lens _eC2LaunchTemplateLaunchTemplateDataIamInstanceProfile (\s a -> s { _eC2LaunchTemplateLaunchTemplateDataIamInstanceProfile = a })
162
true
true
1
9
21
49
25
24
null
null
kawu/nerf-proto
tests/test1.hs
bsd-2-clause
-- | Arbitrary set of active ranges. arbitraryActive :: Gen (S.Set (Pos, Pos)) arbitraryActive = arbitrarySet activeMax arbitrarySpan
133
arbitraryActive :: Gen (S.Set (Pos, Pos)) arbitraryActive = arbitrarySet activeMax arbitrarySpan
96
arbitraryActive = arbitrarySet activeMax arbitrarySpan
54
true
true
0
8
17
34
18
16
null
null
bixuanzju/fcore
lib/JvmTypeQuery.hs
bsd-2-clause
findMethodReturnType :: Connection -> ClassName -> (Bool, MethodName) -- True <=> static method -> [ClassName] -- Class of the arguments -> IO (Maybe ClassName) findMethodReturnType conn c (is_static, m) args = sendRecv conn ([tag, c, m] ++ args) >>= fixRet where tag = if is_static ...
373
findMethodReturnType :: Connection -> ClassName -> (Bool, MethodName) -- True <=> static method -> [ClassName] -- Class of the arguments -> IO (Maybe ClassName) findMethodReturnType conn c (is_static, m) args = sendRecv conn ([tag, c, m] ++ args) >>= fixRet where tag = if is_static ...
373
findMethodReturnType conn c (is_static, m) args = sendRecv conn ([tag, c, m] ++ args) >>= fixRet where tag = if is_static then "qStaticMethod" else "qMethod"
191
false
true
1
12
103
112
58
54
null
null
brendanhay/gogol
gogol-searchconsole/gen/Network/Google/SearchConsole/Types/Product.hs
mpl-2.0
-- | The type of the sitemap. For example: \`rssFeed\`. wsType :: Lens' WmxSitemap (Maybe WmxSitemapType) wsType = lens _wsType (\ s a -> s{_wsType = a})
153
wsType :: Lens' WmxSitemap (Maybe WmxSitemapType) wsType = lens _wsType (\ s a -> s{_wsType = a})
97
wsType = lens _wsType (\ s a -> s{_wsType = a})
47
true
true
0
9
26
46
25
21
null
null
snapframework/snap-loader-dynamic
src/Snap/Loader/Dynamic/Signal.hs
bsd-3-clause
---------- -- both -- ---------- ------------------------------------------------------------------------------ protectHandlers :: IO (IO ()) protectHandlers = do h <- saveHandlers return $ restoreHandlers h ------------------------------------...
362
protectHandlers :: IO (IO ()) protectHandlers = do h <- saveHandlers return $ restoreHandlers h ------------------------------------------------------------------------------
182
protectHandlers = do h <- saveHandlers return $ restoreHandlers h ------------------------------------------------------------------------------
152
true
true
0
8
97
44
23
21
null
null
sukwon0709/mysql
tests/test.hs
bsd-3-clause
scProps = testGroup "(checked by SmallCheck)" [ SC.testProperty "sort == sort . reverse" $ \list -> sort (list :: [Int]) == sort (reverse list) , SC.testProperty "Fermat's little theorem" $ \x -> ((x :: Integer)^7 - x) `mod` 7 == 0 -- the following property does not hold , SC.testProperty "Fermat's ...
422
scProps = testGroup "(checked by SmallCheck)" [ SC.testProperty "sort == sort . reverse" $ \list -> sort (list :: [Int]) == sort (reverse list) , SC.testProperty "Fermat's little theorem" $ \x -> ((x :: Integer)^7 - x) `mod` 7 == 0 -- the following property does not hold , SC.testProperty "Fermat's ...
422
scProps = testGroup "(checked by SmallCheck)" [ SC.testProperty "sort == sort . reverse" $ \list -> sort (list :: [Int]) == sort (reverse list) , SC.testProperty "Fermat's little theorem" $ \x -> ((x :: Integer)^7 - x) `mod` 7 == 0 -- the following property does not hold , SC.testProperty "Fermat's ...
422
false
false
0
14
108
164
88
76
null
null
jsnajder/fer3-catalogue
src/CSV.hs
bsd-3-clause
toForest ((lx,x):xs) = let (ys,zs) = break ((==lx) . fst) xs in Node x (toForest ys) : toForest zs
119
toForest ((lx,x):xs) = let (ys,zs) = break ((==lx) . fst) xs in Node x (toForest ys) : toForest zs
119
toForest ((lx,x):xs) = let (ys,zs) = break ((==lx) . fst) xs in Node x (toForest ys) : toForest zs
119
false
false
0
12
39
74
38
36
null
null
edwardwas/comonadUI
example/Main.hs
isc
tileUI offset (Tile col) = UI (SDLImage $ \r -> SDL.fillRectangle r (offset + V2 (-16) (-16)) (offset + V2 16 16) (V4 maxBound maxBound 0 maxBound)) (const $ return ())
256
tileUI offset (Tile col) = UI (SDLImage $ \r -> SDL.fillRectangle r (offset + V2 (-16) (-16)) (offset + V2 16 16) (V4 maxBound maxBound 0 maxBound)) (const $ return ())
256
tileUI offset (Tile col) = UI (SDLImage $ \r -> SDL.fillRectangle r (offset + V2 (-16) (-16)) (offset + V2 16 16) (V4 maxBound maxBound 0 maxBound)) (const $ return ())
256
false
false
0
14
118
103
52
51
null
null
gridaphobe/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprFFormat :: Format -> SDoc pprFFormat FF64 = empty
56
pprFFormat :: Format -> SDoc pprFFormat FF64 = empty
56
pprFFormat FF64 = empty
27
false
true
0
5
12
18
9
9
null
null
fmapfmapfmap/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types/Product.hs
mpl-2.0
-- | The layer name. lName :: Lens' Layer (Maybe Text) lName = lens _lName (\ s a -> s{_lName = a})
99
lName :: Lens' Layer (Maybe Text) lName = lens _lName (\ s a -> s{_lName = a})
78
lName = lens _lName (\ s a -> s{_lName = a})
44
true
true
0
9
21
46
25
21
null
null
Helium4Haskell/helium
test/exports/Export11.hs
gpl-3.0
result4 :: Listt3 Int result4 = Emptyy
38
result4 :: Listt3 Int result4 = Emptyy
38
result4 = Emptyy
16
false
true
0
6
6
20
8
12
null
null
mpickering/HaRe
src/Language/Haskell/Refact/Utils/Variables.hs
bsd-3-clause
definingDeclsRdrNames' :: (SYB.Data t) => NameMap -> [GHC.Name] -- ^ The specified identifiers. -> t -- ^ A collection of declarations. -> [GHC.LHsDecl GHC.RdrName] -- ^ The result. definingDeclsRdrNames' nameMap pns ds = defining ds where defining decl...
1,038
definingDeclsRdrNames' :: (SYB.Data t) => NameMap -> [GHC.Name] -- ^ The specified identifiers. -> t -- ^ A collection of declarations. -> [GHC.LHsDecl GHC.RdrName] definingDeclsRdrNames' nameMap pns ds = defining ds where defining decl = SYB.everyt...
1,020
definingDeclsRdrNames' nameMap pns ds = defining ds where defining decl = SYB.everythingStaged SYB.Renamer (++) [] ([] `SYB.mkQ` defines') decl where defines' :: (GHC.LHsDecl GHC.RdrName) -> [GHC.LHsDecl GHC.RdrName] defines' decl'@(GHC.L _ (GHC.ValD (GHC.FunBind _ _ _ _ _ _))) | any...
794
true
true
1
13
247
307
156
151
null
null
andrewthad/graphite
src/Diagrams/Graph/Combinators.hs
bsd-3-clause
horizontalLine :: Double -> Diagram B horizontalLine w = fromOffsets [scaleX w unitX]
85
horizontalLine :: Double -> Diagram B horizontalLine w = fromOffsets [scaleX w unitX]
85
horizontalLine w = fromOffsets [scaleX w unitX]
47
false
true
0
7
12
37
16
21
null
null
jgm/texmath
src/Text/TeXMath/Shared.hs
gpl-2.0
-- | Mapping between LaTeX scaling commands and the scaling factor scalers :: [(T.Text, Rational)] scalers = [ ("\\bigg", widthbigg) , ("\\Bigg", widthBigg) , ("\\big", widthbig) , ("\\Big", widthBig) , ("\\biggr", widthbigg) , ("\\Biggr", widthBigg) ...
652
scalers :: [(T.Text, Rational)] scalers = [ ("\\bigg", widthbigg) , ("\\Bigg", widthBigg) , ("\\big", widthbig) , ("\\Big", widthBig) , ("\\biggr", widthbigg) , ("\\Biggr", widthBigg) , ("\\bigr", widthbig) , ("\\Bigr", widthBig) ...
585
scalers = [ ("\\bigg", widthbigg) , ("\\Bigg", widthBigg) , ("\\big", widthbig) , ("\\Big", widthBig) , ("\\biggr", widthbigg) , ("\\Biggr", widthBigg) , ("\\bigr", widthbig) , ("\\Bigr", widthBig) , ("\\biggl", widthbigg) ...
553
true
true
10
9
218
180
101
79
null
null
gcampax/ghc
compiler/basicTypes/Name.hs
bsd-3-clause
isBuiltInSyntax _ = False
67
isBuiltInSyntax _ = False
67
isBuiltInSyntax _ = False
67
false
false
0
5
45
9
4
5
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_FIELDS_NV :: GLenum gl_FIELDS_NV = 0x8E27
44
gl_FIELDS_NV :: GLenum gl_FIELDS_NV = 0x8E27
44
gl_FIELDS_NV = 0x8E27
21
false
true
0
4
5
11
6
5
null
null
gabesoft/kapi
test/PersistenceUserPostsSpec.hs
bsd-3-clause
sub2 :: Record sub2 = Record [ mkStrField "createdAt" "2016-03-03T06:47:35.463Z" , mkBoolField "disabled" False , mkStrField "feedId" "56d7de07c788cb1d6eb91a6e" , mkStrField "_id" "56d7de07c788cb1d6eb91a82" , mkStrListField "tags" ["programming"] , mkStrField "title" "Feed title" , mkTxtFi...
421
sub2 :: Record sub2 = Record [ mkStrField "createdAt" "2016-03-03T06:47:35.463Z" , mkBoolField "disabled" False , mkStrField "feedId" "56d7de07c788cb1d6eb91a6e" , mkStrField "_id" "56d7de07c788cb1d6eb91a82" , mkStrListField "tags" ["programming"] , mkStrField "title" "Feed title" , mkTxtFi...
421
sub2 = Record [ mkStrField "createdAt" "2016-03-03T06:47:35.463Z" , mkBoolField "disabled" False , mkStrField "feedId" "56d7de07c788cb1d6eb91a6e" , mkStrField "_id" "56d7de07c788cb1d6eb91a82" , mkStrListField "tags" ["programming"] , mkStrField "title" "Feed title" , mkTxtField "updatedAt"...
406
false
true
0
7
77
81
41
40
null
null
diffusionkinetics/open
dampf/lib/Dampf/AppFile/Pretty.hs
mit
pprTestUnit (TestGet i Nothing) = text "GET" <+> ttext i
56
pprTestUnit (TestGet i Nothing) = text "GET" <+> ttext i
56
pprTestUnit (TestGet i Nothing) = text "GET" <+> ttext i
56
false
false
0
7
9
27
12
15
null
null
zouppen/hsgeocoder
DeclinationReader.hs
gpl-3.0
-- |Groups heading-list pairs. Adds the base form of a word to the -- list if not there already. groupTypes :: [Types] -> [Declination] groupTypes ((BaseForm base):(Declinations ds):xs) = (base,S.fromList ds):groupTypes xs
222
groupTypes :: [Types] -> [Declination] groupTypes ((BaseForm base):(Declinations ds):xs) = (base,S.fromList ds):groupTypes xs
125
groupTypes ((BaseForm base):(Declinations ds):xs) = (base,S.fromList ds):groupTypes xs
86
true
true
0
12
31
72
37
35
null
null
lennart/tidal-midi
Sound/Tidal/Tetra.hs
gpl-3.0
snoise = doublePattern 20
25
snoise = doublePattern 20
25
snoise = doublePattern 20
25
false
false
0
5
3
9
4
5
null
null
keera-studios/hsQt
Qtc/Enums/Core/QTextStream.hs
bsd-2-clause
eShowBase :: NumberFlag eShowBase = ieNumberFlag $ 1
54
eShowBase :: NumberFlag eShowBase = ieNumberFlag $ 1
54
eShowBase = ieNumberFlag $ 1
30
false
true
0
6
9
18
8
10
null
null
cchalmers/dense
src/Data/Dense/Generic.hs
bsd-3-clause
-- | Execute the monadic action and freeze the resulting array. createT :: (Vector v a, Traversable t) => (forall s . ST s (t (MArray (G.Mutable v) f s a))) -> t (Array v f a) createT m = m `seq` runST (m >>= T.mapM unsafeFreeze)
235
createT :: (Vector v a, Traversable t) => (forall s . ST s (t (MArray (G.Mutable v) f s a))) -> t (Array v f a) createT m = m `seq` runST (m >>= T.mapM unsafeFreeze)
171
createT m = m `seq` runST (m >>= T.mapM unsafeFreeze)
53
true
true
0
17
52
117
58
59
null
null
rvion/lamdu
test/InferCombinators.hs
gpl-3.0
compositeTypeVar :: T.Var (T.Composite p) -> RepeatList (T.Composite p) compositeTypeVar ctv = pure $ T.CVar ctv
112
compositeTypeVar :: T.Var (T.Composite p) -> RepeatList (T.Composite p) compositeTypeVar ctv = pure $ T.CVar ctv
112
compositeTypeVar ctv = pure $ T.CVar ctv
40
false
true
2
10
15
56
25
31
null
null
koterpillar/tianbar
tests/TestPlugin/DBus/Serialization.hs
mit
simpleVariantArray TypeVariant = unwrapVariants (Proxy :: Proxy Variant) <$> listOf1 (simpleVariant TypeVariant)
112
simpleVariantArray TypeVariant = unwrapVariants (Proxy :: Proxy Variant) <$> listOf1 (simpleVariant TypeVariant)
112
simpleVariantArray TypeVariant = unwrapVariants (Proxy :: Proxy Variant) <$> listOf1 (simpleVariant TypeVariant)
112
false
false
1
8
11
37
16
21
null
null
xmonad/xmonad-contrib
XMonad/Layout/WindowNavigation.hs
bsd-3-clause
configurableNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout WindowNavigation l a configurableNavigation conf = ModifiedLayout (WindowNavigation conf (I Nothing))
180
configurableNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout WindowNavigation l a configurableNavigation conf = ModifiedLayout (WindowNavigation conf (I Nothing))
180
configurableNavigation conf = ModifiedLayout (WindowNavigation conf (I Nothing))
80
false
true
0
9
22
58
27
31
null
null
jamesdabbs/keenser
src/Keenser/Util.hs
bsd-3-clause
queue :: ToJSON a => Job a -> Redis () queue job = void $ lpush ("queue:" <> jobQueue job) [LBS.toStrict $ encode job]
118
queue :: ToJSON a => Job a -> Redis () queue job = void $ lpush ("queue:" <> jobQueue job) [LBS.toStrict $ encode job]
118
queue job = void $ lpush ("queue:" <> jobQueue job) [LBS.toStrict $ encode job]
79
false
true
0
9
23
64
30
34
null
null
jvoigtlaender/elm-lang.org
src/backend/Generate.hs
bsd-3-clause
googleAnalytics :: H.Html googleAnalytics = H.script ! A.type_ "text/javascript" $ "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\ \(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\ \m=s.getElementsByTagName(o)[0];a.async=1;a.s...
547
googleAnalytics :: H.Html googleAnalytics = H.script ! A.type_ "text/javascript" $ "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\ \(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\ \m=s.getElementsByTagName(o)[0];a.async=1;a.s...
547
googleAnalytics = H.script ! A.type_ "text/javascript" $ "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\ \(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\ \m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBe...
521
false
true
2
7
80
35
15
20
null
null
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/countdown2.hs
gpl-3.0
valid Mul _ _ = True
20
valid Mul _ _ = True
20
valid Mul _ _ = True
20
false
false
0
5
5
13
6
7
null
null
grandpascorpion/canon
Math/NumberTheory/Canon.hs
gpl-3.0
cMult x y m | not (cHyperExprAny x) && not (cHyperExprAny y) = (gcrToC g, m') | otherwise = (multH x y, m) -- This attempts to do deeper combining and can be problematic (head $ cMultiplicative x y Mult, m) where (g, m') = gcrMult (cToGCR x) (cToGCR y)...
642
cMult x y m | not (cHyperExprAny x) && not (cHyperExprAny y) = (gcrToC g, m') | otherwise = (multH x y, m) -- This attempts to do deeper combining and can be problematic (head $ cMultiplicative x y Mult, m) where (g, m') = gcrMult (cToGCR x) (cToGCR y)...
642
cMult x y m | not (cHyperExprAny x) && not (cHyperExprAny y) = (gcrToC g, m') | otherwise = (multH x y, m) -- This attempts to do deeper combining and can be problematic (head $ cMultiplicative x y Mult, m) where (g, m') = gcrMult (cToGCR x) (cToGCR y)...
642
false
false
0
11
176
108
55
53
null
null
stevely/hspirv
src/SpirV/Builder/Raw.hs
bsd-3-clause
-- Id 1: Selector value, must be scalar integer type -- Id 2: Default label -- Word32s: Scalar integer literal -- Ids: Corresponding label switch :: Id -> Id -> [(Word32, Id)] -> Builder () switch s d ts = zeroOp (OpSwitch s d ts)
230
switch :: Id -> Id -> [(Word32, Id)] -> Builder () switch s d ts = zeroOp (OpSwitch s d ts)
91
switch s d ts = zeroOp (OpSwitch s d ts)
40
true
true
0
9
44
61
33
28
null
null
jberryman/wai
warp/Network/Wai/Handler/Warp/Request.hs
mit
checkCR :: ByteString -> Int -> Int checkCR bs pos = if pos > 0 && 13 == S.index bs p then p else pos -- 13 is CR where !p = pos - 1
138
checkCR :: ByteString -> Int -> Int checkCR bs pos = if pos > 0 && 13 == S.index bs p then p else pos -- 13 is CR where !p = pos - 1
138
checkCR bs pos = if pos > 0 && 13 == S.index bs p then p else pos -- 13 is CR where !p = pos - 1
102
false
true
0
8
40
65
33
32
null
null
xaverdh/hmail
HMail/Brick.hs
gpl-3.0
attributes :: (HMailState,View) -> AttrMap attributes _ = attrMap defAttr $ map (second ($defAttr)) [ "focused" & style bold ,"new" & fgCol green ,"header" & style bold . fgCol blue ,"banner" & style bold . fgCol yellow . bgCol blue ,"body" & id ] where infixr 1 & (&) = (,) style = flip wi...
389
attributes :: (HMailState,View) -> AttrMap attributes _ = attrMap defAttr $ map (second ($defAttr)) [ "focused" & style bold ,"new" & fgCol green ,"header" & style bold . fgCol blue ,"banner" & style bold . fgCol yellow . bgCol blue ,"body" & id ] where infixr 1 & (&) = (,) style = flip wi...
389
attributes _ = attrMap defAttr $ map (second ($defAttr)) [ "focused" & style bold ,"new" & fgCol green ,"header" & style bold . fgCol blue ,"banner" & style bold . fgCol yellow . bgCol blue ,"body" & id ] where infixr 1 & (&) = (,) style = flip withStyle fgCol = flip withForeColor ...
346
false
true
6
9
100
162
79
83
null
null
rgrinberg/wai
warp/Network/Wai/Handler/Warp/HTTP2/Request.hs
mit
validateHeaders :: HeaderList -> Maybe ValidHeaders validateHeaders hs = case pseudo hs (emptyPseudo,id) of Just (Pseudo (Just m) (Just p) ma mcl, h) -> Just $ ValidHeaders m p ma (readInt <$> mcl) h _ -> Nothing where pseudo [] (p,b) = Just (p,b []) pseudo h@((k,v):kvs) (p,b) | ...
2,048
validateHeaders :: HeaderList -> Maybe ValidHeaders validateHeaders hs = case pseudo hs (emptyPseudo,id) of Just (Pseudo (Just m) (Just p) ma mcl, h) -> Just $ ValidHeaders m p ma (readInt <$> mcl) h _ -> Nothing where pseudo [] (p,b) = Just (p,b []) pseudo h@((k,v):kvs) (p,b) | ...
2,048
validateHeaders hs = case pseudo hs (emptyPseudo,id) of Just (Pseudo (Just m) (Just p) ma mcl, h) -> Just $ ValidHeaders m p ma (readInt <$> mcl) h _ -> Nothing where pseudo [] (p,b) = Just (p,b []) pseudo h@((k,v):kvs) (p,b) | k == ":method" = if isJust (colonMethod p) then ...
1,996
false
true
10
13
1,002
695
362
333
null
null
prt2121/haskell-practice
parconc/distrib-chat/chat-noslave.hs
apache-2.0
-- >> -- ----------------------------------------------------------------------------- -- Basic operations -- <<sendLocal sendLocal :: LocalClient -> Message -> STM () sendLocal LocalClient{..} msg = writeTChan clientSendChan msg
231
sendLocal :: LocalClient -> Message -> STM () sendLocal LocalClient{..} msg = writeTChan clientSendChan msg
107
sendLocal LocalClient{..} msg = writeTChan clientSendChan msg
61
true
true
0
8
25
44
23
21
null
null
jstolarek/dep-typed-wbl-heaps-hs
src/TwoPassMerge/CombinedProofs.hs
bsd-3-clause
findMin :: Heap b p -> Nat findMin Empty = undefined
63
findMin :: Heap b p -> Nat findMin Empty = undefined
63
findMin Empty = undefined
36
false
true
0
6
21
23
11
12
null
null
jml/language-python
src/Language/Python/Common/SrcLocation.hs
bsd-3-clause
prettyMultiSpan :: SrcSpan -> Doc prettyMultiSpan span = text (span_filename span) <> colon <+> parens (pretty (startRow span) <> comma <> pretty (startCol span)) <> char '-' <> parens (pretty (endRow span) <> comma <> pretty (endCol span))
252
prettyMultiSpan :: SrcSpan -> Doc prettyMultiSpan span = text (span_filename span) <> colon <+> parens (pretty (startRow span) <> comma <> pretty (startCol span)) <> char '-' <> parens (pretty (endRow span) <> comma <> pretty (endCol span))
251
prettyMultiSpan span = text (span_filename span) <> colon <+> parens (pretty (startRow span) <> comma <> pretty (startCol span)) <> char '-' <> parens (pretty (endRow span) <> comma <> pretty (endCol span))
217
false
true
0
14
49
110
52
58
null
null
prsteele/mdp
src/run-ex-3-2.hs
mit
takeWhile2 p as = map fst $ takeWhile (uncurry p) (zip as (tail as))
68
takeWhile2 p as = map fst $ takeWhile (uncurry p) (zip as (tail as))
68
takeWhile2 p as = map fst $ takeWhile (uncurry p) (zip as (tail as))
68
false
false
0
10
13
43
20
23
null
null
beni55/hermit
src/HERMIT/Dictionary/Undefined.hs
bsd-2-clause
------------------------------------------------------------------------ externals :: [External] externals = map (.+ Strictness) [ external "replace-current-expr-with-undefined" (promoteExprR replaceCurrentExprWithUndefinedR :: RewriteH LCore) [ "Set the current expression to \"undefined\"." ] .+ S...
2,385
externals :: [External] externals = map (.+ Strictness) [ external "replace-current-expr-with-undefined" (promoteExprR replaceCurrentExprWithUndefinedR :: RewriteH LCore) [ "Set the current expression to \"undefined\"." ] .+ Shallow .+ Context .+ Unsafe , external "replace-id-with-undefined" (pr...
2,311
externals = map (.+ Strictness) [ external "replace-current-expr-with-undefined" (promoteExprR replaceCurrentExprWithUndefinedR :: RewriteH LCore) [ "Set the current expression to \"undefined\"." ] .+ Shallow .+ Context .+ Unsafe , external "replace-id-with-undefined" (promoteCoreR . replaceIdWi...
2,287
true
true
0
13
557
450
231
219
null
null
phischu/fragnix
tests/packages/scotty/Text.PrettyPrint.Annotated.HughesPJ.hs
bsd-3-clause
-- mkUnion checks for an empty document mkUnion :: Doc a -> Doc a -> Doc a mkUnion Empty _ = Empty
98
mkUnion :: Doc a -> Doc a -> Doc a mkUnion Empty _ = Empty
58
mkUnion Empty _ = Empty
23
true
true
0
8
21
39
17
22
null
null
GaloisInc/halvm-ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isMetaTyVarTy :: TcType -> Bool isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv
75
isMetaTyVarTy :: TcType -> Bool isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv
75
isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv
43
false
true
0
6
10
31
14
17
null
null
peterokagey/haskellOEIS
src/Helpers/NorthEastWalks.hs
apache-2.0
isOngoing _ = False
29
isOngoing _ = False
29
isOngoing _ = False
29
false
false
0
5
13
9
4
5
null
null
jean-edouard/manager
updatemgr/UpdateMgr/Poller.hs
gpl-2.0
liftBaseOp' :: MonadBaseControl b m => ((x -> b ()) -> b a) -> (x -> m ()) -> m a liftBaseOp' f m = liftBaseWith $ \runInBase -> f $ void . runInBase . m
184
liftBaseOp' :: MonadBaseControl b m => ((x -> b ()) -> b a) -> (x -> m ()) -> m a liftBaseOp' f m = liftBaseWith $ \runInBase -> f $ void . runInBase . m
184
liftBaseOp' f m = liftBaseWith $ \runInBase -> f $ void . runInBase . m
71
false
true
0
13
66
96
46
50
null
null
wavewave/lhc-analysis-collection
heavyhiggs/minv_sm.hs
gpl-3.0
jets = [1,2,3,4,-1,-2,-3,-4]
28
jets = [1,2,3,4,-1,-2,-3,-4]
28
jets = [1,2,3,4,-1,-2,-3,-4]
28
false
false
1
6
2
41
23
18
null
null
raichoo/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCCG n) f = case lookupCtxtExact n (idris_callgraph i) of Just v -> return f { ibc_cg = (n,v) : ibc_cg f } _ -> ifail "IBC write failed"
196
ibc i (IBCCG n) f = case lookupCtxtExact n (idris_callgraph i) of Just v -> return f { ibc_cg = (n,v) : ibc_cg f } _ -> ifail "IBC write failed"
196
ibc i (IBCCG n) f = case lookupCtxtExact n (idris_callgraph i) of Just v -> return f { ibc_cg = (n,v) : ibc_cg f } _ -> ifail "IBC write failed"
196
false
false
1
12
82
81
37
44
null
null
olsner/ghc
testsuite/tests/simplCore/should_run/T7611.hs
bsd-3-clause
mapLamId = myMap (\x -> x)
26
mapLamId = myMap (\x -> x)
26
mapLamId = myMap (\x -> x)
26
false
false
0
7
5
17
9
8
null
null
eb-gh-cr/XMonadContrib1
XMonad/Actions/Search.hs
bsd-3-clause
escape :: String -> String escape = concatMap escapeURIChar
59
escape :: String -> String escape = concatMap escapeURIChar
59
escape = concatMap escapeURIChar
32
false
true
0
5
8
18
9
9
null
null
f-me/snap-core
test/suite/Snap/Iteratee/Tests.hs
bsd-3-clause
testKillIfTooSlow2 :: Test testKillIfTooSlow2 = testCase "iteratee/killIfTooSlow2" $ do -- 10 bytes per second, minimum run 2 seconds let iter = killIfTooSlow (return ()) 10 2 consume m <- liftM S.concat $ run_ $ tooSlowEnum 3 $$ iter H.assertEqual "testKillIfTooSlow2" (S.replicate 300 'f') m -------...
391
testKillIfTooSlow2 :: Test testKillIfTooSlow2 = testCase "iteratee/killIfTooSlow2" $ do -- 10 bytes per second, minimum run 2 seconds let iter = killIfTooSlow (return ()) 10 2 consume m <- liftM S.concat $ run_ $ tooSlowEnum 3 $$ iter H.assertEqual "testKillIfTooSlow2" (S.replicate 300 'f') m -------...
391
testKillIfTooSlow2 = testCase "iteratee/killIfTooSlow2" $ do -- 10 bytes per second, minimum run 2 seconds let iter = killIfTooSlow (return ()) 10 2 consume m <- liftM S.concat $ run_ $ tooSlowEnum 3 $$ iter H.assertEqual "testKillIfTooSlow2" (S.replicate 300 'f') m ----------------------------------...
364
false
true
0
14
63
95
45
50
null
null
urbanslug/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
runPhase (RealPhase LlvmMangle) input_fn dflags = do let next_phase = if gopt Opt_SplitObjs dflags then Splitter else As False output_fn <- phaseOutputFilename next_phase liftIO $ llvmFixupAsm dflags input_fn output_fn return (RealPhase next_phase, output_fn) ---------------------------------...
389
runPhase (RealPhase LlvmMangle) input_fn dflags = do let next_phase = if gopt Opt_SplitObjs dflags then Splitter else As False output_fn <- phaseOutputFilename next_phase liftIO $ llvmFixupAsm dflags input_fn output_fn return (RealPhase next_phase, output_fn) ---------------------------------...
389
runPhase (RealPhase LlvmMangle) input_fn dflags = do let next_phase = if gopt Opt_SplitObjs dflags then Splitter else As False output_fn <- phaseOutputFilename next_phase liftIO $ llvmFixupAsm dflags input_fn output_fn return (RealPhase next_phase, output_fn) ---------------------------------...
389
false
false
0
11
65
87
40
47
null
null
DaMSL/K3
src/Language/K3/Analysis/SEffects/Inference.hs
apache-2.0
fimemeM :: Identifier -> FInfM Bool fimemeM n = get >>= liftExceptM . flip fimeme n
83
fimemeM :: Identifier -> FInfM Bool fimemeM n = get >>= liftExceptM . flip fimeme n
83
fimemeM n = get >>= liftExceptM . flip fimeme n
47
false
true
0
6
15
34
16
18
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxFONTENCODING_MAX :: Int wxFONTENCODING_MAX = 36
49
wxFONTENCODING_MAX :: Int wxFONTENCODING_MAX = 36
49
wxFONTENCODING_MAX = 36
23
false
true
0
4
5
11
6
5
null
null
olsner/ghc
compiler/typecheck/TcBinds.hs
bsd-3-clause
tcBindGroups :: TopLevelFlag -> TcSigFun -> TcPragEnv -> [(RecFlag, LHsBinds Name)] -> TcM thing -> TcM ([(RecFlag, LHsBinds TcId)], thing) -- Typecheck a whole lot of value bindings, -- one strongly-connected component at a time -- Here a "strongly connected component" has the strightforward ...
529
tcBindGroups :: TopLevelFlag -> TcSigFun -> TcPragEnv -> [(RecFlag, LHsBinds Name)] -> TcM thing -> TcM ([(RecFlag, LHsBinds TcId)], thing) tcBindGroups _ _ _ [] thing_inside = do { thing <- thing_inside ; return ([], thing) }
263
tcBindGroups _ _ _ [] thing_inside = do { thing <- thing_inside ; return ([], thing) }
97
true
true
0
14
117
109
60
49
null
null
kfiz/IHaskell
src/IHaskell/Convert/IpynbToLhs.hs
mit
toStr _ = Nothing
17
toStr _ = Nothing
17
toStr _ = Nothing
17
false
false
0
5
3
9
4
5
null
null
michalkonecny/aern2
aern2-mp/src/AERN2/MP/Float/Arithmetic.hs
bsd-3-clause
unaryCEDU :: (MPFloat -> MPFloat) -> (MPFloat -> BoundsCEDU MPFloat) unaryCEDU op x = getBoundsCEDU $ op x
118
unaryCEDU :: (MPFloat -> MPFloat) -> (MPFloat -> BoundsCEDU MPFloat) unaryCEDU op x = getBoundsCEDU $ op x
118
unaryCEDU op x = getBoundsCEDU $ op x
41
false
true
0
8
29
44
22
22
null
null
np/lens
src/Control/Parallel/Strategies/Lens.hs
bsd-3-clause
parOf l s = l (rparWith s)
26
parOf l s = l (rparWith s)
26
parOf l s = l (rparWith s)
26
false
false
1
7
6
25
9
16
null
null
tsahyt/clingo-haskell
src/Clingo/Internal/AST.hs
mit
freeStatement (AstStmtEdge l x) = freeRawLocation l >> freeIndirection x freeEdge
86
freeStatement (AstStmtEdge l x) = freeRawLocation l >> freeIndirection x freeEdge
86
freeStatement (AstStmtEdge l x) = freeRawLocation l >> freeIndirection x freeEdge
86
false
false
0
7
15
29
13
16
null
null
ihc/futhark
src/Futhark/Pass/ExplicitAllocations.hs
isc
memoryInRetType :: [RetType Kernels] -> [RetType ExplicitMemory] memoryInRetType ts = evalState (mapM addAttr ts) $ startOfFreeIDRange ts where addAttr (Prim t) = return $ MemPrim t addAttr Mem{} = fail "memoryInRetType: too much memory" addAttr (Array bt shape u) = do i <- get <* modify (+2...
573
memoryInRetType :: [RetType Kernels] -> [RetType ExplicitMemory] memoryInRetType ts = evalState (mapM addAttr ts) $ startOfFreeIDRange ts where addAttr (Prim t) = return $ MemPrim t addAttr Mem{} = fail "memoryInRetType: too much memory" addAttr (Array bt shape u) = do i <- get <* modify (+2...
573
memoryInRetType ts = evalState (mapM addAttr ts) $ startOfFreeIDRange ts where addAttr (Prim t) = return $ MemPrim t addAttr Mem{} = fail "memoryInRetType: too much memory" addAttr (Array bt shape u) = do i <- get <* modify (+2) return $ MemArray bt shape u $ ReturnsNewBlock Defaul...
508
false
true
1
13
150
240
110
130
null
null
beni55/hermit
src/HERMIT/Kure.hs
bsd-2-clause
-- | Rewrite one child of an expression of the form: @Case@ 'CoreExpr' 'Id' 'Type' ['CoreAlt'] caseOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> Rewrite c m CoreAlt) -> Rew...
448
caseOneR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr -> Rewrite c m Id -> Rewrite c m Type -> (Int -> Rewrite c m CoreAlt) -> Rewrite c m CoreExpr caseOneR re rw rty ralts = unwrapOneR $ caseAllR (wrapOneR re) (wrapOneR rw) ...
353
caseOneR re rw rty ralts = unwrapOneR $ caseAllR (wrapOneR re) (wrapOneR rw) (wrapOneR rty) (wrapOneR . ralts)
110
true
true
0
12
117
148
73
75
null
null
whittle/bounty
test/Tests/Command.hs
mit
test_replace = [ testCase "with existing key" $ do s <- setState [("foo", Record 13 Nothing 0 "bar")] msg <- apply (Replace "foo" 21 0 True "baz") settings s msg @?= Just "STORED\r\n" assertState s [("foo", Record 21 Nothing 0 "baz")] , testCase "without existing key" $ do s <- se...
620
test_replace = [ testCase "with existing key" $ do s <- setState [("foo", Record 13 Nothing 0 "bar")] msg <- apply (Replace "foo" 21 0 True "baz") settings s msg @?= Just "STORED\r\n" assertState s [("foo", Record 21 Nothing 0 "baz")] , testCase "without existing key" $ do s <- se...
620
test_replace = [ testCase "with existing key" $ do s <- setState [("foo", Record 13 Nothing 0 "bar")] msg <- apply (Replace "foo" 21 0 True "baz") settings s msg @?= Just "STORED\r\n" assertState s [("foo", Record 21 Nothing 0 "baz")] , testCase "without existing key" $ do s <- se...
620
false
false
1
14
188
249
113
136
null
null
jabaraster/jabara-yesod-auth-freeaccount
src/Jabara/Yesod/Auth/FreeAccount/Message.hs
mit
englishAccountMsg MsgEmailVerified = "Your email has been verified."
68
englishAccountMsg MsgEmailVerified = "Your email has been verified."
68
englishAccountMsg MsgEmailVerified = "Your email has been verified."
68
false
false
0
4
7
10
4
6
null
null
tjakway/ghcjvm
compiler/prelude/PrelNames.hs
bsd-3-clause
uFloatTyConKey = mkPreludeTyConUnique 161
42
uFloatTyConKey = mkPreludeTyConUnique 161
42
uFloatTyConKey = mkPreludeTyConUnique 161
42
false
false
0
5
4
9
4
5
null
null
rdnetto/persistent
persistent-sqlite/Database/Sqlite.hs
mit
decodeError 8 = ErrorReadOnly
29
decodeError 8 = ErrorReadOnly
29
decodeError 8 = ErrorReadOnly
29
false
false
1
5
3
13
4
9
null
null
christiaanb/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
{- ************************************************************************ * * \subsection[TysWiredIn-Bool]{The @Bool@ type} * * ****************************************************...
1,828
boolTy :: Type boolTy = mkTyConTy boolTyCon
43
boolTy = mkTyConTy boolTyCon
28
true
true
0
6
453
22
9
13
null
null
kazu-yamamoto/llrbtree
Data/Set/BUSplay.hs
bsd-3-clause
{-| See if the splay set is empty. >>> Data.Set.BUSplay.null empty True >>> Data.Set.BUSplay.null (singleton 1) False -} null :: Splay a -> Bool null Leaf = True
163
null :: Splay a -> Bool null Leaf = True
40
null Leaf = True
16
true
true
0
6
29
22
11
11
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\xF99C' = "\x5217"
33
decomposeChar '\xF99C' = "\x5217"
33
decomposeChar '\xF99C' = "\x5217"
33
false
false
0
4
3
10
4
6
null
null
brendanhay/gogol
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/Testers/Patch.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). etpUploadProtocol :: Lens' EditsTestersPatch (Maybe Text) etpUploadProtocol = lens _etpUploadProtocol (\ s a -> s{_etpUploadProtocol = a})
208
etpUploadProtocol :: Lens' EditsTestersPatch (Maybe Text) etpUploadProtocol = lens _etpUploadProtocol (\ s a -> s{_etpUploadProtocol = a})
146
etpUploadProtocol = lens _etpUploadProtocol (\ s a -> s{_etpUploadProtocol = a})
88
true
true
0
9
33
48
25
23
null
null
olsner/sedition
Bus.hs
mit
-- | Wait for the bus to arrive, but don't ride it. wait :: Passenger a -> IO () wait (Passenger v) = readMVar v >> return ()
125
wait :: Passenger a -> IO () wait (Passenger v) = readMVar v >> return ()
73
wait (Passenger v) = readMVar v >> return ()
44
true
true
0
7
27
45
21
24
null
null
ghc-android/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
copyFileVerbose :: Verbosity -> FilePath -> FilePath -> IO () copyFileVerbose verbosity src dest = do info verbosity ("copy " ++ src ++ " to " ++ dest) copyFile src dest -- | Install an ordinary file. This is like a file copy but the permissions -- are set appropriately for an installed file. On Unix it is \"-rw-r...
408
copyFileVerbose :: Verbosity -> FilePath -> FilePath -> IO () copyFileVerbose verbosity src dest = do info verbosity ("copy " ++ src ++ " to " ++ dest) copyFile src dest -- | Install an ordinary file. This is like a file copy but the permissions -- are set appropriately for an installed file. On Unix it is \"-rw-r...
408
copyFileVerbose verbosity src dest = do info verbosity ("copy " ++ src ++ " to " ++ dest) copyFile src dest -- | Install an ordinary file. This is like a file copy but the permissions -- are set appropriately for an installed file. On Unix it is \"-rw-r--r--\" -- while on Windows it uses the default permissions fo...
346
false
true
0
11
77
70
35
35
null
null
ademinn/JavaWithClasses
src/Type.hs
bsd-3-clause
cast (PrimaryType _) _ = False
30
cast (PrimaryType _) _ = False
30
cast (PrimaryType _) _ = False
30
false
false
1
6
5
18
8
10
null
null
vkomenda/CoALP
lib/CoALP/Clause.hs
lgpl-3.0
goalHead :: Term1 goalHead = Fun "?" []
39
goalHead :: Term1 goalHead = Fun "?" []
39
goalHead = Fun "?" []
21
false
true
0
6
7
18
9
9
null
null
FranklinChen/hugs98-plus-Sep2006
packages/fgl/Data/Graph/Inductive/Graph.hs
bsd-3-clause
-- | The label in a 'Context'. lab' :: Context a b -> a lab' (_,_,l,_) = l
74
lab' :: Context a b -> a lab' (_,_,l,_) = l
43
lab' (_,_,l,_) = l
18
true
true
0
6
17
36
20
16
null
null
sonyandy/logicst
benchmarks/unify.hs
bsd-3-clause
coffee = pure $ embed Coffee
28
coffee = pure $ embed Coffee
28
coffee = pure $ embed Coffee
28
false
false
0
6
5
13
6
7
null
null
DataStewardshipPortal/ds-form-engine
JQuery.hs
apache-2.0
setClickHandler :: Handler -> JQuery -> IO JQuery setClickHandler ev jq = inside jq >>= onClick ev >>= parent
109
setClickHandler :: Handler -> JQuery -> IO JQuery setClickHandler ev jq = inside jq >>= onClick ev >>= parent
109
setClickHandler ev jq = inside jq >>= onClick ev >>= parent
59
false
true
0
7
18
41
19
22
null
null
manyoo/reflex-dom
src/Reflex/Dom/Old.hs
bsd-3-clause
nodeClear :: IsNode self => self -> IO () nodeClear n = do mfc <- getFirstChild n case mfc of Nothing -> return () Just fc -> do _ <- removeChild n $ Just fc nodeClear n
193
nodeClear :: IsNode self => self -> IO () nodeClear n = do mfc <- getFirstChild n case mfc of Nothing -> return () Just fc -> do _ <- removeChild n $ Just fc nodeClear n
193
nodeClear n = do mfc <- getFirstChild n case mfc of Nothing -> return () Just fc -> do _ <- removeChild n $ Just fc nodeClear n
151
false
true
0
14
60
90
39
51
null
null
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/ServiceNetworking/Types/Product.hs
mpl-2.0
-- | The field JSON name. fJSONName :: Lens' Field (Maybe Text) fJSONName = lens _fJSONName (\ s a -> s{_fJSONName = a})
122
fJSONName :: Lens' Field (Maybe Text) fJSONName = lens _fJSONName (\ s a -> s{_fJSONName = a})
96
fJSONName = lens _fJSONName (\ s a -> s{_fJSONName = a})
58
true
true
0
9
24
48
25
23
null
null
b0oh/bander-api
app/Main.hs
isc
main :: IO () main = do config <- loadConfig pool <- createPool (subconfig "db" config) runDb pool runMigrations runApi (subconfig "api" config) pool
157
main :: IO () main = do config <- loadConfig pool <- createPool (subconfig "db" config) runDb pool runMigrations runApi (subconfig "api" config) pool
157
main = do config <- loadConfig pool <- createPool (subconfig "db" config) runDb pool runMigrations runApi (subconfig "api" config) pool
143
false
true
0
11
31
71
30
41
null
null
peter-fogg/pardoc
src/Text/Pandoc/Templates.hs
gpl-2.0
multiLookup :: [Text] -> Value -> Maybe Value multiLookup [] x = Just x
71
multiLookup :: [Text] -> Value -> Maybe Value multiLookup [] x = Just x
71
multiLookup [] x = Just x
25
false
true
0
7
13
35
17
18
null
null
NorfairKing/the-notes
src/NumberTheory/Macro.hs
gpl-2.0
-- | Coprime copr :: Note -> Note -> Note copr = binop $ comm0 "bot"
68
copr :: Note -> Note -> Note copr = binop $ comm0 "bot"
55
copr = binop $ comm0 "bot"
26
true
true
0
6
15
27
14
13
null
null
keithodulaigh/Hets
utils/DtdToHaskell-src/pre-1.22/TypeDef.hs
gpl-2.0
ppST (OneOf sts) = parens (text "OneOf" <> text (show (length sts)) <+> hsep (map ppST sts))
119
ppST (OneOf sts) = parens (text "OneOf" <> text (show (length sts)) <+> hsep (map ppST sts))
119
ppST (OneOf sts) = parens (text "OneOf" <> text (show (length sts)) <+> hsep (map ppST sts))
119
false
false
0
13
43
59
27
32
null
null