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
haskell/haddock
haddock-api/src/Haddock/Utils/Json.hs
bsd-2-clause
encodeToBuilder :: ToJSON a => a -> Builder encodeToBuilder = encodeValueBB . toJSON
84
encodeToBuilder :: ToJSON a => a -> Builder encodeToBuilder = encodeValueBB . toJSON
84
encodeToBuilder = encodeValueBB . toJSON
40
false
true
0
6
12
26
13
13
null
null
robstewart57/ripl
src/Compiler.hs
bsd-3-clause
genActors :: R.Ident -> VarInfo -> [ComputeNode] -> Integer -> ([String], [Actor]) genActors outIdent varInfo computeNodes numFrames = (unusedVariableActors, nub $ map (\(n,i) -> mkActor n i) (zip computeNodes [1..])) where -- TODO: change the way that this unit actor is created. -- This will involve ...
14,422
genActors :: R.Ident -> VarInfo -> [ComputeNode] -> Integer -> ([String], [Actor]) genActors outIdent varInfo computeNodes numFrames = (unusedVariableActors, nub $ map (\(n,i) -> mkActor n i) (zip computeNodes [1..])) where -- TODO: change the way that this unit actor is created. -- This will involve ...
14,422
genActors outIdent varInfo computeNodes numFrames = (unusedVariableActors, nub $ map (\(n,i) -> mkActor n i) (zip computeNodes [1..])) where -- TODO: change the way that this unit actor is created. -- This will involve simplifying VarRHS to just SkelRHS. -- mkActor :: ComputeNode -> Int -> Act...
14,339
false
true
14
18
4,618
869
610
259
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The currency for transacting the Reserved Instance resale. At this time, the -- only supported currency is 'USD'. pssCurrencyCode :: Lens' PriceScheduleSpecification (Maybe CurrencyCodeValues) pssCurrencyCode = lens _pssCurrencyCode (\s a -> s { _pssCurrencyCode = a })
274
pssCurrencyCode :: Lens' PriceScheduleSpecification (Maybe CurrencyCodeValues) pssCurrencyCode = lens _pssCurrencyCode (\s a -> s { _pssCurrencyCode = a })
155
pssCurrencyCode = lens _pssCurrencyCode (\s a -> s { _pssCurrencyCode = a })
76
true
true
1
9
38
52
26
26
null
null
siddhanathan/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
isUnqual _ = False
27
isUnqual _ = False
27
isUnqual _ = False
27
false
false
0
5
12
9
4
5
null
null
hackern/network-hans
src/Network/BSD.hs
bsd-3-clause
getProtocolNumber :: ProtocolName -> IO ProtocolNumber getProtocolNumber name = protoNumber `fmap` (getProtocolByName name)
123
getProtocolNumber :: ProtocolName -> IO ProtocolNumber getProtocolNumber name = protoNumber `fmap` (getProtocolByName name)
123
getProtocolNumber name = protoNumber `fmap` (getProtocolByName name)
68
false
true
0
7
12
33
17
16
null
null
Fermat/higher-rank
src/Syntax.hs
bsd-3-clause
flatten a = [a]
15
flatten a = [a]
15
flatten a = [a]
15
false
false
0
5
3
12
6
6
null
null
ak1211/tractor
src/SBIsecCoJp/Scraper.hs
agpl-3.0
purchaseMarginDetailPage :: TL.Text -> Maybe PurchaseMarginDetailPage purchaseMarginDetailPage html = pack =<< Mb.listToMaybe table where -- -- <div class="titletext">買付余力詳細</div> 以下のtable table :: [X.Cursor] table = X.fromDocument (DOM.parseLT html) $// X.attributeIs "class" "ti...
1,292
purchaseMarginDetailPage :: TL.Text -> Maybe PurchaseMarginDetailPage purchaseMarginDetailPage html = pack =<< Mb.listToMaybe table where -- -- <div class="titletext">買付余力詳細</div> 以下のtable table :: [X.Cursor] table = X.fromDocument (DOM.parseLT html) $// X.attributeIs "class" "ti...
1,292
purchaseMarginDetailPage html = pack =<< Mb.listToMaybe table where -- -- <div class="titletext">買付余力詳細</div> 以下のtable table :: [X.Cursor] table = X.fromDocument (DOM.parseLT html) $// X.attributeIs "class" "titletext" >=> X.followingSibling >=> X.element "div" &/...
1,222
false
true
8
15
407
414
198
216
null
null
bgamari/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
removeOneLeadingSpace :: [String] -> [String] removeOneLeadingSpace xs = if all startsWithSpace xs then map (drop 1) xs else xs where startsWithSpace "" = True startsWithSpace (y:_) = y == ' ' -- | Parse footer for a grid table.
257
removeOneLeadingSpace :: [String] -> [String] removeOneLeadingSpace xs = if all startsWithSpace xs then map (drop 1) xs else xs where startsWithSpace "" = True startsWithSpace (y:_) = y == ' ' -- | Parse footer for a grid table.
257
removeOneLeadingSpace xs = if all startsWithSpace xs then map (drop 1) xs else xs where startsWithSpace "" = True startsWithSpace (y:_) = y == ' ' -- | Parse footer for a grid table.
211
false
true
0
9
67
78
41
37
null
null
sdiehl/ghc
compiler/GHC/Cmm/Type.hs
bsd-3-clause
widthInLog W128 = 4
19
widthInLog W128 = 4
19
widthInLog W128 = 4
19
false
false
1
5
3
13
4
9
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/existentials/hc-existentials/src/Lib.hs
unlicense
evalF2 :: Object -> Text evalF2 (Object a _ f2) = f2 a
55
evalF2 :: Object -> Text evalF2 (Object a _ f2) = f2 a
55
evalF2 (Object a _ f2) = f2 a
30
false
true
0
9
13
36
16
20
null
null
andorp/grin
grin/test/Test/Hspec/PipelineExample.hs
bsd-3-clause
pending :: String -> ResultStatus pending = Pending Nothing . Just
66
pending :: String -> ResultStatus pending = Pending Nothing . Just
66
pending = Pending Nothing . Just
32
false
true
1
7
10
30
12
18
null
null
snape/LooplessFunctionalAlgorithms
RealTimeQueue.hs
apache-2.0
chkQueue (xs,ys,z:zs) = (xs,ys,zs)
36
chkQueue (xs,ys,z:zs) = (xs,ys,zs)
36
chkQueue (xs,ys,z:zs) = (xs,ys,zs)
36
false
false
0
7
5
31
18
13
null
null
haskell-distributed/distributed-process
distributed-process-tests/src/Control/Distributed/Process/Tests/Closure.hs
bsd-3-clause
waitClosure :: Int -> Closure (Process ()) waitClosure = $(mkClosure 'wait)
75
waitClosure :: Int -> Closure (Process ()) waitClosure = $(mkClosure 'wait)
75
waitClosure = $(mkClosure 'wait)
32
false
true
0
9
10
34
17
17
null
null
fmapfmapfmap/amazonka
amazonka-cognito-identity/test/Test/AWS/Gen/CognitoIdentity.hs
mpl-2.0
testUpdateIdentityPool :: UpdateIdentityPool -> TestTree testUpdateIdentityPool = req "UpdateIdentityPool" "fixture/UpdateIdentityPool.yaml"
148
testUpdateIdentityPool :: UpdateIdentityPool -> TestTree testUpdateIdentityPool = req "UpdateIdentityPool" "fixture/UpdateIdentityPool.yaml"
148
testUpdateIdentityPool = req "UpdateIdentityPool" "fixture/UpdateIdentityPool.yaml"
91
false
true
0
5
17
20
10
10
null
null
koba-e964/hayashii-mcc
SSAProp.hs
bsd-3-clause
propFundef :: SSAFundef -> SSAFundef propFundef = mapEndoBlocks constPropBlock
78
propFundef :: SSAFundef -> SSAFundef propFundef = mapEndoBlocks constPropBlock
78
propFundef = mapEndoBlocks constPropBlock
41
false
true
0
5
8
18
9
9
null
null
kig/tomtegebra
Tomtegebra/Texture.hs
gpl-3.0
-- | Binds the given list of textures to texture units so that the nth element -- of the list is bound to the nth texture unit. useTexture :: [TextureObject] -> IO () useTexture textures = do mapM_ (\(tex, i) -> do texture Texture2D $= Enabled activeTexture $= TextureUnit i textureBinding ...
621
useTexture :: [TextureObject] -> IO () useTexture textures = do mapM_ (\(tex, i) -> do texture Texture2D $= Enabled activeTexture $= TextureUnit i textureBinding Texture2D $= Just tex) $ zip textures [0..] activeTexture $= TextureUnit 0 -- | Loads a texture from an image file. -- Uses...
491
useTexture textures = do mapM_ (\(tex, i) -> do texture Texture2D $= Enabled activeTexture $= TextureUnit i textureBinding Texture2D $= Just tex) $ zip textures [0..] activeTexture $= TextureUnit 0 -- | Loads a texture from an image file. -- Uses Gdk.Pixbuf for loading the image, so a...
452
true
true
0
14
137
107
53
54
null
null
nicolashery/example-marvel-haskell
Views/Components/CharactersList.hs
mit
charactersListItemView :: Character -> Html charactersListItemView character = H.a ! A.href (toValue (CharacterUrl (C.id character))) ! A.class_ ("list-group-item " <> toValue SPFLink) $ H.h4 ! A.class_ "list-group-item-heading" $ toHtml (C.name character)
268
charactersListItemView :: Character -> Html charactersListItemView character = H.a ! A.href (toValue (CharacterUrl (C.id character))) ! A.class_ ("list-group-item " <> toValue SPFLink) $ H.h4 ! A.class_ "list-group-item-heading" $ toHtml (C.name character)
268
charactersListItemView character = H.a ! A.href (toValue (CharacterUrl (C.id character))) ! A.class_ ("list-group-item " <> toValue SPFLink) $ H.h4 ! A.class_ "list-group-item-heading" $ toHtml (C.name character)
224
false
true
0
17
42
98
47
51
null
null
alpmestan/HNN-0.1
AI/HNN/Neuron.hs
lgpl-3.0
createNeuronU :: Double -> Vector Double -> (Double -> Double) -> Neuron createNeuronU t ws f = Neuron { threshold = t, weights = ws, func = f }
144
createNeuronU :: Double -> Vector Double -> (Double -> Double) -> Neuron createNeuronU t ws f = Neuron { threshold = t, weights = ws, func = f }
144
createNeuronU t ws f = Neuron { threshold = t, weights = ws, func = f }
71
false
true
0
9
28
60
33
27
null
null
spencerjanssen/text
Data/Text/Internal/Builder.hs
bsd-2-clause
-- | Map the resulting list of texts. mapBuilder :: ([S.Text] -> [S.Text]) -> Builder mapBuilder f = Builder (fmap f .)
119
mapBuilder :: ([S.Text] -> [S.Text]) -> Builder mapBuilder f = Builder (fmap f .)
81
mapBuilder f = Builder (fmap f .)
33
true
true
0
10
21
52
26
26
null
null
keithodulaigh/Hets
Adl/Parse.hs
gpl-2.0
pTerm :: Bool -> CharParser st Rule pTerm b = do ms <- many pMinus e <- pParens (pRule False) <|> fmap Tm (pMorphism b) rs <- many $ choiceS pSym [K0, K1, Co] let p = foldl (flip UnExp) e rs return $ foldl (\ r _ -> UnExp Cp r) p ms
242
pTerm :: Bool -> CharParser st Rule pTerm b = do ms <- many pMinus e <- pParens (pRule False) <|> fmap Tm (pMorphism b) rs <- many $ choiceS pSym [K0, K1, Co] let p = foldl (flip UnExp) e rs return $ foldl (\ r _ -> UnExp Cp r) p ms
242
pTerm b = do ms <- many pMinus e <- pParens (pRule False) <|> fmap Tm (pMorphism b) rs <- many $ choiceS pSym [K0, K1, Co] let p = foldl (flip UnExp) e rs return $ foldl (\ r _ -> UnExp Cp r) p ms
206
false
true
0
13
63
145
67
78
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
mpl-2.0
-- | An optional description of this resource. Provide this property when you -- create the resource. vtDescription :: Lens' VPNTunnel (Maybe Text) vtDescription = lens _vtDescription (\ s a -> s{_vtDescription = a})
224
vtDescription :: Lens' VPNTunnel (Maybe Text) vtDescription = lens _vtDescription (\ s a -> s{_vtDescription = a})
122
vtDescription = lens _vtDescription (\ s a -> s{_vtDescription = a})
76
true
true
2
9
41
56
26
30
null
null
mat-tso/helm-game
Main.hs
mit
-- | (x / abs x) * sqrt (abs x) absSqrt :: (Floating a, Ord a) => a -> a absSqrt a | a >= 0 = sqrt a | otherwise = negate.sqrt $ negate a
145
absSqrt :: (Floating a, Ord a) => a -> a absSqrt a | a >= 0 = sqrt a | otherwise = negate.sqrt $ negate a
113
absSqrt a | a >= 0 = sqrt a | otherwise = negate.sqrt $ negate a
72
true
true
0
8
43
65
31
34
null
null
muhbaasu/pfennig-server
src/Pfennig/Layout.hs
mit
readCSS :: ByteString readCSS = encodeUtf8 $ render pfennig
59
readCSS :: ByteString readCSS = encodeUtf8 $ render pfennig
59
readCSS = encodeUtf8 $ render pfennig
37
false
true
0
6
8
24
10
14
null
null
mietek/untitled-wai
src/Auth.hs
bsd-3-clause
createSession' :: AuthState -> EmailAddress -> Pass -> IO (Maybe SessionID) createSession' st email pass = withFoundVerifiedActor' st email pass $ \aid -> query1 (db' st) [aid] [sql| INSERT INTO sessions (actor_id) VALUES (?) RETURNING session_id |]
289
createSession' :: AuthState -> EmailAddress -> Pass -> IO (Maybe SessionID) createSession' st email pass = withFoundVerifiedActor' st email pass $ \aid -> query1 (db' st) [aid] [sql| INSERT INTO sessions (actor_id) VALUES (?) RETURNING session_id |]
289
createSession' st email pass = withFoundVerifiedActor' st email pass $ \aid -> query1 (db' st) [aid] [sql| INSERT INTO sessions (actor_id) VALUES (?) RETURNING session_id |]
213
false
true
0
10
76
75
39
36
null
null
taylor1791/adventofcode
2015/src/Day7.hs
bsd-2-clause
parseOr :: Parsec s u m Gate parseOr = parseInfix (P.string "OR") Or
68
parseOr :: Parsec s u m Gate parseOr = parseInfix (P.string "OR") Or
68
parseOr = parseInfix (P.string "OR") Or
39
false
true
0
8
12
33
16
17
null
null
formrre/yi
yi-core/src/Yi/Buffer/TextUnit.hs
gpl-2.0
atBoundary Document Forward = (>=) <$> pointB <*> sizeB
58
atBoundary Document Forward = (>=) <$> pointB <*> sizeB
58
atBoundary Document Forward = (>=) <$> pointB <*> sizeB
58
false
false
0
6
11
21
11
10
null
null
kyren/hsgb
lib/Gameboy/Util.hs
unlicense
add8 :: Word8 -> Word8 -> (Word8, Bool, Bool) add8 a b = (a + b, carry3, carry7) where carry3 = (lowNibble a + lowNibble b) > 0x0f carry7 = (fromIntegral a + fromIntegral b) > (0xff :: Word16) -- subtract two 8 bit numbers, return the result, as well as the borrow 4 bit flag -- and the borrow 8 bit flag.
317
add8 :: Word8 -> Word8 -> (Word8, Bool, Bool) add8 a b = (a + b, carry3, carry7) where carry3 = (lowNibble a + lowNibble b) > 0x0f carry7 = (fromIntegral a + fromIntegral b) > (0xff :: Word16) -- subtract two 8 bit numbers, return the result, as well as the borrow 4 bit flag -- and the borrow 8 bit flag.
317
add8 a b = (a + b, carry3, carry7) where carry3 = (lowNibble a + lowNibble b) > 0x0f carry7 = (fromIntegral a + fromIntegral b) > (0xff :: Word16) -- subtract two 8 bit numbers, return the result, as well as the borrow 4 bit flag -- and the borrow 8 bit flag.
271
false
true
2
9
74
112
56
56
null
null
anttisalonen/freekick2
src/Match/State/MatchState.hs
gpl-3.0
modPlayer (pln, False) f = modAwayplayers (M.adjust f pln)
58
modPlayer (pln, False) f = modAwayplayers (M.adjust f pln)
58
modPlayer (pln, False) f = modAwayplayers (M.adjust f pln)
58
false
false
0
8
8
30
15
15
null
null
metachord/netlink-hs
System/Linux/Netlink/Protocol.hs
bsd-3-clause
p8 :: Word8 -> Put p8 = putWord8
33
p8 :: Word8 -> Put p8 = putWord8
33
p8 = putWord8
14
false
true
0
7
8
22
9
13
null
null
narurien/ganeti-ceph
src/Ganeti/Utils.hs
gpl-2.0
getCurrentTime :: IO Integer getCurrentTime = do TOD ctime _ <- getClockTime return ctime -- | Returns the current time as an 'Integer' representing the number -- of microseconds from the Unix epoch (hence the need for 'Integer').
235
getCurrentTime :: IO Integer getCurrentTime = do TOD ctime _ <- getClockTime return ctime -- | Returns the current time as an 'Integer' representing the number -- of microseconds from the Unix epoch (hence the need for 'Integer').
235
getCurrentTime = do TOD ctime _ <- getClockTime return ctime -- | Returns the current time as an 'Integer' representing the number -- of microseconds from the Unix epoch (hence the need for 'Integer').
206
false
true
0
8
42
34
16
18
null
null
flyingleafe/parser-gen
src/Grammar.hs
bsd-3-clause
stringLiteral = tokenIf isStringLiteral where isStringLiteral (StringLiteral _) = True isStringLiteral _ = False
126
stringLiteral = tokenIf isStringLiteral where isStringLiteral (StringLiteral _) = True isStringLiteral _ = False
126
stringLiteral = tokenIf isStringLiteral where isStringLiteral (StringLiteral _) = True isStringLiteral _ = False
126
false
false
1
7
27
38
16
22
null
null
enolan/cabal
cabal-install/Distribution/Client/List.hs
bsd-3-clause
sourcePkgsInfo :: (PackageName -> VersionRange) -> PackageName -> InstalledPackageIndex -> PackageIndex.PackageIndex SourcePackage -> (VersionRange, [Installed.InstalledPackageInfo], [SourcePackage]) sourcePkgsInfo prefs name installedPkgIndex sourcePkgIndex = (pref, installedPkgs, sourcePkgs) where p...
694
sourcePkgsInfo :: (PackageName -> VersionRange) -> PackageName -> InstalledPackageIndex -> PackageIndex.PackageIndex SourcePackage -> (VersionRange, [Installed.InstalledPackageInfo], [SourcePackage]) sourcePkgsInfo prefs name installedPkgIndex sourcePkgIndex = (pref, installedPkgs, sourcePkgs) where p...
694
sourcePkgsInfo prefs name installedPkgIndex sourcePkgIndex = (pref, installedPkgs, sourcePkgs) where pref = prefs name installedPkgs = concatMap snd (InstalledPackageIndex.lookupPackageName installedPkgIndex name) sourcePkgs = PackageIndex.lookupPackageName...
484
false
true
3
13
142
135
66
69
null
null
geophf/1HaskellADay
exercises/HAD/Y2016/M10/D06/Solution.hs
mit
tradeLink :: XSummary -> Element tradeLink (XSum blk trd _) = Elt "a" [Attrib "href" (serverURL ++ "trade/" ++ blk ++ ('|':trd))] [S trd]
140
tradeLink :: XSummary -> Element tradeLink (XSum blk trd _) = Elt "a" [Attrib "href" (serverURL ++ "trade/" ++ blk ++ ('|':trd))] [S trd]
140
tradeLink (XSum blk trd _) = Elt "a" [Attrib "href" (serverURL ++ "trade/" ++ blk ++ ('|':trd))] [S trd]
107
false
true
0
11
26
71
36
35
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/HTools/Program/Hspace.hs
bsd-2-clause
arguments :: [ArgCompletion] arguments = []
43
arguments :: [ArgCompletion] arguments = []
43
arguments = []
14
false
true
0
7
5
23
10
13
null
null
hspec/hspec
hspec-discover/example/BazSpec.hs
mit
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
6
7
19
9
10
null
null
cutsea110/BISocie
Settings.hs
bsd-3-clause
bisocie_pub :: PublicKey bisocie_pub = PublicKey { public_size = 256 , public_n = 2687089416965626892254546674124416865354464975665682995658957047832210407346446463609960168053239947306361152865946758365315256301705386628327048929234701289133314775578958403040682768365518550019063167323326961549...
792
bisocie_pub :: PublicKey bisocie_pub = PublicKey { public_size = 256 , public_n = 2687089416965626892254546674124416865354464975665682995658957047832210407346446463609960168053239947306361152865946758365315256301705386628327048929234701289133314775578958403040682768365518550019063167323326961549...
792
bisocie_pub = PublicKey { public_size = 256 , public_n = 26870894169656268922545466741244168653544649756656829956589570478322104073464464636099601680532399473063611528659467583653152563017053866283270489292347012891333147755789584030406827683655185500190631673233269615494706763605175355492877596...
767
false
true
0
6
90
31
19
12
null
null
dalaing/sdl2
src/SDL/Video/Renderer.hs
bsd-3-clause
formatPalette :: MonadIO m => SurfacePixelFormat -> m (Maybe Palette) formatPalette (SurfacePixelFormat f) = liftIO $ wrap . Raw.pixelFormatPalette <$> peek f where wrap p | p == nullPtr = Nothing | otherwise = Just (Palette p) -- | Set a range of colors in a palette. -- -- See @<https://wiki.lib...
392
formatPalette :: MonadIO m => SurfacePixelFormat -> m (Maybe Palette) formatPalette (SurfacePixelFormat f) = liftIO $ wrap . Raw.pixelFormatPalette <$> peek f where wrap p | p == nullPtr = Nothing | otherwise = Just (Palette p) -- | Set a range of colors in a palette. -- -- See @<https://wiki.lib...
392
formatPalette (SurfacePixelFormat f) = liftIO $ wrap . Raw.pixelFormatPalette <$> peek f where wrap p | p == nullPtr = Nothing | otherwise = Just (Palette p) -- | Set a range of colors in a palette. -- -- See @<https://wiki.libsdl.org/SDL_SetPaletteColors SDL_SetPaletteColors>@ for C documentatio...
322
false
true
1
9
77
104
49
55
null
null
lpeterse/HiggsSet
src/Data/HiggsSet.hs
bsd-3-clause
-- | An empty 'HiggsSet' with empty indizes. empty :: forall a i.(Indexable a, Index i, IndexOf a ~ i) => HiggsSet a i empty = HiggsSet { elements = IM.empty , maxKey = minBound , indizes = V.fromList [case property i of ...
604
empty :: forall a i.(Indexable a, Index i, IndexOf a ~ i) => HiggsSet a i empty = HiggsSet { elements = IM.empty , maxKey = minBound , indizes = V.fromList [case property i of Bijective -> SingletonMap TM.empty ...
559
empty = HiggsSet { elements = IM.empty , maxKey = minBound , indizes = V.fromList [case property i of Bijective -> SingletonMap TM.empty Injective -> SingletonMap TM.empty ...
481
true
true
0
14
314
147
75
72
null
null
pshendry/project-euler-solutions
0023/solution.hs
mit
main = putStrLn $ show solve
28
main = putStrLn $ show solve
28
main = putStrLn $ show solve
28
false
false
0
6
5
13
6
7
null
null
edsko/cabal
Cabal/src/Distribution/Version.hs
bsd-3-clause
-- Check an upper bound does not intersect, or even touch a lower bound: -- -- ---| or ---) but not ---] or ---) or ---] -- |--- (--- (--- [--- [--- -- doesNotTouch :: UpperBound -> LowerBound -> Bool doesNotTouch NoUpperBound _ = False
302
doesNotTouch :: UpperBound -> LowerBound -> Bool doesNotTouch NoUpperBound _ = False
84
doesNotTouch NoUpperBound _ = False
35
true
true
0
6
110
29
17
12
null
null
jwvg0425/free-game
FreeGame/Class.hs
bsd-3-clause
mouseButtonR :: Mouse f => f Bool mouseButtonR = mouseButton 1
63
mouseButtonR :: Mouse f => f Bool mouseButtonR = mouseButton 1
62
mouseButtonR = mouseButton 1
28
false
true
0
6
11
24
11
13
null
null
DavidAlphaFox/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
kim/etcdpp
src/Etcd/V2/Client.hs
mpl-2.0
responseAndMetadata :: API.KeyspaceResponse -> ResponseAndMetadata responseAndMetadata rs = ResponseAndMetadata { _rsResponse = getResponse rs , _rsMetadata = meta (getHeadersHList rs) }
198
responseAndMetadata :: API.KeyspaceResponse -> ResponseAndMetadata responseAndMetadata rs = ResponseAndMetadata { _rsResponse = getResponse rs , _rsMetadata = meta (getHeadersHList rs) }
198
responseAndMetadata rs = ResponseAndMetadata { _rsResponse = getResponse rs , _rsMetadata = meta (getHeadersHList rs) }
131
false
true
0
9
32
46
24
22
null
null
awagner83/IdMe
src/Idme/Sync.hs
gpl-3.0
save :: DbFileName -> IdMap -> IO () save f = withFile f WriteMode . flip hPut . encode . toPersistent
102
save :: DbFileName -> IdMap -> IO () save f = withFile f WriteMode . flip hPut . encode . toPersistent
102
save f = withFile f WriteMode . flip hPut . encode . toPersistent
65
false
true
0
8
20
47
22
25
null
null
nushio3/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayTag WayEventLog = "l"
24
wayTag WayEventLog = "l"
24
wayTag WayEventLog = "l"
24
false
false
0
5
3
9
4
5
null
null
CGenie/platform
shared/src/Unison/Note.hs
mit
scopeF :: Functor f => String -> f (Either Note a) -> f (Either Note a) scopeF s = fmap (scope s)
97
scopeF :: Functor f => String -> f (Either Note a) -> f (Either Note a) scopeF s = fmap (scope s)
97
scopeF s = fmap (scope s)
25
false
true
0
11
21
65
29
36
null
null
bitemyapp/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
pprCLbl (RtsLabel (RtsSelectorEntry upd_reqd offset)) = hcat [ptext (sLit "stg_sel_"), text (show offset), ptext (if upd_reqd then (sLit "_upd_entry") else (sLit "_noupd_entry")) ]
254
pprCLbl (RtsLabel (RtsSelectorEntry upd_reqd offset)) = hcat [ptext (sLit "stg_sel_"), text (show offset), ptext (if upd_reqd then (sLit "_upd_entry") else (sLit "_noupd_entry")) ]
254
pprCLbl (RtsLabel (RtsSelectorEntry upd_reqd offset)) = hcat [ptext (sLit "stg_sel_"), text (show offset), ptext (if upd_reqd then (sLit "_upd_entry") else (sLit "_noupd_entry")) ]
254
false
false
0
10
96
80
40
40
null
null
FranklinChen/hugs98-plus-Sep2006
packages/base/Data/ByteString.hs
bsd-3-clause
useAsCString :: ByteString -> (CString -> IO a) -> IO a useAsCString (PS ps s l) = bracket alloc (c_free.castPtr) where alloc = withForeignPtr ps $ \p -> do buf <- c_malloc (fromIntegral l+1) memcpy (castPtr buf) (castPtr p `plusPtr` s) (fromIntegral l) poke (buf `plusPtr` l) (0:...
455
useAsCString :: ByteString -> (CString -> IO a) -> IO a useAsCString (PS ps s l) = bracket alloc (c_free.castPtr) where alloc = withForeignPtr ps $ \p -> do buf <- c_malloc (fromIntegral l+1) memcpy (castPtr buf) (castPtr p `plusPtr` s) (fromIntegral l) poke (buf `plusPtr` l) (0:...
455
useAsCString (PS ps s l) = bracket alloc (c_free.castPtr) where alloc = withForeignPtr ps $ \p -> do buf <- c_malloc (fromIntegral l+1) memcpy (castPtr buf) (castPtr p `plusPtr` s) (fromIntegral l) poke (buf `plusPtr` l) (0::Word8) -- n.b. return (castPtr buf) -- | /...
399
false
true
1
14
118
175
84
91
null
null
jdublu10/toy_lang
src/Lang.hs
mit
{- step rules for basics -} step :: Expr -> Expr step (Ident x) = Ident x
73
step :: Expr -> Expr step (Ident x) = Ident x
45
step (Ident x) = Ident x
24
true
true
0
9
16
34
15
19
null
null
pkamenarsky/typesafe-query-mongodb
src/Database/MongoDB/Query/Typesafe.hs
apache-2.0
tsQueryToSelector (QNot q) = [ "$not" =: tsQueryToSelector q ]
68
tsQueryToSelector (QNot q) = [ "$not" =: tsQueryToSelector q ]
68
tsQueryToSelector (QNot q) = [ "$not" =: tsQueryToSelector q ]
68
false
false
0
7
15
26
12
14
null
null
jsl/luhn
spec/LuhnSpec.hs
mit
spec :: Spec spec = describe "isValid" $ do it "is true for 49927398716" $ isValid 49927398716 `shouldBe` True it "is true for 49927398716" $ isValid 49927398717 `shouldBe` False it "is true for 49927398716" $ isValid 1234567812345678 `shouldBe` False it "is true for 49927398716" $ isValid 1234567812345670 `sho...
331
spec :: Spec spec = describe "isValid" $ do it "is true for 49927398716" $ isValid 49927398716 `shouldBe` True it "is true for 49927398716" $ isValid 49927398717 `shouldBe` False it "is true for 49927398716" $ isValid 1234567812345678 `shouldBe` False it "is true for 49927398716" $ isValid 1234567812345670 `sho...
331
spec = describe "isValid" $ do it "is true for 49927398716" $ isValid 49927398716 `shouldBe` True it "is true for 49927398716" $ isValid 49927398717 `shouldBe` False it "is true for 49927398716" $ isValid 1234567812345678 `shouldBe` False it "is true for 49927398716" $ isValid 1234567812345670 `shouldBe` True
318
false
true
0
10
56
101
46
55
null
null
sandrolovnicki/lambda-calculus-interpreter
src/Helper.hs
mit
reviewVariable ((v, e) : _) var | v == var = show e
53
reviewVariable ((v, e) : _) var | v == var = show e
53
reviewVariable ((v, e) : _) var | v == var = show e
53
false
false
0
8
14
42
19
23
null
null
Peaker/lamdu
src/Lamdu/Data/Ops.hs
gpl-3.0
assocTagName :: (Monad f, MonadReader env m, Has LangId env, Has Dir.Layout env) => m (T.Tag -> MkProperty' (T f) Text) assocTagName = Lens.view id <&> \env tag -> let lang = env ^. has result info = Property (getTagName env info ^. _2 . name) (Transaction.writeIRef (...
1,093
assocTagName :: (Monad f, MonadReader env m, Has LangId env, Has Dir.Layout env) => m (T.Tag -> MkProperty' (T f) Text) assocTagName = Lens.view id <&> \env tag -> let lang = env ^. has result info = Property (getTagName env info ^. _2 . name) (Transaction.writeIRef (...
1,093
assocTagName = Lens.view id <&> \env tag -> let lang = env ^. has result info = Property (getTagName env info ^. _2 . name) (Transaction.writeIRef (ExprIRef.tagI tag) . setName) where setName x | x == mempty = ...
965
false
true
0
18
503
312
152
160
null
null
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/TypeMapping.hs
gpl-3.0
-- ***HACK!!!*** innerHtExpr ht m = TagName (N $ showHType ht "") m
68
innerHtExpr ht m = TagName (N $ showHType ht "") m
50
innerHtExpr ht m = TagName (N $ showHType ht "") m
50
true
false
0
8
13
30
14
16
null
null
SimSaladin/hajong
hajong-server/src/Mahjong/Hand/Yaku.hs
mit
-- | The "standard" checker. If there are yakuman, then yield it or them. -- Otherwise resolve the normal yaku. If normal yaku add up to a Kazoe then -- yield Kazoe Yakuman. Otherwise return all matched yaku. standardCheck :: ValueInfo -> Grouping -> [Yaku] standardCheck vi grp | yakumans <- mapMaybe (runYakuCheck ...
495
standardCheck :: ValueInfo -> Grouping -> [Yaku] standardCheck vi grp | yakumans <- mapMaybe (runYakuCheck vi grp) standardYakumans, not (null yakumans) = yakumans | yaku <- checkYaku standardYaku vi grp = if sumOf (each.yHan) yaku >= 13 then [Yaku 13 "Kazoe Yakuman"] else yaku
286
standardCheck vi grp | yakumans <- mapMaybe (runYakuCheck vi grp) standardYakumans, not (null yakumans) = yakumans | yaku <- checkYaku standardYaku vi grp = if sumOf (each.yHan) yaku >= 13 then [Yaku 13 "Kazoe Yakuman"] else yaku
237
true
true
0
11
89
124
60
64
null
null
ddssff/pandoc
src/Text/Pandoc/Writers/ICML.hs
gpl-2.0
blockToICML opts style (CodeBlock _ str) = parStyle opts (codeBlockName:style) $ [Str str]
90
blockToICML opts style (CodeBlock _ str) = parStyle opts (codeBlockName:style) $ [Str str]
90
blockToICML opts style (CodeBlock _ str) = parStyle opts (codeBlockName:style) $ [Str str]
90
false
false
0
8
12
43
21
22
null
null
expipiplus1/vulkan
generate-new/src/Render/Element.hs
bsd-3-clause
identicalBoot :: RenderElement -> RenderElement identicalBoot re = re { reBoot = Just re }
90
identicalBoot :: RenderElement -> RenderElement identicalBoot re = re { reBoot = Just re }
90
identicalBoot re = re { reBoot = Just re }
42
false
true
0
8
14
38
17
21
null
null
chrisbarrett/apidoc-checker
src/Apidoc/Check/DSL.hs
bsd-3-clause
object _ js = typeError (jsonPos js) (Expected "object") (Actual (typeOf js))
81
object _ js = typeError (jsonPos js) (Expected "object") (Actual (typeOf js))
81
object _ js = typeError (jsonPos js) (Expected "object") (Actual (typeOf js))
81
false
false
1
9
15
44
20
24
null
null
awagner83/identifiers
src/Data/Identifiers/Hashable.hs
bsd-3-clause
-- | Given many ids, return many keys lookupKeys :: (Integral i) => Identifiers i a -> [i] -> [a] lookupKeys s = mapMaybe (lookupKey s)
135
lookupKeys :: (Integral i) => Identifiers i a -> [i] -> [a] lookupKeys s = mapMaybe (lookupKey s)
97
lookupKeys s = mapMaybe (lookupKey s)
37
true
true
0
10
25
57
28
29
null
null
limdauto/learning-haskell
cis194/week5/Calc.hs
mit
eval :: ExprT -> Integer eval (ExprT.Lit x) = x
47
eval :: ExprT -> Integer eval (ExprT.Lit x) = x
47
eval (ExprT.Lit x) = x
22
false
true
0
7
9
30
14
16
null
null
FranklinChen/musicxml2
src/Data/Music/MusicXml/Simple.hs
bsd-3-clause
slur :: Music -> Music slur (Music []) = Music []
51
slur :: Music -> Music slur (Music []) = Music []
51
slur (Music []) = Music []
28
false
true
0
7
12
35
16
19
null
null
piyush-kurur/shakespeare
shakespeare-css/Text/Cassius.hs
bsd-2-clause
parsePair :: Int -> Parser (Contents, Contents) parsePair minIndent = do indent <- parseIndent if indent <= minIndent then fail "not indented" else return () key <- manyTill (parseContent False) $ char ':' spaces value <- manyTill (parseContent True) $ eol <|> eof return (trim key, value) -- FIX...
354
parsePair :: Int -> Parser (Contents, Contents) parsePair minIndent = do indent <- parseIndent if indent <= minIndent then fail "not indented" else return () key <- manyTill (parseContent False) $ char ':' spaces value <- manyTill (parseContent True) $ eol <|> eof return (trim key, value) -- FIX...
354
parsePair minIndent = do indent <- parseIndent if indent <= minIndent then fail "not indented" else return () key <- manyTill (parseContent False) $ char ':' spaces value <- manyTill (parseContent True) $ eol <|> eof return (trim key, value) -- FIXME consider trimming value as well
306
false
true
0
13
77
128
59
69
null
null
frasertweedale/hs-jose
src/Crypto/JOSE/JWK.hs
apache-2.0
thumbprint :: HashAlgorithm a => Getter JWK (Digest a) thumbprint = to (hash . L.toStrict . thumbprintRepr)
107
thumbprint :: HashAlgorithm a => Getter JWK (Digest a) thumbprint = to (hash . L.toStrict . thumbprintRepr)
107
thumbprint = to (hash . L.toStrict . thumbprintRepr)
52
false
true
0
9
16
45
22
23
null
null
leshchevds/ganeti
src/Ganeti/HTools/Program/Hsqueeze.hs
bsd-2-clause
getPowerOffOpCodes :: [Node.Node] -> Result [([[OpCode]], String)] getPowerOffOpCodes nl = do opcodes <- Node.genPowerOffOpCodes nl return [([opcodes], "Powering off nodes")] -- | Get opcodes for powering on nodes
218
getPowerOffOpCodes :: [Node.Node] -> Result [([[OpCode]], String)] getPowerOffOpCodes nl = do opcodes <- Node.genPowerOffOpCodes nl return [([opcodes], "Powering off nodes")] -- | Get opcodes for powering on nodes
218
getPowerOffOpCodes nl = do opcodes <- Node.genPowerOffOpCodes nl return [([opcodes], "Powering off nodes")] -- | Get opcodes for powering on nodes
151
false
true
0
10
32
72
39
33
null
null
fpco/cabal
Cabal/Distribution/Simple/Program/Db.hs
bsd-3-clause
requireProgramVersion :: Verbosity -> Program -> VersionRange -> ProgramDb -> IO (ConfiguredProgram, Version, ProgramDb) requireProgramVersion verbosity prog range conf = do -- If it's not already been configured, try to configure it now conf' <- case lookupProgram prog ...
1,632
requireProgramVersion :: Verbosity -> Program -> VersionRange -> ProgramDb -> IO (ConfiguredProgram, Version, ProgramDb) requireProgramVersion verbosity prog range conf = do -- If it's not already been configured, try to configure it now conf' <- case lookupProgram prog ...
1,632
requireProgramVersion verbosity prog range conf = do -- If it's not already been configured, try to configure it now conf' <- case lookupProgram prog conf of Nothing -> configureProgram verbosity prog conf Just _ -> return conf case lookupProgram prog conf' of Nothing -> d...
1,467
false
true
6
20
608
335
158
177
null
null
freizl/freizl.github.com-old
src/Hakyll/Core/Configuration.hs
bsd-3-clause
defaultConfiguration :: Configuration defaultConfiguration = Configuration { destinationDirectory = "_site" , storeDirectory = "_cache" , tmpDirectory = "_cache/tmp" , providerDirectory = "." , ignoreFile = ignoreFile' , deployCommand = "echo 'No deploy command ...
898
defaultConfiguration :: Configuration defaultConfiguration = Configuration { destinationDirectory = "_site" , storeDirectory = "_cache" , tmpDirectory = "_cache/tmp" , providerDirectory = "." , ignoreFile = ignoreFile' , deployCommand = "echo 'No deploy command ...
898
defaultConfiguration = Configuration { destinationDirectory = "_site" , storeDirectory = "_cache" , tmpDirectory = "_cache/tmp" , providerDirectory = "." , ignoreFile = ignoreFile' , deployCommand = "echo 'No deploy command specified' && exit 1" , deploySite...
860
false
true
0
8
287
159
91
68
null
null
gnn/Hets
OWL2/CASL2OWL.hs
gpl-2.0
toSubClass :: Id -> [ClassExpression] -> Axiom toSubClass i = PlainAxiom (ClassEntity $ toC i) . ListFrameBit (Just SubClass) . ExpressionBit . map (\ c -> ([], c))
166
toSubClass :: Id -> [ClassExpression] -> Axiom toSubClass i = PlainAxiom (ClassEntity $ toC i) . ListFrameBit (Just SubClass) . ExpressionBit . map (\ c -> ([], c))
166
toSubClass i = PlainAxiom (ClassEntity $ toC i) . ListFrameBit (Just SubClass) . ExpressionBit . map (\ c -> ([], c))
119
false
true
1
10
29
79
40
39
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpOcc :: PrimOp -> OccName primOpOcc op = case primOpInfo op of Dyadic occ _ -> occ Monadic occ _ -> occ Compare occ _ -> occ GenPrimOp occ _ _ _ -> occ -- primOpSig is like primOpType but gives the result split apart: -- (type variable...
391
primOpOcc :: PrimOp -> OccName primOpOcc op = case primOpInfo op of Dyadic occ _ -> occ Monadic occ _ -> occ Compare occ _ -> occ GenPrimOp occ _ _ _ -> occ -- primOpSig is like primOpType but gives the result split apart: -- (type variable...
391
primOpOcc op = case primOpInfo op of Dyadic occ _ -> occ Monadic occ _ -> occ Compare occ _ -> occ GenPrimOp occ _ _ _ -> occ -- primOpSig is like primOpType but gives the result split apart: -- (type variables, argument types, result type)...
360
false
true
0
8
138
76
37
39
null
null
ezyang/hoopl
testing/Parse.hs
bsd-3-clause
parens = P.parens lexer
23
parens = P.parens lexer
23
parens = P.parens lexer
23
false
false
0
6
3
11
5
6
null
null
GregorySchwartz/dotfiles
.xmonad/xmonad.hs
gpl-2.0
colors "red" = "#fb4934"
32
colors "red" = "#fb4934"
32
colors "red" = "#fb4934"
32
false
false
0
5
11
9
4
5
null
null
music-suite/music-pitch
src/Music/Pitch/Scale.hs
bsd-3-clause
ajorScale :: Mode Pitch majorScale = modeFromSteps [_M2,_M2,m2,_M2,_M2,_M2] _P8
80
majorScale :: Mode Pitch majorScale = modeFromSteps [_M2,_M2,m2,_M2,_M2,_M2] _P8
80
majorScale = modeFromSteps [_M2,_M2,m2,_M2,_M2,_M2] _P8
55
false
true
0
6
9
37
21
16
null
null
music-suite/music-pitch
src/Music/Pitch/Literal/Pitch.hs
bsd-3-clause
gs____ = fromPitch $ viaPitchL (4, 1, -4)
44
gs____ = fromPitch $ viaPitchL (4, 1, -4)
44
gs____ = fromPitch $ viaPitchL (4, 1, -4)
44
false
false
0
8
10
24
13
11
null
null
massysett/cartel
cartel/lib/Cartel/Betsy/Internal.hs
bsd-3-clause
makeFlag :: Applicative m => NonEmptyString -- ^ Name of flag -> FlagOpts -- ^ Options for the flag -> Betsy m FlagName -- ^ This operation will fail if there is already a flag with the -- name you gave. makeFlag nes opts = Betsy $ \fls -> pure $ case nes of [] -> Left EmptyFlagName x:xs -> ...
546
makeFlag :: Applicative m => NonEmptyString -- ^ Name of flag -> FlagOpts -- ^ Options for the flag -> Betsy m FlagName makeFlag nes opts = Betsy $ \fls -> pure $ case nes of [] -> Left EmptyFlagName x:xs -> let nm = FlagName x xs in case lookup nm . map (\(Flag n v) -> (n, v)) $ fls o...
458
makeFlag nes opts = Betsy $ \fls -> pure $ case nes of [] -> Left EmptyFlagName x:xs -> let nm = FlagName x xs in case lookup nm . map (\(Flag n v) -> (n, v)) $ fls of Nothing -> let st' = Flag nm opts : fls in Right (nm, st') Just _ -> Left (DuplicateFl...
326
true
true
0
21
182
191
94
97
null
null
Crazycolorz5/Haskell-Code
PrintPrimes.hs
unlicense
main=print s
12
main=print s
12
main=print s
12
false
false
1
5
1
13
4
9
null
null
TomMD/ghc
compiler/types/Type.hs
bsd-3-clause
cmpTypeX _ (ForAllTy _ _) (TyVarTy _) = GT
45
cmpTypeX _ (ForAllTy _ _) (TyVarTy _) = GT
45
cmpTypeX _ (ForAllTy _ _) (TyVarTy _) = GT
45
false
false
1
6
11
30
13
17
null
null
pascal-knodel/haskell-craft
_/links/E'10'15.hs
mit
prop_last' :: [Integer] -> Property prop_last' list = list /= [] ==> last' list == Prelude.last list
109
prop_last' :: [Integer] -> Property prop_last' list = list /= [] ==> last' list == Prelude.last list
109
prop_last' list = list /= [] ==> last' list == Prelude.last list
73
false
true
1
6
25
45
22
23
null
null
jean-edouard/manager
xenmgr/Vm/Queries.hs
gpl-2.0
whenManagedVm :: (MonadRpc e m) => Uuid -> m () -> m () whenManagedVm uuid f = whenM ( isManagedVm uuid ) f
107
whenManagedVm :: (MonadRpc e m) => Uuid -> m () -> m () whenManagedVm uuid f = whenM ( isManagedVm uuid ) f
107
whenManagedVm uuid f = whenM ( isManagedVm uuid ) f
51
false
true
0
9
22
56
27
29
null
null
jml/haverer
tests/Ring.hs
apache-2.0
-- Dropping the current item will always advance to the next item. dropCurrentItem :: Eq a => Ring a -> Property dropCurrentItem ring = ringSize ring > 1 ==> Just (currentItem (advance ring)) == fmap currentItem (dropItem ring (currentItem ring))
250
dropCurrentItem :: Eq a => Ring a -> Property dropCurrentItem ring = ringSize ring > 1 ==> Just (currentItem (advance ring)) == fmap currentItem (dropItem ring (currentItem ring))
183
dropCurrentItem ring = ringSize ring > 1 ==> Just (currentItem (advance ring)) == fmap currentItem (dropItem ring (currentItem ring))
137
true
true
0
11
43
78
37
41
null
null
noteed/syntactical
Text/Syntactical/Data.hs
bsd-3-clause
current (Middle l s _ _) = l ++ [s]
35
current (Middle l s _ _) = l ++ [s]
35
current (Middle l s _ _) = l ++ [s]
35
false
false
0
7
9
28
14
14
null
null
mcschroeder/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Given a bunch of alts code and their discrs, do the donkey work -- of making a multiway branch using a switch tree. -- What a load of hassle! mkMultiBranch :: Maybe Int -- # datacons in tycon, if alg alt ...
5,174
mkMultiBranch :: Maybe Int -- # datacons in tycon, if alg alt -- a hint; generates better code -- Nothing is always safe -> [(Discr, BCInstrList)] -> BcM BCInstrList mkMultiBranch maybe_ncons raw_ways = do lbl_default ...
4,947
mkMultiBranch maybe_ncons raw_ways = do lbl_default <- getLabelBc let mkTree :: [(Discr, BCInstrList)] -> Discr -> Discr -> BcM BCInstrList mkTree [] _range_lo _range_hi = return (unitOL (JMP lbl_default)) -- shouldn't happen? mkTree [val] range_lo range_hi ...
4,684
true
true
0
22
1,920
1,127
573
554
null
null
DavidAlphaFox/ghc
libraries/containers/Data/Sequence.hs
bsd-3-clause
-- | 'foldlWithIndex' is a version of 'foldl' that also provides access -- to the index of each element. foldlWithIndex :: (b -> Int -> a -> b) -> b -> Seq a -> b foldlWithIndex f z xs = foldl (\ g x i -> i `seq` f (g (i - 1)) i x) (const z) xs (length xs - 1)
260
foldlWithIndex :: (b -> Int -> a -> b) -> b -> Seq a -> b foldlWithIndex f z xs = foldl (\ g x i -> i `seq` f (g (i - 1)) i x) (const z) xs (length xs - 1)
155
foldlWithIndex f z xs = foldl (\ g x i -> i `seq` f (g (i - 1)) i x) (const z) xs (length xs - 1)
97
true
true
0
13
61
119
60
59
null
null
Enamex/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
nativeTyWidth :: NativeTy -> Int nativeTyWidth IT8 = 8
54
nativeTyWidth :: NativeTy -> Int nativeTyWidth IT8 = 8
54
nativeTyWidth IT8 = 8
21
false
true
0
5
8
22
10
12
null
null
WraithM/fingmodules
src/Language/Fw/TypeCheck.hs
bsd-3-clause
tyEq :: (Show a, Eq a) => Context a -> Type a -> Type a -> Bool tyEq _ TyInt TyInt = True
89
tyEq :: (Show a, Eq a) => Context a -> Type a -> Type a -> Bool tyEq _ TyInt TyInt = True
89
tyEq _ TyInt TyInt = True
25
false
true
0
9
22
54
26
28
null
null
romanb/amazonka
amazonka-sqs/gen/Network/AWS/SQS/Types.hs
mpl-2.0
-- | Not implemented. Reserved for future use. mavStringListValues :: Lens' MessageAttributeValue [Text] mavStringListValues = lens _mavStringListValues (\s a -> s { _mavStringListValues = a }) . _List
213
mavStringListValues :: Lens' MessageAttributeValue [Text] mavStringListValues = lens _mavStringListValues (\s a -> s { _mavStringListValues = a }) . _List
166
mavStringListValues = lens _mavStringListValues (\s a -> s { _mavStringListValues = a }) . _List
108
true
true
0
10
39
47
26
21
null
null
TomMD/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
getInvalids :: [Validity] -> [MsgDoc] getInvalids vs = [d | NotValid d <- vs]
77
getInvalids :: [Validity] -> [MsgDoc] getInvalids vs = [d | NotValid d <- vs]
77
getInvalids vs = [d | NotValid d <- vs]
39
false
true
0
9
13
44
21
23
null
null
green-haskell/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
dTyConKey = mkPreludeTyConUnique 146
36
dTyConKey = mkPreludeTyConUnique 146
36
dTyConKey = mkPreludeTyConUnique 146
36
false
false
0
5
3
9
4
5
null
null
conal/lambda-ccc
src/LambdaCCC/ReifySimple.hs
bsd-3-clause
varPatS = "varPat#"
19
varPatS = "varPat#"
19
varPatS = "varPat#"
19
false
false
1
5
2
10
3
7
null
null
lunaris/hindent
src/HIndent/Styles/Cramer.hs
bsd-3-clause
-- | Indent a half level. indentHalf :: MonadState (PrintState s) m => m a -> m a indentHalf p = getIndentSpaces >>= flip indented p . (`div` 2)
155
indentHalf :: MonadState (PrintState s) m => m a -> m a indentHalf p = getIndentSpaces >>= flip indented p . (`div` 2)
129
indentHalf p = getIndentSpaces >>= flip indented p . (`div` 2)
62
true
true
0
8
39
59
30
29
null
null
geocurnoff/nikki
src/Sorts/Nikki/Initialisation.hs
lgpl-3.0
headLeft = left
15
headLeft = left
15
headLeft = left
15
false
false
0
4
2
6
3
3
null
null
valis/hoq
src/Syntax/PrettyPrinter.hs
gpl-2.0
prec (Constr _ s) = prec s
36
prec (Constr _ s) = prec s
36
prec (Constr _ s) = prec s
36
false
false
0
7
16
20
9
11
null
null
mavenraven/hhunspell
src/HHunspell.hs
bsd-3-clause
nullableToErrorT :: (Monad m) => Ptr a -> ErrorT HunError m (Ptr a) nullableToErrorT = ErrorT . nullableToEither
112
nullableToErrorT :: (Monad m) => Ptr a -> ErrorT HunError m (Ptr a) nullableToErrorT = ErrorT . nullableToEither
112
nullableToErrorT = ErrorT . nullableToEither
44
false
true
0
9
17
44
22
22
null
null
tnrangwi/grill
src/FormulaEngine/Evaluate.hs
mit
eval :: T.FormulaTree -- ^ Compiled tree to evaluate -> EvalRef -- ^ The sheet, if other cells are referenced -> P.Plain -- ^ Plain result value eval (T.Raw v) _ = v
175
eval :: T.FormulaTree -- ^ Compiled tree to evaluate -> EvalRef -- ^ The sheet, if other cells are referenced -> P.Plain eval (T.Raw v) _ = v
151
eval (T.Raw v) _ = v
20
true
true
0
11
42
45
22
23
null
null
djeik/fuckdown2
src/Asm.hs
mit
je :: Val label addr -> AsmF label addr () je v1 = liftF . Je v1 $ ()
69
je :: Val label addr -> AsmF label addr () je v1 = liftF . Je v1 $ ()
69
je v1 = liftF . Je v1 $ ()
26
false
true
0
7
18
49
22
27
null
null
rrnewton/stack
src/Stack/Setup/Installed.hs
bsd-3-clause
toFilePathNoTrailingSlash :: Path loc Dir -> FilePath toFilePathNoTrailingSlash = FP.dropTrailingPathSeparator . toFilePath
123
toFilePathNoTrailingSlash :: Path loc Dir -> FilePath toFilePathNoTrailingSlash = FP.dropTrailingPathSeparator . toFilePath
123
toFilePathNoTrailingSlash = FP.dropTrailingPathSeparator . toFilePath
69
false
true
0
6
11
26
13
13
null
null
manyoo/Morakot
Network.hs
bsd-3-clause
emptyLine _ = False
19
emptyLine _ = False
19
emptyLine _ = False
19
false
false
0
4
3
10
4
6
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Flows/TransitionRouteGroups/Patch.hs
mpl-2.0
-- | OAuth access token. plaftrgpAccessToken :: Lens' ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatch (Maybe Text) plaftrgpAccessToken = lens _plaftrgpAccessToken (\ s a -> s{_plaftrgpAccessToken = a})
216
plaftrgpAccessToken :: Lens' ProjectsLocationsAgentsFlowsTransitionRouteGroupsPatch (Maybe Text) plaftrgpAccessToken = lens _plaftrgpAccessToken (\ s a -> s{_plaftrgpAccessToken = a})
191
plaftrgpAccessToken = lens _plaftrgpAccessToken (\ s a -> s{_plaftrgpAccessToken = a})
94
true
true
1
9
29
51
25
26
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/GluePartitionSkewedInfo.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-skewedinfo.html#cfn-glue-partition-skewedinfo-skewedcolumnvaluelocationmaps gpsiSkewedColumnValueLocationMaps :: Lens' GluePartitionSkewedInfo (Maybe Object) gpsiSkewedColumnValueLocationMaps = lens _gluePartitionSkewedInfo...
423
gpsiSkewedColumnValueLocationMaps :: Lens' GluePartitionSkewedInfo (Maybe Object) gpsiSkewedColumnValueLocationMaps = lens _gluePartitionSkewedInfoSkewedColumnValueLocationMaps (\s a -> s { _gluePartitionSkewedInfoSkewedColumnValueLocationMaps = a })
250
gpsiSkewedColumnValueLocationMaps = lens _gluePartitionSkewedInfoSkewedColumnValueLocationMaps (\s a -> s { _gluePartitionSkewedInfoSkewedColumnValueLocationMaps = a })
168
true
true
0
9
21
46
25
21
null
null
sdiehl/ghc
compiler/GHC/Cmm/Utils.hs
bsd-3-clause
isTrivialCmmExpr (CmmLit _) = True
42
isTrivialCmmExpr (CmmLit _) = True
42
isTrivialCmmExpr (CmmLit _) = True
42
false
false
0
7
12
15
7
8
null
null
Changaco/haskell-plugins
src/System/Plugins/Utils.hs
lgpl-2.1
decode_lower 'e' = '='
22
decode_lower 'e' = '='
22
decode_lower 'e' = '='
22
false
false
0
5
3
9
4
5
null
null
danse/haskell-opaleye
src/Opaleye/Internal/HaskellDB/Sql/Default.hs
bsd-3-clause
showBinOp OpLike = "LIKE"
32
showBinOp OpLike = "LIKE"
32
showBinOp OpLike = "LIKE"
32
false
false
0
5
10
9
4
5
null
null