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
pparkkin/eta
compiler/ETA/TypeCheck/TcType.hs
bsd-3-clause
legalFIResultTyCon :: DynFlags -> TyCon -> Type -> Bool legalFIResultTyCon dflags tc ty | tc == unitTyCon = True | otherwise = marshalableTyCon dflags tc ty
182
legalFIResultTyCon :: DynFlags -> TyCon -> Type -> Bool legalFIResultTyCon dflags tc ty | tc == unitTyCon = True | otherwise = marshalableTyCon dflags tc ty
182
legalFIResultTyCon dflags tc ty | tc == unitTyCon = True | otherwise = marshalableTyCon dflags tc ty
126
false
true
1
8
51
58
27
31
null
null
SamirTalwar/Smoke
src/lib/Test/Smoke/Types/Tests.hs
mit
many :: FromJSON a => Value -> Parser (Vector a) many (Array v) = mapM parseJSON v
82
many :: FromJSON a => Value -> Parser (Vector a) many (Array v) = mapM parseJSON v
82
many (Array v) = mapM parseJSON v
33
false
true
0
10
16
51
22
29
null
null
christiaanb/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
collect_bind _ (AbsBinds { abs_exports = dbinds }) acc = map abe_poly dbinds ++ acc
83
collect_bind _ (AbsBinds { abs_exports = dbinds }) acc = map abe_poly dbinds ++ acc
83
collect_bind _ (AbsBinds { abs_exports = dbinds }) acc = map abe_poly dbinds ++ acc
83
false
false
2
9
14
37
17
20
null
null
DanielG/cabal-helper
src/CabalHelper/Compiletime/Process.hs
apache-2.0
formatProcessArg :: String -> String formatProcessArg xs | any isSpace xs = "'"++ xs ++"'" | otherwise = xs
120
formatProcessArg :: String -> String formatProcessArg xs | any isSpace xs = "'"++ xs ++"'" | otherwise = xs
120
formatProcessArg xs | any isSpace xs = "'"++ xs ++"'" | otherwise = xs
83
false
true
0
8
31
46
21
25
null
null
cies/gelatin
gelatin-gl/src/Gelatin/GL/Shader.hs
bsd-3-clause
glslUniformIdentifier (UniformSumLength _) = "sumlength"
57
glslUniformIdentifier (UniformSumLength _) = "sumlength"
57
glslUniformIdentifier (UniformSumLength _) = "sumlength"
57
false
false
0
7
5
15
7
8
null
null
Frefreak/hearthstone-cardsearch
client/src/JavaScript/JQuery.hs
bsd-3-clause
isDefaultPrevented :: Event -> IO Bool isDefaultPrevented e = jq_isDefaultPrevented e
85
isDefaultPrevented :: Event -> IO Bool isDefaultPrevented e = jq_isDefaultPrevented e
85
isDefaultPrevented e = jq_isDefaultPrevented e
46
false
true
0
7
10
28
12
16
null
null
brendanhay/gogol
gogol-container/gen/Network/Google/Container/Types/Product.hs
mpl-2.0
-- | Constraint enforced on the max num of pods per node. mpcMaxPodsPerNode :: Lens' MaxPodsConstraint (Maybe Int64) mpcMaxPodsPerNode = lens _mpcMaxPodsPerNode (\ s a -> s{_mpcMaxPodsPerNode = a}) . mapping _Coerce
229
mpcMaxPodsPerNode :: Lens' MaxPodsConstraint (Maybe Int64) mpcMaxPodsPerNode = lens _mpcMaxPodsPerNode (\ s a -> s{_mpcMaxPodsPerNode = a}) . mapping _Coerce
171
mpcMaxPodsPerNode = lens _mpcMaxPodsPerNode (\ s a -> s{_mpcMaxPodsPerNode = a}) . mapping _Coerce
112
true
true
2
8
45
60
28
32
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
hvcDefaults :: Map Hypervisor (Map String PyValueEx) hvcDefaults = Map.fromList [ (XenPvm, Map.fromList [ (hvUseBootloader, PyValueEx False) , (hvBootloaderPath, PyValueEx xenBootloader) , (hvBootloaderArgs, PyValueEx "") , (hvKernelPath, PyValueEx xenKernel)...
7,597
hvcDefaults :: Map Hypervisor (Map String PyValueEx) hvcDefaults = Map.fromList [ (XenPvm, Map.fromList [ (hvUseBootloader, PyValueEx False) , (hvBootloaderPath, PyValueEx xenBootloader) , (hvBootloaderArgs, PyValueEx "") , (hvKernelPath, PyValueEx xenKernel)...
7,597
hvcDefaults = Map.fromList [ (XenPvm, Map.fromList [ (hvUseBootloader, PyValueEx False) , (hvBootloaderPath, PyValueEx xenBootloader) , (hvBootloaderArgs, PyValueEx "") , (hvKernelPath, PyValueEx xenKernel) , (hvInitrdPath, PyValueEx "") ...
7,544
false
true
0
11
3,327
1,625
952
673
null
null
rueshyna/gogol
gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs
mpl-2.0
-- | The election officials for this election administrative body. abElectionOfficials :: Lens' AdministrativeBody [ElectionOfficial] abElectionOfficials = lens _abElectionOfficials (\ s a -> s{_abElectionOfficials = a}) . _Default . _Coerce
261
abElectionOfficials :: Lens' AdministrativeBody [ElectionOfficial] abElectionOfficials = lens _abElectionOfficials (\ s a -> s{_abElectionOfficials = a}) . _Default . _Coerce
194
abElectionOfficials = lens _abElectionOfficials (\ s a -> s{_abElectionOfficials = a}) . _Default . _Coerce
127
true
true
2
8
49
57
28
29
null
null
tamaralipowski/courseography
hs/Response/Draw.hs
gpl-3.0
drawContent :: H.Html drawContent = H.div ! A.id "about-div" $ "Draw a Graph"
77
drawContent :: H.Html drawContent = H.div ! A.id "about-div" $ "Draw a Graph"
77
drawContent = H.div ! A.id "about-div" $ "Draw a Graph"
55
false
true
2
7
12
35
15
20
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/Utils.hs
bsd-2-clause
-- | Comma-join a string list. commaJoin :: [String] -> String commaJoin = intercalate ","
90
commaJoin :: [String] -> String commaJoin = intercalate ","
59
commaJoin = intercalate ","
27
true
true
0
7
14
28
13
15
null
null
CanvasHS/Canvas.hs
canvashs-module/CanvasHs.hs
lgpl-2.1
doActions :: MVar (State a) -> State a -> [Action] -> IO ([Action], State a) doActions st cst [] = return ([], cst)
115
doActions :: MVar (State a) -> State a -> [Action] -> IO ([Action], State a) doActions st cst [] = return ([], cst)
115
doActions st cst [] = return ([], cst)
38
false
true
0
10
22
73
37
36
null
null
mattias-lundell/timber-llvm
src/Scp.hs
bsd-3-clause
drive env (EVar (Prim Match _)) ((AppCtxt [EAp (EVar (Prim Commit _)) [arg]]):c) = drive env arg c
100
drive env (EVar (Prim Match _)) ((AppCtxt [EAp (EVar (Prim Commit _)) [arg]]):c) = drive env arg c
100
drive env (EVar (Prim Match _)) ((AppCtxt [EAp (EVar (Prim Commit _)) [arg]]):c) = drive env arg c
100
false
false
0
15
19
74
36
38
null
null
AndrewRademacher/stack
src/Stack/Package.hs
bsd-3-clause
benchmarkFiles :: (MonadLogger m, MonadIO m, MonadCatch m, MonadReader (Path Abs File, Path Abs Dir) m) => Benchmark -> m (Set ModuleName, Set DotCabalPath, [PackageWarning]) benchmarkFiles bench = do dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build) dir <- asks (parent . fst) (modules,files,w...
868
benchmarkFiles :: (MonadLogger m, MonadIO m, MonadCatch m, MonadReader (Path Abs File, Path Abs Dir) m) => Benchmark -> m (Set ModuleName, Set DotCabalPath, [PackageWarning]) benchmarkFiles bench = do dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build) dir <- asks (parent . fst) (modules,files,w...
868
benchmarkFiles bench = do dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build) dir <- asks (parent . fst) (modules,files,warnings) <- resolveFilesAndDeps (Just $ benchmarkName bench) (dirs ++ [dir]) (bnames <> exposed) haskellModuleExts cfiles <...
685
false
true
0
11
231
271
135
136
null
null
christiaanb/Idris-dev
src/Idris/Completion.hs
bsd-3-clause
replCompletion :: CompletionFunc Idris replCompletion (prev, next) = case firstWord of ':':cmdName -> completeCmd (':':cmdName) (prev, next) _ -> completeExpr [] (prev, next) where firstWord = fst $ break isWhitespace $ dropWhile isWhitespace...
335
replCompletion :: CompletionFunc Idris replCompletion (prev, next) = case firstWord of ':':cmdName -> completeCmd (':':cmdName) (prev, next) _ -> completeExpr [] (prev, next) where firstWord = fst $ break isWhitespace $ dropWhile isWhitespace...
335
replCompletion (prev, next) = case firstWord of ':':cmdName -> completeCmd (':':cmdName) (prev, next) _ -> completeExpr [] (prev, next) where firstWord = fst $ break isWhitespace $ dropWhile isWhitespace $ reverse prev
296
false
true
0
10
113
103
52
51
null
null
alphaHeavy/hlint
src/HSE/Util.hs
gpl-2.0
allowLeftSection x = x /= "#"
29
allowLeftSection x = x /= "#"
29
allowLeftSection x = x /= "#"
29
false
false
3
5
5
19
7
12
null
null
sdiehl/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
consDataCon_RDR = nameRdrName consDataConName
45
consDataCon_RDR = nameRdrName consDataConName
45
consDataCon_RDR = nameRdrName consDataConName
45
false
false
0
5
3
9
4
5
null
null
plow-technologies/hs-webdriver
src/Test/WebDriver/Commands/Wait.hs
bsd-3-clause
-- |Apply a monadic predicate to every element in a list, and 'expect' that -- at least one succeeds. expectAny :: MonadBaseControl IO m => (a -> m Bool) -> [a] -> m () expectAny p xs = expect . or =<< mapM p xs
211
expectAny :: MonadBaseControl IO m => (a -> m Bool) -> [a] -> m () expectAny p xs = expect . or =<< mapM p xs
109
expectAny p xs = expect . or =<< mapM p xs
42
true
true
0
9
44
66
33
33
null
null
danfran/hcoord
src/MathExtensions.hs
bsd-3-clause
tanSquared :: Double -> Double tanSquared phi = tan phi ** 2
60
tanSquared :: Double -> Double tanSquared phi = tan phi ** 2
60
tanSquared phi = tan phi ** 2
29
false
true
0
7
11
31
13
18
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Short/Internal.hs
mit
packCStringLen :: CStringLen -> IO ShortByteString packCStringLen (cstr, len) | len >= 0 = createFromPtr cstr len
113
packCStringLen :: CStringLen -> IO ShortByteString packCStringLen (cstr, len) | len >= 0 = createFromPtr cstr len
113
packCStringLen (cstr, len) | len >= 0 = createFromPtr cstr len
62
false
true
0
8
16
46
21
25
null
null
BartMassey/list-combinators
Data/List/Combinator.hs
bsd-3-clause
-- | The 'stripPrefixBy' function drops the given prefix from a list. -- It returns 'Just' the suffix of the list after the given prefix -- if the prefix matches, and 'Nothing' otherwise. A user-supplied -- predicate is used for testing element equality. -- -- /O(n)/ where /n/ is the length of the prefix. Laws: -- -...
1,372
stripPrefixBy :: (a -> a -> Bool) -> [a] -> [a] -> Maybe [a] stripPrefixBy p ps xs = foldl f (Just ps) xs where f Nothing _ = Nothing f (Just []) _ = Nothing f (Just (y : ys)) x | p x y = Just ys | otherwise = Nothing -- | The 'stripSuffix' function drops the given suffix from a list. -- I...
601
stripPrefixBy p ps xs = foldl f (Just ps) xs where f Nothing _ = Nothing f (Just []) _ = Nothing f (Just (y : ys)) x | p x y = Just ys | otherwise = Nothing -- | The 'stripSuffix' function drops the given suffix from a list. -- It returns 'Just' the prefix of the list before the given suffi...
539
true
true
3
9
328
169
92
77
null
null
emwap/feldspar-language
src/Feldspar/Core/Middleend/OptimizeUntyped.hs
bsd-3-clause
count v e@(In (Lambda v' _)) | v == v' || v `notElem` fv e = 0 | otherwise = 100
101
count v e@(In (Lambda v' _)) | v == v' || v `notElem` fv e = 0 | otherwise = 100
101
count v e@(In (Lambda v' _)) | v == v' || v `notElem` fv e = 0 | otherwise = 100
101
false
false
1
10
41
65
30
35
null
null
rodrigosetti/hreddit
src/System/Console/CommandLoop.hs
mit
performCommand :: MonadIO m => [Command c m] -> String -> [String] -> ExceptT String (StateT c m) () performCommand commands commandName args = do command <- getCommand commands commandName let argNum = argumentNumber command when (length args > argNum) $ liftIO $ putStrLn $ "warning: \"" ...
489
performCommand :: MonadIO m => [Command c m] -> String -> [String] -> ExceptT String (StateT c m) () performCommand commands commandName args = do command <- getCommand commands commandName let argNum = argumentNumber command when (length args > argNum) $ liftIO $ putStrLn $ "warning: \"" ...
489
performCommand commands commandName args = do command <- getCommand commands commandName let argNum = argumentNumber command when (length args > argNum) $ liftIO $ putStrLn $ "warning: \"" ++ commandName ++ "\" takes at most " ++ show argNum ++ " arguments." function command args -...
388
false
true
0
17
113
145
68
77
null
null
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/Fixups.hs
lgpl-2.1
dropMovedItems (APIUnion u) = (Just . APIUnion) u {unionMethods = filterMovedMethods (unionMethods u)}
106
dropMovedItems (APIUnion u) = (Just . APIUnion) u {unionMethods = filterMovedMethods (unionMethods u)}
106
dropMovedItems (APIUnion u) = (Just . APIUnion) u {unionMethods = filterMovedMethods (unionMethods u)}
106
false
false
0
10
16
42
21
21
null
null
merijn/trifecta
src/Text/Trifecta/Util/IntervalMap.hs
bsd-3-clause
-- | /O(log n)/. Insert an interval into a map. -- The map may contain duplicate intervals; the new entry will be inserted -- before any existing entries for the same interval. insert :: Ord v => v -> v -> a -> IntervalMap v a -> IntervalMap v a insert lo hi _ m | lo > hi = m
277
insert :: Ord v => v -> v -> a -> IntervalMap v a -> IntervalMap v a insert lo hi _ m | lo > hi = m
99
insert lo hi _ m | lo > hi = m
30
true
true
0
11
61
71
33
38
null
null
ekmett/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
labelType (SRTLabel _) = DataLabel
59
labelType (SRTLabel _) = DataLabel
59
labelType (SRTLabel _) = DataLabel
59
false
false
0
7
29
15
7
8
null
null
linusyang/barrelfish
hake/RuleDefs.hs
mit
kernelCFlags "x86_64" = X86_64.kernelCFlags
43
kernelCFlags "x86_64" = X86_64.kernelCFlags
43
kernelCFlags "x86_64" = X86_64.kernelCFlags
43
false
false
0
5
3
11
5
6
null
null
technogeeky/d-A
include/base-4.5.0.0/Data/Maybe.hs
gpl-3.0
-- | The 'maybeToList' function returns an empty list when given -- 'Nothing' or a singleton list when not given 'Nothing'. maybeToList :: Maybe a -> [a] maybeToList Nothing = []
192
maybeToList :: Maybe a -> [a] maybeToList Nothing = []
68
maybeToList Nothing = []
27
true
true
0
8
44
34
16
18
null
null
glguy/CookieCalculator
src/CookieClicker.hs
isc
baseUpgradeCost :: GameInput -> GameState -> Upgrade -> Double baseUpgradeCost inp st u = case view upgradeName u of "Golden switch [off]" -> 60 * 60 * computeCps inp st n | n `elem` santaUpgrades -> 2525 * 3 ^ view santaLevel inp _ -> view upgradeCost u -- | Cookies with a constant power effect
311
baseUpgradeCost :: GameInput -> GameState -> Upgrade -> Double baseUpgradeCost inp st u = case view upgradeName u of "Golden switch [off]" -> 60 * 60 * computeCps inp st n | n `elem` santaUpgrades -> 2525 * 3 ^ view santaLevel inp _ -> view upgradeCost u -- | Cookies with a constant power effect
311
baseUpgradeCost inp st u = case view upgradeName u of "Golden switch [off]" -> 60 * 60 * computeCps inp st n | n `elem` santaUpgrades -> 2525 * 3 ^ view santaLevel inp _ -> view upgradeCost u -- | Cookies with a constant power effect
248
false
true
0
11
70
101
49
52
null
null
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Tree.hs
bsd-3-clause
lchoices (FChoice _ _ _ _ ts) = P.llength (P.filter active ts)
65
lchoices (FChoice _ _ _ _ ts) = P.llength (P.filter active ts)
65
lchoices (FChoice _ _ _ _ ts) = P.llength (P.filter active ts)
65
false
false
0
8
14
38
18
20
null
null
emwap/feldspar-compiler
lib/Feldspar/Compiler/Imperative/Frontend.hs
bsd-3-clause
isNativeArray _ = False
53
isNativeArray _ = False
53
isNativeArray _ = False
53
false
false
0
5
33
9
4
5
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
gpl-2.0
-- LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON switch 'A' '3' = '\x01E2'
75
switch 'A' '3' = '\x01E2'
25
switch 'A' '3' = '\x01E2'
25
true
false
0
5
14
12
6
6
null
null
antonlogvinenko/javelin
src/Javelin/Lib/ByteCode/Attribute.hs
mit
parseAnnValue tag = ElementAnnValue tag <$> parseAnnAttr
56
parseAnnValue tag = ElementAnnValue tag <$> parseAnnAttr
56
parseAnnValue tag = ElementAnnValue tag <$> parseAnnAttr
56
false
false
0
6
6
16
7
9
null
null
tattsun/conlogger
src/Control/Concurrent/ConLogger.hs
mit
runner :: ConLogger -> IO () runner cl = do log <- readChan chan T.putStrLn log runner cl where chan = conLogger cl
127
runner :: ConLogger -> IO () runner cl = do log <- readChan chan T.putStrLn log runner cl where chan = conLogger cl
127
runner cl = do log <- readChan chan T.putStrLn log runner cl where chan = conLogger cl
98
false
true
0
8
34
58
25
33
null
null
tolysz/hs-tls
core/Network/TLS/Util.hs
bsd-3-clause
sub :: Bytes -> Int -> Int -> Maybe Bytes sub b offset len | B.length b < offset + len = Nothing | otherwise = Just $ B.take len $ snd $ B.splitAt offset b
179
sub :: Bytes -> Int -> Int -> Maybe Bytes sub b offset len | B.length b < offset + len = Nothing | otherwise = Just $ B.take len $ snd $ B.splitAt offset b
179
sub b offset len | B.length b < offset + len = Nothing | otherwise = Just $ B.take len $ snd $ B.splitAt offset b
137
false
true
1
11
59
88
40
48
null
null
roelvandijk/complexity
Test/Complexity/Chart.hs
bsd-3-clause
quickStatsToChart :: [MeasurementStats] -> Layout Double Double quickStatsToChart xs = statsToChart $ zip xs $ cycle colours where colours = [ blue , red , green , darkgoldenrod , orchid , sienna ...
413
quickStatsToChart :: [MeasurementStats] -> Layout Double Double quickStatsToChart xs = statsToChart $ zip xs $ cycle colours where colours = [ blue , red , green , darkgoldenrod , orchid , sienna ...
413
quickStatsToChart xs = statsToChart $ zip xs $ cycle colours where colours = [ blue , red , green , darkgoldenrod , orchid , sienna , darkcyan , olivedrab ,...
349
false
true
0
7
222
75
41
34
null
null
sol/wai
wai-extra/Network/Wai/Middleware/Gzip.hs
mit
splitCommas x = let (y, z) = break (== ',') x in y : splitCommas (dropWhile (== ' ') $ drop 1 z)
105
splitCommas x = let (y, z) = break (== ',') x in y : splitCommas (dropWhile (== ' ') $ drop 1 z)
105
splitCommas x = let (y, z) = break (== ',') x in y : splitCommas (dropWhile (== ' ') $ drop 1 z)
105
false
false
0
12
31
62
31
31
null
null
bionikspoon/playing-with-haskell---oreilly
ch04/Plus.hs
mit
plus :: Num a => a -> a -> a a `plus` b = a + b
47
plus :: Num a => a -> a -> a a `plus` b = a + b
47
a `plus` b = a + b
18
false
true
3
9
16
41
18
23
null
null
pbiggar/rash
test/Rash/test/TestAST.hs
bsd-3-clause
tests :: TestTree tests = testGroup "AST tests" [unitTests, bugs]
65
tests :: TestTree tests = testGroup "AST tests" [unitTests, bugs]
65
tests = testGroup "AST tests" [unitTests, bugs]
47
false
true
0
6
9
22
12
10
null
null
ctford/Idris-Elba-dev
src/IRTS/Java/JTypes.hs
bsd-3-clause
callableType :: J.Type callableType = RefType . ClassRefType $ ClassType [(Ident "Callable", [])]
99
callableType :: J.Type callableType = RefType . ClassRefType $ ClassType [(Ident "Callable", [])]
99
callableType = RefType . ClassRefType $ ClassType [(Ident "Callable", [])]
76
false
true
0
9
14
38
20
18
null
null
rzetterberg/orgmode-sql
lib/Database/OrgMode/Export/OrgParse.hs
bsd-3-clause
exportFilterDocument :: (MonadIO m) => [Entity Db.Heading] -> ReaderT SqlBackend m Document exportFilterDocument dbHeadings = do rels <- mapM exportHeadingRel dbHeadings return $ Document "" (headingsFromRels rels) {-| Exports a complete heading from the database in a ...
553
exportFilterDocument :: (MonadIO m) => [Entity Db.Heading] -> ReaderT SqlBackend m Document exportFilterDocument dbHeadings = do rels <- mapM exportHeadingRel dbHeadings return $ Document "" (headingsFromRels rels) {-| Exports a complete heading from the database in a ...
553
exportFilterDocument dbHeadings = do rels <- mapM exportHeadingRel dbHeadings return $ Document "" (headingsFromRels rels) {-| Exports a complete heading from the database in a tuple with the database ID and the ID of it's parent. NB: Does not retrieve the subheadings of the given heading. All headings should...
419
false
true
0
10
127
73
35
38
null
null
input-output-hk/pos-haskell-prototype
tools/src/blockchain-analyser/Rendering.hs
mit
-- | Given a `Block`, returns a table row suitable for being printed -- by `tabl`. toTableRow :: UOM -> (Block, Maybe Undo) -> [Text] toTableRow uom' (block, mbUndo) = let blockHeader = getBlockHeader block previousBlock = pretty (prevBlock block) blockHash = blockHeaderHash blockHeader ...
1,092
toTableRow :: UOM -> (Block, Maybe Undo) -> [Text] toTableRow uom' (block, mbUndo) = let blockHeader = getBlockHeader block previousBlock = pretty (prevBlock block) blockHash = blockHeaderHash blockHeader epoch = pretty (getEpochIndex (getEpoch blockHeader)) blockType ...
1,009
toTableRow uom' (block, mbUndo) = let blockHeader = getBlockHeader block previousBlock = pretty (prevBlock block) blockHash = blockHeaderHash blockHeader epoch = pretty (getEpochIndex (getEpoch blockHeader)) blockType = either (const "GENESIS") (const "MAIN") block ...
958
true
true
0
13
335
273
143
130
null
null
olsner/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
voidPrimTyConName = mkPrimTc (fsLit "Void#") voidPrimTyConKey voidPrimTyCon
87
voidPrimTyConName = mkPrimTc (fsLit "Void#") voidPrimTyConKey voidPrimTyCon
87
voidPrimTyConName = mkPrimTc (fsLit "Void#") voidPrimTyConKey voidPrimTyCon
87
false
false
0
7
18
19
9
10
null
null
sordina/Historical-Cryptography
Codec/Encryption/Historical/XOR/CommandCrack.hs
mit
resolve _ = usage
17
resolve _ = usage
17
resolve _ = usage
17
false
false
0
5
3
9
4
5
null
null
tolysz/keter
Network/HTTP/ReverseProxy/Rewrite.hs
mit
mkRuleMap :: Set RewriteRule -> Map HeaderName RewriteRule mkRuleMap = Map.fromList . map (\k -> (CI.mk . encodeUtf8 $ ruleHeader k, k)) . Set.toList
149
mkRuleMap :: Set RewriteRule -> Map HeaderName RewriteRule mkRuleMap = Map.fromList . map (\k -> (CI.mk . encodeUtf8 $ ruleHeader k, k)) . Set.toList
149
mkRuleMap = Map.fromList . map (\k -> (CI.mk . encodeUtf8 $ ruleHeader k, k)) . Set.toList
90
false
true
0
13
23
65
33
32
null
null
ElastiLotem/deeplink
src/System/FilePath/ByteString.hs
gpl-2.0
joinPath paths = BS8.intercalate "/" paths
70
joinPath paths = BS8.intercalate "/" paths
70
joinPath paths = BS8.intercalate "/" paths
70
false
false
0
6
33
16
7
9
null
null
CarmineM74/haskell_craft3e
Index.hs
mit
amalgamate [p] = [p]
20
amalgamate [p] = [p]
20
amalgamate [p] = [p]
20
false
false
0
5
3
16
8
8
null
null
keithodulaigh/Hets
CSL/Parse_AS_Basic.hs
gpl-2.0
-- | parser for commands command :: CharParser (AnnoState.AnnoState st) CMD command = reduceCommand <|> try assignment <|> repeatExpr <|> caseExpr <|> sequenceExpr <|> constraint
188
command :: CharParser (AnnoState.AnnoState st) CMD command = reduceCommand <|> try assignment <|> repeatExpr <|> caseExpr <|> sequenceExpr <|> constraint
163
command = reduceCommand <|> try assignment <|> repeatExpr <|> caseExpr <|> sequenceExpr <|> constraint
112
true
true
4
8
34
54
26
28
null
null
OpenGenus/cosmos
code/cryptography/src/caesar_cipher/caesar_cipher.hs
gpl-3.0
main :: IO () main = mapM_ print [encoded, decoded] where encoded = caesar (-114) "Veni, vidi, vici" decoded = uncaesar (-114) encoded
144
main :: IO () main = mapM_ print [encoded, decoded] where encoded = caesar (-114) "Veni, vidi, vici" decoded = uncaesar (-114) encoded
144
main = mapM_ print [encoded, decoded] where encoded = caesar (-114) "Veni, vidi, vici" decoded = uncaesar (-114) encoded
130
false
true
1
7
32
60
31
29
null
null
cohomology/hmcalc
Main.hs
gpl-3.0
main :: IO() main = putStrLn "Hello"
36
main :: IO() main = putStrLn "Hello"
36
main = putStrLn "Hello"
23
false
true
0
7
6
25
10
15
null
null
nevrenato/Hets_Fork
THF/ATC_THF.hs
gpl-2.0
_tcTHFBinaryTupleTc :: TyCon _tcTHFBinaryTupleTc = mkTyCon "THF.As.THFBinaryTuple"
82
_tcTHFBinaryTupleTc :: TyCon _tcTHFBinaryTupleTc = mkTyCon "THF.As.THFBinaryTuple"
82
_tcTHFBinaryTupleTc = mkTyCon "THF.As.THFBinaryTuple"
53
false
true
0
5
6
14
7
7
null
null
tectronics/rockdodger
helpers/display_colour_key.hs
gpl-2.0
parseColKey _ = Nothing
23
parseColKey _ = Nothing
23
parseColKey _ = Nothing
23
false
false
0
5
3
9
4
5
null
null
nek0/gegl
src/GEGL/Buffer.hs
lgpl-3.0
gegl_buffer_set_pattern :: FFI.GeglBuffer -- ^ Target buffer -> FFI.GeglRectangle -- ^ Area of target buffer to fill -> FFI.GeglBuffer -- ^ A buffer to be repeated as pattern -> Double -- ^ X offset -> Double -- ^ Y offset -> IO () gegl_buffer_set_pattern (FFI.GeglBuffer fbuffe...
749
gegl_buffer_set_pattern :: FFI.GeglBuffer -- ^ Target buffer -> FFI.GeglRectangle -- ^ Area of target buffer to fill -> FFI.GeglBuffer -- ^ A buffer to be repeated as pattern -> Double -- ^ X offset -> Double -- ^ Y offset -> IO () gegl_buffer_set_pattern (FFI.GeglBuffer fbuffe...
749
gegl_buffer_set_pattern (FFI.GeglBuffer fbuffer) rect (FFI.GeglBuffer fpattern) xoff yoff = do rectPtr <- new rect let (cx, cy) = (CDouble xoff, CDouble yoff) withForeignPtr fbuffer $ \buffer -> withForeignPtr fpattern $ \pattern -> FFI.c_gegl_buffer_set_pattern buffer ...
477
false
true
0
14
229
164
80
84
null
null
ekr/tamarin-prover
src/Main/Environment.hs
gpl-3.0
ensureGraphVizDot :: Arguments -> IO Bool ensureGraphVizDot as = do putStrLn $ "GraphViz tool: '" ++ dot ++ "'" testProcess check errMsg " checking version: " dot ["-V"] "" where dot = dotPath as check _ err | "graphviz" `isInfixOf` map toLower err = Right $ init err ++ ". OK." | otherwise...
683
ensureGraphVizDot :: Arguments -> IO Bool ensureGraphVizDot as = do putStrLn $ "GraphViz tool: '" ++ dot ++ "'" testProcess check errMsg " checking version: " dot ["-V"] "" where dot = dotPath as check _ err | "graphviz" `isInfixOf` map toLower err = Right $ init err ++ ". OK." | otherwise...
683
ensureGraphVizDot as = do putStrLn $ "GraphViz tool: '" ++ dot ++ "'" testProcess check errMsg " checking version: " dot ["-V"] "" where dot = dotPath as check _ err | "graphviz" `isInfixOf` map toLower err = Right $ init err ++ ". OK." | otherwise = Left $ er...
641
false
true
0
9
219
145
72
73
null
null
VinylRecords/Vinyl
benchmarks/StorableBench.hs
mit
doubleNormYLens :: V.Vector (MyVertex Float) -> V.Vector (MyVertex Float) doubleNormYLens = V.map (rlensf #normal . _y *~ (2::Float))
133
doubleNormYLens :: V.Vector (MyVertex Float) -> V.Vector (MyVertex Float) doubleNormYLens = V.map (rlensf #normal . _y *~ (2::Float))
133
doubleNormYLens = V.map (rlensf #normal . _y *~ (2::Float))
59
false
true
4
9
17
67
31
36
null
null
br0ns/hindsight
src/Data/BTree/KVBackend/Files.hs
gpl-3.0
compress' bs = do B.concat $ BL.toChunks $ compress $ BL.fromChunks [bs]
74
compress' bs = do B.concat $ BL.toChunks $ compress $ BL.fromChunks [bs]
74
compress' bs = do B.concat $ BL.toChunks $ compress $ BL.fromChunks [bs]
74
false
false
0
10
13
36
17
19
null
null
adamschoenemann/asa-analysis
src/Anal.hs
bsd-3-clause
-- A mapping from the recursive equations to the big transfer function eqsToBigT :: Lat a => Map ID (Equation a) -> BigT a eqsToBigT eqs = \env -> M.map (\tfun -> tfun env) eqs
176
eqsToBigT :: Lat a => Map ID (Equation a) -> BigT a eqsToBigT eqs = \env -> M.map (\tfun -> tfun env) eqs
105
eqsToBigT eqs = \env -> M.map (\tfun -> tfun env) eqs
53
true
true
0
9
34
63
31
32
null
null
hyPiRion/hs-playground
trex-ann/Main.hs
unlicense
-- Although this is illegal according to our constraints, the type checker -- cannot confirm this because, well, I don't know. But the last constraint is -- clearly illegal (The others are okay) broken :: ((("depth" ::= Int :| "depth" ::= Int :| r0) :! "depth") ~ Int, (("depth" ::= Int :| r0) :! "depth") ~ I...
507
broken :: ((("depth" ::= Int :| "depth" ::= Int :| r0) :! "depth") ~ Int, (("depth" ::= Int :| r0) :! "depth") ~ Int, r0 :\ "depth", ("depth" ::= Int :| r0) :\ "depth") => AnnExpr r0 -> AnnExpr ("depth" ::= Int :| "depth" ::= Int :| r0) broken e = annDepth (annDepth e)
312
broken e = annDepth (annDepth e)
32
true
true
0
14
129
145
76
69
null
null
sinelaw/fresh
Main.hs
gpl-2.0
num :: Double -> Expr () num = ELit () . LitNum
47
num :: Double -> Expr () num = ELit () . LitNum
47
num = ELit () . LitNum
22
false
true
0
8
11
35
15
20
null
null
piccolo-lang/piccolo
src/Core/Parser.hs
gpl-3.0
action :: Parser Action action = try output <|> try input <|> (do pos <- getPosition reserved "new" (v, t) <- parens typedVar pos' <- getPosition return (ANew v (-1) t (mkLoc pos pos'))) <|> do pos <- getPosition reserved "...
1,040
action :: Parser Action action = try output <|> try input <|> (do pos <- getPosition reserved "new" (v, t) <- parens typedVar pos' <- getPosition return (ANew v (-1) t (mkLoc pos pos'))) <|> do pos <- getPosition reserved "...
1,040
action = try output <|> try input <|> (do pos <- getPosition reserved "new" (v, t) <- parens typedVar pos' <- getPosition return (ANew v (-1) t (mkLoc pos pos'))) <|> do pos <- getPosition reserved "let" (v, t, e...
1,016
false
true
0
17
479
362
165
197
null
null
JustinUnger/haskell-book
ch6/ch6-a.hs
mit
-- this works because it goes more concrete and Int has instance of Ord -- 10 --young :: [Char] -> Char young :: Ord a => [a] -> a young xs = head (sort xs)
158
young :: Ord a => [a] -> a young xs = head (sort xs)
52
young xs = head (sort xs)
25
true
true
0
7
36
40
21
19
null
null
halogenandtoast/mirin
app/Main.hs
mit
runSQL :: (HasSpock m, SpockConn m ~ SqlBackend) => SqlPersistT (LoggingT IO) a -> m a runSQL action = runQuery $ \conn -> runStdoutLoggingT $ runSqlConn action conn
165
runSQL :: (HasSpock m, SpockConn m ~ SqlBackend) => SqlPersistT (LoggingT IO) a -> m a runSQL action = runQuery $ \conn -> runStdoutLoggingT $ runSqlConn action conn
165
runSQL action = runQuery $ \conn -> runStdoutLoggingT $ runSqlConn action conn
78
false
true
0
9
27
70
34
36
null
null
merijn/parsers
src/Text/Parser/Token.hs
bsd-3-clause
-- | Token parser @symbolic s@ parses 'char' @s@ and skips -- trailing white space. symbolic :: TokenParsing m => Char -> m Char symbolic name = token (highlight Symbol (char name))
181
symbolic :: TokenParsing m => Char -> m Char symbolic name = token (highlight Symbol (char name))
97
symbolic name = token (highlight Symbol (char name))
52
true
true
0
9
31
47
23
24
null
null
nathyong/microghc-ghc
ghc/Main.hs
bsd-3-clause
countFS entries longest has_z (b:bs) = let len = length b longest' = max len longest entries' = entries + len has_zs = length (filter hasZEncoding b) in countFS entries' longest' (has_z + has_zs) bs
242
countFS entries longest has_z (b:bs) = let len = length b longest' = max len longest entries' = entries + len has_zs = length (filter hasZEncoding b) in countFS entries' longest' (has_z + has_zs) bs
242
countFS entries longest has_z (b:bs) = let len = length b longest' = max len longest entries' = entries + len has_zs = length (filter hasZEncoding b) in countFS entries' longest' (has_z + has_zs) bs
242
false
false
0
11
78
87
43
44
null
null
kmate/HaRe
old/testing/liftToToplevel/WhereIn1AST.hs
bsd-3-clause
anotherFun 0 y = sq y where sq x = x ^ 2
40
anotherFun 0 y = sq y where sq x = x ^ 2
40
anotherFun 0 y = sq y where sq x = x ^ 2
40
false
false
1
6
12
31
13
18
null
null
nikita-volkov/hasql-th
library/Hasql/TH/Extraction/ChildExprList.hs
mit
insertStmt (InsertStmt a b c d e) = foldMap withClause a <> insertTarget b <> insertRest c <> foldMap onConflict d <> foldMap returningClause e
161
insertStmt (InsertStmt a b c d e) = foldMap withClause a <> insertTarget b <> insertRest c <> foldMap onConflict d <> foldMap returningClause e
161
insertStmt (InsertStmt a b c d e) = foldMap withClause a <> insertTarget b <> insertRest c <> foldMap onConflict d <> foldMap returningClause e
161
false
false
8
6
42
68
27
41
null
null
vTurbine/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
demoteNameSpace DataName = Nothing
34
demoteNameSpace DataName = Nothing
34
demoteNameSpace DataName = Nothing
34
false
false
0
5
3
9
4
5
null
null
alonho/bottle
src/Graphics/UI/Bottle/Animation.hs
gpl-3.0
scale :: Vector2 Draw.R -> Frame -> Frame scale factor = over Frame $ (fmap . second) scaleImage where scaleImage (PositionedImage img (Rect tl size)) = PositionedImage img (Rect (tl * factor) (size * factor))
223
scale :: Vector2 Draw.R -> Frame -> Frame scale factor = over Frame $ (fmap . second) scaleImage where scaleImage (PositionedImage img (Rect tl size)) = PositionedImage img (Rect (tl * factor) (size * factor))
223
scale factor = over Frame $ (fmap . second) scaleImage where scaleImage (PositionedImage img (Rect tl size)) = PositionedImage img (Rect (tl * factor) (size * factor))
181
false
true
2
9
48
105
49
56
null
null
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Smt/Theories.hs
bsd-3-clause
sel = "smt_map_sel"
21
sel = "smt_map_sel"
21
sel = "smt_map_sel"
21
false
false
0
4
4
6
3
3
null
null
fmapfmapfmap/amazonka
amazonka-iam/gen/Network/AWS/IAM/Types/Product.hs
mpl-2.0
-- | The stable and unique string identifying the role. For more information -- about IDs, see -- <http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM Identifiers> -- in the /Using IAM/ guide. rdRoleId :: Lens' RoleDetail (Maybe Text) rdRoleId = lens _rdRoleId (\ s a -> s{_rdRoleId = a})
311
rdRoleId :: Lens' RoleDetail (Maybe Text) rdRoleId = lens _rdRoleId (\ s a -> s{_rdRoleId = a})
95
rdRoleId = lens _rdRoleId (\ s a -> s{_rdRoleId = a})
53
true
true
0
9
43
49
28
21
null
null
llelf/vacuole
Vacuole/UI/Draw/Nodes.hs
bsd-3-clause
mkNode (Node EmptyList _) = vanillaNode "[]"
46
mkNode (Node EmptyList _) = vanillaNode "[]"
46
mkNode (Node EmptyList _) = vanillaNode "[]"
46
false
false
0
7
8
20
9
11
null
null
input-output-hk/pos-haskell-prototype
core/test/Test/Pos/Core/Json.hs
mit
-------------------------------------------------------------------------------- -- EpochIndex -------------------------------------------------------------------------------- roundTripEpochIndex :: Property roundTripEpochIndex = eachOf 1000 genEpochIndex roundTripsAesonYamlBuildable
285
roundTripEpochIndex :: Property roundTripEpochIndex = eachOf 1000 genEpochIndex roundTripsAesonYamlBuildable
108
roundTripEpochIndex = eachOf 1000 genEpochIndex roundTripsAesonYamlBuildable
76
true
true
0
5
13
21
12
9
null
null
joeschmo/joebot2
src/Main.hs
mit
main = do fs <- OA.execParser opts checkOpts fs where opts = OA.info (OA.helper <*> flags) ( OA.fullDesc <> OA.progDesc "Joebot2" <> OA.header "joe_bot - a IRC bot written in haskell")
210
main = do fs <- OA.execParser opts checkOpts fs where opts = OA.info (OA.helper <*> flags) ( OA.fullDesc <> OA.progDesc "Joebot2" <> OA.header "joe_bot - a IRC bot written in haskell")
210
main = do fs <- OA.execParser opts checkOpts fs where opts = OA.info (OA.helper <*> flags) ( OA.fullDesc <> OA.progDesc "Joebot2" <> OA.header "joe_bot - a IRC bot written in haskell")
210
false
false
0
10
56
71
33
38
null
null
jstolarek/ghc
libraries/base/Data/Data.hs
bsd-3-clause
-- | Test for a non-representable type isNorepType :: DataType -> Bool isNorepType dt = case datarep dt of NoRep -> True _ -> False ------------------------------------------------------------------------------ -- -- Convenience for qualified type constructors -- ----------...
466
isNorepType :: DataType -> Bool isNorepType dt = case datarep dt of NoRep -> True _ -> False ------------------------------------------------------------------------------ -- -- Convenience for qualified type constructors -- -------------------------------------------------...
427
isNorepType dt = case datarep dt of NoRep -> True _ -> False ------------------------------------------------------------------------------ -- -- Convenience for qualified type constructors -- ------------------------------------------------------------------------------ ...
395
true
true
0
8
95
52
28
24
null
null
ezyang/ghc
compiler/basicTypes/Avail.hs
bsd-3-clause
availsToNameEnv :: [AvailInfo] -> NameEnv AvailInfo availsToNameEnv avails = foldr add emptyNameEnv avails where add avail env = extendNameEnvList env (zip (availNames avail) (repeat avail)) -- | Just the main name made available, i.e. not the available pieces -- of type or class b...
359
availsToNameEnv :: [AvailInfo] -> NameEnv AvailInfo availsToNameEnv avails = foldr add emptyNameEnv avails where add avail env = extendNameEnvList env (zip (availNames avail) (repeat avail)) -- | Just the main name made available, i.e. not the available pieces -- of type or class b...
359
availsToNameEnv avails = foldr add emptyNameEnv avails where add avail env = extendNameEnvList env (zip (availNames avail) (repeat avail)) -- | Just the main name made available, i.e. not the available pieces -- of type or class brought into scope by the 'GenAvailInfo'
307
false
true
0
9
86
71
35
36
null
null
Super-Fluid/heqet
Heqet/Instruments.hs
gpl-3.0
trumpet = Instrument { _midiInstrument = "trumpet" , _pickUpTime = 3 , _putDownTime = 3 , _annotatePlayability = simpleRange [pp| e, |] [pp| bf'' |] , _assignConcertClefs = allTreble , _assignWrittenClefs = allTreble , _transposition = [pp| bf, |] , _name = "Trumpet" , _shortName ...
379
trumpet = Instrument { _midiInstrument = "trumpet" , _pickUpTime = 3 , _putDownTime = 3 , _annotatePlayability = simpleRange [pp| e, |] [pp| bf'' |] , _assignConcertClefs = allTreble , _assignWrittenClefs = allTreble , _transposition = [pp| bf, |] , _name = "Trumpet" , _shortName ...
379
trumpet = Instrument { _midiInstrument = "trumpet" , _pickUpTime = 3 , _putDownTime = 3 , _annotatePlayability = simpleRange [pp| e, |] [pp| bf'' |] , _assignConcertClefs = allTreble , _assignWrittenClefs = allTreble , _transposition = [pp| bf, |] , _name = "Trumpet" , _shortName ...
379
false
false
0
7
106
91
62
29
null
null
kyagrd/micronax
src/Parser.hs
bsd-2-clause
ty2Type (S.TArr t1 t2) = TArr (ty2Type t1) (ty2Type t2)
55
ty2Type (S.TArr t1 t2) = TArr (ty2Type t1) (ty2Type t2)
55
ty2Type (S.TArr t1 t2) = TArr (ty2Type t1) (ty2Type t2)
55
false
false
0
8
9
36
17
19
null
null
ddssff/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
-- | Produce an Docx file from a Pandoc document. writeDocx :: WriterOptions -- ^ Writer options -> Pandoc -- ^ Document to convert -> IO BL.ByteString writeDocx opts doc@(Pandoc meta _) = do let datadir = writerUserDataDir opts let doc' = walk fixDisplayMath $ doc username <- lookup ...
16,424
writeDocx :: WriterOptions -- ^ Writer options -> Pandoc -- ^ Document to convert -> IO BL.ByteString writeDocx opts doc@(Pandoc meta _) = do let datadir = writerUserDataDir opts let doc' = walk fixDisplayMath $ doc username <- lookup "USERNAME" <$> getEnvironment utctime <- getCurr...
16,374
writeDocx opts doc@(Pandoc meta _) = do let datadir = writerUserDataDir opts let doc' = walk fixDisplayMath $ doc username <- lookup "USERNAME" <$> getEnvironment utctime <- getCurrentTime distArchive <- getDefaultReferenceDocx datadir refArchive <- case writerReferenceDocx opts of Just...
16,243
true
true
0
28
4,576
3,357
1,742
1,615
null
null
abakst/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector/Unboxed/Mutable.hs
bsd-3-clause
length = G.length
17
length = G.length
17
length = G.length
17
false
false
1
6
2
12
4
8
null
null
gleachkr/Carnap
Carnap-GHCJS/src/Carnap/GHCJS/Action/ProofCheck.hs
gpl-3.0
trySave :: ( Sequentable lex , Inference r lex sem , ToSchema lex sem , PrismSubstitutionalVariable lex , MonadVar (ClassicalSequentOver lex) (State Int) , Concretes lex sem ) => Checker r lex sem -> IORef [(String, SomeRule)] -> IORef Bool -> Document ...
3,022
trySave :: ( Sequentable lex , Inference r lex sem , ToSchema lex sem , PrismSubstitutionalVariable lex , MonadVar (ClassicalSequentOver lex) (State Int) , Concretes lex sem ) => Checker r lex sem -> IORef [(String, SomeRule)] -> IORef Bool -> Document ...
3,022
trySave checker drs ref w i = do isFinished <- liftIO $ readIORef ref somerules <- liftIO $ readIORef drs rtconfig <- liftIO $ rulePost checker Just view <- getDefaultView w if isFinished then do (Just v) <- getValue (castToHTMLTextAreaElement i) ...
2,650
false
true
0
32
1,339
672
319
353
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
isVariableChar x = isVariableStartChar x || isDigit x
53
isVariableChar x = isVariableStartChar x || isDigit x
53
isVariableChar x = isVariableStartChar x || isDigit x
53
false
false
0
6
7
19
8
11
null
null
marcelosousa/poet
src/Test/Examples/ExSeven.hs
gpl-2.0
t12' s = let v = safeLookup "t12" s (BS.pack "pcq") in case v of IntVal 2 -> let ns = insert (BS.pack "pcq") (IntVal 3) s ns'= insert (BS.pack "x") (IntVal 1) ns in [ns'] _ -> []
212
t12' s = let v = safeLookup "t12" s (BS.pack "pcq") in case v of IntVal 2 -> let ns = insert (BS.pack "pcq") (IntVal 3) s ns'= insert (BS.pack "x") (IntVal 1) ns in [ns'] _ -> []
212
t12' s = let v = safeLookup "t12" s (BS.pack "pcq") in case v of IntVal 2 -> let ns = insert (BS.pack "pcq") (IntVal 3) s ns'= insert (BS.pack "x") (IntVal 1) ns in [ns'] _ -> []
212
false
false
0
17
72
117
56
61
null
null
romanb/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/Types.hs
mpl-2.0
-- | 'Error'' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'eErrorCode' @::@ 'Maybe' 'ErrorCode' -- -- * 'eErrorDetails' @::@ 'HashMap' 'Text' 'Text' -- error :: Error' error = Error' { _eErrorCode = Nothing , _eErrorDetails = mempty }
288
error :: Error' error = Error' { _eErrorCode = Nothing , _eErrorDetails = mempty }
97
error = Error' { _eErrorCode = Nothing , _eErrorDetails = mempty }
81
true
true
0
6
58
33
23
10
null
null
c0deaddict/project-euler
src/Part1/Problem21.hs
bsd-3-clause
divisors :: Int -> [Int] divisors x = filter (/= x) $ combis 1 factors where factors = group $ trialDivision x
112
divisors :: Int -> [Int] divisors x = filter (/= x) $ combis 1 factors where factors = group $ trialDivision x
112
divisors x = filter (/= x) $ combis 1 factors where factors = group $ trialDivision x
87
false
true
3
8
23
60
27
33
null
null
brendanhay/gogol
gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs
mpl-2.0
-- | Condition that triggers the breakpoint. The condition is a compound -- boolean expression composed using expressions in a programming language -- at the source location. bCondition :: Lens' Breakpoint (Maybe Text) bCondition = lens _bCondition (\ s a -> s{_bCondition = a})
280
bCondition :: Lens' Breakpoint (Maybe Text) bCondition = lens _bCondition (\ s a -> s{_bCondition = a})
105
bCondition = lens _bCondition (\ s a -> s{_bCondition = a})
61
true
true
0
9
45
50
27
23
null
null
AlexMckey/FP101x-ItFP_Haskell
Sources/pmctemplate_.hs
cc0-1.0
-- =================================== -- Ex. 2 -- =================================== atom :: IO a -> Concurrent a atom = error "You have to implement atom"
158
atom :: IO a -> Concurrent a atom = error "You have to implement atom"
70
atom = error "You have to implement atom"
41
true
true
0
6
22
27
14
13
null
null
rueshyna/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/GetServerConfig.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pzgscUploadProtocol :: Lens' ProjectsZonesGetServerConfig (Maybe Text) pzgscUploadProtocol = lens _pzgscUploadProtocol (\ s a -> s{_pzgscUploadProtocol = a})
227
pzgscUploadProtocol :: Lens' ProjectsZonesGetServerConfig (Maybe Text) pzgscUploadProtocol = lens _pzgscUploadProtocol (\ s a -> s{_pzgscUploadProtocol = a})
165
pzgscUploadProtocol = lens _pzgscUploadProtocol (\ s a -> s{_pzgscUploadProtocol = a})
94
true
true
0
9
33
48
25
23
null
null
brendanhay/gogol
gogol-oslogin/gen/Network/Google/OSLogin/Types/Product.hs
mpl-2.0
-- | The user ID. paUid :: Lens' PosixAccount (Maybe Int64) paUid = lens _paUid (\ s a -> s{_paUid = a}) . mapping _Coerce
130
paUid :: Lens' PosixAccount (Maybe Int64) paUid = lens _paUid (\ s a -> s{_paUid = a}) . mapping _Coerce
112
paUid = lens _paUid (\ s a -> s{_paUid = a}) . mapping _Coerce
70
true
true
0
10
32
55
28
27
null
null
urbanslug/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
zapInfo :: (IdInfo -> Maybe IdInfo) -> Id -> Id zapInfo zapper id = maybeModifyIdInfo (zapper (idInfo id)) id
109
zapInfo :: (IdInfo -> Maybe IdInfo) -> Id -> Id zapInfo zapper id = maybeModifyIdInfo (zapper (idInfo id)) id
109
zapInfo zapper id = maybeModifyIdInfo (zapper (idInfo id)) id
61
false
true
0
9
18
56
26
30
null
null
remotty/cdr
frameworks/haskell/Test/CodeWars/BlackList.hs
agpl-3.0
solutionImportDeclarations :: IO [ImportDecl] solutionImportDeclarations = do (Syntax.Module _ _ _ _ _ imports _) <- solutionModule return imports -- | A class for specifying that something is to be hidden in the solution imports
234
solutionImportDeclarations :: IO [ImportDecl] solutionImportDeclarations = do (Syntax.Module _ _ _ _ _ imports _) <- solutionModule return imports -- | A class for specifying that something is to be hidden in the solution imports
234
solutionImportDeclarations = do (Syntax.Module _ _ _ _ _ imports _) <- solutionModule return imports -- | A class for specifying that something is to be hidden in the solution imports
188
false
true
0
10
39
51
25
26
null
null
lukexi/ghc-7.8-arm64
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
ssignMem_FltCode = assignMem_IntCode
37
assignMem_FltCode = assignMem_IntCode
37
assignMem_FltCode = assignMem_IntCode
37
false
false
0
4
3
6
3
3
null
null
marcellussiegburg/autotool
collection/src/Geo/Prover.hs
gpl-2.0
main = do args <- getArgs (f, s) <- case args of [] -> ("stdin",) <$> getContents [f] -> (f,) <$> readFile f let p = parse (program <* eof ) f s case p of Left e -> error $ show e Right x -> handle $ Block x
237
main = do args <- getArgs (f, s) <- case args of [] -> ("stdin",) <$> getContents [f] -> (f,) <$> readFile f let p = parse (program <* eof ) f s case p of Left e -> error $ show e Right x -> handle $ Block x
237
main = do args <- getArgs (f, s) <- case args of [] -> ("stdin",) <$> getContents [f] -> (f,) <$> readFile f let p = parse (program <* eof ) f s case p of Left e -> error $ show e Right x -> handle $ Block x
237
false
false
0
12
79
128
63
65
null
null
ghorn/ois-input-manager
src/Key.hs
bsd-3-clause
decodeKey 30 = KC_A
19
decodeKey 30 = KC_A
19
decodeKey 30 = KC_A
19
false
false
1
5
3
13
4
9
null
null
CanvasHS/Canvas.hs
demo/graph/Graphs.hs
lgpl-2.1
drawEdge :: State -> Int -> Shape drawEdge st num = Translate (minX) (minY) $ Event defaults{eventId="edge"++(show num), mouseClick=True} $ Offset (5,5) $ Container width height $ [ Stroke uiBlue 2 $ Line [(x1 - minX + 5, y1 - minY + 5), (x2 - minX + 5, y2 - minY + 5)] ] ++ (if shouldDisplayGuides then [F...
638
drawEdge :: State -> Int -> Shape drawEdge st num = Translate (minX) (minY) $ Event defaults{eventId="edge"++(show num), mouseClick=True} $ Offset (5,5) $ Container width height $ [ Stroke uiBlue 2 $ Line [(x1 - minX + 5, y1 - minY + 5), (x2 - minX + 5, y2 - minY + 5)] ] ++ (if shouldDisplayGuides then [F...
638
drawEdge st num = Translate (minX) (minY) $ Event defaults{eventId="edge"++(show num), mouseClick=True} $ Offset (5,5) $ Container width height $ [ Stroke uiBlue 2 $ Line [(x1 - minX + 5, y1 - minY + 5), (x2 - minX + 5, y2 - minY + 5)] ] ++ (if shouldDisplayGuides then [Fill uiRed $ Circle (width `div` 2,...
604
false
true
6
14
179
346
178
168
null
null
SKA-ScienceDataProcessor/RC
MS3/dna-programs/DDP_Slice.hs
apache-2.0
ddpProductSliceFailure :: Actor Slice Double ddpProductSliceFailure = actor $ \(fullSlice) -> duration "vector slice" $ do do -- Calculate offsets nProc <- groupSize rnk <- rank -- FIXME: Bad! let slice@(Slice _ n) = scatterSlice (fromIntegral nProc) fullSlice !! rnk -- First we need to ge...
1,295
ddpProductSliceFailure :: Actor Slice Double ddpProductSliceFailure = actor $ \(fullSlice) -> duration "vector slice" $ do do -- Calculate offsets nProc <- groupSize rnk <- rank -- FIXME: Bad! let slice@(Slice _ n) = scatterSlice (fromIntegral nProc) fullSlice !! rnk -- First we need to ge...
1,295
ddpProductSliceFailure = actor $ \(fullSlice) -> duration "vector slice" $ do do -- Calculate offsets nProc <- groupSize rnk <- rank -- FIXME: Bad! let slice@(Slice _ n) = scatterSlice (fromIntegral nProc) fullSlice !! rnk -- First we need to generate files on tmpfs vecChan <- duration...
1,250
false
true
0
19
373
407
190
217
null
null
nickbart1980/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
yamlToMeta :: ReaderOptions -> Yaml.Value -> MetaValue yamlToMeta opts (Yaml.String t) = toMetaValue opts t
107
yamlToMeta :: ReaderOptions -> Yaml.Value -> MetaValue yamlToMeta opts (Yaml.String t) = toMetaValue opts t
107
yamlToMeta opts (Yaml.String t) = toMetaValue opts t
52
false
true
0
8
14
39
19
20
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim.hs
gpl-2.0
mkKeymapSet :: Proto VimConfig -> KeymapSet mkKeymapSet = modelessKeymapSet . vimKeymap . extractValue
102
mkKeymapSet :: Proto VimConfig -> KeymapSet mkKeymapSet = modelessKeymapSet . vimKeymap . extractValue
102
mkKeymapSet = modelessKeymapSet . vimKeymap . extractValue
58
false
true
0
6
12
26
13
13
null
null
pseudonom/persistent
persistent/Database/Persist/Sql/Class.hs
mit
to4 :: ((a,b),(c,d)) -> (a,b,c,d) to4 ((a,b),(c,d)) = (a,b,c,d)
63
to4 :: ((a,b),(c,d)) -> (a,b,c,d) to4 ((a,b),(c,d)) = (a,b,c,d)
63
to4 ((a,b),(c,d)) = (a,b,c,d)
29
false
true
0
7
8
82
50
32
null
null
brendanhay/gogol
gogol-binaryauthorization/gen/Network/Google/Resource/BinaryAuthorization/Projects/Policy/TestIAMPermissions.hs
mpl-2.0
-- | Creates a value of 'ProjectsPolicyTestIAMPermissions' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pptipXgafv' -- -- * 'pptipUploadProtocol' -- -- * 'pptipAccessToken' -- -- * 'pptipUploadType' -- -- * 'pptipPayload' -- -- * '...
864
projectsPolicyTestIAMPermissions :: TestIAMPermissionsRequest -- ^ 'pptipPayload' -> Text -- ^ 'pptipResource' -> ProjectsPolicyTestIAMPermissions projectsPolicyTestIAMPermissions pPptipPayload_ pPptipResource_ = ProjectsPolicyTestIAMPermissions' { _pptipXgafv = Nothing , _pptipUploadProtocol = No...
505
projectsPolicyTestIAMPermissions pPptipPayload_ pPptipResource_ = ProjectsPolicyTestIAMPermissions' { _pptipXgafv = Nothing , _pptipUploadProtocol = Nothing , _pptipAccessToken = Nothing , _pptipUploadType = Nothing , _pptipPayload = pPptipPayload_ , _pptipResource = pPptipResource_ , _ppt...
346
true
true
0
6
150
87
60
27
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/GamePhysics/GDef.hs
bsd-2-clause
accelerationDueToGravityRel :: Relation accelerationDueToGravityRel = FCall (C thFluxVect) [C QP.time] := C htTransCoeff :* FCall (C temp_diff) [C QP.time]
157
accelerationDueToGravityRel :: Relation accelerationDueToGravityRel = FCall (C thFluxVect) [C QP.time] := C htTransCoeff :* FCall (C temp_diff) [C QP.time]
157
accelerationDueToGravityRel = FCall (C thFluxVect) [C QP.time] := C htTransCoeff :* FCall (C temp_diff) [C QP.time]
117
false
true
0
10
20
60
29
31
null
null