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
ddssff/rdf4h
testsuite/tests/W3C/TurtleTest.hs
bsd-3-clause
suiteFilesDir = "data/w3c/turtle/TurtleTests/"
46
suiteFilesDir = "data/w3c/turtle/TurtleTests/"
46
suiteFilesDir = "data/w3c/turtle/TurtleTests/"
46
false
false
0
4
2
6
3
3
null
null
acowley/ghc
compiler/nativeGen/X86/Regs.hs
bsd-3-clause
showReg :: Platform -> RegNo -> String showReg platform n | n >= firstxmm = "%xmm" ++ show (n-firstxmm) | n >= firstfake = "%fake" ++ show (n-firstfake) | n >= 8 = "%r" ++ show n | otherwise = regNames platform !! n
261
showReg :: Platform -> RegNo -> String showReg platform n | n >= firstxmm = "%xmm" ++ show (n-firstxmm) | n >= firstfake = "%fake" ++ show (n-firstfake) | n >= 8 = "%r" ++ show n | otherwise = regNames platform !! n
261
showReg platform n | n >= firstxmm = "%xmm" ++ show (n-firstxmm) | n >= firstfake = "%fake" ++ show (n-firstfake) | n >= 8 = "%r" ++ show n | otherwise = regNames platform !! n
222
false
true
0
9
89
111
52
59
null
null
chrisjpn/CPIB_ILMCompiler
src/VM/VirtualMachineIO.hs
bsd-3-clause
execInstr instr state = return (Left (ErrorMsg ([], "internal error VM state: "++ show state ++" : " ++ show instr)))
119
execInstr instr state = return (Left (ErrorMsg ([], "internal error VM state: "++ show state ++" : " ++ show instr)))
119
execInstr instr state = return (Left (ErrorMsg ([], "internal error VM state: "++ show state ++" : " ++ show instr)))
119
false
false
0
14
22
52
25
27
null
null
iu-parfunc/AutoObsidian
interface_brainstorming/06_ExtensibleEffects/newVer/Eff1.hs
bsd-3-clause
tmapr = ([11,12,13,14,15] ==) $ run $ runReader tmap (10::Int)
70
tmapr = ([11,12,13,14,15] ==) $ run $ runReader tmap (10::Int)
70
tmapr = ([11,12,13,14,15] ==) $ run $ runReader tmap (10::Int)
70
false
false
0
8
17
44
26
18
null
null
fmthoma/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
linkBinary :: DynFlags -> [FilePath] -> [PackageKey] -> IO () linkBinary = linkBinary' False
92
linkBinary :: DynFlags -> [FilePath] -> [PackageKey] -> IO () linkBinary = linkBinary' False
92
linkBinary = linkBinary' False
30
false
true
0
9
13
37
19
18
null
null
literate-unitb/literate-unitb
src/Document/Tests/IndirectEq.hs
mit
path0 :: FilePath path0 = [path|Tests/indirect-equality.tex|]
61
path0 :: FilePath path0 = [path|Tests/indirect-equality.tex|]
61
path0 = [path|Tests/indirect-equality.tex|]
43
false
true
0
6
5
22
11
11
null
null
uuhan/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTTConstApp f (Constant c@(Ch _)) | f == reflm "Ch" = return c
83
reifyTTConstApp f (Constant c@(Ch _)) | f == reflm "Ch" = return c
83
reifyTTConstApp f (Constant c@(Ch _)) | f == reflm "Ch" = return c
83
false
false
0
10
29
42
19
23
null
null
ComputationWithBoundedResources/tct-core
src/Tct/Core/Common/Options.hs
bsd-3-clause
-- | Sets the description for an option. withHelpDoc :: O.Mod f a -> Doc -> O.Mod f a opt `withHelpDoc` doc = opt <> O.helpDoc (Just doc)
137
withHelpDoc :: O.Mod f a -> Doc -> O.Mod f a opt `withHelpDoc` doc = opt <> O.helpDoc (Just doc)
96
opt `withHelpDoc` doc = opt <> O.helpDoc (Just doc)
51
true
true
1
9
27
57
27
30
null
null
mjoldfield/plotfont
src/Graphics/PlotFont.hs
gpl-2.0
dist:: PFPoint -> PFPoint -> Double dist (xa,ya) (xb,yb) = sqrt $ (xa - xb)^2 + (ya - yb)^2
91
dist:: PFPoint -> PFPoint -> Double dist (xa,ya) (xb,yb) = sqrt $ (xa - xb)^2 + (ya - yb)^2
91
dist (xa,ya) (xb,yb) = sqrt $ (xa - xb)^2 + (ya - yb)^2
55
false
true
0
10
18
71
37
34
null
null
mrakgr/futhark
src/Futhark/Analysis/HORepresentation/SOAC.hs
bsd-3-clause
certificates (Stream cs _ _ _ _) = cs
37
certificates (Stream cs _ _ _ _) = cs
37
certificates (Stream cs _ _ _ _) = cs
37
false
false
0
7
8
23
11
12
null
null
r-p1e/negotians
src/Internal.hs
bsd-3-clause
describeHeader :: RequestHeaders -> Text describeHeader = Text.intercalate "; " . map (\(a,b) -> Text.decodeUtf8 (original a) <> ":" <> Text.decodeUtf8 b)
184
describeHeader :: RequestHeaders -> Text describeHeader = Text.intercalate "; " . map (\(a,b) -> Text.decodeUtf8 (original a) <> ":" <> Text.decodeUtf8 b)
184
describeHeader = Text.intercalate "; " . map (\(a,b) -> Text.decodeUtf8 (original a) <> ":" <> Text.decodeUtf8 b)
143
false
true
0
13
51
65
33
32
null
null
c0c0n3/audidoza
Css/DiffTree.hs
gpl-3.0
headerFont, serifFont, monospaceFont ∷ Css headerFont = do fontFamily ["Verdana", "Geneva"] [sansSerif] fontSize (px 14)
143
headerFont, serifFont, monospaceFont ∷ Css headerFont = do fontFamily ["Verdana", "Geneva"] [sansSerif] fontSize (px 14)
143
headerFont = do fontFamily ["Verdana", "Geneva"] [sansSerif] fontSize (px 14)
100
false
true
0
9
37
44
24
20
null
null
tjakway/ghcjvm
compiler/simplStg/StgStats.hs
bsd-3-clause
{- ************************************************************************ * * \subsection{Top-level list of bindings (a ``program'')} * * ******************************************...
1,490
showStgStats :: [StgBinding] -> String showStgStats prog = "STG Statistics:\n\n" ++ concat (map showc (Map.toList (gatherStgStats prog))) where showc (x,n) = (showString (s x) . shows n) "\n" s Literals = "Literals " s Applications = "Applications ...
1,134
showStgStats prog = "STG Statistics:\n\n" ++ concat (map showc (Map.toList (gatherStgStats prog))) where showc (x,n) = (showString (s x) . shows n) "\n" s Literals = "Literals " s Applications = "Applications " s ConstructorApps ...
1,095
true
true
9
10
577
295
130
165
null
null
cchens/courseography
hs/Svg/Generator.hs
gpl-3.0
ellipseToSVG :: Bool -> Shape -> S.Svg ellipseToSVG styled ellipse = S.g ! A.id_ (stringValue (shapeId_ ellipse)) ! A.class_ "bool" $ do S.ellipse ! A.cx (stringValue . show . fst $ shapePos ellipse) ! A.cy (stringValue . show . snd $ shapePos ellipse) ...
781
ellipseToSVG :: Bool -> Shape -> S.Svg ellipseToSVG styled ellipse = S.g ! A.id_ (stringValue (shapeId_ ellipse)) ! A.class_ "bool" $ do S.ellipse ! A.cx (stringValue . show . fst $ shapePos ellipse) ! A.cy (stringValue . show . snd $ shapePos ellipse) ...
781
ellipseToSVG styled ellipse = S.g ! A.id_ (stringValue (shapeId_ ellipse)) ! A.class_ "bool" $ do S.ellipse ! A.cx (stringValue . show . fst $ shapePos ellipse) ! A.cy (stringValue . show . snd $ shapePos ellipse) ! A.rx (stringValue . show $ shapeWidt...
742
false
true
0
17
323
231
112
119
null
null
ezyang/ghc
compiler/cmm/CmmMachOp.hs
bsd-3-clause
mo_wordAnd dflags = MO_And (wordWidth dflags)
50
mo_wordAnd dflags = MO_And (wordWidth dflags)
50
mo_wordAnd dflags = MO_And (wordWidth dflags)
50
false
false
0
7
10
18
8
10
null
null
adbrowne/dodgerblue
src/DodgerBlue/Testing.hs
bsd-3-clause
runnablePrograms :: (MonadState (LoopState t a) m) => ExecutionTree (ProgramState t a) -> m [(Text,ProgramState t a)] runnablePrograms t = (fmap catMaybes) . sequenceA $ foldlWithKey' acc [] t where acc xs threadName programState = (justIfRunnable threadName programState):xs justIfRunnable threadName ...
846
runnablePrograms :: (MonadState (LoopState t a) m) => ExecutionTree (ProgramState t a) -> m [(Text,ProgramState t a)] runnablePrograms t = (fmap catMaybes) . sequenceA $ foldlWithKey' acc [] t where acc xs threadName programState = (justIfRunnable threadName programState):xs justIfRunnable threadName ...
846
runnablePrograms t = (fmap catMaybes) . sequenceA $ foldlWithKey' acc [] t where acc xs threadName programState = (justIfRunnable threadName programState):xs justIfRunnable threadName programState@(ExternalProgramRunning (p,_idleCount)) = do isBlocked <- isProgramBlocked p if isBlock...
728
false
true
3
12
204
260
131
129
null
null
CarmineM74/haskell_craft3e
Chapter18.hs
mit
-- Programming with monads -- ^^^^^^^^^^^^^^^^^^^^^^^ -- The basics of input/output -- ^^^^^^^^^^^^^^^^^^^^^^^^^^ -- Reading input is done by getLine and getChar: see Prelude for details. -- getLine :: IO String -- getChar :: IO Char -- Text strings are written using -- -- putStr :: String -> IO () -- putSt...
426
helloWorld :: IO () helloWorld = putStr "Hello, World!"
55
helloWorld = putStr "Hello, World!"
35
true
true
0
6
84
31
21
10
null
null
mariefarrell/Hets
HasCASL/TypeRel.hs
gpl-2.0
idInj :: Named Sentence idInj = makeNamed "ga_inj_identity" $ Formula $ mkForall [GenTypeVarDecl aTypeArg, GenVarDecl xa] $ mkInjEq aType aType xa xa
153
idInj :: Named Sentence idInj = makeNamed "ga_inj_identity" $ Formula $ mkForall [GenTypeVarDecl aTypeArg, GenVarDecl xa] $ mkInjEq aType aType xa xa
153
idInj = makeNamed "ga_inj_identity" $ Formula $ mkForall [GenTypeVarDecl aTypeArg, GenVarDecl xa] $ mkInjEq aType aType xa xa
129
false
true
4
8
25
55
25
30
null
null
sharkdp/zehntausend
src/Zehntausend.hs
mit
wert (_, _) = 0
27
wert (_, _) = 0
27
wert (_, _) = 0
27
false
false
0
6
16
15
8
7
null
null
brendanhay/gogol
gogol-cloudiot/gen/Network/Google/CloudIOT/Types/Product.hs
mpl-2.0
-- | The entity the certificate and public key belong to. xcdSubject :: Lens' X509CertificateDetails (Maybe Text) xcdSubject = lens _xcdSubject (\ s a -> s{_xcdSubject = a})
175
xcdSubject :: Lens' X509CertificateDetails (Maybe Text) xcdSubject = lens _xcdSubject (\ s a -> s{_xcdSubject = a})
117
xcdSubject = lens _xcdSubject (\ s a -> s{_xcdSubject = a})
61
true
true
1
9
29
50
25
25
null
null
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/Vere/Term.hs
mit
leftBracket :: Text leftBracket = "«"
37
leftBracket :: Text leftBracket = "«"
37
leftBracket = "«"
17
false
true
0
4
5
11
6
5
null
null
flowbox-public/protocol-buffers
Text/ProtocolBuffers/Basic.hs
apache-2.0
uToString :: Utf8 -> String uToString (Utf8 bs) = U.toString bs
63
uToString :: Utf8 -> String uToString (Utf8 bs) = U.toString bs
63
uToString (Utf8 bs) = U.toString bs
35
false
true
0
7
10
29
14
15
null
null
wjdhamilton/ig-haskell
src/IG/REST.hs
bsd-3-clause
tryFormats (f:fs) t = case parseTimeM True defaultTimeLocale f (cs t) of Just date -> Just date Nothing -> tryFormats fs t -- ^ Specifies the expiry of the instrument which you wish to purchase. The date -- (and sometimes time) at which a spreadbet or CFD will au...
535
tryFormats (f:fs) t = case parseTimeM True defaultTimeLocale f (cs t) of Just date -> Just date Nothing -> tryFormats fs t -- ^ Specifies the expiry of the instrument which you wish to purchase. The date -- (and sometimes time) at which a spreadbet or CFD will au...
535
tryFormats (f:fs) t = case parseTimeM True defaultTimeLocale f (cs t) of Just date -> Just date Nothing -> tryFormats fs t -- ^ Specifies the expiry of the instrument which you wish to purchase. The date -- (and sometimes time) at which a spreadbet or CFD will au...
535
false
false
1
8
146
69
33
36
null
null
rfranek/duckling
Duckling/Time/VI/Rules.hs
bsd-3-clause
ruleTimeofdaySharp :: Rule ruleTimeofdaySharp = Rule { name = "<time-of-day> sharp" , pattern = [ Predicate isATimeOfDay , regex "(\x0111)(\x00fa)ng" ] , prod = \tokens -> case tokens of (Token Time td:_) -> tt $ notLatent td _ -> Nothing }
272
ruleTimeofdaySharp :: Rule ruleTimeofdaySharp = Rule { name = "<time-of-day> sharp" , pattern = [ Predicate isATimeOfDay , regex "(\x0111)(\x00fa)ng" ] , prod = \tokens -> case tokens of (Token Time td:_) -> tt $ notLatent td _ -> Nothing }
272
ruleTimeofdaySharp = Rule { name = "<time-of-day> sharp" , pattern = [ Predicate isATimeOfDay , regex "(\x0111)(\x00fa)ng" ] , prod = \tokens -> case tokens of (Token Time td:_) -> tt $ notLatent td _ -> Nothing }
245
false
true
0
14
72
87
46
41
null
null
Zankoku-Okuno/octopus
Language/Octopus/Parser/Import.hs
gpl-3.0
popExplicit :: Parser () popExplicit = layoutOnly $ do top <- head <$> getState case top of Explicit _ -> modifyState tail --_ -> fail "" -- Close Explicits can match open Explicits before dedents match their Implicits Implicit _ -> do (upper, lower) <- break isExplic...
552
popExplicit :: Parser () popExplicit = layoutOnly $ do top <- head <$> getState case top of Explicit _ -> modifyState tail --_ -> fail "" -- Close Explicits can match open Explicits before dedents match their Implicits Implicit _ -> do (upper, lower) <- break isExplic...
552
popExplicit = layoutOnly $ do top <- head <$> getState case top of Explicit _ -> modifyState tail --_ -> fail "" -- Close Explicits can match open Explicits before dedents match their Implicits Implicit _ -> do (upper, lower) <- break isExplicit <$> getState ...
527
false
true
0
17
191
151
73
78
null
null
xenog/haskoin
test/bitcoin/Network/Haskoin/Crypto/Hash/Tests.hs
unlicense
-- After encoding and decoding, we may loose precision so the new result is >= -- to the old one. decEncCompact :: Integer -> Bool decEncCompact i -- Integer completely fits inside the mantisse | abs i <= 0x007fffff = decodeCompact (encodeCompact i) == (i, False) -- Otherwise precision will be lost and the ...
522
decEncCompact :: Integer -> Bool decEncCompact i -- Integer completely fits inside the mantisse | abs i <= 0x007fffff = decodeCompact (encodeCompact i) == (i, False) -- Otherwise precision will be lost and the decoded result will -- be smaller than the original number | i >= 0 = fst (de...
424
decEncCompact i -- Integer completely fits inside the mantisse | abs i <= 0x007fffff = decodeCompact (encodeCompact i) == (i, False) -- Otherwise precision will be lost and the decoded result will -- be smaller than the original number | i >= 0 = fst (decodeCompact (encodeCompact i)) < ...
391
true
true
1
11
130
116
58
58
null
null
pheaver/hSimpleDB
src/Network/AWS/Authentication.hs
bsd-3-clause
reservedChar :: Char -> Bool reservedChar x -- from space (0x20) till '~' everything is fine. The rest are control chars, or high bit. | xi >= 0x20 && xi <= 0x7e = False | otherwise = True where xi = ord x
221
reservedChar :: Char -> Bool reservedChar x -- from space (0x20) till '~' everything is fine. The rest are control chars, or high bit. | xi >= 0x20 && xi <= 0x7e = False | otherwise = True where xi = ord x
221
reservedChar x -- from space (0x20) till '~' everything is fine. The rest are control chars, or high bit. | xi >= 0x20 && xi <= 0x7e = False | otherwise = True where xi = ord x
192
false
true
1
10
58
55
27
28
null
null
google/haskell-trainings
haskell_101/codelab/01_functions/src/Solution.hs
apache-2.0
-- Note that Haskell is strict about types even for basic integral types. -- Int is never automatically converted to Double. But you can use -- fromIntegral to convert from any integral type to any number type. divide :: Int -> Int -> Double divide x y = fromIntegral x / fromIntegral y
287
divide :: Int -> Int -> Double divide x y = fromIntegral x / fromIntegral y
75
divide x y = fromIntegral x / fromIntegral y
44
true
true
0
6
53
37
19
18
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/product_2.hs
mit
primMulInt (Neg x) (Neg y) = Pos (primMulNat x y)
49
primMulInt (Neg x) (Neg y) = Pos (primMulNat x y)
49
primMulInt (Neg x) (Neg y) = Pos (primMulNat x y)
49
false
false
0
7
9
34
16
18
null
null
kolmodin/cabal
Cabal/Distribution/Simple/GHC/Internal.hs
bsd-3-clause
componentGhcOptions :: Verbosity -> LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo -> FilePath -> GhcOptions componentGhcOptions _verbosity lbi bi clbi odir = mempty { -- Use --ghc-option=-v instead! ghcOptVerbosity = NoFlag, ghcOptHideAllPacka...
2,482
componentGhcOptions :: Verbosity -> LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo -> FilePath -> GhcOptions componentGhcOptions _verbosity lbi bi clbi odir = mempty { -- Use --ghc-option=-v instead! ghcOptVerbosity = NoFlag, ghcOptHideAllPacka...
2,482
componentGhcOptions _verbosity lbi bi clbi odir = mempty { -- Use --ghc-option=-v instead! ghcOptVerbosity = NoFlag, ghcOptHideAllPackages = toFlag True, ghcOptCabal = toFlag True, ghcOptThisUnitId = case clbi of LibComponentLocalBuildInfo { componentCompat...
2,325
false
true
0
12
749
483
256
227
null
null
sajith/accelerate
Data/Array/Accelerate/Language.hs
bsd-3-clause
-- Reductions -- ---------- -- |Reduction of the innermost dimension of an array of arbitrary rank. The first argument needs to -- be an /associative/ function to enable an efficient parallel implementation. -- fold :: (Shape ix, Elt a) => (Exp a -> Exp a -> Exp a) -> Exp a -> Acc (Array (ix:.Int) a...
366
fold :: (Shape ix, Elt a) => (Exp a -> Exp a -> Exp a) -> Exp a -> Acc (Array (ix:.Int) a) -> Acc (Array ix a) fold = Acc $$$ Fold
152
fold = Acc $$$ Fold
19
true
true
2
14
90
106
52
54
null
null
mikehat/blaze-css
src/Text/Blaze/Css21/Value.hs
bsd-3-clause
to_string Red = "red"
40
to_string Red = "red"
40
to_string Red = "red"
40
false
false
0
5
22
9
4
5
null
null
ideas-edu/ideas
src/Ideas/Main/Default.hs
apache-2.0
processDatabase :: DomainReasoner -> FilePath -> IO () processDatabase dr database = do (n, time) <- getDiffTime $ do rows <- Log.selectFrom database "requests" ["input"] $ \row -> do txt <- headM row (_, out, _) <- process mempty dr txt putStrLn out return (length rows)...
390
processDatabase :: DomainReasoner -> FilePath -> IO () processDatabase dr database = do (n, time) <- getDiffTime $ do rows <- Log.selectFrom database "requests" ["input"] $ \row -> do txt <- headM row (_, out, _) <- process mempty dr txt putStrLn out return (length rows) ...
389
processDatabase dr database = do (n, time) <- getDiffTime $ do rows <- Log.selectFrom database "requests" ["input"] $ \row -> do txt <- headM row (_, out, _) <- process mempty dr txt putStrLn out return (length rows) putStrLn $ "processed " ++ show n ++ " requests in ...
334
false
true
0
18
113
155
72
83
null
null
siddhanathan/ghc
compiler/prelude/ForeignCall.hs
bsd-3-clause
ccallConvToInt :: CCallConv -> Int ccallConvToInt StdCallConv = 0
65
ccallConvToInt :: CCallConv -> Int ccallConvToInt StdCallConv = 0
65
ccallConvToInt StdCallConv = 0
30
false
true
0
5
8
18
9
9
null
null
geekingfrog/advent-of-code
src/Y2017/Day14.hs
bsd-3-clause
isUsed Used = True
18
isUsed Used = True
18
isUsed Used = True
18
false
false
0
5
3
9
4
5
null
null
rumblesan/improviz
src/Language/Ast/Transformers/Globalise.hs
bsd-3-clause
globaliseProgram :: Program -> Transformer Program globaliseProgram (Program statements) = Program <$> mapM globaliseStatement statements
139
globaliseProgram :: Program -> Transformer Program globaliseProgram (Program statements) = Program <$> mapM globaliseStatement statements
139
globaliseProgram (Program statements) = Program <$> mapM globaliseStatement statements
88
false
true
0
7
16
36
17
19
null
null
riwsky/wiwinwlh
src/newtype.hs
mit
err = v + x
11
err = v + x
11
err = v + x
11
false
false
1
5
4
13
5
8
null
null
rsasse/tamarin-prover
src/Web/Theory.hs
gpl-3.0
-- | Build the Html document showing the rules of the theory. rulesSnippet :: HtmlDocument d => ClosedTheory -> d rulesSnippet thy = vcat [ ppWithHeader "Fact Symbols with Injective Instances" $ fsepList (text . showFactTagArity) injFacts , ppWithHeader "Multiset Rewriting Rules" $ vsep $ map pr...
881
rulesSnippet :: HtmlDocument d => ClosedTheory -> d rulesSnippet thy = vcat [ ppWithHeader "Fact Symbols with Injective Instances" $ fsepList (text . showFactTagArity) injFacts , ppWithHeader "Multiset Rewriting Rules" $ vsep $ map prettyRuleAC msrRules , ppWithHeader "Restrictions of the Se...
819
rulesSnippet thy = vcat [ ppWithHeader "Fact Symbols with Injective Instances" $ fsepList (text . showFactTagArity) injFacts , ppWithHeader "Multiset Rewriting Rules" $ vsep $ map prettyRuleAC msrRules , ppWithHeader "Restrictions of the Set of Traces" $ vsep $ map prettyRestriction ...
767
true
true
0
10
265
182
89
93
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/Sessions/Contexts/Create.hs
mpl-2.0
-- | JSONP pasccCallback :: Lens' ProjectsAgentSessionsContextsCreate (Maybe Text) pasccCallback = lens _pasccCallback (\ s a -> s{_pasccCallback = a})
159
pasccCallback :: Lens' ProjectsAgentSessionsContextsCreate (Maybe Text) pasccCallback = lens _pasccCallback (\ s a -> s{_pasccCallback = a})
148
pasccCallback = lens _pasccCallback (\ s a -> s{_pasccCallback = a})
76
true
true
1
9
27
51
25
26
null
null
mosigo/haskell-sandbox
src/AminoAcidPDB.hs
bsd-3-clause
groupPDBLinesByAminos :: [PDBLine] -> [[PDBLine]] groupPDBLinesByAminos = groupPDBLinesByAminosHelper []
104
groupPDBLinesByAminos :: [PDBLine] -> [[PDBLine]] groupPDBLinesByAminos = groupPDBLinesByAminosHelper []
104
groupPDBLinesByAminos = groupPDBLinesByAminosHelper []
54
false
true
0
7
8
29
16
13
null
null
slspeek/hephem
test/HEphem/HEphemSpec.hs
gpl-3.0
prop_intervalLeftBorder :: Interval -> Bool prop_intervalLeftBorder (t0, t1) = isInInterval t0 (t0, t1)
103
prop_intervalLeftBorder :: Interval -> Bool prop_intervalLeftBorder (t0, t1) = isInInterval t0 (t0, t1)
103
prop_intervalLeftBorder (t0, t1) = isInInterval t0 (t0, t1)
59
false
true
0
6
12
35
19
16
null
null
danidiaz/Haskell-Foldl-Library
src/Control/Foldl/Text.hs
bsd-3-clause
-- | Computes the minimum character minimum :: Fold Text (Maybe Char) minimum = L.Fold step Nothing' lazy where step mc txt = if T.null txt then mc else Just' (case mc of Nothing' -> T.minimum txt Just' c -> min c (T.minimum txt) )
286
minimum :: Fold Text (Maybe Char) minimum = L.Fold step Nothing' lazy where step mc txt = if T.null txt then mc else Just' (case mc of Nothing' -> T.minimum txt Just' c -> min c (T.minimum txt) )
250
minimum = L.Fold step Nothing' lazy where step mc txt = if T.null txt then mc else Just' (case mc of Nothing' -> T.minimum txt Just' c -> min c (T.minimum txt) )
216
true
true
0
14
99
100
49
51
null
null
jpierre03/caronch-code-generator
src/Caronch/Lang/Parser.hs
bsd-3-clause
itemProcess :: Parsec String () Item itemProcess = do try $ reserved "process" id <- identifier label <- stringL name <- stringL try $ reserved ";" return $ Process id label name
218
itemProcess :: Parsec String () Item itemProcess = do try $ reserved "process" id <- identifier label <- stringL name <- stringL try $ reserved ";" return $ Process id label name
218
itemProcess = do try $ reserved "process" id <- identifier label <- stringL name <- stringL try $ reserved ";" return $ Process id label name
181
false
true
0
8
71
75
33
42
null
null
haskell/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
renameTyFamDefltD :: TyFamDefltDecl GhcRn -> RnM (TyFamDefltDecl DocNameI) renameTyFamDefltD = renameTyFamInstD
111
renameTyFamDefltD :: TyFamDefltDecl GhcRn -> RnM (TyFamDefltDecl DocNameI) renameTyFamDefltD = renameTyFamInstD
111
renameTyFamDefltD = renameTyFamInstD
36
false
true
0
8
10
27
13
14
null
null
ant0nsc/bond
compiler/src/Language/Bond/Codegen/Cpp/Util.hs
mit
enumValue :: ToText a => MappingContext -> Type -> a -> Text enumValue cpp (BT_UserDefined e@Enum {..} _) x = [lt|#{getQualifiedName cpp $ getDeclNamespace cpp e}::_bond_enumerators::#{declName}::#{x}|]
206
enumValue :: ToText a => MappingContext -> Type -> a -> Text enumValue cpp (BT_UserDefined e@Enum {..} _) x = [lt|#{getQualifiedName cpp $ getDeclNamespace cpp e}::_bond_enumerators::#{declName}::#{x}|]
206
enumValue cpp (BT_UserDefined e@Enum {..} _) x = [lt|#{getQualifiedName cpp $ getDeclNamespace cpp e}::_bond_enumerators::#{declName}::#{x}|]
145
false
true
3
10
29
61
32
29
null
null
qpliu/esolang
featured/glass.hs
gpl-3.0
gc :: Op gc cont st@State{stGCFlag = True} = cont st
52
gc :: Op gc cont st@State{stGCFlag = True} = cont st
52
gc cont st@State{stGCFlag = True} = cont st
43
false
true
2
7
10
42
17
25
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock.hs
gpl-3.0
getInTreeDir :: IO String getInTreeDir = do m <- getExecDir case m of Nothing -> error "No GhcDir found" Just d -> return (d </> ".." </> "lib")
156
getInTreeDir :: IO String getInTreeDir = do m <- getExecDir case m of Nothing -> error "No GhcDir found" Just d -> return (d </> ".." </> "lib")
156
getInTreeDir = do m <- getExecDir case m of Nothing -> error "No GhcDir found" Just d -> return (d </> ".." </> "lib")
130
false
true
0
13
39
60
28
32
null
null
yangsiwei880813/CS644
src/CodeConstruct.hs
gpl-2.0
listStringFromStatement (DFReturn mexpr) = case mexpr of Just expr -> listStringFromDFExpr expr Nothing -> []
199
listStringFromStatement (DFReturn mexpr) = case mexpr of Just expr -> listStringFromDFExpr expr Nothing -> []
199
listStringFromStatement (DFReturn mexpr) = case mexpr of Just expr -> listStringFromDFExpr expr Nothing -> []
199
false
false
0
8
104
39
18
21
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Script/Abstract.hs
mit
letterToUnicode L_η = Unicode.Letter 'η'
40
letterToUnicode L_η = Unicode.Letter 'η'
40
letterToUnicode L_η = Unicode.Letter 'η'
40
false
false
0
6
4
16
7
9
null
null
itsbruce/hackerrank
euler/1_3or5.hs
unlicense
sumLessThan :: Integer -> Integer sumLessThan t = let sum1 = sumDlessT t in (sum1 3) + (sum1 5) - (sum1 15)
116
sumLessThan :: Integer -> Integer sumLessThan t = let sum1 = sumDlessT t in (sum1 3) + (sum1 5) - (sum1 15)
116
sumLessThan t = let sum1 = sumDlessT t in (sum1 3) + (sum1 5) - (sum1 15)
82
false
true
0
10
30
58
28
30
null
null
uuhan/Idris-dev
src/Idris/Parser/Helpers.hs
bsd-3-clause
addAcc :: Name -> Accessibility -> IdrisParser () addAcc n a = do i <- get put (i { hide_list = addDef n a (hide_list i) }) {- | Add accessbility option for data declarations (works for interfaces too - 'abstract' means the data/interface is visible but members not) -}
287
addAcc :: Name -> Accessibility -> IdrisParser () addAcc n a = do i <- get put (i { hide_list = addDef n a (hide_list i) }) {- | Add accessbility option for data declarations (works for interfaces too - 'abstract' means the data/interface is visible but members not) -}
287
addAcc n a = do i <- get put (i { hide_list = addDef n a (hide_list i) }) {- | Add accessbility option for data declarations (works for interfaces too - 'abstract' means the data/interface is visible but members not) -}
237
false
true
0
14
67
72
34
38
null
null
cliffano/swaggy-jenkins
clients/haskell-yesod/generated/src/Handler/RemoteAccess.hs
mit
-- | -- -- Retrieve queue details -- operationId: getQueue getQueueApiJsonR :: Handler Value getQueueApiJsonR = notImplemented
127
getQueueApiJsonR :: Handler Value getQueueApiJsonR = notImplemented
67
getQueueApiJsonR = notImplemented
33
true
true
0
5
17
18
11
7
null
null
hvr/text
tests/Tests/Properties.hs
bsd-2-clause
tl_strip = TL.dropAround isSpace `eq` TL.strip
55
tl_strip = TL.dropAround isSpace `eq` TL.strip
55
tl_strip = TL.dropAround isSpace `eq` TL.strip
55
false
false
0
7
14
19
10
9
null
null
colinba/tip-toi-reveng
src/tttool.hs
mit
mediaCmd :: Mod CommandFields (Conf -> IO ()) mediaCmd = command "media" $ info parser $ progDesc "dumps all audio samples" where parser = const <$> (dumpAudioTo <$> mediaDirParser <*> gmeFileParser) mediaDirParser :: Parser FilePath mediaDirParser = strOption $ mconcat [ long "dir" ...
458
mediaCmd :: Mod CommandFields (Conf -> IO ()) mediaCmd = command "media" $ info parser $ progDesc "dumps all audio samples" where parser = const <$> (dumpAudioTo <$> mediaDirParser <*> gmeFileParser) mediaDirParser :: Parser FilePath mediaDirParser = strOption $ mconcat [ long "dir" ...
458
mediaCmd = command "media" $ info parser $ progDesc "dumps all audio samples" where parser = const <$> (dumpAudioTo <$> mediaDirParser <*> gmeFileParser) mediaDirParser :: Parser FilePath mediaDirParser = strOption $ mconcat [ long "dir" , short 'd' , metavar "DIR" ...
412
false
true
4
9
142
122
60
62
null
null
nikki-and-the-robots/nikki
src/Base/Constants.hs
lgpl-3.0
pngDir :: FilePath pngDir = "png"
33
pngDir :: FilePath pngDir = "png"
33
pngDir = "png"
14
false
true
0
6
5
18
7
11
null
null
mbudde/jana
src/Jana/ErrorMessages.hs
bsd-3-clause
divisionByZero :: Message divisionByZero = Message "Division by zero"
69
divisionByZero :: Message divisionByZero = Message "Division by zero"
69
divisionByZero = Message "Division by zero"
43
false
true
0
5
8
14
7
7
null
null
mit-pdos/fscq-impl
src/fscq.hs
mit
fscqUnlink :: FSrunner -> MVar Coq_fs_xparams -> FilePath -> IO Errno fscqUnlink fr m_fsxp (_:path) = withMVar m_fsxp $ \fsxp -> do debugStart "UNLINK" path (dirparts, filename) <- return $ splitDirsFile path (rd, ()) <- fr $ AsyncFS._AFS__lookup fsxp (coq_FSXPRootInum fsxp) dirparts debugMore rd case rd of ...
630
fscqUnlink :: FSrunner -> MVar Coq_fs_xparams -> FilePath -> IO Errno fscqUnlink fr m_fsxp (_:path) = withMVar m_fsxp $ \fsxp -> do debugStart "UNLINK" path (dirparts, filename) <- return $ splitDirsFile path (rd, ()) <- fr $ AsyncFS._AFS__lookup fsxp (coq_FSXPRootInum fsxp) dirparts debugMore rd case rd of ...
630
fscqUnlink fr m_fsxp (_:path) = withMVar m_fsxp $ \fsxp -> do debugStart "UNLINK" path (dirparts, filename) <- return $ splitDirsFile path (rd, ()) <- fr $ AsyncFS._AFS__lookup fsxp (coq_FSXPRootInum fsxp) dirparts debugMore rd case rd of Errno.Err e -> return $ errnoToPosix e Errno.OK (dnum, isdir) ...
560
false
true
0
19
165
256
119
137
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/PackageDescription/Parse.hs
bsd-3-clause
deprecatedFields :: [(String,String)] deprecatedFields = deprecatedFieldsPkgDescr ++ deprecatedFieldsBuildInfo
114
deprecatedFields :: [(String,String)] deprecatedFields = deprecatedFieldsPkgDescr ++ deprecatedFieldsBuildInfo
114
deprecatedFields = deprecatedFieldsPkgDescr ++ deprecatedFieldsBuildInfo
76
false
true
0
6
11
24
14
10
null
null
RAFIRAF/HASKELL
For a Few Monads More/difflist.hs
mit
fromDiffList :: DiffList a -> [a] fromDiffList (DiffList f) = f []
68
fromDiffList :: DiffList a -> [a] fromDiffList (DiffList f) = f []
66
fromDiffList (DiffList f) = f []
32
false
true
0
7
13
35
17
18
null
null
alexstachnik/High-Level-C
src/Language/HLC/Quasi/TypeParser.hs
gpl-2.0
asstToConstraint (ParenA asst) = asstToConstraint asst
56
asstToConstraint (ParenA asst) = asstToConstraint asst
56
asstToConstraint (ParenA asst) = asstToConstraint asst
56
false
false
0
7
7
18
8
10
null
null
olorin/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/DisableSnapshotCopy.hs
mpl-2.0
-- | The response status code. dscrsResponseStatus :: Lens' DisableSnapshotCopyResponse Int dscrsResponseStatus = lens _dscrsResponseStatus (\ s a -> s{_dscrsResponseStatus = a})
178
dscrsResponseStatus :: Lens' DisableSnapshotCopyResponse Int dscrsResponseStatus = lens _dscrsResponseStatus (\ s a -> s{_dscrsResponseStatus = a})
147
dscrsResponseStatus = lens _dscrsResponseStatus (\ s a -> s{_dscrsResponseStatus = a})
86
true
true
0
9
21
40
22
18
null
null
flyrry/phonypony
src/Vindinium/Runner/Tileset.hs
mit
heroesConf :: [(String, Int, Int)] heroesConf = [ ("hero1", 0, 3) , ("hero2", 0, 2) , ("hero3", 0, 1) , ("hero4", 0, 0) ]
173
heroesConf :: [(String, Int, Int)] heroesConf = [ ("hero1", 0, 3) , ("hero2", 0, 2) , ("hero3", 0, 1) , ("hero4", 0, 0) ]
173
heroesConf = [ ("hero1", 0, 3) , ("hero2", 0, 2) , ("hero3", 0, 1) , ("hero4", 0, 0) ]
138
false
true
0
8
75
78
47
31
null
null
alephcloud/hs-configuration-tools
src/Configuration/Utils/Internal/JsonTools.hs
mit
-- -------------------------------------------------------------------------- -- -- Compute Difference between two JSON Values -- | Merge two JSON values and annotate the result with the differences. -- diff ∷ Value → Value → Value diff a b | a == b = toJSON $ Both a
268
diff ∷ Value → Value → Value diff a b | a == b = toJSON $ Both a
64
diff a b | a == b = toJSON $ Both a
35
true
true
0
8
43
49
24
25
null
null
ku-fpg/kansas-amber
firmware/Timing/Host/Test.hs
bsd-3-clause
main :: IO () main = withArduino True "/dev/cu.usbmodem1421" prog
65
main :: IO () main = withArduino True "/dev/cu.usbmodem1421" prog
65
main = withArduino True "/dev/cu.usbmodem1421" prog
51
false
true
0
6
9
23
11
12
null
null
alephcloud/hs-aws-general
tests/SignatureV4.hs
mit
prop_canonicalHeaders :: HTTP.RequestHeaders -> Bool prop_canonicalHeaders h = let x = canonicalHeaders h in x `seq` True
121
prop_canonicalHeaders :: HTTP.RequestHeaders -> Bool prop_canonicalHeaders h = let x = canonicalHeaders h in x `seq` True
121
prop_canonicalHeaders h = let x = canonicalHeaders h in x `seq` True
68
false
true
0
9
16
46
21
25
null
null
Mathnerd314/lamdu
bottlelib/Graphics/UI/Bottle/Widget.hs
gpl-3.0
scale :: Vector2 R -> Widget f -> Widget f scale mult = (wFrame %~ Anim.scale mult) . (wFocalArea . Rect.topLeftAndSize %~ (* mult)) . (wMaybeEnter . Lens.traversed %~ (Lens.mapped . enterResultRect . Rect.topLeftAndSize %~ (*mult)) . (Lens.argument . Direction.coordinates . Rect.topLeftAndSize ...
356
scale :: Vector2 R -> Widget f -> Widget f scale mult = (wFrame %~ Anim.scale mult) . (wFocalArea . Rect.topLeftAndSize %~ (* mult)) . (wMaybeEnter . Lens.traversed %~ (Lens.mapped . enterResultRect . Rect.topLeftAndSize %~ (*mult)) . (Lens.argument . Direction.coordinates . Rect.topLeftAndSize ...
356
scale mult = (wFrame %~ Anim.scale mult) . (wFocalArea . Rect.topLeftAndSize %~ (* mult)) . (wMaybeEnter . Lens.traversed %~ (Lens.mapped . enterResultRect . Rect.topLeftAndSize %~ (*mult)) . (Lens.argument . Direction.coordinates . Rect.topLeftAndSize %~ (/mult))) . (wSize %~ (* mult))
313
false
true
0
14
74
148
79
69
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/NV/texture_rectangle.txt NV_texture_rectangle> extension supported? -- Note that in the presence of multiple contexts with different capabilities, -- this might be wrong. Use 'glGetNVTextureRectangle' in those cases instead. gl_NV_texture_rectangle :: Bool gl_NV_textur...
377
gl_NV_texture_rectangle :: Bool gl_NV_texture_rectangle = member "GL_NV_texture_rectangle" extensions
101
gl_NV_texture_rectangle = member "GL_NV_texture_rectangle" extensions
69
true
true
0
5
38
19
11
8
null
null
onponomarev/ganeti
src/Ganeti/JQScheduler.hs
bsd-2-clause
cleanupIfDead :: JQStatus -> JobId -> IO Bool cleanupIfDead state jid = do logDebug $ "Extra job-death detection for " ++ show (fromJobId jid) jobs <- readIORef (jqJobs state) let jobWS = find ((==) jid . qjId . jJob) $ qRunning jobs -- and run the post hooks let runHooks = do r <- runResultT . withLo...
1,054
cleanupIfDead :: JQStatus -> JobId -> IO Bool cleanupIfDead state jid = do logDebug $ "Extra job-death detection for " ++ show (fromJobId jid) jobs <- readIORef (jqJobs state) let jobWS = find ((==) jid . qjId . jJob) $ qRunning jobs -- and run the post hooks let runHooks = do r <- runResultT . withLo...
1,054
cleanupIfDead state jid = do logDebug $ "Extra job-death detection for " ++ show (fromJobId jid) jobs <- readIORef (jqJobs state) let jobWS = find ((==) jid . qjId . jJob) $ qRunning jobs -- and run the post hooks let runHooks = do r <- runResultT . withLock (jqForkLock state) ...
1,008
false
true
0
18
452
258
123
135
null
null
plow-technologies/shakespeare-dynamic
ghcjs-shakespeare-dynamic/src/Shakespeare/Dynamic/Render.hs
mit
-- | Run dom (not forked) forever. This receives the current dom -- and then renders it again each time it changes runDomI :: DOMNode -- ^ Container to render the dom in -> IO () -- ^ Action to run after the FIRST render -> STMEnvelope (LiveVDom VDA.JSEvent) -- ^ dom to run and watch for changes ...
737
runDomI :: DOMNode -- ^ Container to render the dom in -> IO () -- ^ Action to run after the FIRST render -> STMEnvelope (LiveVDom VDA.JSEvent) -- ^ dom to run and watch for changes -> IO () runDomI container postRun envLD = do vdm <- recvIO envLD vn' <- renderDom container emptyDiv vdm ...
622
runDomI container postRun envLD = do vdm <- recvIO envLD vn' <- renderDom container emptyDiv vdm -- Render the initial dom _ <- atAnimationFrame postRun foldOnChangeWith waitForDom envLD (renderDom container) vn' -- pass the rendered dom into the fold that ...
404
true
true
0
12
215
117
56
61
null
null
spechub/Hets
Common/LibName.hs
gpl-2.0
mkLibStr :: String -> String mkLibStr = dropWhile (== '/') . stripLibChars
74
mkLibStr :: String -> String mkLibStr = dropWhile (== '/') . stripLibChars
74
mkLibStr = dropWhile (== '/') . stripLibChars
45
false
true
1
7
11
34
15
19
null
null
KyleOndy/GearBot-irc
src/GearWatcher.hs
bsd-3-clause
frontPageSaleIds :: [Listing] -> [String] frontPageSaleIds = map postId
71
frontPageSaleIds :: [Listing] -> [String] frontPageSaleIds = map postId
71
frontPageSaleIds = map postId
29
false
true
0
6
8
24
13
11
null
null
ghcjs/ghcjs
src/Gen2/RtsApply.hs
mit
stackApply :: DynFlags -> CgSettings -> Int -- ^ number of registers in stack frame -> Int -- ^ number of arguments -> JStat stackApply dflags s r n = closure (ClosureInfo funcName (CIRegs 0 [PtrV]) funcName layout CIStackFrame noStatic) body whe...
3,880
stackApply :: DynFlags -> CgSettings -> Int -- ^ number of registers in stack frame -> Int -- ^ number of arguments -> JStat stackApply dflags s r n = closure (ClosureInfo funcName (CIRegs 0 [PtrV]) funcName layout CIStackFrame noStatic) body whe...
3,880
stackApply dflags s r n = closure (ClosureInfo funcName (CIRegs 0 [PtrV]) funcName layout CIStackFrame noStatic) body where layout = CILayoutUnknown r funcName = T.pack ("h$ap_" ++ show n ++ "_" ++ show r) body = jVar $ \c -> c |= r1 .^ "f" # traceRts s (e func...
3,695
false
true
49
26
1,740
1,304
663
641
null
null
dcreager/cabal
Distribution/PackageDescription/Parse.hs
bsd-3-clause
parseField [] unrec (a,us) (F l f val) = return $ case unrec (f,val) a of -- no fields matched, see if the 'unrec' Just a' -> (a',us) -- function wants to do anything with it Nothing -> (a, ((l,f):us))
228
parseField [] unrec (a,us) (F l f val) = return $ case unrec (f,val) a of -- no fields matched, see if the 'unrec' Just a' -> (a',us) -- function wants to do anything with it Nothing -> (a, ((l,f):us))
228
parseField [] unrec (a,us) (F l f val) = return $ case unrec (f,val) a of -- no fields matched, see if the 'unrec' Just a' -> (a',us) -- function wants to do anything with it Nothing -> (a, ((l,f):us))
228
false
false
0
12
66
94
52
42
null
null
enolan/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
constDocs c@(AType (ATInt (ITFixed IT16))) = "Sixteen bits (unsigned)"
70
constDocs c@(AType (ATInt (ITFixed IT16))) = "Sixteen bits (unsigned)"
70
constDocs c@(AType (ATInt (ITFixed IT16))) = "Sixteen bits (unsigned)"
70
false
false
0
12
8
30
15
15
null
null
markuspf/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
-- | The initial empty context initContext = MkContext 0 emptyContext
69
initContext = MkContext 0 emptyContext
38
initContext = MkContext 0 emptyContext
38
true
false
0
5
10
12
6
6
null
null
tdammers/ginger
src/Text/Ginger/AST.hs
mit
exprAnnotation (StringLiteralE a _) = a
39
exprAnnotation (StringLiteralE a _) = a
39
exprAnnotation (StringLiteralE a _) = a
39
false
false
0
7
5
17
8
9
null
null
quyse/flaw
flaw-lua/Flaw/Script/Lua/Operations.hs
mit
luaValuePow :: LuaMonad m => LuaValue m -> LuaValue m -> m (LuaValue m) luaValuePow = numberBinaryOp pow "__pow" where pow a b = exp $ log a * b
148
luaValuePow :: LuaMonad m => LuaValue m -> LuaValue m -> m (LuaValue m) luaValuePow = numberBinaryOp pow "__pow" where pow a b = exp $ log a * b
148
luaValuePow = numberBinaryOp pow "__pow" where pow a b = exp $ log a * b
76
false
true
0
10
33
68
32
36
null
null
scvalex/dissemina2
Cached.hs
gpl-3.0
handleRequest :: MVar (Map String ByteString) -> Socket -> IO () handleRequest cacheVar sock = do text <- modifyMVar cacheVar $ \cache -> do uri <- readRequestUri sock case M.lookup uri cache of Nothing -> do -- fileText <- readFile uri fileText <- mmapFileByteS...
532
handleRequest :: MVar (Map String ByteString) -> Socket -> IO () handleRequest cacheVar sock = do text <- modifyMVar cacheVar $ \cache -> do uri <- readRequestUri sock case M.lookup uri cache of Nothing -> do -- fileText <- readFile uri fileText <- mmapFileByteS...
532
handleRequest cacheVar sock = do text <- modifyMVar cacheVar $ \cache -> do uri <- readRequestUri sock case M.lookup uri cache of Nothing -> do -- fileText <- readFile uri fileText <- mmapFileByteString uri Nothing return (M.insert uri fileText cac...
467
false
true
0
20
170
160
73
87
null
null
michaelmelanson/cminus-compiler
Compiler/CodeGeneration/CompilationState.hs
bsd-2-clause
label name = do a <- currentAddress comment ("label " ++ name ++ " defined at " ++ show a) defineLabel name a
149
label name = do a <- currentAddress comment ("label " ++ name ++ " defined at " ++ show a) defineLabel name a
149
label name = do a <- currentAddress comment ("label " ++ name ++ " defined at " ++ show a) defineLabel name a
149
false
false
1
13
62
49
21
28
null
null
ruudkoot/odin
src/SCSI/Sense.hs
gpl-3.0
decodeSenseData :: SenseData -> String decodeSenseData senseData = undefined
76
decodeSenseData :: SenseData -> String decodeSenseData senseData = undefined
76
decodeSenseData senseData = undefined
37
false
true
0
7
8
24
10
14
null
null
jwvg0425/HaskellScratchPad
src/quicksort.hs
mit
quicksort (x:xs) = smallerSorted ++ [x] ++ biggerSorted where smallerSorted = quicksort (filter (<=x) xs) biggerSorted = quicksort (filter (>x) xs) -- ÇØ´ç ¿ø¼Ò°¡ ÀÖ´Â À§Ä¡¸¦ µ¹·ÁÁÜ
193
quicksort (x:xs) = smallerSorted ++ [x] ++ biggerSorted where smallerSorted = quicksort (filter (<=x) xs) biggerSorted = quicksort (filter (>x) xs) -- ÇØ´ç ¿ø¼Ò°¡ ÀÖ´Â À§Ä¡¸¦ µ¹·ÁÁÜ
193
quicksort (x:xs) = smallerSorted ++ [x] ++ biggerSorted where smallerSorted = quicksort (filter (<=x) xs) biggerSorted = quicksort (filter (>x) xs) -- ÇØ´ç ¿ø¼Ò°¡ ÀÖ´Â À§Ä¡¸¦ µ¹·ÁÁÜ
193
false
false
2
8
38
78
38
40
null
null
emc2/saltlang
test/Test/UnitTests/Control/Monad/ProofRecorder.hs
bsd-3-clause
combineCases :: Monad m => (String, ProofRecorderT Symbol m (), ProofScript Symbol) -- ^ The first case. -> (String, ProofRecorderT Symbol m (), ProofScript Symbol) -- ^ The second case. -> (String, ProofRecorderT Symbol m (), ProofScript Symbol) ...
518
combineCases :: Monad m => (String, ProofRecorderT Symbol m (), ProofScript Symbol) -- ^ The first case. -> (String, ProofRecorderT Symbol m (), ProofScript Symbol) -- ^ The second case. -> (String, ProofRecorderT Symbol m (), ProofScript Symbol) combi...
483
combineCases (firstname, first, firstscript) (secondname, second, secondscript) = (firstname ++ secondname, first >> second, firstscript ++ secondscript)
168
true
true
0
12
155
142
76
66
null
null
bmmoore/logic
Logic/CNF.hs
bsd-3-clause
mkDef p@(_,vars) (Forall v f1) = do (p1,d1) <- def f1 return $ And (foralls vars (limpl p (Forall v (ltrue p1)))) d1
124
mkDef p@(_,vars) (Forall v f1) = do (p1,d1) <- def f1 return $ And (foralls vars (limpl p (Forall v (ltrue p1)))) d1
124
mkDef p@(_,vars) (Forall v f1) = do (p1,d1) <- def f1 return $ And (foralls vars (limpl p (Forall v (ltrue p1)))) d1
124
false
false
0
16
30
86
43
43
null
null
scvalex/ltorrent
Data/Bencoding.hs
lgpl-3.0
showStructure :: Bencoding -> String showStructure (BencString s) = printf "%d byte string" (L.length s)
104
showStructure :: Bencoding -> String showStructure (BencString s) = printf "%d byte string" (L.length s)
104
showStructure (BencString s) = printf "%d byte string" (L.length s)
67
false
true
0
8
14
37
18
19
null
null
rootzlevel/device-manager
lib/DBus/UDisks2/Operations.hs
bsd-3-clause
udisksDestination :: DBus.BusName udisksDestination = "org.freedesktop.UDisks2"
79
udisksDestination :: DBus.BusName udisksDestination = "org.freedesktop.UDisks2"
79
udisksDestination = "org.freedesktop.UDisks2"
45
false
true
0
7
5
20
8
12
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 205942 = 5164
33
getValueFromProduct 205942 = 5164
33
getValueFromProduct 205942 = 5164
33
false
false
0
5
3
9
4
5
null
null
three/codeworld
codeworld-base/src/Internal/Text.hs
apache-2.0
toCWText :: T.Text -> Text toCWText = T . J.textToJSString
58
toCWText :: T.Text -> Text toCWText = T . J.textToJSString
58
toCWText = T . J.textToJSString
31
false
true
1
7
9
31
13
18
null
null
clarissalittler/cs311
DFALang.hs
mit
evalDfa ds (DOr d d') s = case evalDfa ds d s of End -> End Fail -> evalDfa ds d' s -- main handler
156
evalDfa ds (DOr d d') s = case evalDfa ds d s of End -> End Fail -> evalDfa ds d' s -- main handler
156
evalDfa ds (DOr d d') s = case evalDfa ds d s of End -> End Fail -> evalDfa ds d' s -- main handler
156
false
false
0
8
81
52
25
27
null
null
urbanslug/ghc
compiler/typecheck/TcGenGenerics.hs
bsd-3-clause
foldBal' op x l = let (a,b) = splitAt (length l `div` 2) l in foldBal' op x a `op` foldBal' op x b
120
foldBal' op x l = let (a,b) = splitAt (length l `div` 2) l in foldBal' op x a `op` foldBal' op x b
120
foldBal' op x l = let (a,b) = splitAt (length l `div` 2) l in foldBal' op x a `op` foldBal' op x b
120
false
false
1
12
45
78
35
43
null
null
kowey/GenI
src/NLP/GenI/Configuration.hs
gpl-2.0
getBuilderType :: Params -> BuilderType getBuilderType = fromMaybe defaultBuilderType . builderType
99
getBuilderType :: Params -> BuilderType getBuilderType = fromMaybe defaultBuilderType . builderType
99
getBuilderType = fromMaybe defaultBuilderType . builderType
59
false
true
0
6
10
22
11
11
null
null
apunktbau/co4
src/CO4/Frontend/TH.hs
gpl-3.0
parseTHConstructor :: TH.Con -> Constructor parseTHConstructor con = case con of TH.NormalC n strictTypes -> CCon (untypedName $ fromTHName n) $ map parseTHStrictType strictTypes _ -> notSupported "parseTHConstructor" con where parseTHStrictType (_,t) = let SType t' = parseTHType t in ...
334
parseTHConstructor :: TH.Con -> Constructor parseTHConstructor con = case con of TH.NormalC n strictTypes -> CCon (untypedName $ fromTHName n) $ map parseTHStrictType strictTypes _ -> notSupported "parseTHConstructor" con where parseTHStrictType (_,t) = let SType t' = parseTHType t in ...
334
parseTHConstructor con = case con of TH.NormalC n strictTypes -> CCon (untypedName $ fromTHName n) $ map parseTHStrictType strictTypes _ -> notSupported "parseTHConstructor" con where parseTHStrictType (_,t) = let SType t' = parseTHType t in t'
290
false
true
0
12
86
111
50
61
null
null
christiaanb/clash-compiler
clash-lib/src/CLaSH/Rewrite/Combinators.hs
bsd-2-clause
allR _ _ _ (Data dc) = return (Data dc)
41
allR _ _ _ (Data dc) = return (Data dc)
41
allR _ _ _ (Data dc) = return (Data dc)
41
false
false
0
7
11
30
14
16
null
null
whitehead1415/typeclasses-mob
app/Expression.hs
bsd-3-clause
area (Square s) = s * s
23
area (Square s) = s * s
23
area (Square s) = s * s
23
false
false
0
6
6
20
9
11
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxDIALOG_MODAL :: Int wxDIALOG_MODAL = 32
41
wxDIALOG_MODAL :: Int wxDIALOG_MODAL = 32
41
wxDIALOG_MODAL = 32
19
false
true
0
6
5
18
7
11
null
null
Rufflewind/ascii-art
Main.hs
mit
termColorToRGB (CS16 x) = s16Colors !! fromIntegral x
53
termColorToRGB (CS16 x) = s16Colors !! fromIntegral x
53
termColorToRGB (CS16 x) = s16Colors !! fromIntegral x
53
false
false
0
6
7
23
10
13
null
null
graninas/Andromeda
src/Andromeda/Utils/Parsing.hs
bsd-3-clause
intTuple2 :: GenParser Char st (Int, Int) intTuple2 = do char '(' v1 <- integerConstant trueSpaces >> char ',' >> trueSpaces v2 <- integerConstant char ')' return (v1, v2)
183
intTuple2 :: GenParser Char st (Int, Int) intTuple2 = do char '(' v1 <- integerConstant trueSpaces >> char ',' >> trueSpaces v2 <- integerConstant char ')' return (v1, v2)
183
intTuple2 = do char '(' v1 <- integerConstant trueSpaces >> char ',' >> trueSpaces v2 <- integerConstant char ')' return (v1, v2)
141
false
true
0
9
40
76
35
41
null
null
guoguo12/haskell-ptable
ptable.hs
apache-2.0
anum "Rf" = 104
15
anum "Rf" = 104
15
anum "Rf" = 104
15
false
false
0
4
3
10
4
6
null
null
urbanslug/ghc
compiler/utils/FastTypes.hs
bsd-3-clause
minFastInt, maxFastInt :: FastInt -> FastInt -> FastInt minFastInt x y = if x <# y then x else y
96
minFastInt, maxFastInt :: FastInt -> FastInt -> FastInt minFastInt x y = if x <# y then x else y
96
minFastInt x y = if x <# y then x else y
40
false
true
0
6
19
38
21
17
null
null
evilcandybag/JSHC
hslib/Prelude.hs
mit
(<) = JSHC.Internal.int32lt
28
(<) = JSHC.Internal.int32lt
28
(<) = JSHC.Internal.int32lt
28
false
false
1
6
3
15
7
8
null
null
joelmccracken/git-stuff
src/Trackable.hs
bsd-3-clause
processInboxTrackable :: InboxDirTrackable -> R.Reddup NHFile processInboxTrackable idt@(InboxDirTrackable dir _locSpec)= do dir' <- lift $ pathToTextOrError dir R.verbose $ "checking " <> dir' lift $ Tu.cd dir let files = lift $ Tu.ls dir files >>= (lift . return . NHFile idt)
289
processInboxTrackable :: InboxDirTrackable -> R.Reddup NHFile processInboxTrackable idt@(InboxDirTrackable dir _locSpec)= do dir' <- lift $ pathToTextOrError dir R.verbose $ "checking " <> dir' lift $ Tu.cd dir let files = lift $ Tu.ls dir files >>= (lift . return . NHFile idt)
289
processInboxTrackable idt@(InboxDirTrackable dir _locSpec)= do dir' <- lift $ pathToTextOrError dir R.verbose $ "checking " <> dir' lift $ Tu.cd dir let files = lift $ Tu.ls dir files >>= (lift . return . NHFile idt)
227
false
true
1
13
52
121
53
68
null
null