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
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/24_07.hs
mit
assignmentEx :: ByteString assignmentEx = "woot=1"
50
assignmentEx :: ByteString assignmentEx = "woot=1"
50
assignmentEx = "woot=1"
23
false
true
0
4
5
11
6
5
null
null
rimmington/unordered-containers
tests/HashMapProperties.hs
bsd-3-clause
eq :: (Eq a, Eq k, Hashable k, Ord k) => (Model k v -> a) -- ^ Function that modifies a 'Model' -> (HM.HashMap k v -> a) -- ^ Function that modified a 'HashMap' in the same -- way -> [(k, v)] -- ^ Initial content of the 'HashMap' and 'Model' -> Bool ...
423
eq :: (Eq a, Eq k, Hashable k, Ord k) => (Model k v -> a) -- ^ Function that modifies a 'Model' -> (HM.HashMap k v -> a) -- ^ Function that modified a 'HashMap' in the same -- way -> [(k, v)] -- ^ Initial content of the 'HashMap' and 'Model' -> Bool eq f g x...
363
eq f g xs = g (HM.fromList xs) == f (M.fromList xs)
51
true
true
2
12
154
129
67
62
null
null
xenog/haskoin
test/bitcoin/Network/Haskoin/Crypto/Mnemonic/Tests.hs
unlicense
getBitsEndBits :: ByteCountGen -> Bool getBitsEndBits (ByteCountGen bs i) = (r == 0) || (BS.last bits .&. (0xff `shiftR` r) == 0x00) where r = i `mod` 8 bits = getBits i bs
186
getBitsEndBits :: ByteCountGen -> Bool getBitsEndBits (ByteCountGen bs i) = (r == 0) || (BS.last bits .&. (0xff `shiftR` r) == 0x00) where r = i `mod` 8 bits = getBits i bs
186
getBitsEndBits (ByteCountGen bs i) = (r == 0) || (BS.last bits .&. (0xff `shiftR` r) == 0x00) where r = i `mod` 8 bits = getBits i bs
147
false
true
3
9
46
87
46
41
null
null
martrik/COMP101
Term1/COMP101/Lab4/LabSheet4.hs
mit
prop_InRange :: Int -> Int -> [Int] -> Bool prop_InRange a b xs = lex
69
prop_InRange :: Int -> Int -> [Int] -> Bool prop_InRange a b xs = lex
69
prop_InRange a b xs = lex
25
false
true
0
8
14
33
17
16
null
null
ajnsit/glambda
src/Language/Glambda/Lex.hs
bsd-3-clause
--------------------------------------------------- -- Utility string_ :: String -> Lexer () string_ = ignore . string
118
string_ :: String -> Lexer () string_ = ignore . string
55
string_ = ignore . string
25
true
true
1
8
13
33
15
18
null
null
ciderpunx/exercismo
src/Luhn.hs
gpl-3.0
-- this is sort of cheeky, try all the digits and grab the first one that is -- valid. Worst case performance only requires 10 appends, digits and undigits -- so its fine to do it this way. create :: Integer -> Integer create n = head [ x | d <- [0..9] , let x = unDigits 10 (digits 10 n ++ [d]) ...
348
create :: Integer -> Integer create n = head [ x | d <- [0..9] , let x = unDigits 10 (digits 10 n ++ [d]) , isValid x ]
158
create n = head [ x | d <- [0..9] , let x = unDigits 10 (digits 10 n ++ [d]) , isValid x ]
129
true
true
0
14
106
77
40
37
null
null
foreverbell/project-euler-solutions
src/42.hs
bsd-3-clause
solve :: String -> Int solve input = length triangleWord where words' = filter (\s -> (length s) >= 2) (groupBy (\a b -> ((a == ',') == (b == ','))) input) words = sort $ map (tail . init) words' wordValue s = sum $ map (\c -> ord c - ord 'A' + 1) s triangleNumber = [ (n * (n + 1)) `d...
428
solve :: String -> Int solve input = length triangleWord where words' = filter (\s -> (length s) >= 2) (groupBy (\a b -> ((a == ',') == (b == ','))) input) words = sort $ map (tail . init) words' wordValue s = sum $ map (\c -> ord c - ord 'A' + 1) s triangleNumber = [ (n * (n + 1)) `d...
428
solve input = length triangleWord where words' = filter (\s -> (length s) >= 2) (groupBy (\a b -> ((a == ',') == (b == ','))) input) words = sort $ map (tail . init) words' wordValue s = sum $ map (\c -> ord c - ord 'A' + 1) s triangleNumber = [ (n * (n + 1)) `div` 2 | n <- [1 .. 100]...
405
false
true
0
15
133
224
121
103
null
null
Fermat/Gottlob
Language/Induction.hs
bsd-3-clause
tailAppend x f2 y= Forall x (Imply (rename (PVar $ y++ show 1) (PVar y) f2) f2)
81
tailAppend x f2 y= Forall x (Imply (rename (PVar $ y++ show 1) (PVar y) f2) f2)
81
tailAppend x f2 y= Forall x (Imply (rename (PVar $ y++ show 1) (PVar y) f2) f2)
81
false
false
1
12
18
64
27
37
null
null
ameingast/slisp
src/SLISP/Eval.hs
bsd-3-clause
keyOrder :: [String] -> [Expression] -> [Expression] keyOrder [] exprs = exprs
78
keyOrder :: [String] -> [Expression] -> [Expression] keyOrder [] exprs = exprs
78
keyOrder [] exprs = exprs
25
false
true
0
7
11
35
19
16
null
null
antalsz/hs-to-coq
examples/ghc/gen-files/Config.hs
mit
cProjectGitCommitId :: String cProjectGitCommitId = "f31c40efdc918bc9da8a325327ba5a472bd6ea9e"
98
cProjectGitCommitId :: String cProjectGitCommitId = "f31c40efdc918bc9da8a325327ba5a472bd6ea9e"
98
cProjectGitCommitId = "f31c40efdc918bc9da8a325327ba5a472bd6ea9e"
66
false
true
0
4
9
11
6
5
null
null
jwiegley/github
src/GitHub/Request.hs
bsd-3-clause
onHttpException :: MonadError Error m => HttpException -> m a onHttpException = throwError . HTTPError
102
onHttpException :: MonadError Error m => HttpException -> m a onHttpException = throwError . HTTPError
102
onHttpException = throwError . HTTPError
40
false
true
1
8
14
38
16
22
null
null
GRACeFUL-project/haskelzinc
examples.hs
bsd-3-clause
ler1 = [ (%) "Example taken from http://www.hakank.org/minizinc/euler_1.mzn", assignPar Int "n" $ 999, declarePar (Array [CT $ 1 ... "n"] Dec (CT $ 0 ... 1)) "x", assignVar Int "s" $ forall [["i"] @@ 1 ... "n"] "sum" ("x"!.["i"] * "i"), solve satisfy, constraint $ forall [["i"] @@ 1 ... "n"] "fora...
486
euler1 = [ (%) "Example taken from http://www.hakank.org/minizinc/euler_1.mzn", assignPar Int "n" $ 999, declarePar (Array [CT $ 1 ... "n"] Dec (CT $ 0 ... 1)) "x", assignVar Int "s" $ forall [["i"] @@ 1 ... "n"] "sum" ("x"!.["i"] * "i"), solve satisfy, constraint $ forall [["i"] @@ 1 ... "n"] "fo...
486
euler1 = [ (%) "Example taken from http://www.hakank.org/minizinc/euler_1.mzn", assignPar Int "n" $ 999, declarePar (Array [CT $ 1 ... "n"] Dec (CT $ 0 ... 1)) "x", assignVar Int "s" $ forall [["i"] @@ 1 ... "n"] "sum" ("x"!.["i"] * "i"), solve satisfy, constraint $ forall [["i"] @@ 1 ... "n"] "fo...
486
false
false
1
17
128
238
129
109
null
null
mitchellwrosen/hive
hive/src/Hive/Game.hs
bsd-3-clause
gamePlayerL :: Lens' Game Player gamePlayerL = lens gamePlayer (\x y -> x { gamePlayer = y })
93
gamePlayerL :: Lens' Game Player gamePlayerL = lens gamePlayer (\x y -> x { gamePlayer = y })
93
gamePlayerL = lens gamePlayer (\x y -> x { gamePlayer = y })
60
false
true
0
9
17
39
21
18
null
null
yuvallanger/threepenny-gui
samples/GameThing.hs
bsd-3-clause
where location = pixelsToGrid pixels
36
where location = pixelsToGrid pixels
36
where location = pixelsToGrid pixels
36
false
false
1
5
4
15
5
10
null
null
jlouis/combinatorrent
src/Protocol/BCode.hs
bsd-2-clause
getWrapped :: Char -> Char -> Get a -> Get a getWrapped a b p = char a *> p <* char b
85
getWrapped :: Char -> Char -> Get a -> Get a getWrapped a b p = char a *> p <* char b
85
getWrapped a b p = char a *> p <* char b
40
false
true
0
8
22
50
23
27
null
null
wtanaka/haskell
MutualTailRecursion.hs
gpl-3.0
_countNonAsMutual2 xs acc | 'a' == head xs = countAsMutual2 xs acc | otherwise = _countNonAsMutual2 (tail xs) acc
119
_countNonAsMutual2 xs acc | 'a' == head xs = countAsMutual2 xs acc | otherwise = _countNonAsMutual2 (tail xs) acc
119
_countNonAsMutual2 xs acc | 'a' == head xs = countAsMutual2 xs acc | otherwise = _countNonAsMutual2 (tail xs) acc
119
false
false
1
9
24
47
21
26
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeVpcClassicLink.hs
mpl-2.0
-- | 'DescribeVpcClassicLink' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dvclDryRun' @::@ 'Maybe' 'Bool' -- -- * 'dvclFilters' @::@ ['Filter'] -- -- * 'dvclVpcIds' @::@ ['Text'] -- describeVpcClassicLink :: DescribeVpcClassicLink describeVpcClassicLink = DescribeVpcClassicLink ...
409
describeVpcClassicLink :: DescribeVpcClassicLink describeVpcClassicLink = DescribeVpcClassicLink { _dvclDryRun = Nothing , _dvclVpcIds = mempty , _dvclFilters = mempty }
187
describeVpcClassicLink = DescribeVpcClassicLink { _dvclDryRun = Nothing , _dvclVpcIds = mempty , _dvclFilters = mempty }
138
true
true
0
7
69
45
30
15
null
null
fmapfmapfmap/amazonka
amazonka-codepipeline/gen/Network/AWS/CodePipeline/Types/Product.hs
mpl-2.0
-- | The action declaration\'s name. adName :: Lens' ActionDeclaration Text adName = lens _adName (\ s a -> s{_adName = a})
123
adName :: Lens' ActionDeclaration Text adName = lens _adName (\ s a -> s{_adName = a})
86
adName = lens _adName (\ s a -> s{_adName = a})
47
true
true
0
9
21
40
22
18
null
null
eijian/mkcpu
src/Logic/Register.hs
bsd-3-clause
lc_register4 :: LogicCircuit lc_register4 = lc_register 4
57
lc_register4 :: LogicCircuit lc_register4 = lc_register 4
57
lc_register4 = lc_register 4
28
false
true
0
5
6
14
7
7
null
null
bananu7/Hate
src/Hate/Events.hs
mit
writeWithTime :: TQueue TimedEvent -> Event -> IO () writeWithTime tc e = time >>= \t -> atomically . writeTQueue tc $ (t, e)
126
writeWithTime :: TQueue TimedEvent -> Event -> IO () writeWithTime tc e = time >>= \t -> atomically . writeTQueue tc $ (t, e)
125
writeWithTime tc e = time >>= \t -> atomically . writeTQueue tc $ (t, e)
72
false
true
0
9
24
58
29
29
null
null
spechub/Hets
QBF/Analysis.hs
gpl-2.0
-- Basic analysis for propositional logic basicPropositionalAnalysis :: (AS_BASIC.BASICSPEC, Sign.Sign, GlobalAnnos.GlobalAnnos) -> Result.Result (AS_BASIC.BASICSPEC, ExtSign Sign.Sign Symbol.Symbol, [AS_Anno.Named AS_BASIC.FORMULA]) basicPropositionalAnalysis (bs, sig, _) = ...
800
basicPropositionalAnalysis :: (AS_BASIC.BASICSPEC, Sign.Sign, GlobalAnnos.GlobalAnnos) -> Result.Result (AS_BASIC.BASICSPEC, ExtSign Sign.Sign Symbol.Symbol, [AS_Anno.Named AS_BASIC.FORMULA]) basicPropositionalAnalysis (bs, sig, _) = Result.Result diags $ if exErrs then No...
758
basicPropositionalAnalysis (bs, sig, _) = Result.Result diags $ if exErrs then Nothing else Just (bs, ExtSign sigItems declaredSyms, formulae) where bsSig = makeSig bs sig sigItems = msign bsSig declaredSyms = Set.map Symbol.Symbol $ Set.difference (items sigItems) $ items sig ...
522
true
true
6
11
194
232
112
120
null
null
Altech/haScm
src/Scheme/Evaluator.hs
gpl-3.0
set _ b = badS b
16
set _ b = badS b
16
set _ b = badS b
16
false
false
1
5
5
15
6
9
null
null
codemac/yi-editor
src/Yi/UI/Cocoa/Application.hs
gpl-2.0
ya_run :: YiApplication () -> IO () ya_run self = do -- Schedule a timer that repeatedly invokes ya_doTick in order to have -- some Haskell code running all the time. This will prevent other -- Haskell threads to stall while waiting for the Cocoa run loop to finish. _NSTimer # scheduledTimerWithTimeIntervalTarg...
429
ya_run :: YiApplication () -> IO () ya_run self = do -- Schedule a timer that repeatedly invokes ya_doTick in order to have -- some Haskell code running all the time. This will prevent other -- Haskell threads to stall while waiting for the Cocoa run loop to finish. _NSTimer # scheduledTimerWithTimeIntervalTarg...
429
ya_run self = do -- Schedule a timer that repeatedly invokes ya_doTick in order to have -- some Haskell code running all the time. This will prevent other -- Haskell threads to stall while waiting for the Cocoa run loop to finish. _NSTimer # scheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats ...
393
false
true
0
10
87
70
32
38
null
null
rueshyna/gogol
gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Services/Patch.hs
mpl-2.0
-- | Part of \`name\`. See documentation of \`appsId\`. aspServicesId :: Lens' AppsServicesPatch Text aspServicesId = lens _aspServicesId (\ s a -> s{_aspServicesId = a})
178
aspServicesId :: Lens' AppsServicesPatch Text aspServicesId = lens _aspServicesId (\ s a -> s{_aspServicesId = a})
122
aspServicesId = lens _aspServicesId (\ s a -> s{_aspServicesId = a})
76
true
true
0
9
32
42
22
20
null
null
wangwangwar/cis194
src/ch7/Ch7.hs
bsd-3-clause
treeDepth :: Tree a -> Integer treeDepth Empty = 0
50
treeDepth :: Tree a -> Integer treeDepth Empty = 0
50
treeDepth Empty = 0
19
false
true
0
7
9
27
11
16
null
null
merijn/trifecta
tests/QuickCheck.hs
bsd-3-clause
prop_notFollowedBy2 :: String -> Char -> Bool prop_notFollowedBy2 x y = isLeft $ parse (anyChar *> notFollowedBy (char y) *> char y) x
138
prop_notFollowedBy2 :: String -> Char -> Bool prop_notFollowedBy2 x y = isLeft $ parse (anyChar *> notFollowedBy (char y) *> char y) x
138
prop_notFollowedBy2 x y = isLeft $ parse (anyChar *> notFollowedBy (char y) *> char y) x
92
false
true
2
11
26
57
27
30
null
null
jystic/calamine
src/Main.hs
bsd-3-clause
forkLogging :: IO () forkLogging = void . forkIO . forever $ do msg <- atomically (readTChan logChan) T.hPutStrLn stderr msg hFlush stderr
150
forkLogging :: IO () forkLogging = void . forkIO . forever $ do msg <- atomically (readTChan logChan) T.hPutStrLn stderr msg hFlush stderr
150
forkLogging = void . forkIO . forever $ do msg <- atomically (readTChan logChan) T.hPutStrLn stderr msg hFlush stderr
129
false
true
0
11
34
60
27
33
null
null
NightRa/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LSHL ITNative) [l, r] = v ++ "INTOP(<<," ++ creg l ++ ", " ++ creg r ++ ")"
83
doOp v (LSHL ITNative) [l, r] = v ++ "INTOP(<<," ++ creg l ++ ", " ++ creg r ++ ")"
83
doOp v (LSHL ITNative) [l, r] = v ++ "INTOP(<<," ++ creg l ++ ", " ++ creg r ++ ")"
83
false
false
0
9
20
51
25
26
null
null
vincenthz/cryptonite
gen/Template.hs
bsd-3-clause
renderTemplate :: Template -> Attrs -> [(String, [Attrs])] -> String renderTemplate template attrs multiAttrs = concat $ map renderAtom template where renderAtom :: TAtom -> String renderAtom (Text b) = b renderAtom (Var s) = maybe "" id $ lo...
720
renderTemplate :: Template -> Attrs -> [(String, [Attrs])] -> String renderTemplate template attrs multiAttrs = concat $ map renderAtom template where renderAtom :: TAtom -> String renderAtom (Text b) = b renderAtom (Var s) = maybe "" id $ lo...
720
renderTemplate template attrs multiAttrs = concat $ map renderAtom template where renderAtom :: TAtom -> String renderAtom (Text b) = b renderAtom (Var s) = maybe "" id $ lookup s attrs renderAtom (Tpl n t) = case lookup n multiAttrs of Nothing ->...
606
false
true
0
16
284
235
119
116
null
null
pxqr/algorithm-wm
src/TC.hs
mit
kdChk :: Ty -> Kind -> Context Kind () kdChk t ke = do ka <- kdInf t spec <- withUKd $ do unifyKd ke ka ka' <- reify ka ke' <- reify ke return (ka' == ke') unless spec $ do throwError (KindMismatchE ke ka t) return ()
246
kdChk :: Ty -> Kind -> Context Kind () kdChk t ke = do ka <- kdInf t spec <- withUKd $ do unifyKd ke ka ka' <- reify ka ke' <- reify ke return (ka' == ke') unless spec $ do throwError (KindMismatchE ke ka t) return ()
246
kdChk t ke = do ka <- kdInf t spec <- withUKd $ do unifyKd ke ka ka' <- reify ka ke' <- reify ke return (ka' == ke') unless spec $ do throwError (KindMismatchE ke ka t) return ()
207
false
true
0
13
77
127
55
72
null
null
chemist/highlighter
src/Text/Highlighter/Lexers/Felix.hs
bsd-3-clause
tvarlist' :: TokenMatcher tvarlist' = [ anyOf whitespace' , anyOf operators' , tokNext "\\[" (Arbitrary "Punctuation") Push , tokNext "\\]" (Arbitrary "Punctuation") Pop , tok "," (Arbitrary "Punctuation") , tok "(with|where)\\b" (Arbitrary "Keyword") , tok "[a-zA-Z_]\\w*" (Arbitrary "Name")...
326
tvarlist' :: TokenMatcher tvarlist' = [ anyOf whitespace' , anyOf operators' , tokNext "\\[" (Arbitrary "Punctuation") Push , tokNext "\\]" (Arbitrary "Punctuation") Pop , tok "," (Arbitrary "Punctuation") , tok "(with|where)\\b" (Arbitrary "Keyword") , tok "[a-zA-Z_]\\w*" (Arbitrary "Name")...
326
tvarlist' = [ anyOf whitespace' , anyOf operators' , tokNext "\\[" (Arbitrary "Punctuation") Push , tokNext "\\]" (Arbitrary "Punctuation") Pop , tok "," (Arbitrary "Punctuation") , tok "(with|where)\\b" (Arbitrary "Keyword") , tok "[a-zA-Z_]\\w*" (Arbitrary "Name") ]
300
false
true
0
9
70
104
50
54
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
toName GW = "Guinea-Bissau"
27
toName GW = "Guinea-Bissau"
27
toName GW = "Guinea-Bissau"
27
false
false
0
4
3
10
4
6
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
dataCollectorDrbd :: String dataCollectorDrbd = "drbd"
66
dataCollectorDrbd :: String dataCollectorDrbd = "drbd"
66
dataCollectorDrbd = "drbd"
32
false
true
0
4
17
11
6
5
null
null
mdsteele/fallback
src/Fallback/Scenario/Script/Attack.hs
gpl-3.0
monsterOffensiveAction :: Grid.Key Monster -> Int -> Script CombatEffect () monsterOffensiveAction key frames = do alterStatus (HitMonster key) (seSetInvisibility NoInvisibility) setMonsterAnim key (AttackAnim frames) -- | Same as 'monsterOffensiveAction', but also face the monster towards the -- given position.
318
monsterOffensiveAction :: Grid.Key Monster -> Int -> Script CombatEffect () monsterOffensiveAction key frames = do alterStatus (HitMonster key) (seSetInvisibility NoInvisibility) setMonsterAnim key (AttackAnim frames) -- | Same as 'monsterOffensiveAction', but also face the monster towards the -- given position.
318
monsterOffensiveAction key frames = do alterStatus (HitMonster key) (seSetInvisibility NoInvisibility) setMonsterAnim key (AttackAnim frames) -- | Same as 'monsterOffensiveAction', but also face the monster towards the -- given position.
242
false
true
0
9
43
72
34
38
null
null
Quid2/model
src/Data/Model/Types.hs
bsd-3-clause
nestedTypeNs t@(TypeN _ ps) = t : concatMap nestedTypeNs ps
59
nestedTypeNs t@(TypeN _ ps) = t : concatMap nestedTypeNs ps
59
nestedTypeNs t@(TypeN _ ps) = t : concatMap nestedTypeNs ps
59
false
false
0
8
9
29
14
15
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Update.hs
mpl-2.0
-- | Landing page campaign ID. lpuCampaignId :: Lens' LandingPagesUpdate Int64 lpuCampaignId = lens _lpuCampaignId (\ s a -> s{_lpuCampaignId = a}) . _Coerce
171
lpuCampaignId :: Lens' LandingPagesUpdate Int64 lpuCampaignId = lens _lpuCampaignId (\ s a -> s{_lpuCampaignId = a}) . _Coerce
140
lpuCampaignId = lens _lpuCampaignId (\ s a -> s{_lpuCampaignId = a}) . _Coerce
92
true
true
2
8
37
50
24
26
null
null
dmjio/aeson
src/Data/Aeson/Encoding/Builder.hs
bsd-3-clause
encodeToBuilder (String s) = text s
35
encodeToBuilder (String s) = text s
35
encodeToBuilder (String s) = text s
35
false
false
0
7
5
18
8
10
null
null
geophf/1HaskellADay
exercises/HAD/Y2016/M10/D11/Exercise.hs
mit
{-- BONUS ----------------------------------------------------------------- Using the work you've done before, e.g. Y2016.M10.D06.Exercise, make the block hash ID a link to show the transactions for that block in a pretty HTML table format --} transactionsFromBlock :: Hash -> Element transactionsFromBlock hashId = ...
329
transactionsFromBlock :: Hash -> Element transactionsFromBlock hashId = undefined
81
transactionsFromBlock hashId = undefined
40
true
true
0
5
44
19
10
9
null
null
eamsden/Animas
src/FRP/Animas/Miscellany.hs
bsd-3-clause
-- | Apply a function to the first value in each pair in a list of pairs. mapFst :: (a -> b) -> [(a,c)] -> [(b,c)] mapFst _ [] = []
143
mapFst :: (a -> b) -> [(a,c)] -> [(b,c)] mapFst _ [] = []
69
mapFst _ [] = []
28
true
true
0
8
42
54
31
23
null
null
olsner/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp dflags IntGtOp = Just (mo_wordSGt dflags)
60
translateOp dflags IntGtOp = Just (mo_wordSGt dflags)
60
translateOp dflags IntGtOp = Just (mo_wordSGt dflags)
60
false
false
0
7
13
22
9
13
null
null
ihc/futhark
src/Futhark/Test/Values.hs
isc
constituent ']' = False
23
constituent ']' = False
23
constituent ']' = False
23
false
false
0
5
3
9
4
5
null
null
tpsinnem/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
bUn (ITFixed IT16) op [B16 x] = Just $ B16 (op x)
53
bUn (ITFixed IT16) op [B16 x] = Just $ B16 (op x)
53
bUn (ITFixed IT16) op [B16 x] = Just $ B16 (op x)
53
false
false
1
8
15
41
18
23
null
null
mzini/TcT
source/Tct/Method/PopStar.hs
gpl-3.0
-- | This processor is like 'popstarSmall' but incorporates parameter substitution addidionally. spopstarPS :: S.ProcessorInstance PopStar spopstarPS = ppopstarProcessor `S.withArgs` (True :+: True :+: Nothing)
210
spopstarPS :: S.ProcessorInstance PopStar spopstarPS = ppopstarProcessor `S.withArgs` (True :+: True :+: Nothing)
113
spopstarPS = ppopstarProcessor `S.withArgs` (True :+: True :+: Nothing)
71
true
true
1
9
24
40
20
20
null
null
urbanslug/ghc
compiler/specialise/Rules.hs
bsd-3-clause
noBlackList :: Activation -> Bool noBlackList _ = False
55
noBlackList :: Activation -> Bool noBlackList _ = False
55
noBlackList _ = False
21
false
true
0
7
8
24
10
14
null
null
ekmett/ghc
compiler/cmm/PprC.hs
bsd-3-clause
pprLit1 :: CmmLit -> SDoc pprLit1 lit@(CmmLabelOff _ _) = parens (pprLit lit)
77
pprLit1 :: CmmLit -> SDoc pprLit1 lit@(CmmLabelOff _ _) = parens (pprLit lit)
77
pprLit1 lit@(CmmLabelOff _ _) = parens (pprLit lit)
51
false
true
3
7
12
42
20
22
null
null
chadbrewbaker/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readAssignmentWord2 = isOk readAssignmentWord "b=(1 2 3)"
62
prop_readAssignmentWord2 = isOk readAssignmentWord "b=(1 2 3)"
62
prop_readAssignmentWord2 = isOk readAssignmentWord "b=(1 2 3)"
62
false
false
0
5
6
11
5
6
null
null
mrkkrp/stack
src/Stack/Config.hs
bsd-3-clause
resolvePackageLocation menv projRoot (PLRemote url remotePackageType) = do workDir <- view workDirL let nameBeforeHashing = case remotePackageType of RPTHttp{} -> url RPTGit commit -> T.unwords [url, commit] RPTHg commit -> T.unwords [url, commit, "hg"] -- TODO: dedup...
4,545
resolvePackageLocation menv projRoot (PLRemote url remotePackageType) = do workDir <- view workDirL let nameBeforeHashing = case remotePackageType of RPTHttp{} -> url RPTGit commit -> T.unwords [url, commit] RPTHg commit -> T.unwords [url, commit, "hg"] -- TODO: dedup...
4,545
resolvePackageLocation menv projRoot (PLRemote url remotePackageType) = do workDir <- view workDirL let nameBeforeHashing = case remotePackageType of RPTHttp{} -> url RPTGit commit -> T.unwords [url, commit] RPTHg commit -> T.unwords [url, commit, "hg"] -- TODO: dedup...
4,545
false
false
2
36
1,847
987
470
517
null
null
tomlokhorst/language-cil
src/Language/Cil/Build.hs
bsd-3-clause
unaligned :: Alignment -> MethodDecl unaligned a = OpCode $ Unaligned a
71
unaligned :: Alignment -> MethodDecl unaligned a = OpCode $ Unaligned a
71
unaligned a = OpCode $ Unaligned a
34
false
true
2
7
11
31
13
18
null
null
valderman/shellmate
shellmate/Control/Shell/Concurrent.hs
bsd-3-clause
await :: Future a -> Shell a await (Future h v) = joinResult $ unsafeLiftIO (readMVar v <* readIORef h)
103
await :: Future a -> Shell a await (Future h v) = joinResult $ unsafeLiftIO (readMVar v <* readIORef h)
103
await (Future h v) = joinResult $ unsafeLiftIO (readMVar v <* readIORef h)
74
false
true
2
9
19
57
25
32
null
null
ocean0yohsuke/Simply-Typed-Lambda
src/Lambda/Parser.hs
bsd-3-clause
commentblock :: Parser String commentblock = block1 <|> block2 <?> "commentblock" where block1 = do c <- commentline cs <- many $ commentline (*:) (c ++ concat cs) block2 = do string "{-" manyTill anyChar (try (string "-}"))
275
commentblock :: Parser String commentblock = block1 <|> block2 <?> "commentblock" where block1 = do c <- commentline cs <- many $ commentline (*:) (c ++ concat cs) block2 = do string "{-" manyTill anyChar (try (string "-}"))
275
commentblock = block1 <|> block2 <?> "commentblock" where block1 = do c <- commentline cs <- many $ commentline (*:) (c ++ concat cs) block2 = do string "{-" manyTill anyChar (try (string "-}"))
245
false
true
3
12
88
107
46
61
null
null
ArnoVanLumig/chesshs
ChessTest.hs
bsd-3-clause
enumpos = let Just brd = fromFEN brutepos in describe "brute force" $ do it "should accept all moves" $ do assertEmpty (filter (\x -> not $ valid x brd) brutemoves) it "shouldn't accept any other move" $ do assertEmpty (filter (\x -> valid x brd) (mulMovesExcept pieces brutemoves))
304
enumpos = let Just brd = fromFEN brutepos in describe "brute force" $ do it "should accept all moves" $ do assertEmpty (filter (\x -> not $ valid x brd) brutemoves) it "shouldn't accept any other move" $ do assertEmpty (filter (\x -> valid x brd) (mulMovesExcept pieces brutemoves))
304
enumpos = let Just brd = fromFEN brutepos in describe "brute force" $ do it "should accept all moves" $ do assertEmpty (filter (\x -> not $ valid x brd) brutemoves) it "shouldn't accept any other move" $ do assertEmpty (filter (\x -> valid x brd) (mulMovesExcept pieces brutemoves))
304
false
false
0
19
70
117
53
64
null
null
Zigazou/containers
Data/Sequence.hs
bsd-3-clause
toPQ _ f (Single x) = Just (f x)
32
toPQ _ f (Single x) = Just (f x)
32
toPQ _ f (Single x) = Just (f x)
32
false
false
1
7
8
32
13
19
null
null
treeowl/GADTSeq
Data/Sequence.hs
bsd-3-clause
addDigits1 m1 (One a) b (Three c d e) m2 = appendTree2 m1 (node3 a b c) (node2 d e) m2
90
addDigits1 m1 (One a) b (Three c d e) m2 = appendTree2 m1 (node3 a b c) (node2 d e) m2
90
addDigits1 m1 (One a) b (Three c d e) m2 = appendTree2 m1 (node3 a b c) (node2 d e) m2
90
false
false
0
7
24
60
29
31
null
null
ruicc/chat-server
tests/Tasty.hs
mit
qcProps = testGroup "QuickCheck" [ QC.testProperty "id == reverse . reverse" $ \ (list :: [Int]) -> list == reverse (reverse list) ]
148
qcProps = testGroup "QuickCheck" [ QC.testProperty "id == reverse . reverse" $ \ (list :: [Int]) -> list == reverse (reverse list) ]
148
qcProps = testGroup "QuickCheck" [ QC.testProperty "id == reverse . reverse" $ \ (list :: [Int]) -> list == reverse (reverse list) ]
148
false
false
0
12
38
51
26
25
null
null
SFML-haskell/SFML
src/SFML/Graphics/Texture.hs
mit
--CSFML_GRAPHICS_API void sfTexture_destroy(sfTexture* texture); -- | Return the size of the texture in pixels. textureSize :: Texture -> IO Vec2u textureSize tex = alloca $ \ptr -> sfTexture_getSize_helper tex ptr >> peek ptr
228
textureSize :: Texture -> IO Vec2u textureSize tex = alloca $ \ptr -> sfTexture_getSize_helper tex ptr >> peek ptr
114
textureSize tex = alloca $ \ptr -> sfTexture_getSize_helper tex ptr >> peek ptr
79
true
true
0
8
34
48
23
25
null
null
GaloisInc/saw-script
cryptol-saw-core/src/Verifier/SAW/CryptolEnv.hs
bsd-3-clause
loadCryptolModule :: (?fileReader :: FilePath -> IO ByteString) => SharedContext -> C.ImportPrimitiveOptions -> CryptolEnv -> FilePath -> IO (CryptolModule, CryptolEnv) loadCryptolModule sc primOpts env path = do let modEnv = eModuleEnv env (m, modEnv') <- liftModuleM modEnv (MB.loadModuleByPath path) ...
1,526
loadCryptolModule :: (?fileReader :: FilePath -> IO ByteString) => SharedContext -> C.ImportPrimitiveOptions -> CryptolEnv -> FilePath -> IO (CryptolModule, CryptolEnv) loadCryptolModule sc primOpts env path = do let modEnv = eModuleEnv env (m, modEnv') <- liftModuleM modEnv (MB.loadModuleByPath path) ...
1,526
loadCryptolModule sc primOpts env path = do let modEnv = eModuleEnv env (m, modEnv') <- liftModuleM modEnv (MB.loadModuleByPath path) checkNotParameterized m let ifaceDecls = getAllIfaceDecls modEnv' (types, modEnv'') <- liftModuleM modEnv' $ do prims <- MB.getPrimMap TM.inpVars `fmap` MB.genInferInp...
1,345
false
true
0
18
297
543
263
280
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_LUA_WORD3 :: Int wxSTC_LUA_WORD3 = 14
43
wxSTC_LUA_WORD3 :: Int wxSTC_LUA_WORD3 = 14
43
wxSTC_LUA_WORD3 = 14
20
false
true
0
6
5
18
7
11
null
null
AubreyEAnderson/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
-- Checks that are run on the AST root treeChecks :: [Parameters -> Token -> [TokenComment]] treeChecks = [ runNodeAnalysis (\p t -> (mapM_ ((\ f -> f t) . (\ f -> f p)) (nodeChecks ++ checksFor (shellType p)))) ,subshellAssignmentCheck ,checkSpacefulness ,checkQuotesInLiterals ,...
539
treeChecks :: [Parameters -> Token -> [TokenComment]] treeChecks = [ runNodeAnalysis (\p t -> (mapM_ ((\ f -> f t) . (\ f -> f p)) (nodeChecks ++ checksFor (shellType p)))) ,subshellAssignmentCheck ,checkSpacefulness ,checkQuotesInLiterals ,checkShebangParameters ,checkFuncti...
500
treeChecks = [ runNodeAnalysis (\p t -> (mapM_ ((\ f -> f t) . (\ f -> f p)) (nodeChecks ++ checksFor (shellType p)))) ,subshellAssignmentCheck ,checkSpacefulness ,checkQuotesInLiterals ,checkShebangParameters ,checkFunctionsUsedExternally ,checkUnusedAssignments ,che...
446
true
true
0
16
123
135
75
60
null
null
futtetennista/IntroductionToFunctionalProgramming
RWH/src/Ch16/HttpRequestParser.hs
mit
httpToken :: Monad m => (ParsecT String Int m Char -> ParsecT String Int m Char) -> ParsecT String Int m [Char] httpToken p = -- (:) <$> statefulParser letter <*> (many . statefulParser) (letter <|> digit <|> oneOf "-_") many1 (p tchar) where -- tchar :: Monad m => ParsecT String Int m Str...
455
httpToken :: Monad m => (ParsecT String Int m Char -> ParsecT String Int m Char) -> ParsecT String Int m [Char] httpToken p = -- (:) <$> statefulParser letter <*> (many . statefulParser) (letter <|> digit <|> oneOf "-_") many1 (p tchar) where -- tchar :: Monad m => ParsecT String Int m Str...
455
httpToken p = -- (:) <$> statefulParser letter <*> (many . statefulParser) (letter <|> digit <|> oneOf "-_") many1 (p tchar) where -- tchar :: Monad m => ParsecT String Int m String -> ParsecT String Int m String tchar = noneOf (separators ++ ctls) -- satisfy (not . (`elem` (separators ++ ctls...
323
false
true
0
9
120
92
46
46
null
null
frantisekfarka/ghc-dsi
compiler/utils/IOEnv.hs
bsd-3-clause
tryM :: IOEnv env r -> IOEnv env (Either IOEnvFailure r) -- Reflect UserError exceptions (only) into IOEnv monad -- Other exceptions are not caught; they are simply propagated as exns -- -- The idea is that errors in the program being compiled will give rise -- to UserErrors. But, say, pattern-match failures in GHC it...
489
tryM :: IOEnv env r -> IOEnv env (Either IOEnvFailure r) tryM (IOEnv thing) = IOEnv (\ env -> tryIOEnvFailure (thing env))
122
tryM (IOEnv thing) = IOEnv (\ env -> tryIOEnvFailure (thing env))
65
true
true
0
10
85
73
38
35
null
null
CindyLinz/Haskell.js
trans/src/Desugar/Tuple.hs
mit
deTupleRhs (GuardedRhss l guardedRhs) = GuardedRhss (id l) (fmap (deTupleGuardedRhs) guardedRhs)
96
deTupleRhs (GuardedRhss l guardedRhs) = GuardedRhss (id l) (fmap (deTupleGuardedRhs) guardedRhs)
96
deTupleRhs (GuardedRhss l guardedRhs) = GuardedRhss (id l) (fmap (deTupleGuardedRhs) guardedRhs)
96
false
false
0
8
10
40
19
21
null
null
jyp/ling
Ling/Subst.hs
bsd-3-clause
app :: Defs -> Term -> [Term] -> Term app _ t [] = t
59
app :: Defs -> Term -> [Term] -> Term app _ t [] = t
59
app _ t [] = t
21
false
true
0
10
21
41
19
22
null
null
CRogers/hspec-reactive-banana
src/Test/Hspec/ReactiveBanana.hs
bsd-3-clause
dup :: Event t a -> Event t a dup e = union e e
47
dup :: Event t a -> Event t a dup e = union e e
47
dup e = union e e
17
false
true
0
7
14
37
16
21
null
null
radekm/crep
FrontEnd/RegexParser.hs
bsd-3-clause
p_group :: RegexParserSt st => Parsec String st (Regex Char Yes) p_group = between (char_ '(') (char_ ')') (p_quest <*> p_regex) <?> "group" where p_quest = choice [ char_ '?' >> return id , do st <- getState let (num, newSt) = newCaptureNum st ...
783
p_group :: RegexParserSt st => Parsec String st (Regex Char Yes) p_group = between (char_ '(') (char_ ')') (p_quest <*> p_regex) <?> "group" where p_quest = choice [ char_ '?' >> return id , do st <- getState let (num, newSt) = newCaptureNum st ...
783
p_group = between (char_ '(') (char_ ')') (p_quest <*> p_regex) <?> "group" where p_quest = choice [ char_ '?' >> return id , do st <- getState let (num, newSt) = newCaptureNum st if num <= maxCaptureNum then do p...
718
false
true
0
13
336
163
78
85
null
null
BakerSmithA/Turing
src/Syntax/Parser.hs
bsd-3-clause
program :: ParserM Stm program = lift importPaths *> stm <* eof
63
program :: ParserM Stm program = lift importPaths *> stm <* eof
63
program = lift importPaths *> stm <* eof
40
false
true
0
7
11
25
12
13
null
null
AndrewRademacher/stack
src/Stack/Types/Config.hs
bsd-3-clause
configMonoidGhcOptionsName :: Text configMonoidGhcOptionsName = "ghc-options"
77
configMonoidGhcOptionsName :: Text configMonoidGhcOptionsName = "ghc-options"
77
configMonoidGhcOptionsName = "ghc-options"
42
false
true
0
4
5
11
6
5
null
null
ku-fpg/blank-canvas
Graphics/Blank/Types/Cursor.hs
bsd-3-clause
-- | Shorthand for 'Copy'. copy :: Cursor copy = Copy
53
copy :: Cursor copy = Copy
26
copy = Copy
11
true
true
0
6
10
19
8
11
null
null
ezyang/ghc
compiler/prelude/THNames.hs
bsd-3-clause
-------------------- TH.Lib ----------------------- -- data Lit = ... charLName, stringLName, integerLName, intPrimLName, wordPrimLName, floatPrimLName, doublePrimLName, rationalLName, stringPrimLName, charPrimLName :: Name charLName = libFun (fsLit "charL") charLIdKey
289
charLName, stringLName, integerLName, intPrimLName, wordPrimLName, floatPrimLName, doublePrimLName, rationalLName, stringPrimLName, charPrimLName :: Name charLName = libFun (fsLit "charL") charLIdKey
219
charLName = libFun (fsLit "charL") charLIdKey
57
true
true
0
7
45
42
31
11
null
null
BrennonTWilliams/lamdu
Lamdu/Data/Expression/IRef.hs
gpl-3.0
variableRefGuid :: Expr.VariableRef (DefI t) -> Guid variableRefGuid (Expr.ParameterRef i) = i
94
variableRefGuid :: Expr.VariableRef (DefI t) -> Guid variableRefGuid (Expr.ParameterRef i) = i
94
variableRefGuid (Expr.ParameterRef i) = i
41
false
true
0
8
11
37
18
19
null
null
guoy34/ampersand
src/Database/Design/Ampersand/FSpec/Plug.hs
gpl-3.0
showSQL (SQLBool ) = "BOOLEAN"
34
showSQL (SQLBool ) = "BOOLEAN"
34
showSQL (SQLBool ) = "BOOLEAN"
34
false
false
0
5
8
13
6
7
null
null
mathhun/stack
src/Stack/Build/Installed.hs
bsd-3-clause
-- | Check if a can be included in the set of installed packages or not, based -- on the package selections made by the user. This does not perform any -- dirtiness or flag change checks. isAllowed :: PackageInstallInfo pii => GetInstalledOpts -> Maybe InstalledCache -> Map PackageName pii...
1,939
isAllowed :: PackageInstallInfo pii => GetInstalledOpts -> Maybe InstalledCache -> Map PackageName pii -> Maybe InstalledPackageLocation -> DumpPackage Bool Bool -> Allowed isAllowed opts mcache sourceMap mloc dp -- Check that it can do profiling if necess...
1,751
isAllowed opts mcache sourceMap mloc dp -- Check that it can do profiling if necessary | getInstalledProfiling opts && isJust mcache && not (dpProfiling dp) = NeedsProfiling -- Check that it has haddocks if necessary | getInstalledHaddock opts && isJust mcache && not (dpHaddock dp) = NeedsHaddock | ...
1,518
true
true
2
16
604
339
161
178
null
null
andorp/bead
src/Bead/View/UserActions.hs
bsd-3-clause
userStoryFor (ModifyAssessmentAndScores ak a scores) = Story.modifyAssessmentAndScores ak a scores
98
userStoryFor (ModifyAssessmentAndScores ak a scores) = Story.modifyAssessmentAndScores ak a scores
98
userStoryFor (ModifyAssessmentAndScores ak a scores) = Story.modifyAssessmentAndScores ak a scores
98
false
false
0
7
9
28
13
15
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types/Product.hs
mpl-2.0
-- | Creates a value of 'URLTargeting' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'utTargetedURLs' -- -- * 'utExcludedURLs' urlTargeting :: URLTargeting urlTargeting = URLTargeting' {_utTargetedURLs = Nothing, _utExcludedURL...
332
urlTargeting :: URLTargeting urlTargeting = URLTargeting' {_utTargetedURLs = Nothing, _utExcludedURLs = Nothing}
118
urlTargeting = URLTargeting' {_utTargetedURLs = Nothing, _utExcludedURLs = Nothing}
85
true
true
0
7
55
42
24
18
null
null
tpsinnem/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
p_strHead _ = Nothing
21
p_strHead _ = Nothing
21
p_strHead _ = Nothing
21
false
false
0
4
3
10
4
6
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/ReadableStreamSource.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamSource.cancel Mozilla ReadableStreamSource.cancel documentation> cancel :: (MonadDOM m, ToJSVal reason) => ReadableStreamSource -> reason -> m () cancel self reason = liftDOM (void (self ^. jsf "cancel" [toJSVal reason]))
309
cancel :: (MonadDOM m, ToJSVal reason) => ReadableStreamSource -> reason -> m () cancel self reason = liftDOM (void (self ^. jsf "cancel" [toJSVal reason]))
174
cancel self reason = liftDOM (void (self ^. jsf "cancel" [toJSVal reason]))
77
true
true
0
12
49
77
37
40
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Tech.hs
mit
mineralsCost Maelstorm = 100
28
mineralsCost Maelstorm = 100
28
mineralsCost Maelstorm = 100
28
false
false
0
5
3
9
4
5
null
null
nobsun/hs-bcopl
src/Language/BCoPL/TypeLevel/MetaTheory/Nat.hs
bsd-3-clause
plusSucc :: Nat' n1 -> Nat' n2 -> Nat' n3 -> Plus n1 n2 n3 -> Plus n1 (S n2) (S n3) plusSucc n1 n2 n3 p = case n1 of Z' -> case p of PZero _ -> PZero (S' n2) pat -> case pat of {} S' n1' -> case n3 of S' n3' -> case p of PSucc _ _ _ p' -> PSucc n1' (S' n2) n3 (plusSucc n1' n2 n3' p') ...
382
plusSucc :: Nat' n1 -> Nat' n2 -> Nat' n3 -> Plus n1 n2 n3 -> Plus n1 (S n2) (S n3) plusSucc n1 n2 n3 p = case n1 of Z' -> case p of PZero _ -> PZero (S' n2) pat -> case pat of {} S' n1' -> case n3 of S' n3' -> case p of PSucc _ _ _ p' -> PSucc n1' (S' n2) n3 (plusSucc n1' n2 n3' p') ...
382
plusSucc n1 n2 n3 p = case n1 of Z' -> case p of PZero _ -> PZero (S' n2) pat -> case pat of {} S' n1' -> case n3 of S' n3' -> case p of PSucc _ _ _ p' -> PSucc n1' (S' n2) n3 (plusSucc n1' n2 n3' p') pat -> case pat of {} pat -> case pat of {}
298
false
true
0
16
141
211
102
109
null
null
kirhgoff/haskell-sandbox
euler32/euler32.hs
mit
valids xs = nub(mapMaybe id (validsMaybe xs))
45
valids xs = nub(mapMaybe id (validsMaybe xs))
45
valids xs = nub(mapMaybe id (validsMaybe xs))
45
false
false
0
9
6
26
12
14
null
null
Bodigrim/arithmoi
Math/NumberTheory/Moduli/JacobiSymbol.hs
mit
-- numerator positive and smaller than denominator jacPS :: (Integral a, Bits a) => JacobiSymbol -> a -> a -> JacobiSymbol jacPS !acc a b | evenI a = case shiftToOddCount a of (z, o) | evenI z || rem8is1or7 b -> jacOL (if rem4is3 o && rem4is3 b then negJS acc else acc) b o | otherwise ->...
460
jacPS :: (Integral a, Bits a) => JacobiSymbol -> a -> a -> JacobiSymbol jacPS !acc a b | evenI a = case shiftToOddCount a of (z, o) | evenI z || rem8is1or7 b -> jacOL (if rem4is3 o && rem4is3 b then negJS acc else acc) b o | otherwise -> jacOL (if rem4is3 o && rem4is3 b then acc else neg...
409
jacPS !acc a b | evenI a = case shiftToOddCount a of (z, o) | evenI z || rem8is1or7 b -> jacOL (if rem4is3 o && rem4is3 b then negJS acc else acc) b o | otherwise -> jacOL (if rem4is3 o && rem4is3 b then acc else negJS acc) b o | otherwise = jacOL (if rem4is3 a && rem4is3 b then negJS ...
337
true
true
1
14
123
204
97
107
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
-- 1107 is FREE tagOf_PrimOp IsNullObjectOp = _ILIT(1108)
57
tagOf_PrimOp IsNullObjectOp = _ILIT(1108)
41
tagOf_PrimOp IsNullObjectOp = _ILIT(1108)
41
true
false
0
6
7
16
8
8
null
null
glguy/ssh-hans
tests/Tests/Packet.hs
bsd-3-clause
genSeqNum :: Gen Word32 genSeqNum = arbitrary
45
genSeqNum :: Gen Word32 genSeqNum = arbitrary
45
genSeqNum = arbitrary
21
false
true
0
6
6
20
8
12
null
null
sukwon0709/z3-haskell
src/Z3/Monad.hs
bsd-3-clause
-- | Declare and create a constant. -- -- Reference: <http://research.microsoft.com/en-us/um/redmond/projects/z3/group__capi.html#ga093c9703393f33ae282ec5e8729354ef> mkConst :: MonadZ3 z3 => Symbol -> Sort -> z3 AST mkConst = liftFun2 Base.mkConst
247
mkConst :: MonadZ3 z3 => Symbol -> Sort -> z3 AST mkConst = liftFun2 Base.mkConst
81
mkConst = liftFun2 Base.mkConst
31
true
true
0
8
25
37
19
18
null
null
seppeljordan/sdl2
examples/lazyfoo/Lesson01.hs
bsd-3-clause
screenWidth, screenHeight :: CInt (screenWidth, screenHeight) = (640, 480)
74
screenWidth, screenHeight :: CInt (screenWidth, screenHeight) = (640, 480)
74
(screenWidth, screenHeight) = (640, 480)
40
false
true
0
5
8
26
16
10
null
null
josiah14/lambdaline
LambdaLine/XTerm/Colors.hs
gpl-3.0
defaultDarkGreen :: Color defaultDarkGreen = "2"
48
defaultDarkGreen :: Color defaultDarkGreen = "2"
48
defaultDarkGreen = "2"
22
false
true
0
6
5
18
7
11
null
null
snoyberg/hack-frontend-monadcgi
samples/hack_fastcgi.hs
bsd-2-clause
mainCGI = Network.CGI.output "This is a test"
45
mainCGI = Network.CGI.output "This is a test"
45
mainCGI = Network.CGI.output "This is a test"
45
false
false
0
6
6
12
6
6
null
null
rueshyna/gogol
gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Merge.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). vmUploadProtocol :: Lens' VariantsMerge (Maybe Text) vmUploadProtocol = lens _vmUploadProtocol (\ s a -> s{_vmUploadProtocol = a})
200
vmUploadProtocol :: Lens' VariantsMerge (Maybe Text) vmUploadProtocol = lens _vmUploadProtocol (\ s a -> s{_vmUploadProtocol = a})
138
vmUploadProtocol = lens _vmUploadProtocol (\ s a -> s{_vmUploadProtocol = a})
85
true
true
0
9
33
48
25
23
null
null
FranklinChen/music-score
src/Music/Time/Types.hs
bsd-3-clause
_midpointS s = _onsetS s .+^ _durationS s / 2
46
_midpointS s = _onsetS s .+^ _durationS s / 2
46
_midpointS s = _onsetS s .+^ _durationS s / 2
46
false
false
0
7
10
23
10
13
null
null
kernelim/leveldb-haskell
src/Data/Stream/Monadic.hs
bsd-3-clause
product :: (Num a, Monad m) => Stream m a -> m a product (Stream next s0) = loop 1 =<< s0 where loop !a !s = do step <- next s case step of Done -> return a Skip s' -> loop a s' Yield x s' -> loop (a * x) s'
283
product :: (Num a, Monad m) => Stream m a -> m a product (Stream next s0) = loop 1 =<< s0 where loop !a !s = do step <- next s case step of Done -> return a Skip s' -> loop a s' Yield x s' -> loop (a * x) s'
283
product (Stream next s0) = loop 1 =<< s0 where loop !a !s = do step <- next s case step of Done -> return a Skip s' -> loop a s' Yield x s' -> loop (a * x) s'
234
false
true
0
12
129
141
63
78
null
null
PipocaQuemada/ermine
tests/properties/Binary.hs
bsd-2-clause
prop_pack_unpack_guarded :: Guarded Int -> Bool prop_pack_unpack_guarded = pack_unpack
86
prop_pack_unpack_guarded :: Guarded Int -> Bool prop_pack_unpack_guarded = pack_unpack
86
prop_pack_unpack_guarded = pack_unpack
38
false
true
0
6
8
18
9
9
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/Coverage.hs
bsd-3-clause
addTickStmt isGuard (ParStmt pairs mzipExpr bindExpr) = do liftM3 ParStmt (mapM (addTickStmtAndBinders isGuard) pairs) (addTickSyntaxExpr hpcSrcSpan mzipExpr) (addTickSyntaxExpr hpcSrcSpan bindExpr)
226
addTickStmt isGuard (ParStmt pairs mzipExpr bindExpr) = do liftM3 ParStmt (mapM (addTickStmtAndBinders isGuard) pairs) (addTickSyntaxExpr hpcSrcSpan mzipExpr) (addTickSyntaxExpr hpcSrcSpan bindExpr)
226
addTickStmt isGuard (ParStmt pairs mzipExpr bindExpr) = do liftM3 ParStmt (mapM (addTickStmtAndBinders isGuard) pairs) (addTickSyntaxExpr hpcSrcSpan mzipExpr) (addTickSyntaxExpr hpcSrcSpan bindExpr)
226
false
false
0
11
47
63
30
33
null
null
gergoerdi/brainfuck
language-registermachine/src/Language/RegisterMachine/Syntax/Macros.hs
bsd-3-clause
instantiateStmt (Mov r1 r2) = return Mov `ap` instantiateReg r1 `ap` instantiateReg r2
86
instantiateStmt (Mov r1 r2) = return Mov `ap` instantiateReg r1 `ap` instantiateReg r2
86
instantiateStmt (Mov r1 r2) = return Mov `ap` instantiateReg r1 `ap` instantiateReg r2
86
false
false
0
7
12
38
19
19
null
null
himura/ghc-mod
Info.hs
bsd-3-clause
info :: Options -> FilePath -> ModuleString -> FilePath -> IO String info opt fileName modstr expr = inModuleContext opt fileName modstr exprToInfo where exprToInfo = infoThing expr ----------------------------------------------------------------
253
info :: Options -> FilePath -> ModuleString -> FilePath -> IO String info opt fileName modstr expr = inModuleContext opt fileName modstr exprToInfo where exprToInfo = infoThing expr ----------------------------------------------------------------
253
info opt fileName modstr expr = inModuleContext opt fileName modstr exprToInfo where exprToInfo = infoThing expr ----------------------------------------------------------------
184
false
true
1
10
35
68
30
38
null
null
tjakway/ghcjvm
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
ctEvTerm :: CtEvidence -> EvTerm ctEvTerm ev@(CtWanted { ctev_dest = HoleDest _ }) = EvCoercion $ ctEvCoercion ev
113
ctEvTerm :: CtEvidence -> EvTerm ctEvTerm ev@(CtWanted { ctev_dest = HoleDest _ }) = EvCoercion $ ctEvCoercion ev
113
ctEvTerm ev@(CtWanted { ctev_dest = HoleDest _ }) = EvCoercion $ ctEvCoercion ev
80
false
true
5
6
17
46
23
23
null
null
ksaveljev/hNES
NES/Emulator.hs
mit
getStorageAddr :: MonadEmulator m => Instruction -> m Storage getStorageAddr (Instruction _ _ _ am arg) = case arg of [] -> case am of Accumulator -> return A _ -> oops [w8] -> case am of ZeroPage -> return $ Ram $ fromIntegral w8 ZeroPageX -> ...
1,557
getStorageAddr :: MonadEmulator m => Instruction -> m Storage getStorageAddr (Instruction _ _ _ am arg) = case arg of [] -> case am of Accumulator -> return A _ -> oops [w8] -> case am of ZeroPage -> return $ Ram $ fromIntegral w8 ZeroPageX -> ...
1,557
getStorageAddr (Instruction _ _ _ am arg) = case arg of [] -> case am of Accumulator -> return A _ -> oops [w8] -> case am of ZeroPage -> return $ Ram $ fromIntegral w8 ZeroPageX -> do x <- loadX return $ Ram...
1,495
false
true
0
17
759
465
218
247
null
null
fmthoma/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
checkLinkInfo :: DynFlags -> [PackageKey] -> FilePath -> IO Bool checkLinkInfo dflags pkg_deps exe_file | not (platformSupportsSavingLinkOpts (platformOS (targetPlatform dflags))) -- ToDo: Windows and OS X do not use the ELF binary format, so -- readelf does not work there. We need to find another way to do -- thi...
826
checkLinkInfo :: DynFlags -> [PackageKey] -> FilePath -> IO Bool checkLinkInfo dflags pkg_deps exe_file | not (platformSupportsSavingLinkOpts (platformOS (targetPlatform dflags))) -- ToDo: Windows and OS X do not use the ELF binary format, so -- readelf does not work there. We need to find another way to do -- thi...
826
checkLinkInfo dflags pkg_deps exe_file | not (platformSupportsSavingLinkOpts (platformOS (targetPlatform dflags))) -- ToDo: Windows and OS X do not use the ELF binary format, so -- readelf does not work there. We need to find another way to do -- this. = return False -- conservatively we should return True, but n...
761
false
true
0
14
175
173
81
92
null
null
jdimond/diplomarbeit
lib/Search/Processing/GOV2.hs
bsd-3-clause
tagToText (TagOpen "BR" _) = Just "\n"
38
tagToText (TagOpen "BR" _) = Just "\n"
38
tagToText (TagOpen "BR" _) = Just "\n"
38
false
false
0
7
6
20
9
11
null
null
bitemyapp/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayDesc WayThreaded = "Threaded"
32
wayDesc WayThreaded = "Threaded"
32
wayDesc WayThreaded = "Threaded"
32
false
false
1
5
3
13
4
9
null
null
pparkkin/eta
compiler/ETA/CodeGen/ArgRep.hs
bsd-3-clause
argRepFt L = jlong
18
argRepFt L = jlong
18
argRepFt L = jlong
18
false
false
1
5
3
13
4
9
null
null
lpsmith/aeson
Data/Aeson/Generic.hs
bsd-3-clause
toJSON_generic :: (Data a) => a -> Value toJSON_generic = generic where -- Generic encoding of an algebraic data type. generic a = case dataTypeRep (dataTypeOf a) of -- No constructor, so it must be an error value. Code -- it anyway as Null. ...
1,638
toJSON_generic :: (Data a) => a -> Value toJSON_generic = generic where -- Generic encoding of an algebraic data type. generic a = case dataTypeRep (dataTypeOf a) of -- No constructor, so it must be an error value. Code -- it anyway as Null. ...
1,638
toJSON_generic = generic where -- Generic encoding of an algebraic data type. generic a = case dataTypeRep (dataTypeOf a) of -- No constructor, so it must be an error value. Code -- it anyway as Null. AlgRep [] -> Null -- El...
1,597
false
true
5
12
596
214
125
89
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Environments/Sessions/MatchIntent.hs
mpl-2.0
-- | OAuth access token. plaesmiAccessToken :: Lens' ProjectsLocationsAgentsEnvironmentsSessionsMatchIntent (Maybe Text) plaesmiAccessToken = lens _plaesmiAccessToken (\ s a -> s{_plaesmiAccessToken = a})
212
plaesmiAccessToken :: Lens' ProjectsLocationsAgentsEnvironmentsSessionsMatchIntent (Maybe Text) plaesmiAccessToken = lens _plaesmiAccessToken (\ s a -> s{_plaesmiAccessToken = a})
187
plaesmiAccessToken = lens _plaesmiAccessToken (\ s a -> s{_plaesmiAccessToken = a})
91
true
true
0
9
29
48
25
23
null
null