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
janschulz/pandoc
src/Text/Pandoc/Readers/MediaWiki.hs
gpl-2.0
doubleQuotes :: MWParser Inlines doubleQuotes = B.doubleQuoted . trimInlines . mconcat <$> try ((getState >>= guard . readerSmart . mwOptions) *> openDoubleQuote *> manyTill inline closeDoubleQuote ) where openDoubleQuote = char '"' <* lookAhead alphaNum closeDoubleQuote = char '"' <* notFollowedBy al...
326
doubleQuotes :: MWParser Inlines doubleQuotes = B.doubleQuoted . trimInlines . mconcat <$> try ((getState >>= guard . readerSmart . mwOptions) *> openDoubleQuote *> manyTill inline closeDoubleQuote ) where openDoubleQuote = char '"' <* lookAhead alphaNum closeDoubleQuote = char '"' <* notFollowedBy al...
326
doubleQuotes = B.doubleQuoted . trimInlines . mconcat <$> try ((getState >>= guard . readerSmart . mwOptions) *> openDoubleQuote *> manyTill inline closeDoubleQuote ) where openDoubleQuote = char '"' <* lookAhead alphaNum closeDoubleQuote = char '"' <* notFollowedBy alphaNum
293
false
true
1
11
59
95
46
49
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GLU/Quadrics.hs
bsd-3-clause
renderPrimitive quadricObj (Cylinder b t h s n) = gluCylinder quadricObj b t h s n
85
renderPrimitive quadricObj (Cylinder b t h s n) = gluCylinder quadricObj b t h s n
85
renderPrimitive quadricObj (Cylinder b t h s n) = gluCylinder quadricObj b t h s n
85
false
false
0
7
18
38
18
20
null
null
charlesrosenbauer/Bzo-Compiler
src/BzoParserRules.hs
gpl-3.0
parserIter fname tokens ((BzS_Token _ (TkNewline _)) :x@(BzS_PolyHead p0 xs):stk) = parserIter fname tokens (x:stk)
158
parserIter fname tokens ((BzS_Token _ (TkNewline _)) :x@(BzS_PolyHead p0 xs):stk) = parserIter fname tokens (x:stk)
158
parserIter fname tokens ((BzS_Token _ (TkNewline _)) :x@(BzS_PolyHead p0 xs):stk) = parserIter fname tokens (x:stk)
158
false
false
0
11
57
63
32
31
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/lab6.hs
unlicense
e21 :: [Test] e21 = U.t "e21" ex21 82
52
e21 :: [Test] e21 = U.t "e21" ex21 82
52
e21 = U.t "e21" ex21 82
38
false
true
1
6
23
26
12
14
null
null
feliposz/learning-stuff
haskell/c9lectures-ch9.hs
mit
example1 = do s <- fsGetLine fsPutStrLn s {------------------------------- Hangman one player types secret word the other player enters a sequence of guesses for each guess, the computer says which letter in the secret word occur in the guess(?) --------------------------------} -- Hugs originaly had a...
522
example1 = do s <- fsGetLine fsPutStrLn s {------------------------------- Hangman one player types secret word the other player enters a sequence of guesses for each guess, the computer says which letter in the secret word occur in the guess(?) --------------------------------} -- Hugs originaly had a...
522
example1 = do s <- fsGetLine fsPutStrLn s {------------------------------- Hangman one player types secret word the other player enters a sequence of guesses for each guess, the computer says which letter in the secret word occur in the guess(?) --------------------------------} -- Hugs originaly had a...
522
false
false
1
8
92
27
12
15
null
null
alanz/Blobs
lib/DData/IntMap.hs
lgpl-2.1
unionWithKey f (Tip k x) t = insertWithKey f k x t
50
unionWithKey f (Tip k x) t = insertWithKey f k x t
50
unionWithKey f (Tip k x) t = insertWithKey f k x t
50
false
false
1
6
11
35
14
21
null
null
ThoughtLeadr/neo4j-haskell-http-client
src/Database/Neo4j/Node.hs
bsd-3-clause
nodeFromResponseBody body = do case Attoparsec.parse json body of Attoparsec.Done _ r -> case fromJSON r of Error err -> Nothing Success n@(Node {..}) -> Just n Attoparsec.Fail _ _ _ -> Nothing
237
nodeFromResponseBody body = do case Attoparsec.parse json body of Attoparsec.Done _ r -> case fromJSON r of Error err -> Nothing Success n@(Node {..}) -> Just n Attoparsec.Fail _ _ _ -> Nothing
237
nodeFromResponseBody body = do case Attoparsec.parse json body of Attoparsec.Done _ r -> case fromJSON r of Error err -> Nothing Success n@(Node {..}) -> Just n Attoparsec.Fail _ _ _ -> Nothing
237
false
false
1
18
76
96
42
54
null
null
purebred-mua/purebred
src/Purebred/Types.hs
agpl-3.0
mvMailListOfAttachmentsKeybindings :: Lens' MailViewSettings [Keybinding 'ViewMail 'MailListOfAttachments] mvMailListOfAttachmentsKeybindings = lens _mvMailListOfAttachmentsKeybindings (\s x -> s { _mvMailListOfAttachmentsKeybindings = x })
240
mvMailListOfAttachmentsKeybindings :: Lens' MailViewSettings [Keybinding 'ViewMail 'MailListOfAttachments] mvMailListOfAttachmentsKeybindings = lens _mvMailListOfAttachmentsKeybindings (\s x -> s { _mvMailListOfAttachmentsKeybindings = x })
240
mvMailListOfAttachmentsKeybindings = lens _mvMailListOfAttachmentsKeybindings (\s x -> s { _mvMailListOfAttachmentsKeybindings = x })
133
false
true
0
9
19
51
27
24
null
null
nevrenato/Hets_Fork
OWL2/Function.hs
gpl-2.0
maybeDo :: (Function a) => Action -> AMap -> Maybe a -> Maybe a maybeDo t mp = fmap $ function t mp
99
maybeDo :: (Function a) => Action -> AMap -> Maybe a -> Maybe a maybeDo t mp = fmap $ function t mp
99
maybeDo t mp = fmap $ function t mp
35
false
true
2
10
22
57
26
31
null
null
gdevanla/scotty-from-ground-up
app/Main3.hs
bsd-3-clause
cond :: Eq t => t -> t -> Bool cond condition_str = f where f i = i == condition_str
86
cond :: Eq t => t -> t -> Bool cond condition_str = f where f i = i == condition_str
86
cond condition_str = f where f i = i == condition_str
55
false
true
2
9
22
56
23
33
null
null
mcschroeder/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
toIfaceCoercion (TransCo co1 co2) = IfaceTransCo (toIfaceCoercion co1) (toIfaceCoercion co2)
145
toIfaceCoercion (TransCo co1 co2) = IfaceTransCo (toIfaceCoercion co1) (toIfaceCoercion co2)
145
toIfaceCoercion (TransCo co1 co2) = IfaceTransCo (toIfaceCoercion co1) (toIfaceCoercion co2)
145
false
false
0
7
62
34
16
18
null
null
mainland/dph
dph-lifted-vseg/Data/Array/Parallel/Lifted/Combinators.hs
bsd-3-clause
mapPP_v :: (PA a, PA b) => (a :-> b) -> PArray a -> PArray b mapPP_v f as = PA.replicate (PA.length as) f $:^ as
130
mapPP_v :: (PA a, PA b) => (a :-> b) -> PArray a -> PArray b mapPP_v f as = PA.replicate (PA.length as) f $:^ as
130
mapPP_v f as = PA.replicate (PA.length as) f $:^ as
61
false
true
0
9
43
71
35
36
null
null
dschoepe/tud-mensa
TUDMensa.hs
bsd-3-clause
-- | Retrieve and parse menu for current week getMenu :: Date -> Location -> IO WeekMenu getMenu = (.) (fmap parseWeek) . getWeekly
131
getMenu :: Date -> Location -> IO WeekMenu getMenu = (.) (fmap parseWeek) . getWeekly
85
getMenu = (.) (fmap parseWeek) . getWeekly
42
true
true
0
8
23
38
20
18
null
null
yliu120/K3
src/Language/K3/Analysis/Provenance/Inference.hs
apache-2.0
{- Analysis entry point -} inferProgramProvenance :: K3 Declaration -> Either String (K3 Declaration, PIEnv) inferProgramProvenance prog = do lcenv <- lambdaClosures prog liftEitherTM $ runPInfE (pienv0 lcenv) $ doInference prog where liftEitherTM = either (Left . T.unpack) Right doInference p = do ...
882
inferProgramProvenance :: K3 Declaration -> Either String (K3 Declaration, PIEnv) inferProgramProvenance prog = do lcenv <- lambdaClosures prog liftEitherTM $ runPInfE (pienv0 lcenv) $ doInference prog where liftEitherTM = either (Left . T.unpack) Right doInference p = do np <- globalsProv p ...
855
inferProgramProvenance prog = do lcenv <- lambdaClosures prog liftEitherTM $ runPInfE (pienv0 lcenv) $ doInference prog where liftEitherTM = either (Left . T.unpack) Right doInference p = do np <- globalsProv p np' <- mapExpression inferExprProvenance np np'' <- simplifyProgramProve...
773
true
true
8
11
182
227
108
119
null
null
enolan/whiteout
src/Test/Network/BitTorrent/Whiteout.hs
bsd-3-clause
verifyMultiFileShouldSucceed :: Assertion verifyMultiFileShouldSucceed = verifyGeneric "test-data/larry lessig - code v2.torrent" "test-data/Larry Lessig - Code V2" True
181
verifyMultiFileShouldSucceed :: Assertion verifyMultiFileShouldSucceed = verifyGeneric "test-data/larry lessig - code v2.torrent" "test-data/Larry Lessig - Code V2" True
181
verifyMultiFileShouldSucceed = verifyGeneric "test-data/larry lessig - code v2.torrent" "test-data/Larry Lessig - Code V2" True
139
false
true
0
4
28
20
9
11
null
null
zenhack/haskell-capnp
tests/Util.hs
mit
interactCapnpWithSchema :: String -> String -> LBS.ByteString -> [String] -> ResourceT IO (ExitCode, LBS.ByteString, LBS.ByteString) interactCapnpWithSchema subCommand msgSchema stdInBytes args = do let writeTempFile = runResourceT $ do (_, (path, hndl)) <- allocate (openTempFile "/tmp" ...
774
interactCapnpWithSchema :: String -> String -> LBS.ByteString -> [String] -> ResourceT IO (ExitCode, LBS.ByteString, LBS.ByteString) interactCapnpWithSchema subCommand msgSchema stdInBytes args = do let writeTempFile = runResourceT $ do (_, (path, hndl)) <- allocate (openTempFile "/tmp" ...
774
interactCapnpWithSchema subCommand msgSchema stdInBytes args = do let writeTempFile = runResourceT $ do (_, (path, hndl)) <- allocate (openTempFile "/tmp" "schema.capnp") (\(_, hndl) -> hClose hndl) lift $ hPutStr hndl msgSchema return path sch...
641
false
true
0
17
174
191
98
93
null
null
SimSaladin/haikubot
Tavutus.hs
bsd-3-clause
sana :: Parser Sana sana = concat <$> sequence [ pure <$> tavuFirst , (concat <$>) . many . try $ sequence [tavuNth, tavuFirst] , many tavuNth ]
168
sana :: Parser Sana sana = concat <$> sequence [ pure <$> tavuFirst , (concat <$>) . many . try $ sequence [tavuNth, tavuFirst] , many tavuNth ]
168
sana = concat <$> sequence [ pure <$> tavuFirst , (concat <$>) . many . try $ sequence [tavuNth, tavuFirst] , many tavuNth ]
148
false
true
2
10
51
69
34
35
null
null
ribag/ganeti-experiments
src/Ganeti/Query/Node.hs
gpl-2.0
nodeLiveFieldExtract "cnodes" res = jsonHead (rpcResNodeInfoHvInfo res) hvInfoCpuNodes
88
nodeLiveFieldExtract "cnodes" res = jsonHead (rpcResNodeInfoHvInfo res) hvInfoCpuNodes
88
nodeLiveFieldExtract "cnodes" res = jsonHead (rpcResNodeInfoHvInfo res) hvInfoCpuNodes
88
false
false
0
7
9
22
10
12
null
null
rootzlevel/hledger-add
src/Model.hs
bsd-3-clause
context _ _ _ _ (FinalQuestion _ _) = return []
48
context _ _ _ _ (FinalQuestion _ _) = return []
48
context _ _ _ _ (FinalQuestion _ _) = return []
48
false
false
0
7
11
30
14
16
null
null
yoo-e/yesod-helpers
Yesod/Helpers/Form.hs
bsd-3-clause
encodedListTextareaField :: ( Monad m , RenderMessage (HandlerSite m) msg , RenderMessage (HandlerSite m) FormMessage ) => (Parsec Text () b, Text) -- ^ separator: parser and its 'standard' representation ...
1,032
encodedListTextareaField :: ( Monad m , RenderMessage (HandlerSite m) msg , RenderMessage (HandlerSite m) FormMessage ) => (Parsec Text () b, Text) -- ^ separator: parser and its 'standard' representation ...
1,024
encodedListTextareaField (p_sep, sep) (p, render) mk_msg = checkMMap f (Textarea . T.intercalate sep . map render) textareaField where f t = case parse (manySepEndBy p_sep p <* eof) "" (unTextarea t) of Left err -> return $ Left $ mk_msg $ show err Right x -> return $ Rig...
413
true
true
1
11
427
249
124
125
null
null
tonyday567/web-play
src/Web/Play/Css.hs
mit
cssPlay :: Css cssPlay = ".play" ? do fontSize (px 10) fontFamily ["Arial", "Helvetica"] [sansSerif] marginLeft (px 30) marginTop (px 12) marginBottom (px 12) "#spinner" ? marginLeft (px 6) ".btn" ? marginLeft (px 6) "#buttons" ? do marginTop (px 2) marginBottom (px 6) "#btnGo....
1,082
cssPlay :: Css cssPlay = ".play" ? do fontSize (px 10) fontFamily ["Arial", "Helvetica"] [sansSerif] marginLeft (px 30) marginTop (px 12) marginBottom (px 12) "#spinner" ? marginLeft (px 6) ".btn" ? marginLeft (px 6) "#buttons" ? do marginTop (px 2) marginBottom (px 6) "#btnGo....
1,082
cssPlay = ".play" ? do fontSize (px 10) fontFamily ["Arial", "Helvetica"] [sansSerif] marginLeft (px 30) marginTop (px 12) marginBottom (px 12) "#spinner" ? marginLeft (px 6) ".btn" ? marginLeft (px 6) "#buttons" ? do marginTop (px 2) marginBottom (px 6) "#btnGo.on" ? col...
1,067
false
true
0
14
350
455
191
264
null
null
akhileshs/stack
src/Stack/Constants.hs
bsd-3-clause
hpcDirFromDir :: (MonadThrow m, MonadReader env m, HasPlatform env, HasEnvConfig env) => Path Abs Dir -- ^ Package directory. -> m (Path Abs Dir) hpcDirFromDir fp = liftM (fp </>) hpcRelativeDir
211
hpcDirFromDir :: (MonadThrow m, MonadReader env m, HasPlatform env, HasEnvConfig env) => Path Abs Dir -- ^ Package directory. -> m (Path Abs Dir) hpcDirFromDir fp = liftM (fp </>) hpcRelativeDir
211
hpcDirFromDir fp = liftM (fp </>) hpcRelativeDir
52
false
true
0
10
47
77
38
39
null
null
sgillespie/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
isFunLike :: RuleMatchInfo -> Bool isFunLike FunLike = True
59
isFunLike :: RuleMatchInfo -> Bool isFunLike FunLike = True
59
isFunLike FunLike = True
24
false
true
0
7
8
24
10
14
null
null
ademinn/JavaWithClasses
src/Analyzer.hs
bsd-3-clause
findField :: (WithProgram s, MonadState s m) => ObjectType -> String -> m (Either String (Type, Int)) findField typeName fieldName = do cls <- findClass typeName return $ cls >>= \cls' -> do let mfl = List.find (\f -> varName f == fieldName) $ classFields cls' case mfl of Just fl -> ...
471
findField :: (WithProgram s, MonadState s m) => ObjectType -> String -> m (Either String (Type, Int)) findField typeName fieldName = do cls <- findClass typeName return $ cls >>= \cls' -> do let mfl = List.find (\f -> varName f == fieldName) $ classFields cls' case mfl of Just fl -> ...
471
findField typeName fieldName = do cls <- findClass typeName return $ cls >>= \cls' -> do let mfl = List.find (\f -> varName f == fieldName) $ classFields cls' case mfl of Just fl -> Right (varType fl, fromJust . List.elemIndex fl $ classFields cls') Nothing -> Left $ "cla...
369
false
true
0
19
125
186
90
96
null
null
ThoughtLeadr/TLDR-Client-Haskell
Network/TLDR/Client.hs
bsd-3-clause
getAd :: Client -> String -> IO (Either String Ad) getAd client adID = do timestamp <- fmap truncate getPOSIXTime let uri = buildURI client adID timestamp let auth = BSC.unpack $ Base16.encode $ hmac SHA256.hash 64 (privateKey client) (BSC.pack (uriPath uri ++ uriQuery uri)) let headers = [m...
864
getAd :: Client -> String -> IO (Either String Ad) getAd client adID = do timestamp <- fmap truncate getPOSIXTime let uri = buildURI client adID timestamp let auth = BSC.unpack $ Base16.encode $ hmac SHA256.hash 64 (privateKey client) (BSC.pack (uriPath uri ++ uriQuery uri)) let headers = [m...
864
getAd client adID = do timestamp <- fmap truncate getPOSIXTime let uri = buildURI client adID timestamp let auth = BSC.unpack $ Base16.encode $ hmac SHA256.hash 64 (privateKey client) (BSC.pack (uriPath uri ++ uriQuery uri)) let headers = [mkHeader HdrAuthorization auth] r <- tryHTTPRequ...
813
false
true
0
18
269
316
154
162
null
null
thoferon/cric
src/Cric/TypeDefs.hs
mit
traceLogger lvl msg = debugLogger lvl msg
43
traceLogger lvl msg = debugLogger lvl msg
43
traceLogger lvl msg = debugLogger lvl msg
43
false
false
0
5
8
16
7
9
null
null
urbanslug/ghc
compiler/parser/ApiAnnotation.hs
bsd-3-clause
getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment] getAnnotationComments (_,anns) span = case Map.lookup span anns of Just cs -> cs Nothing -> [] -- |Retrieve the comments allocated to the current 'SrcSpan', and -- remove them from the annotations
282
getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment] getAnnotationComments (_,anns) span = case Map.lookup span anns of Just cs -> cs Nothing -> [] -- |Retrieve the comments allocated to the current 'SrcSpan', and -- remove them from the annotations
282
getAnnotationComments (_,anns) span = case Map.lookup span anns of Just cs -> cs Nothing -> [] -- |Retrieve the comments allocated to the current 'SrcSpan', and -- remove them from the annotations
207
false
true
0
8
50
66
34
32
null
null
bitemyapp/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
andDollar = "$and"
18
andDollar = "$and"
18
andDollar = "$and"
18
false
false
1
5
2
10
3
7
null
null
phischu/fragnix
builtins/ghc-prim/GHC.Prim.hs
bsd-3-clause
double2Float# :: Double# -> Float# double2Float# = double2Float#
64
double2Float# :: Double# -> Float# double2Float# = double2Float#
64
double2Float# = double2Float#
29
false
true
0
5
7
15
8
7
null
null
urv/fixhs
src/Data/FIX/Spec/FIX43.hs
lgpl-2.1
tMassCancelResponse :: FIXTag tMassCancelResponse = FIXTag { tName = "MassCancelResponse" , tnum = 531 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
183
tMassCancelResponse :: FIXTag tMassCancelResponse = FIXTag { tName = "MassCancelResponse" , tnum = 531 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
183
tMassCancelResponse = FIXTag { tName = "MassCancelResponse" , tnum = 531 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
153
false
true
0
10
38
51
29
22
null
null
patrickboe/artery
Box.hs
mit
area (Box (Point x1 y1) (Point x2 y2)) = (x2 - x1) * (y2 - y1)
62
area (Box (Point x1 y1) (Point x2 y2)) = (x2 - x1) * (y2 - y1)
62
area (Box (Point x1 y1) (Point x2 y2)) = (x2 - x1) * (y2 - y1)
62
false
false
0
9
15
51
26
25
null
null
ksaveljev/hake-2
src/Game/Monsters/MGladiator.hs
bsd-3-clause
gladiatorFramesStand :: V.Vector MFrameT gladiatorFramesStand = V.fromList [ MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Ju...
479
gladiatorFramesStand :: V.Vector MFrameT gladiatorFramesStand = V.fromList [ MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Ju...
479
gladiatorFramesStand = V.fromList [ MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing , MFrameT (Just GameAI.aiStand) 0 Nothing ...
438
false
true
0
10
158
153
74
79
null
null
bitemyapp/ganeti
src/Ganeti/HTools/Program/Hcheck.hs
bsd-2-clause
-- | Print all the statistics on a group level. printGroupStats :: Options -> Bool -> Phase -> GroupStats -> IO () printGroupStats opts machineread phase ((grp, score), stats) = do let values = prepareGroupValues stats score extradata = extractGroupData machineread grp printStats opts machineread (GroupLvl ex...
401
printGroupStats :: Options -> Bool -> Phase -> GroupStats -> IO () printGroupStats opts machineread phase ((grp, score), stats) = do let values = prepareGroupValues stats score extradata = extractGroupData machineread grp printStats opts machineread (GroupLvl extradata) phase values -- | Print all the statis...
353
printGroupStats opts machineread phase ((grp, score), stats) = do let values = prepareGroupValues stats score extradata = extractGroupData machineread grp printStats opts machineread (GroupLvl extradata) phase values -- | Print all the statistics on a cluster (global) level.
286
true
true
0
10
70
99
50
49
null
null
mrakgr/futhark
src/Futhark/CodeGen/Backends/SimpleRepresentation.hs
bsd-3-clause
sameRepresentation' (Mem _ space1) (Mem _ space2) = space1 == space2
68
sameRepresentation' (Mem _ space1) (Mem _ space2) = space1 == space2
68
sameRepresentation' (Mem _ space1) (Mem _ space2) = space1 == space2
68
false
false
0
7
10
35
16
19
null
null
philipcraig/hutton
src/Exercises/ChapterOneToFive.hs
bsd-3-clause
_ch2_ex3 :: Int _ch2_ex3 = a `div` length xs where a = 10 xs = [1, 2, 3, 4, 5] :: [Int]
97
_ch2_ex3 :: Int _ch2_ex3 = a `div` length xs where a = 10 xs = [1, 2, 3, 4, 5] :: [Int]
97
_ch2_ex3 = a `div` length xs where a = 10 xs = [1, 2, 3, 4, 5] :: [Int]
81
false
true
0
6
31
54
32
22
null
null
mcschroeder/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
int64PrimTyCon :: TyCon int64PrimTyCon = pcPrimTyCon0 int64PrimTyConName Int64Rep
82
int64PrimTyCon :: TyCon int64PrimTyCon = pcPrimTyCon0 int64PrimTyConName Int64Rep
82
int64PrimTyCon = pcPrimTyCon0 int64PrimTyConName Int64Rep
58
false
true
0
5
8
16
8
8
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | URL of this landing page. This is a required field. lpURL :: Lens' LandingPage (Maybe Text) lpURL = lens _lpURL (\ s a -> s{_lpURL = a})
141
lpURL :: Lens' LandingPage (Maybe Text) lpURL = lens _lpURL (\ s a -> s{_lpURL = a})
84
lpURL = lens _lpURL (\ s a -> s{_lpURL = a})
44
true
true
1
9
28
51
25
26
null
null
diagrams/potrace-diagrams
examples/colours.hs
gpl-2.0
fromColourImage :: (Colour Double -> Bool) -> Image PixelRGBA8 -> Bitmap fromColourImage f img@(Image w h _) = generate w h $ \i j -> f . rgb8ToColour $ pixelAt img i (h - j - 1)
180
fromColourImage :: (Colour Double -> Bool) -> Image PixelRGBA8 -> Bitmap fromColourImage f img@(Image w h _) = generate w h $ \i j -> f . rgb8ToColour $ pixelAt img i (h - j - 1)
180
fromColourImage f img@(Image w h _) = generate w h $ \i j -> f . rgb8ToColour $ pixelAt img i (h - j - 1)
107
false
true
0
11
38
92
46
46
null
null
gallais/typing-with-leftovers
src/linear/Surface/Parser.hs
gpl-3.0
pRCut :: Parser RInfer pRCut = Cut <$> (string "(" *> betweenSpace pRCheck) <*> (string ":" *> betweenSpace pRType <* string ")")
141
pRCut :: Parser RInfer pRCut = Cut <$> (string "(" *> betweenSpace pRCheck) <*> (string ":" *> betweenSpace pRType <* string ")")
141
pRCut = Cut <$> (string "(" *> betweenSpace pRCheck) <*> (string ":" *> betweenSpace pRType <* string ")")
118
false
true
5
9
33
65
29
36
null
null
freizl/freizl.github.com-old
tests/Hakyll/Core/Rules/Tests.hs
bsd-3-clause
rules01 :: IORef Bool -> Rules () rules01 ioref = do -- Compile some posts match "*.md" $ do route $ setExtension "html" compile pandocCompiler -- Yeah. I don't know how else to test this stuff? preprocess $ writeIORef ioref True -- Compile them, raw match "*.md" $ version "raw...
807
rules01 :: IORef Bool -> Rules () rules01 ioref = do -- Compile some posts match "*.md" $ do route $ setExtension "html" compile pandocCompiler -- Yeah. I don't know how else to test this stuff? preprocess $ writeIORef ioref True -- Compile them, raw match "*.md" $ version "raw...
807
rules01 ioref = do -- Compile some posts match "*.md" $ do route $ setExtension "html" compile pandocCompiler -- Yeah. I don't know how else to test this stuff? preprocess $ writeIORef ioref True -- Compile them, raw match "*.md" $ version "raw" $ do route idRoute ...
773
false
true
0
14
259
198
83
115
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/List.hs
mpl-2.0
-- | Creates a value of 'ContentCategoriesList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cclSearchString' -- -- * 'cclIds' -- -- * 'cclProFileId' -- -- * 'cclSortOrder' -- -- * 'cclPageToken' -- -- * 'cclSortField' -- -- * 'ccl...
712
contentCategoriesList :: Int64 -- ^ 'cclProFileId' -> ContentCategoriesList contentCategoriesList pCclProFileId_ = ContentCategoriesList' { _cclSearchString = Nothing , _cclIds = Nothing , _cclProFileId = _Coerce # pCclProFileId_ , _cclSortOrder = Nothing , _cclPageToken = Nothing , ...
380
contentCategoriesList pCclProFileId_ = ContentCategoriesList' { _cclSearchString = Nothing , _cclIds = Nothing , _cclProFileId = _Coerce # pCclProFileId_ , _cclSortOrder = Nothing , _cclPageToken = Nothing , _cclSortField = Nothing , _cclMaxResults = Nothing }
296
true
true
0
8
144
93
60
33
null
null
kindohm/tidal-midi-rack
Sound/Tidal/MIDI/Kindohm/CustomParams.hs
gpl-3.0
(egint, egint_p) = pF "egint" (Just 0.5)
40
(egint, egint_p) = pF "egint" (Just 0.5)
40
(egint, egint_p) = pF "egint" (Just 0.5)
40
false
false
0
7
6
24
12
12
null
null
kosmikus/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
defaultListFlags :: ListFlags defaultListFlags = ListFlags { listInstalled = Flag False, listSimpleOutput = Flag False, listVerbosity = toFlag normal, listPackageDBs = [] }
198
defaultListFlags :: ListFlags defaultListFlags = ListFlags { listInstalled = Flag False, listSimpleOutput = Flag False, listVerbosity = toFlag normal, listPackageDBs = [] }
198
defaultListFlags = ListFlags { listInstalled = Flag False, listSimpleOutput = Flag False, listVerbosity = toFlag normal, listPackageDBs = [] }
168
false
true
0
7
48
48
27
21
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo Int64SrlOp = mkGenPrimOp (fsLit "uncheckedIShiftRL64#") [] [int64PrimTy, intPrimTy] int64PrimTy
117
primOpInfo Int64SrlOp = mkGenPrimOp (fsLit "uncheckedIShiftRL64#") [] [int64PrimTy, intPrimTy] int64PrimTy
117
primOpInfo Int64SrlOp = mkGenPrimOp (fsLit "uncheckedIShiftRL64#") [] [int64PrimTy, intPrimTy] int64PrimTy
117
false
false
0
7
20
32
16
16
null
null
gergoerdi/brainfuck
language-registermachine/src/Language/RegisterMachine/Parser.hs
bsd-3-clause
arg = try int <|> sym where int = lexeme $ do s <- optionMaybe $ char '-' ds <- many1 digit let n = read ds :: Int n' = case s of Nothing -> n Just _ -> -n return $ Int n' sym = liftM Symbol symbol
304
arg = try int <|> sym where int = lexeme $ do s <- optionMaybe $ char '-' ds <- many1 digit let n = read ds :: Int n' = case s of Nothing -> n Just _ -> -n return $ Int n' sym = liftM Symbol symbol
304
arg = try int <|> sym where int = lexeme $ do s <- optionMaybe $ char '-' ds <- many1 digit let n = read ds :: Int n' = case s of Nothing -> n Just _ -> -n return $ Int n' sym = liftM Symbol symbol
304
false
false
5
15
156
122
53
69
null
null
piyush-kurur/yesod
yesod/Build.hs
mit
determineDeps :: FilePath -> IO [(ComparisonType, FilePath)] determineDeps x = do y <- TIO.readFile x -- FIXME catch IO exceptions let z = A.parse (many $ (parser <|> (A.anyChar >> return Nothing))) y case z of A.Fail{} -> return [] A.Done _ r -> mapM go r >>= filterM (doesFileExist . snd) ....
3,655
determineDeps :: FilePath -> IO [(ComparisonType, FilePath)] determineDeps x = do y <- TIO.readFile x -- FIXME catch IO exceptions let z = A.parse (many $ (parser <|> (A.anyChar >> return Nothing))) y case z of A.Fail{} -> return [] A.Done _ r -> mapM go r >>= filterM (doesFileExist . snd) ....
3,655
determineDeps x = do y <- TIO.readFile x -- FIXME catch IO exceptions let z = A.parse (many $ (parser <|> (A.anyChar >> return Nothing))) y case z of A.Fail{} -> return [] A.Done _ r -> mapM go r >>= filterM (doesFileExist . snd) . concat where go (Just (StaticFiles fp, _)) = map ((,) ...
3,594
false
true
28
30
1,246
1,302
655
647
null
null
frp-arduino/frp-arduino
src/Arduino/Nano.hs
gpl-3.0
analogRead :: AnalogInput -> Stream Word analogRead an = createInput (analogName an) (setBit "ADCSRA" "ADEN" $ setBit "ADMUX" "REFS0" $ setBit "ADCSRA" "ADPS2" $ setBit "ADCSRA" "ADPS1" $ setBit "ADCSRA" "ADPS0" $ end) ((if (testBit (mux an) 3) then setBit else clearBit) "ADMUX" "MU...
662
analogRead :: AnalogInput -> Stream Word analogRead an = createInput (analogName an) (setBit "ADCSRA" "ADEN" $ setBit "ADMUX" "REFS0" $ setBit "ADCSRA" "ADPS2" $ setBit "ADCSRA" "ADPS1" $ setBit "ADCSRA" "ADPS0" $ end) ((if (testBit (mux an) 3) then setBit else clearBit) "ADMUX" "MU...
662
analogRead an = createInput (analogName an) (setBit "ADCSRA" "ADEN" $ setBit "ADMUX" "REFS0" $ setBit "ADCSRA" "ADPS2" $ setBit "ADCSRA" "ADPS1" $ setBit "ADCSRA" "ADPS0" $ end) ((if (testBit (mux an) 3) then setBit else clearBit) "ADMUX" "MUX3" $ (if (testBit (mux an) 2) then ...
621
false
true
0
20
165
255
125
130
null
null
harendra-kumar/asyncly
src/Streamly/Internal/Data/Unfold.hs
bsd-3-clause
enumerateFromToIntegral :: (Monad m, Integral a) => a -> Unfold m a a enumerateFromToIntegral to = takeWhile (<= to) $ supplySecond enumerateFromStepIntegral 1
163
enumerateFromToIntegral :: (Monad m, Integral a) => a -> Unfold m a a enumerateFromToIntegral to = takeWhile (<= to) $ supplySecond enumerateFromStepIntegral 1
163
enumerateFromToIntegral to = takeWhile (<= to) $ supplySecond enumerateFromStepIntegral 1
93
false
true
0
7
26
56
28
28
null
null
erikd/yesod
yesod-core/Yesod/Core/Handler.hs
mit
msgKey :: Text msgKey = "_MSG"
30
msgKey :: Text msgKey = "_MSG"
30
msgKey = "_MSG"
15
false
true
0
4
5
11
6
5
null
null
betaveros/bcodex
Text/Bcodex/Alpha.hs
mit
isVowel :: Char -> Bool isVowel 'a' = True
42
isVowel :: Char -> Bool isVowel 'a' = True
42
isVowel 'a' = True
18
false
true
0
7
8
24
10
14
null
null
yyotti/99Haskell
src/main/Lists.hs
mit
{- - 3 Problem 3 - (*) Find the K'th element of a list. The first element in the list is number 1. - - Example in Haskell: - Prelude> elementAt [1,2,3] 2 - 2 - Prelude> elementAt "haskell" 5 - 'e' -} elementAt :: [a] -> Int -> a elementAt [] _ = error "list is empty"
289
elementAt :: [a] -> Int -> a elementAt [] _ = error "list is empty"
67
elementAt [] _ = error "list is empty"
38
true
true
0
6
79
33
17
16
null
null
PipocaQuemada/ermine
src/Ermine/Inference/Type.hs
bsd-2-clause
inferType d cxt (Term.Lam ps e) = do (skss, pts, ppts) <- unzip3 <$> traverse (inferPatternType d) ps let pcxt (ArgPP i pp) | Just f <- ppts ^? ix (fromIntegral i) = f pp pcxt _ = error "panic: bad argument reference in lambda term" Witness rcs t c <- inferTypeInScope (d+1) pcxt cxt e let cc = Pat...
561
inferType d cxt (Term.Lam ps e) = do (skss, pts, ppts) <- unzip3 <$> traverse (inferPatternType d) ps let pcxt (ArgPP i pp) | Just f <- ppts ^? ix (fromIntegral i) = f pp pcxt _ = error "panic: bad argument reference in lambda term" Witness rcs t c <- inferTypeInScope (d+1) pcxt cxt e let cc = Pat...
561
inferType d cxt (Term.Lam ps e) = do (skss, pts, ppts) <- unzip3 <$> traverse (inferPatternType d) ps let pcxt (ArgPP i pp) | Just f <- ppts ^? ix (fromIntegral i) = f pp pcxt _ = error "panic: bad argument reference in lambda term" Witness rcs t c <- inferTypeInScope (d+1) pcxt cxt e let cc = Pat...
561
false
false
0
17
124
253
117
136
null
null
notogawa/haskell-graceful-debian
src/System/Posix/Graceful/Worker.hs
bsd-3-clause
-- | Worker process action workerProcess :: GracefulWorker -> Socket -> IO () workerProcess GracefulWorker { gracefulWorkerInitialize = initialize , gracefulWorkerApplication = application , gracefulWorkerFinalize = finalize } sock =...
989
workerProcess :: GracefulWorker -> Socket -> IO () workerProcess GracefulWorker { gracefulWorkerInitialize = initialize , gracefulWorkerApplication = application , gracefulWorkerFinalize = finalize } sock = do void $ installHandler...
962
workerProcess GracefulWorker { gracefulWorkerInitialize = initialize , gracefulWorkerApplication = application , gracefulWorkerFinalize = finalize } sock = do void $ installHandler sigQUIT (CatchOnce $ close sock) Nothing count <...
911
true
true
2
17
335
288
133
155
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
isHruleChar :: Char -> Bool isHruleChar '*' = True
50
isHruleChar :: Char -> Bool isHruleChar '*' = True
50
isHruleChar '*' = True
22
false
true
0
7
8
24
10
14
null
null
nzok/decimal
FixedTest.hs
mit
ssGen :: Gen (Scale R) -- scale ssGen = choose (0,4) >>= (return . Scale)
74
ssGen :: Gen (Scale R) ssGen = choose (0,4) >>= (return . Scale)
64
ssGen = choose (0,4) >>= (return . Scale)
41
true
true
1
8
15
45
22
23
null
null
martinvlk/cabal
Cabal/Distribution/Simple/JHC.hs
bsd-3-clause
jhcLanguages :: [(Language, Flag)] jhcLanguages = [(Haskell98, "")]
67
jhcLanguages :: [(Language, Flag)] jhcLanguages = [(Haskell98, "")]
67
jhcLanguages = [(Haskell98, "")]
32
false
true
0
6
7
29
18
11
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionAutoscalers/Delete.hs
mpl-2.0
-- | Name of the autoscaler to delete. radAutoscaler :: Lens' RegionAutoscalersDelete Text radAutoscaler = lens _radAutoscaler (\ s a -> s{_radAutoscaler = a})
167
radAutoscaler :: Lens' RegionAutoscalersDelete Text radAutoscaler = lens _radAutoscaler (\ s a -> s{_radAutoscaler = a})
128
radAutoscaler = lens _radAutoscaler (\ s a -> s{_radAutoscaler = a})
76
true
true
0
9
31
42
22
20
null
null
rootzlevel/hledger-add
src/main/Main.hs
bsd-3-clause
setContext :: AppState -> IO AppState setContext as = do ctx <- flip listSimpleReplace (asContext as) . V.fromList <$> context (asJournal as) (asMatchAlgo as) (asDateFormat as) (editText as) (asStep as) return as { asContext = ctx }
245
setContext :: AppState -> IO AppState setContext as = do ctx <- flip listSimpleReplace (asContext as) . V.fromList <$> context (asJournal as) (asMatchAlgo as) (asDateFormat as) (editText as) (asStep as) return as { asContext = ctx }
245
setContext as = do ctx <- flip listSimpleReplace (asContext as) . V.fromList <$> context (asJournal as) (asMatchAlgo as) (asDateFormat as) (editText as) (asStep as) return as { asContext = ctx }
207
false
true
0
12
49
104
50
54
null
null
acowley/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
ppTyVar "o" = "openAlphaTyVar"
30
ppTyVar "o" = "openAlphaTyVar"
30
ppTyVar "o" = "openAlphaTyVar"
30
false
false
0
4
3
10
4
6
null
null
icetortoise/ftphs
src/Network/FTP/Server.hs
lgpl-2.1
s_crlf = "\r\n"
15
s_crlf = "\r\n"
15
s_crlf = "\r\n"
15
false
false
1
5
2
10
3
7
null
null
hamsal/DM-AtariAI
src/ConvolveGPU.hs
mit
conv4D :: T.Handle -> T.Handle -> RU.Array R.D R.DIM4 Float -> RU.Array R.D R.DIM4 Float -> Int -> IO (RU.Array R.D R.DIM4 Float) conv4D toC fromC !img !fltr !strd = do -- 1 x imageDepth x imageWidth x imageHeight let _:(!imgDpth):(!imgWdth):(!imgHght):_ = R.deepSeqArrays [img, fltr] ...
1,653
conv4D :: T.Handle -> T.Handle -> RU.Array R.D R.DIM4 Float -> RU.Array R.D R.DIM4 Float -> Int -> IO (RU.Array R.D R.DIM4 Float) conv4D toC fromC !img !fltr !strd = do -- 1 x imageDepth x imageWidth x imageHeight let _:(!imgDpth):(!imgWdth):(!imgHght):_ = R.deepSeqArrays [img, fltr] ...
1,653
conv4D toC fromC !img !fltr !strd = do -- 1 x imageDepth x imageWidth x imageHeight let _:(!imgDpth):(!imgWdth):(!imgHght):_ = R.deepSeqArrays [img, fltr] (reverse $ U.los $ R.e...
1,511
false
true
0
18
630
613
303
310
null
null
jfoutz/language-bash
src/Language/Bash/Parse/Builder.hs
bsd-3-clause
-- | Concat zero or more monoidal results. many :: (Alternative f, Monoid a) => f a -> f a many = fmap mconcat . Applicative.many
129
many :: (Alternative f, Monoid a) => f a -> f a many = fmap mconcat . Applicative.many
86
many = fmap mconcat . Applicative.many
38
true
true
0
7
25
46
23
23
null
null
andyarvanitis/Idris-dev
src/Idris/IdeSlave.hs
bsd-3-clause
encodeTerm :: [(Name, Bool)] -> Term -> String encodeTerm bnd tm = UTF8.toString . Base64.encode . Lazy.toStrict . Binary.encode $ (bnd, tm)
160
encodeTerm :: [(Name, Bool)] -> Term -> String encodeTerm bnd tm = UTF8.toString . Base64.encode . Lazy.toStrict . Binary.encode $ (bnd, tm)
160
encodeTerm bnd tm = UTF8.toString . Base64.encode . Lazy.toStrict . Binary.encode $ (bnd, tm)
113
false
true
0
9
41
63
34
29
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
1108 = 1107
11
1108 = 1107
11
1108 = 1107
11
false
false
1
5
2
10
3
7
null
null
bananu7/Turnip
src/Turnip/Eval/TH.hs
mit
genLibLoadFunction :: [Entry] -> Q [Dec] genLibLoadFunction entries = do let funs = ListE <$> mapM toModuleItem entries [d| loadBaseLibraryGen :: String -> Eval.LuaM () loadBaseLibraryGen modName = addNativeModule modName $(funs) |] where toModuleItem :: Entry -> Q Exp ...
527
genLibLoadFunction :: [Entry] -> Q [Dec] genLibLoadFunction entries = do let funs = ListE <$> mapM toModuleItem entries [d| loadBaseLibraryGen :: String -> Eval.LuaM () loadBaseLibraryGen modName = addNativeModule modName $(funs) |] where toModuleItem :: Entry -> Q Exp ...
527
genLibLoadFunction entries = do let funs = ListE <$> mapM toModuleItem entries [d| loadBaseLibraryGen :: String -> Eval.LuaM () loadBaseLibraryGen modName = addNativeModule modName $(funs) |] where toModuleItem :: Entry -> Q Exp toModuleItem (_, luaName, tempName, _)...
486
false
true
0
11
123
92
52
40
null
null
corajr/cataskell
src/Cataskell/GameData/Resources.hs
bsd-3-clause
genericHarborDiscount :: Int -> Set HarborDiscount genericHarborDiscount i = Set.fromList $ map (mkDiscount i) [Lumber, Wool, Wheat, Brick, Ore]
146
genericHarborDiscount :: Int -> Set HarborDiscount genericHarborDiscount i = Set.fromList $ map (mkDiscount i) [Lumber, Wool, Wheat, Brick, Ore]
146
genericHarborDiscount i = Set.fromList $ map (mkDiscount i) [Lumber, Wool, Wheat, Brick, Ore]
95
false
true
0
8
20
53
28
25
null
null
nushio3/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
addTickLCmdStmts' :: [LStmt Id (LHsCmd Id)] -> TM a -> TM ([LStmt Id (LHsCmd Id)], a) addTickLCmdStmts' lstmts res = bindLocals binders $ do lstmts' <- mapM (liftL addTickCmdStmt) lstmts a <- res return (lstmts', a) where binders = collectLStmtsBinders lstmts
295
addTickLCmdStmts' :: [LStmt Id (LHsCmd Id)] -> TM a -> TM ([LStmt Id (LHsCmd Id)], a) addTickLCmdStmts' lstmts res = bindLocals binders $ do lstmts' <- mapM (liftL addTickCmdStmt) lstmts a <- res return (lstmts', a) where binders = collectLStmtsBinders lstmts
295
addTickLCmdStmts' lstmts res = bindLocals binders $ do lstmts' <- mapM (liftL addTickCmdStmt) lstmts a <- res return (lstmts', a) where binders = collectLStmtsBinders lstmts
209
false
true
0
12
76
119
57
62
null
null
fmthoma/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isTypedBracket :: HsBracket id -> Bool isTypedBracket (TExpBr {}) = True
72
isTypedBracket :: HsBracket id -> Bool isTypedBracket (TExpBr {}) = True
72
isTypedBracket (TExpBr {}) = True
33
false
true
0
7
10
28
14
14
null
null
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/Network/Policy.hs
mit
defaultDequeuePolicyEdgeBehindNat :: DequeuePolicy defaultDequeuePolicyEdgeBehindNat = go where go :: DequeuePolicy go NodeCore = error "defaultDequeuePolicy: edge to core not applicable" go NodeRelay = Dequeue (MaxMsgPerSec 1) (MaxInFlight 2) go NodeEdge = error "defaultDequeuePolicy: edge to edge ...
382
defaultDequeuePolicyEdgeBehindNat :: DequeuePolicy defaultDequeuePolicyEdgeBehindNat = go where go :: DequeuePolicy go NodeCore = error "defaultDequeuePolicy: edge to core not applicable" go NodeRelay = Dequeue (MaxMsgPerSec 1) (MaxInFlight 2) go NodeEdge = error "defaultDequeuePolicy: edge to edge ...
382
defaultDequeuePolicyEdgeBehindNat = go where go :: DequeuePolicy go NodeCore = error "defaultDequeuePolicy: edge to core not applicable" go NodeRelay = Dequeue (MaxMsgPerSec 1) (MaxInFlight 2) go NodeEdge = error "defaultDequeuePolicy: edge to edge not applicable" -- | Dequeueing policy for the Aux...
331
false
true
3
7
67
65
33
32
null
null
anttisalonen/economics
src/Curve.hs
mit
lookupY' (QuadraticFunction a b c) x = a * (x ^ (2 :: Int)) + b * x + c
71
lookupY' (QuadraticFunction a b c) x = a * (x ^ (2 :: Int)) + b * x + c
71
lookupY' (QuadraticFunction a b c) x = a * (x ^ (2 :: Int)) + b * x + c
71
false
false
0
11
19
50
26
24
null
null
nedervold/context-free-grammar
src/Data/Graph/Inductive/ULGraph.hs
bsd-3-clause
matchAny :: (G.Graph gr, Ord n) => ULGraph gr n e -> GDecomp gr n e matchAny gr = (fromFglContext gr ctxt, fromGraph gr') where (ctxt, gr') = G.matchAny $ toGraph gr -- | Creates a 'ULGraph' from the list of nodes and labeled edges. -- Nodes need not appear in the list of nodes; it's enough to appear -- as one...
336
matchAny :: (G.Graph gr, Ord n) => ULGraph gr n e -> GDecomp gr n e matchAny gr = (fromFglContext gr ctxt, fromGraph gr') where (ctxt, gr') = G.matchAny $ toGraph gr -- | Creates a 'ULGraph' from the list of nodes and labeled edges. -- Nodes need not appear in the list of nodes; it's enough to appear -- as one...
336
matchAny gr = (fromFglContext gr ctxt, fromGraph gr') where (ctxt, gr') = G.matchAny $ toGraph gr -- | Creates a 'ULGraph' from the list of nodes and labeled edges. -- Nodes need not appear in the list of nodes; it's enough to appear -- as one end of an edge.
268
false
true
0
8
74
94
47
47
null
null
jml/difftodo
cmd/git-todo/Main.hs
apache-2.0
commentsFromDiff :: [FilePath] -> IO [Comment] commentsFromDiff args = either abort pure . Fixme.newCommentsFromDiff =<< gitDiff args where abort e = do hPutStrLn stderr $ "ERROR: " <> e exitWith (ExitFailure 1)
231
commentsFromDiff :: [FilePath] -> IO [Comment] commentsFromDiff args = either abort pure . Fixme.newCommentsFromDiff =<< gitDiff args where abort e = do hPutStrLn stderr $ "ERROR: " <> e exitWith (ExitFailure 1)
231
commentsFromDiff args = either abort pure . Fixme.newCommentsFromDiff =<< gitDiff args where abort e = do hPutStrLn stderr $ "ERROR: " <> e exitWith (ExitFailure 1)
184
false
true
2
10
51
92
39
53
null
null
NICTA/lets-lens
src/Lets/GetSetLens.hs
bsd-3-clause
stateL :: Lens Locality String stateL = Lens (\(Locality c _ y) t -> Locality c t y) (\(Locality _ t _) -> t)
121
stateL :: Lens Locality String stateL = Lens (\(Locality c _ y) t -> Locality c t y) (\(Locality _ t _) -> t)
121
stateL = Lens (\(Locality c _ y) t -> Locality c t y) (\(Locality _ t _) -> t)
88
false
true
0
9
35
66
34
32
null
null
mpickering/HaRe
old/testing/rmOneParameter/FunIn4_TokOut.hs
bsd-3-clause
--Any unused parameter to a definition can be removed. --In this example: remove 'x' will fail, as (x,y) is treated as one parameter and 'y' is used. foo (x,y) = h + t where (h,t) = head $ zip [1..7] [3..y]
210
foo (x,y) = h + t where (h,t) = head $ zip [1..7] [3..y]
58
foo (x,y) = h + t where (h,t) = head $ zip [1..7] [3..y]
58
true
false
0
9
44
55
30
25
null
null
aisamanra/matterhorn
src/State/Async.hs
bsd-3-clause
-- | Try to run a computation, posting an informative error -- message if it fails with a 'MattermostServerError'. tryMM :: IO a -- ^ The action to try (usually a MM API call) -> (a -> IO (MH ())) -- ^ What to do on success -> IO (MH ()) tryMM act onSuccess = do result <- liftIO $ try act ...
2,950
tryMM :: IO a -- ^ The action to try (usually a MM API call) -> (a -> IO (MH ())) -- ^ What to do on success -> IO (MH ()) tryMM act onSuccess = do result <- liftIO $ try act case result of Left e -> return $ mhError $ ServerError e Right value -> liftIO $ onSuccess value...
2,833
tryMM act onSuccess = do result <- liftIO $ try act case result of Left e -> return $ mhError $ ServerError e Right value -> liftIO $ onSuccess value -- * Background Computation -- $background_computation -- -- The main context for Matterhorn is the EventM context provided by -- the 'Brick' li...
2,686
true
true
0
13
609
173
108
65
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp DoubleAcosOp = _ILIT(104)
38
tagOf_PrimOp DoubleAcosOp = _ILIT(104)
38
tagOf_PrimOp DoubleAcosOp = _ILIT(104)
38
false
false
0
6
3
15
7
8
null
null
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
a528 :: IO (); a528 = forever $ putStrLn "a528"
47
a528 :: IO () a528 = forever $ putStrLn "a528"
46
a528 = forever $ putStrLn "a528"
32
false
true
0
6
9
24
12
12
null
null
bitemyapp/ghc
libraries/base/GHC/Event/IntTable.hs
bsd-3-clause
new :: Int -> IO (IntTable a) new capacity = IntTable `liftM` (newIORef =<< new_ capacity)
90
new :: Int -> IO (IntTable a) new capacity = IntTable `liftM` (newIORef =<< new_ capacity)
90
new capacity = IntTable `liftM` (newIORef =<< new_ capacity)
60
false
true
0
9
15
48
23
25
null
null
bkoropoff/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
-- | Pretty printing options with default verbosity. defaultPPOption :: PPOption defaultPPOption = PPOption { ppopt_impl = False , ppopt_depth = Just 200 }
155
defaultPPOption :: PPOption defaultPPOption = PPOption { ppopt_impl = False , ppopt_depth = Just 200 }
102
defaultPPOption = PPOption { ppopt_impl = False , ppopt_depth = Just 200 }
74
true
true
0
7
23
29
17
12
null
null
kawamuray/ganeti
src/Ganeti/Constants.hs
gpl-2.0
cvEnodesharedfilestoragepathunusable :: (String, String, String) cvEnodesharedfilestoragepathunusable = ("node", Types.cVErrorCodeToRaw CvENODESHAREDFILESTORAGEPATHUNUSABLE, "Shared file storage path unusable")
218
cvEnodesharedfilestoragepathunusable :: (String, String, String) cvEnodesharedfilestoragepathunusable = ("node", Types.cVErrorCodeToRaw CvENODESHAREDFILESTORAGEPATHUNUSABLE, "Shared file storage path unusable")
218
cvEnodesharedfilestoragepathunusable = ("node", Types.cVErrorCodeToRaw CvENODESHAREDFILESTORAGEPATHUNUSABLE, "Shared file storage path unusable")
153
false
true
0
7
22
34
20
14
null
null
libscott/quickson
test/Benchmark.hs
bsd-3-clause
main :: IO () main = defaultMain -- TODO: Refactor such that "bench" also tests [ bench "quickGetSimple" $ nf quickGetSimple jsonSimple , bench "aesonGetSimple" $ nf aesonGetSimple jsonSimple , bench "quickGetComplex" $ nf quickGetComplex jsonComplex , bench "aesonGetComplex" $ nf aesonGetComple...
2,202
main :: IO () main = defaultMain -- TODO: Refactor such that "bench" also tests [ bench "quickGetSimple" $ nf quickGetSimple jsonSimple , bench "aesonGetSimple" $ nf aesonGetSimple jsonSimple , bench "quickGetComplex" $ nf quickGetComplex jsonComplex , bench "aesonGetComplex" $ nf aesonGetComple...
2,202
main = defaultMain -- TODO: Refactor such that "bench" also tests [ bench "quickGetSimple" $ nf quickGetSimple jsonSimple , bench "aesonGetSimple" $ nf aesonGetSimple jsonSimple , bench "quickGetComplex" $ nf quickGetComplex jsonComplex , bench "aesonGetComplex" $ nf aesonGetComplex jsonComplex ...
2,188
false
true
1
15
516
742
391
351
null
null
DavidAlphaFox/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
annProvenanceName_maybe ModuleAnnProvenance = Nothing
59
annProvenanceName_maybe ModuleAnnProvenance = Nothing
59
annProvenanceName_maybe ModuleAnnProvenance = Nothing
59
false
false
0
5
9
9
4
5
null
null
travitch/dalvik
src/Dalvik/Printer.hs
bsd-3-clause
prettyEncodedMethod :: DexFile -> [(MethodId, [VisibleAnnotation])] -> (Word32, EncodedMethod) -> PP.Doc prettyEncodedMethod dex annots (n, m) = case (mmeth, mmeth >>= (getProto dex . methProtoId)) of (Just method, Just proto) -> let flags = methAccessFlags m adoc | Just vannots <- lookup (methId ...
1,271
prettyEncodedMethod :: DexFile -> [(MethodId, [VisibleAnnotation])] -> (Word32, EncodedMethod) -> PP.Doc prettyEncodedMethod dex annots (n, m) = case (mmeth, mmeth >>= (getProto dex . methProtoId)) of (Just method, Just proto) -> let flags = methAccessFlags m adoc | Just vannots <- lookup (methId ...
1,271
prettyEncodedMethod dex annots (n, m) = case (mmeth, mmeth >>= (getProto dex . methProtoId)) of (Just method, Just proto) -> let flags = methAccessFlags m adoc | Just vannots <- lookup (methId m) annots = " annots" $+$ PP.nest 8 (vsep (map (prettyVisibleAnnotation dex) vann...
1,166
false
true
0
20
384
414
209
205
null
null
ellchow/pgrep
src/ParsecTree.hs
apache-2.0
buildParser _ (ParametrizedNode "s" ((StringLeaf s) : [])) = Right $ str s
74
buildParser _ (ParametrizedNode "s" ((StringLeaf s) : [])) = Right $ str s
74
buildParser _ (ParametrizedNode "s" ((StringLeaf s) : [])) = Right $ str s
74
false
false
1
10
12
43
20
23
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Qualifier.hs
bsd-3-clause
mkQual = mkQualNEW
18
mkQual = mkQualNEW
18
mkQual = mkQualNEW
18
false
false
0
4
2
6
3
3
null
null
HIPERFIT/futhark
src/Futhark/IR/Primitive/Parse.hs
isc
keyword :: T.Text -> Parser () keyword s = lexeme $ chunk s *> notFollowedBy (satisfy constituent)
98
keyword :: T.Text -> Parser () keyword s = lexeme $ chunk s *> notFollowedBy (satisfy constituent)
98
keyword s = lexeme $ chunk s *> notFollowedBy (satisfy constituent)
67
false
true
0
8
16
45
21
24
null
null
42f87d89/BinZ
binz.hs
mit
toBinZ (Cpx (0, b)) = BinZ [1,1] * toBinZ (Cpx (b, 0))
54
toBinZ (Cpx (0, b)) = BinZ [1,1] * toBinZ (Cpx (b, 0))
54
toBinZ (Cpx (0, b)) = BinZ [1,1] * toBinZ (Cpx (b, 0))
54
false
false
0
9
11
49
26
23
null
null
wellecks/coltrane
ColtraneTests.hs
bsd-3-clause
testPostParams3 :: Params testPostParams3 = [("r1","/seas"),("dpt","cis")]
74
testPostParams3 :: Params testPostParams3 = [("r1","/seas"),("dpt","cis")]
74
testPostParams3 = [("r1","/seas"),("dpt","cis")]
48
false
true
0
7
5
36
19
17
null
null
dmvianna/haskellbook
src/Ch23-RandomExample2.hs
unlicense
nDie :: Int -> State StdGen [Die] nDie n = replicateM n rollDie
63
nDie :: Int -> State StdGen [Die] nDie n = replicateM n rollDie
63
nDie n = replicateM n rollDie
29
false
true
0
7
12
31
15
16
null
null
begriffs/postgrest
test/Feature/PgVersion96Spec.hs
mit
spec :: SpecWith Application spec = describe "features supported on PostgreSQL 9.6" $ do context "GUC headers" $ do it "succeeds setting the headers" $ do get "/rpc/get_projects_and_guc_headers?id=eq.2&select=id" `shouldRespondWith` [json|[{"id": 2}]|] {matchHeaders = [ ...
3,529
spec :: SpecWith Application spec = describe "features supported on PostgreSQL 9.6" $ do context "GUC headers" $ do it "succeeds setting the headers" $ do get "/rpc/get_projects_and_guc_headers?id=eq.2&select=id" `shouldRespondWith` [json|[{"id": 2}]|] {matchHeaders = [ ...
3,529
spec = describe "features supported on PostgreSQL 9.6" $ do context "GUC headers" $ do it "succeeds setting the headers" $ do get "/rpc/get_projects_and_guc_headers?id=eq.2&select=id" `shouldRespondWith` [json|[{"id": 2}]|] {matchHeaders = [ matchContentTypeJson, ...
3,500
false
true
1
18
885
462
259
203
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Text/Pretty.hs
gpl-3.0
opExists = operator_ "∃ "
28
opExists = operator_ "∃ "
28
opExists = operator_ "∃ "
28
false
false
0
5
7
9
4
5
null
null
jgeskens/oemfoe-haskell
Main.hs
mit
fib 1 = 2
9
fib 1 = 2
9
fib 1 = 2
9
false
false
0
4
3
10
4
6
null
null
urbanslug/ghc
compiler/codeGen/StgCmmProf.hs
bsd-3-clause
----------------------------------------------------------------------------- -- -- Lag/drag/void stuff -- ----------------------------------------------------------------------------- -- -- Initial value for the LDV field in a static closure -- staticLdvInit :: DynFlags -> CmmLit staticLdvInit = zeroCL...
322
staticLdvInit :: DynFlags -> CmmLit staticLdvInit = zeroCLit
60
staticLdvInit = zeroCLit
24
true
true
0
7
43
30
17
13
null
null
timtylin/scholdoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
bracketed :: Monoid a => LP a -> LP a bracketed parser = try $ char '[' *> (mconcat <$> manyTill parser (char ']'))
115
bracketed :: Monoid a => LP a -> LP a bracketed parser = try $ char '[' *> (mconcat <$> manyTill parser (char ']'))
115
bracketed parser = try $ char '[' *> (mconcat <$> manyTill parser (char ']'))
77
false
true
0
10
23
60
28
32
null
null
kikofernandez/kikofernandez.github.io
files/monadic-typechecker/typechecker/src/Initial/Typechecker.hs
mit
-- | Helper function to lookup a class given a 'Name' and an 'Env'. -- For example: -- -- > typecheck env (ClassType c) = do -- > _ <- lookupClass env c -- > return $ ClassType c -- lookupClass :: Env -> Name -> Except TCError ClassDef lookupClass Env{ctable} c = case Map.lookup c ctable of Just cdef -> retur...
445
lookupClass :: Env -> Name -> Except TCError ClassDef lookupClass Env{ctable} c = case Map.lookup c ctable of Just cdef -> return cdef Nothing -> throwError $ UnknownClassError c -- | Find a field declaration by its 'Type' (@ty@) and field name @f@
259
lookupClass Env{ctable} c = case Map.lookup c ctable of Just cdef -> return cdef Nothing -> throwError $ UnknownClassError c -- | Find a field declaration by its 'Type' (@ty@) and field name @f@
205
true
true
3
7
97
79
41
38
null
null
mightymoose/liquidhaskell
tests/pos/GhcListSort.hs
bsd-3-clause
rqsort w (x:xs) r = rqpart w x xs [] [] r
41
rqsort w (x:xs) r = rqpart w x xs [] [] r
41
rqsort w (x:xs) r = rqpart w x xs [] [] r
41
false
false
0
7
11
37
18
19
null
null
christiannolte/tip-toi-reveng
src/GMEWriter.hs
mit
putTVal :: TVal ResReg -> SPut putTVal (Reg n) = do putWord8 0 putWord16 n
82
putTVal :: TVal ResReg -> SPut putTVal (Reg n) = do putWord8 0 putWord16 n
82
putTVal (Reg n) = do putWord8 0 putWord16 n
51
false
true
0
7
22
39
17
22
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Deidentify.hs
mpl-2.0
-- | V1 error format. pldsdXgafv :: Lens' ProjectsLocationsDataSetsDeidentify (Maybe Xgafv) pldsdXgafv = lens _pldsdXgafv (\ s a -> s{_pldsdXgafv = a})
153
pldsdXgafv :: Lens' ProjectsLocationsDataSetsDeidentify (Maybe Xgafv) pldsdXgafv = lens _pldsdXgafv (\ s a -> s{_pldsdXgafv = a})
131
pldsdXgafv = lens _pldsdXgafv (\ s a -> s{_pldsdXgafv = a})
61
true
true
0
9
23
48
25
23
null
null
jeffchao/hedgewars-accessible
gameServer/HandlerUtils.hs
gpl-2.0
thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan] thisClientChans = do (ci, rnc) <- ask return [sendChan (rnc `client` ci)]
140
thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan] thisClientChans = do (ci, rnc) <- ask return [sendChan (rnc `client` ci)]
140
thisClientChans = do (ci, rnc) <- ask return [sendChan (rnc `client` ci)]
81
false
true
0
11
25
59
32
27
null
null
jonathanknowles/haskell-calculator
source/library/Reflex/Dom/Extras.hs
bsd-3-clause
styleSheet :: DomBuilder t m => Text -> m () styleSheet link = elAttr "link" as $ pure () where as = mconcat [ "rel" =: "stylesheet" , "type" =: "text/css" , "href" =: link ]
225
styleSheet :: DomBuilder t m => Text -> m () styleSheet link = elAttr "link" as $ pure () where as = mconcat [ "rel" =: "stylesheet" , "type" =: "text/css" , "href" =: link ]
225
styleSheet link = elAttr "link" as $ pure () where as = mconcat [ "rel" =: "stylesheet" , "type" =: "text/css" , "href" =: link ]
180
false
true
0
8
86
78
38
40
null
null