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
spacekitteh/smcghc
ghc/Main.hs
bsd-3-clause
showPackages, dumpPackages, dumpPackagesSimple :: DynFlags -> IO () showPackages dflags = putStrLn (showSDoc dflags (pprPackages dflags))
143
showPackages, dumpPackages, dumpPackagesSimple :: DynFlags -> IO () showPackages dflags = putStrLn (showSDoc dflags (pprPackages dflags))
143
showPackages dflags = putStrLn (showSDoc dflags (pprPackages dflags))
75
false
true
0
9
21
44
23
21
null
null
ksallberg/valuecalc
Text/HTML/ValueCalc/Scraping.hs
unlicense
getSubId ((TagOpen _ localLs):ts) id err = do let fTags = ["yes" | ("id", x) <- localLs, x == id] case (length fTags) > 0 of True -> do let (TagText toReturn) = head ts return toReturn False -> do getSubId ts id err
263
getSubId ((TagOpen _ localLs):ts) id err = do let fTags = ["yes" | ("id", x) <- localLs, x == id] case (length fTags) > 0 of True -> do let (TagText toReturn) = head ts return toReturn False -> do getSubId ts id err
263
getSubId ((TagOpen _ localLs):ts) id err = do let fTags = ["yes" | ("id", x) <- localLs, x == id] case (length fTags) > 0 of True -> do let (TagText toReturn) = head ts return toReturn False -> do getSubId ts id err
263
false
false
1
17
91
126
59
67
null
null
brendanhay/gogol
gogol-docs/gen/Network/Google/Docs/Types/Product.hs
mpl-2.0
-- | Creates bullets for paragraphs. reqCreateParagraphBullets :: Lens' Request' (Maybe CreateParagraphBulletsRequest) reqCreateParagraphBullets = lens _reqCreateParagraphBullets (\ s a -> s{_reqCreateParagraphBullets = a})
231
reqCreateParagraphBullets :: Lens' Request' (Maybe CreateParagraphBulletsRequest) reqCreateParagraphBullets = lens _reqCreateParagraphBullets (\ s a -> s{_reqCreateParagraphBullets = a})
194
reqCreateParagraphBullets = lens _reqCreateParagraphBullets (\ s a -> s{_reqCreateParagraphBullets = a})
112
true
true
0
9
30
48
25
23
null
null
mightymoose/liquidhaskell
benchmarks/xmonad-0.10/tests/Properties.hs
bsd-3-clause
-- Useful operation, the non-local workspaces hidden_spaces x = map workspace (visible x) ++ hidden x
101
hidden_spaces x = map workspace (visible x) ++ hidden x
55
hidden_spaces x = map workspace (visible x) ++ hidden x
55
true
false
1
8
15
31
13
18
null
null
benkolera/haskell-ldap-classy
LDAP/Classy/Decode.hs
mit
attrNel :: (MonadError e m, AsLdapEntryDecodeError e,FromLdapAttribute a,Applicative m) => String -> LDAPEntry -> m (NonEmpty a) attrNel n e = attrsParse (requireNel n e) n e
182
attrNel :: (MonadError e m, AsLdapEntryDecodeError e,FromLdapAttribute a,Applicative m) => String -> LDAPEntry -> m (NonEmpty a) attrNel n e = attrsParse (requireNel n e) n e
182
attrNel n e = attrsParse (requireNel n e) n e
45
false
true
0
10
34
77
38
39
null
null
csrhodes/pandoc
src/Text/Pandoc/Parsing.hs
gpl-2.0
mathInlineWith :: Stream s m Char => String -> String -> ParserT s st m String mathInlineWith op cl = try $ do string op notFollowedBy space words' <- many1Till (count 1 (noneOf " \t\n\\") <|> (char '\\' >> -- This next clause is needed because \text{..} can ...
1,464
mathInlineWith :: Stream s m Char => String -> String -> ParserT s st m String mathInlineWith op cl = try $ do string op notFollowedBy space words' <- many1Till (count 1 (noneOf " \t\n\\") <|> (char '\\' >> -- This next clause is needed because \text{..} can ...
1,464
mathInlineWith op cl = try $ do string op notFollowedBy space words' <- many1Till (count 1 (noneOf " \t\n\\") <|> (char '\\' >> -- This next clause is needed because \text{..} can -- contain $, \(\), etc. (try (str...
1,384
false
true
5
23
562
478
227
251
null
null
ardumont/haskell-lab
src/io/wc.hs
gpl-2.0
countLines :: IO () countLines = do (filename:_) <- getArgs contents <- readFile filename putStrLn $ (show . length . lines) contents
139
countLines :: IO () countLines = do (filename:_) <- getArgs contents <- readFile filename putStrLn $ (show . length . lines) contents
139
countLines = do (filename:_) <- getArgs contents <- readFile filename putStrLn $ (show . length . lines) contents
119
false
true
0
11
27
61
29
32
null
null
eklitzke/Data.ConsistentHash
Data/ConsistentHash.hs
isc
updateHash :: a -> CHash a -> CHash a updateHash x h = addItems items h where x' = fromIntegral $ getHashFunc h $ x items = [CHashItem p x | p <- cHashInt x']
174
updateHash :: a -> CHash a -> CHash a updateHash x h = addItems items h where x' = fromIntegral $ getHashFunc h $ x items = [CHashItem p x | p <- cHashInt x']
174
updateHash x h = addItems items h where x' = fromIntegral $ getHashFunc h $ x items = [CHashItem p x | p <- cHashInt x']
136
false
true
1
10
50
80
37
43
null
null
seagate-ssg/options-schema
src/Options/Schema/Applicative.hs
bsd-3-clause
mkBlockParser n d (Flag active def) = mkFlagParser active def n d
65
mkBlockParser n d (Flag active def) = mkFlagParser active def n d
65
mkBlockParser n d (Flag active def) = mkFlagParser active def n d
65
false
false
0
7
11
30
14
16
null
null
javgh/bitcoin-rpc
Network/BitcoinRPC/MarkerAddressesTest.hs
bsd-3-clause
markerAdressesTests :: [Test] markerAdressesTests = [ testProperty "sums match" propSumsMatch , testProperty "sum size is less or equal" propSizeLessOrEqual , test1, test2, test3, test4, test5 ]
260
markerAdressesTests :: [Test] markerAdressesTests = [ testProperty "sums match" propSumsMatch , testProperty "sum size is less or equal" propSizeLessOrEqual , test1, test2, test3, test4, test5 ]
260
markerAdressesTests = [ testProperty "sums match" propSumsMatch , testProperty "sum size is less or equal" propSizeLessOrEqual , test1, test2, test3, test4, test5 ]
230
false
true
0
7
91
52
27
25
null
null
duairc/opaleye-x
src/Opaleye/X/Transaction.hs
mpl-2.0
------------------------------------------------------------------------------ insert :: (MonadInner IO m, PGIn as ws) => Table ws -> [as] -> TransactionT m Int64 insert table as = TransactionT . ReaderT $ \connection -> liftI $ runInsertMany connection table (map pg as)
279
insert :: (MonadInner IO m, PGIn as ws) => Table ws -> [as] -> TransactionT m Int64 insert table as = TransactionT . ReaderT $ \connection -> liftI $ runInsertMany connection table (map pg as)
200
insert table as = TransactionT . ReaderT $ \connection -> liftI $ runInsertMany connection table (map pg as)
112
true
true
0
10
43
87
44
43
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
3632 = 3631
11
3632 = 3631
11
3632 = 3631
11
false
false
1
5
2
10
3
7
null
null
dysinger/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/DescribeLogStreams.hs
mpl-2.0
dlsrNextToken :: Lens' DescribeLogStreamsResponse (Maybe Text) dlsrNextToken = lens _dlsrNextToken (\s a -> s { _dlsrNextToken = a })
133
dlsrNextToken :: Lens' DescribeLogStreamsResponse (Maybe Text) dlsrNextToken = lens _dlsrNextToken (\s a -> s { _dlsrNextToken = a })
133
dlsrNextToken = lens _dlsrNextToken (\s a -> s { _dlsrNextToken = a })
70
false
true
0
9
18
45
24
21
null
null
hxw/conlecterm
src/SendControl.hs
bsd-2-clause
sym ':' = (X.shiftMask, X.stringToKeysym "colon")
49
sym ':' = (X.shiftMask, X.stringToKeysym "colon")
49
sym ':' = (X.shiftMask, X.stringToKeysym "colon")
49
false
false
0
7
5
23
11
12
null
null
kazu-yamamoto/test-framework-doctest-prime
Test/Framework/Providers/DocTest/Prime.hs
bsd-3-clause
runDocTest :: CompleteTestOptions -> DocTestAction -> IO (DocTestRunning :~> InteractionResult, IO ()) runDocTest topts (DocTestAction doctest) = runImprovingIO $ do yieldImprovement DocTestRunning mb_result <- maybeTimeoutImprovingIO (unK $ topt_timeout topts) $ liftIO doctest return (mb_result `orElse` Su...
328
runDocTest :: CompleteTestOptions -> DocTestAction -> IO (DocTestRunning :~> InteractionResult, IO ()) runDocTest topts (DocTestAction doctest) = runImprovingIO $ do yieldImprovement DocTestRunning mb_result <- maybeTimeoutImprovingIO (unK $ topt_timeout topts) $ liftIO doctest return (mb_result `orElse` Su...
328
runDocTest topts (DocTestAction doctest) = runImprovingIO $ do yieldImprovement DocTestRunning mb_result <- maybeTimeoutImprovingIO (unK $ topt_timeout topts) $ liftIO doctest return (mb_result `orElse` Success 0)
225
false
true
0
14
48
108
50
58
null
null
crockeo/tic-taskell
src/Server.hs
mit
server :: IORef Board -> ScottyM () server boardRef = do serveStatic getHomePage getBoardState boardRef postResetBoard boardRef postPerformMove boardRef handle404
176
server :: IORef Board -> ScottyM () server boardRef = do serveStatic getHomePage getBoardState boardRef postResetBoard boardRef postPerformMove boardRef handle404
176
server boardRef = do serveStatic getHomePage getBoardState boardRef postResetBoard boardRef postPerformMove boardRef handle404
140
false
true
0
7
33
53
21
32
null
null
diku-dk/futhark
src/Futhark/CodeGen/Backends/GenericPython.hs
isc
futharkFun :: String -> String futharkFun s = "futhark_" ++ zEncodeString s
75
futharkFun :: String -> String futharkFun s = "futhark_" ++ zEncodeString s
75
futharkFun s = "futhark_" ++ zEncodeString s
44
false
true
2
7
11
31
13
18
null
null
geraldus/yesod
yesod/Yesod/Default/Config.hs
mit
withYamlEnvironment :: Show e => FilePath -- ^ the yaml file -> e -- ^ the environment you want to load -> (Value -> Parser a) -- ^ what to do with the mapping -> IO a withYamlEnvironment fp env f = do mval <- decodeFileEither fp...
612
withYamlEnvironment :: Show e => FilePath -- ^ the yaml file -> e -- ^ the environment you want to load -> (Value -> Parser a) -- ^ what to do with the mapping -> IO a withYamlEnvironment fp env f = do mval <- decodeFileEither fp...
612
withYamlEnvironment fp env f = do mval <- decodeFileEither fp case mval of Left err -> fail $ "Invalid YAML file: " ++ show fp ++ " " ++ prettyPrintParseException err Right (Object obj) | Just v <- M.lookup (T.pack $ show env) obj -> parseMonad f v _ -> fail $ "Coul...
357
false
true
0
17
237
170
79
91
null
null
izuk/pwdhash
src/Codec/Pwdhash.hs
bsd-3-clause
replaceNonAlphaNum :: String -> Extra String replaceNonAlphaNum [] = return []
78
replaceNonAlphaNum :: String -> Extra String replaceNonAlphaNum [] = return []
78
replaceNonAlphaNum [] = return []
33
false
true
0
6
10
28
13
15
null
null
open-etcs/openetcs-sdm
src/ETCS/SDM/Stepper.hs
bsd-3-clause
orderedList (a:b:xs) = b > a && orderedList (b:xs)
50
orderedList (a:b:xs) = b > a && orderedList (b:xs)
50
orderedList (a:b:xs) = b > a && orderedList (b:xs)
50
false
false
0
8
8
38
19
19
null
null
forste/haReFork
refactorer/RefacDupTrans.hs
bsd-3-clause
createAbs' (x:y:es) = int : createAbs' (y:es) where int = compareExp [] x y
83
createAbs' (x:y:es) = int : createAbs' (y:es) where int = compareExp [] x y
83
createAbs' (x:y:es) = int : createAbs' (y:es) where int = compareExp [] x y
83
false
false
3
7
21
59
25
34
null
null
robeverest/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalPrim (PrimMod ty) = evalMod ty
46
evalPrim (PrimMod ty) = evalMod ty
46
evalPrim (PrimMod ty) = evalMod ty
46
false
false
0
7
17
18
8
10
null
null
lorem-ipsum/adventofcode2015
day06.hs
gpl-2.0
makeGrid = foldl translateCommand start where translateCommand g (ON c) = on c g translateCommand g (OFF c) = off c g translateCommand g (TOGGLE c) = toggle c g
174
makeGrid = foldl translateCommand start where translateCommand g (ON c) = on c g translateCommand g (OFF c) = off c g translateCommand g (TOGGLE c) = toggle c g
174
makeGrid = foldl translateCommand start where translateCommand g (ON c) = on c g translateCommand g (OFF c) = off c g translateCommand g (TOGGLE c) = toggle c g
174
false
false
0
7
43
77
36
41
null
null
sheyll/b9-vm-image-builder
src/lib/B9/Artifact/Readable/Interpreter.hs
mit
prefixExternalSourcesPaths _fromDir sg = sg
43
prefixExternalSourcesPaths _fromDir sg = sg
43
prefixExternalSourcesPaths _fromDir sg = sg
43
false
false
0
5
4
11
5
6
null
null
aleator/simple-dc1394
System/Camera/Firewire/Simple.hs
bsd-3-clause
-- | Set camera shutter speed setFeature :: CUInt -> Camera a -> Word32 -> IO () setFeature f c speed = withCameraPtr c $ \camera -> checking $ c'dc1394_feature_set_value camera f ...
365
setFeature :: CUInt -> Camera a -> Word32 -> IO () setFeature f c speed = withCameraPtr c $ \camera -> checking $ c'dc1394_feature_set_value camera f (fromI...
334
setFeature f c speed = withCameraPtr c $ \camera -> checking $ c'dc1394_feature_set_value camera f (fromIntegral speed)
283
true
true
0
10
198
72
34
38
null
null
daleooo/barrelfish
tools/mackerel/TypeTable.hs
mit
builtin_size "uint32" = 32
26
builtin_size "uint32" = 32
26
builtin_size "uint32" = 32
26
false
false
0
4
3
10
4
6
null
null
NICTA/lets-lens
src/Lets/GetSetLens.hs
bsd-3-clause
-- | -- -- >>> get (choice fstL sndL) (Left ("abc", 7)) -- "abc" -- -- >>> get (choice fstL sndL) (Right ("abc", 7)) -- 7 -- -- >>> set (choice fstL sndL) (Left ("abc", 7)) "def" -- Left ("def",7) -- -- >>> set (choice fstL sndL) (Right ("abc", 7)) 8 -- Right ("abc",8) choice :: Lens a x -> Lens b x -> Lens (Eith...
361
choice :: Lens a x -> Lens b x -> Lens (Either a b) x choice = error "todo: choice"
91
choice = error "todo: choice"
31
true
true
0
10
81
60
34
26
null
null
BartAdv/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectDatatype :: RDatatype -> Raw reflectDatatype (RDatatype tyn tyConArgs tyConRes constrs) = raw_apply (Var $ tacN "MkDatatype") [ reflectName tyn , rawList (Var $ tacN "TyConArg") (map reflectConArg tyConArgs) , reflectRaw tyConRes ...
1,001
reflectDatatype :: RDatatype -> Raw reflectDatatype (RDatatype tyn tyConArgs tyConRes constrs) = raw_apply (Var $ tacN "MkDatatype") [ reflectName tyn , rawList (Var $ tacN "TyConArg") (map reflectConArg tyConArgs) , reflectRaw tyConRes ...
1,001
reflectDatatype (RDatatype tyn tyConArgs tyConRes constrs) = raw_apply (Var $ tacN "MkDatatype") [ reflectName tyn , rawList (Var $ tacN "TyConArg") (map reflectConArg tyConArgs) , reflectRaw tyConRes , r...
965
false
true
0
13
482
268
134
134
null
null
chreekat/snowdrift
Application.hs
agpl-3.0
forkEventHandler :: App -> IO () forkEventHandler app@App{..} = void . forkIO . forever $ do threadDelay 1000000 -- Sleep for one second in between runs. handleNEvents 10 -- Handle up to 10 events per run. where handleNEvents :: Int -> IO () handleNEvents 0 = return () handleNEvents n = atomic...
525
forkEventHandler :: App -> IO () forkEventHandler app@App{..} = void . forkIO . forever $ do threadDelay 1000000 -- Sleep for one second in between runs. handleNEvents 10 -- Handle up to 10 events per run. where handleNEvents :: Int -> IO () handleNEvents 0 = return () handleNEvents n = atomic...
525
forkEventHandler app@App{..} = void . forkIO . forever $ do threadDelay 1000000 -- Sleep for one second in between runs. handleNEvents 10 -- Handle up to 10 events per run. where handleNEvents :: Int -> IO () handleNEvents 0 = return () handleNEvents n = atomically (tryReadTChan appEventChan) ...
492
false
true
0
14
141
171
81
90
null
null
karamellpelle/grid
source/Game/Values/Plain.hs
gpl-3.0
valueLevelPuzzlePathRadius :: Float valueLevelPuzzlePathRadius = valueGridPathRadius
89
valueLevelPuzzlePathRadius :: Float valueLevelPuzzlePathRadius = valueGridPathRadius
89
valueLevelPuzzlePathRadius = valueGridPathRadius
53
false
true
0
4
10
11
6
5
null
null
aelve/guide
back/src/Guide/ServerStuff.hs
bsd-3-clause
undoEdit (EditSetCategoryNotes catId old new) = do now <- markdownBlockSource . categoryNotes <$> dbQuery (GetCategory catId) if now /= new then return (Left "notes have been changed further") else Right () <$ dbUpdate (SetCategoryNotes catId old)
259
undoEdit (EditSetCategoryNotes catId old new) = do now <- markdownBlockSource . categoryNotes <$> dbQuery (GetCategory catId) if now /= new then return (Left "notes have been changed further") else Right () <$ dbUpdate (SetCategoryNotes catId old)
259
undoEdit (EditSetCategoryNotes catId old new) = do now <- markdownBlockSource . categoryNotes <$> dbQuery (GetCategory catId) if now /= new then return (Left "notes have been changed further") else Right () <$ dbUpdate (SetCategoryNotes catId old)
259
false
false
0
11
47
87
41
46
null
null
kindohm/Tidal
Sound/Tidal/Params.hs
gpl-3.0
coarse :: Pattern Int -> OscPattern coarse = make' int32 coarse_p
65
coarse :: Pattern Int -> OscPattern coarse = make' int32 coarse_p
65
coarse = make' int32 coarse_p
29
false
true
0
7
10
31
12
19
null
null
IreneKnapp/Faction
libfaction/Distribution/ParseUtils.hs
bsd-3-clause
parseExtensionQ :: ReadP r Extension parseExtensionQ = parseQuoted parse <++ parse
82
parseExtensionQ :: ReadP r Extension parseExtensionQ = parseQuoted parse <++ parse
82
parseExtensionQ = parseQuoted parse <++ parse
45
false
true
0
6
10
28
12
16
null
null
dmort27/WebComparator
PhonData.hs
bsd-3-clause
showTrimmedACT :: ACT -> String showTrimmedACT = intercalate "\n" . map (showACTRow . transformRow trimToCogMorph) . fst
120
showTrimmedACT :: ACT -> String showTrimmedACT = intercalate "\n" . map (showACTRow . transformRow trimToCogMorph) . fst
120
showTrimmedACT = intercalate "\n" . map (showACTRow . transformRow trimToCogMorph) . fst
88
false
true
0
10
16
39
19
20
null
null
neetsdkasu/Paiza-POH-MyAnswers
POH7/Mizugi/Main.hs
mit
gs = getLine
12
gs = getLine
12
gs = getLine
12
false
false
1
5
2
10
3
7
null
null
abhean/phffp-examples
src/Lib.hs
bsd-3-clause
incTimes t n = 1 + incTimes (t - 1) n
37
incTimes t n = 1 + incTimes (t - 1) n
37
incTimes t n = 1 + incTimes (t - 1) n
37
false
false
0
8
10
27
13
14
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
userHsTyVarBndrs :: SrcSpan -> [name] -> [Located (HsTyVarBndr name)] -- Caller sets location userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]
159
userHsTyVarBndrs :: SrcSpan -> [name] -> [Located (HsTyVarBndr name)] userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]
135
userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]
65
true
true
0
10
26
62
32
30
null
null
taktoa/ghcjs-electron
src/GHCJS/Electron/Accelerator.hs
mit
-- | Compile a 'KeyQuery' to a list of 'Accelerator's. runKeyQuery :: KeyQuery -> [Accelerator] runKeyQuery = undefined
119
runKeyQuery :: KeyQuery -> [Accelerator] runKeyQuery = undefined
64
runKeyQuery = undefined
23
true
true
0
6
17
19
11
8
null
null
tingtun/jmacro
Language/Javascript/JMacro/Base.hs
bsd-3-clause
x $$ y = align (x $+$ y)
25
x $$ y = align (x $+$ y)
25
x $$ y = align (x $+$ y)
25
false
false
2
7
8
21
10
11
null
null
plumlife/cabal
Cabal/Distribution/Simple/BuildTarget.hs
bsd-3-clause
------------------------------ -- Top level match runner -- -- | Given a matcher and a key to look up, use the matcher to find all the -- possible matches. There may be 'None', a single 'Unambiguous' match or -- you may have an 'Ambiguous' match with several possibilities. -- findMatch :: Eq b => Match b -> MaybeAmbig...
638
findMatch :: Eq b => Match b -> MaybeAmbiguous b findMatch match = case match of NoMatch _ msgs -> None (nub msgs) ExactMatch _ xs -> checkAmbiguous xs InexactMatch _ xs -> checkAmbiguous xs where checkAmbiguous xs = case nub xs of [x] -> Unambiguous x ...
360
findMatch match = case match of NoMatch _ msgs -> None (nub msgs) ExactMatch _ xs -> checkAmbiguous xs InexactMatch _ xs -> checkAmbiguous xs where checkAmbiguous xs = case nub xs of [x] -> Unambiguous x xs' -> Ambiguous xs'
311
true
true
0
10
186
129
62
67
null
null
brianshourd/adventOfCode2015
test/Day12Spec.hs
mit
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
1
6
7
22
9
13
null
null
divayprakash/haskell-course
week7programmingAssignment.hs
mit
lookAndSay :: Integer -> Integer lookAndSay n = read (concatMap describe (group (show n))) where describe run = show (length run) ++ take 1 run
155
lookAndSay :: Integer -> Integer lookAndSay n = read (concatMap describe (group (show n))) where describe run = show (length run) ++ take 1 run
155
lookAndSay n = read (concatMap describe (group (show n))) where describe run = show (length run) ++ take 1 run
122
false
true
0
11
36
70
33
37
null
null
beni55/cgrep
src/CGrep/Filter.hs
gpl-2.0
filterFunctionMap = Map.fromList [ (C, mkFilterFunction [("/*", "*/"), ("//", "\n")] [("\"", "\"")] ), (Cpp, mkFilterFunction [("/*", "*/"), ("//", "\n")] [("\"", "\"")] ), (Cabal, mkFilterFunction [("--", "\n")] [("\"", "\"")] ), (Csharp, mkFilterFunction [("/*...
2,926
filterFunctionMap = Map.fromList [ (C, mkFilterFunction [("/*", "*/"), ("//", "\n")] [("\"", "\"")] ), (Cpp, mkFilterFunction [("/*", "*/"), ("//", "\n")] [("\"", "\"")] ), (Cabal, mkFilterFunction [("--", "\n")] [("\"", "\"")] ), (Csharp, mkFilterFunction [("/*...
2,926
filterFunctionMap = Map.fromList [ (C, mkFilterFunction [("/*", "*/"), ("//", "\n")] [("\"", "\"")] ), (Cpp, mkFilterFunction [("/*", "*/"), ("//", "\n")] [("\"", "\"")] ), (Cabal, mkFilterFunction [("--", "\n")] [("\"", "\"")] ), (Csharp, mkFilterFunction [("/*...
2,926
false
false
1
10
715
1,439
911
528
null
null
vikraman/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
reOrderNodes depth bndr_set weak_fvs (node : nodes) binds = -- pprTrace "reOrderNodes" (text "unchosen" <+> ppr unchosen $$ -- text "chosen" <+> ppr chosen_nodes) $ loopBreakNodes new_depth bndr_set weak_fvs unchosen $ (map mk_loop_breaker chosen_nodes ++ binds) where (chos...
9,400
reOrderNodes depth bndr_set weak_fvs (node : nodes) binds = -- pprTrace "reOrderNodes" (text "unchosen" <+> ppr unchosen $$ -- text "chosen" <+> ppr chosen_nodes) $ loopBreakNodes new_depth bndr_set weak_fvs unchosen $ (map mk_loop_breaker chosen_nodes ++ binds) where (chos...
9,400
reOrderNodes depth bndr_set weak_fvs (node : nodes) binds = -- pprTrace "reOrderNodes" (text "unchosen" <+> ppr unchosen $$ -- text "chosen" <+> ppr chosen_nodes) $ loopBreakNodes new_depth bndr_set weak_fvs unchosen $ (map mk_loop_breaker chosen_nodes ++ binds) where (chos...
9,400
false
false
0
11
2,617
620
330
290
null
null
noteed/scp-streams
Network/SCP/Protocol.hs
bsd-3-clause
startSending :: SCP -> IO Bool startSending SCP{..} = do getFeedback scpOut
77
startSending :: SCP -> IO Bool startSending SCP{..} = do getFeedback scpOut
77
startSending SCP{..} = do getFeedback scpOut
46
false
true
0
8
13
38
16
22
null
null
yiannist/ganeti
src/Ganeti/Confd/Utils.hs
bsd-2-clause
-- | Returns the HMAC key. getClusterHmac :: IO HashKey getClusterHmac = Path.confdHmacKey >>= fmap B.unpack . B.readFile
121
getClusterHmac :: IO HashKey getClusterHmac = Path.confdHmacKey >>= fmap B.unpack . B.readFile
94
getClusterHmac = Path.confdHmacKey >>= fmap B.unpack . B.readFile
65
true
true
0
8
17
32
16
16
null
null
agentm/project-m36
src/lib/ProjectM36/IsomorphicSchema.hs
unlicense
databaseContextExprMorph iso@(IsoUnion (rvTrue, rvFalse) filt rvOut) relExprFunc expr = case expr of --assign: replace all instances in the portion of the target relvar with the new tuples from the relExpr --problem: between the delete->insert, constraints could be violated which would not otherwise be violated ...
1,773
databaseContextExprMorph iso@(IsoUnion (rvTrue, rvFalse) filt rvOut) relExprFunc expr = case expr of --assign: replace all instances in the portion of the target relvar with the new tuples from the relExpr --problem: between the delete->insert, constraints could be violated which would not otherwise be violated ...
1,773
databaseContextExprMorph iso@(IsoUnion (rvTrue, rvFalse) filt rvOut) relExprFunc expr = case expr of --assign: replace all instances in the portion of the target relvar with the new tuples from the relExpr --problem: between the delete->insert, constraints could be violated which would not otherwise be violated ...
1,773
false
false
1
18
463
434
204
230
null
null
christiaanb/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
-- | Outputs a debugging message at verbosity level of @-v@ or higher debugTraceMsg :: SDoc -> CoreM () debugTraceMsg = msg (flip Err.debugTraceMsg 3)
150
debugTraceMsg :: SDoc -> CoreM () debugTraceMsg = msg (flip Err.debugTraceMsg 3)
80
debugTraceMsg = msg (flip Err.debugTraceMsg 3)
46
true
true
0
8
24
34
17
17
null
null
langthom/stats
dist/build/autogen/Paths_stats.hs
bsd-3-clause
libexecdir = "/usr/local/libexec"
33
libexecdir = "/usr/local/libexec"
33
libexecdir = "/usr/local/libexec"
33
false
false
1
5
2
10
3
7
null
null
input-output-hk/pos-haskell-prototype
crypto/Pos/Crypto/SecretSharing.hs
mit
getDhSecret :: Scrape.DhSecret -> ByteString getDhSecret (Scrape.DhSecret s) = s
80
getDhSecret :: Scrape.DhSecret -> ByteString getDhSecret (Scrape.DhSecret s) = s
80
getDhSecret (Scrape.DhSecret s) = s
35
false
true
0
10
9
34
15
19
null
null
dmvianna/haskellbook
src/Ch26-MorraState.hs
unlicense
layer AI2P B = "Person"
24
player AI2P B = "Person"
24
player AI2P B = "Person"
24
false
false
0
5
5
11
5
6
null
null
zoomhub/zoomhub
tests/ZoomHub/Types/DeepZoomImageSpec.hs
mit
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
7
7
25
10
15
null
null
factisresearch/influx
test/Database/Influx/API/Tests.hs
bsd-3-clause
dropDb :: DatabaseName -> IO () dropDb name = let query = Query $ "DROP DATABASE IF EXISTS " <> name in postQuery testConfig Nothing query
146
dropDb :: DatabaseName -> IO () dropDb name = let query = Query $ "DROP DATABASE IF EXISTS " <> name in postQuery testConfig Nothing query
146
dropDb name = let query = Query $ "DROP DATABASE IF EXISTS " <> name in postQuery testConfig Nothing query
114
false
true
0
10
33
49
23
26
null
null
bos/math-functions
tests/Tests/Sum.hs
bsd-2-clause
trueSum :: (Fractional b, Real a) => [a] -> b trueSum xs = fromRational . Prelude.sum . map toRational $ xs
107
trueSum :: (Fractional b, Real a) => [a] -> b trueSum xs = fromRational . Prelude.sum . map toRational $ xs
107
trueSum xs = fromRational . Prelude.sum . map toRational $ xs
61
false
true
0
8
20
53
27
26
null
null
xmonad/xmonad
src/XMonad/Main.hs
bsd-3-clause
handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do withWindowAttributes dpy w $ \wa -> do -- ignore override windows -- need to ignore mapping requests by managed windows not on the current workspace managed <- isClient w when (not (wa_override_redirect wa) && not managed) $ ma...
417
handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do withWindowAttributes dpy w $ \wa -> do -- ignore override windows -- need to ignore mapping requests by managed windows not on the current workspace managed <- isClient w when (not (wa_override_redirect wa) && not managed) $ ma...
417
handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do withWindowAttributes dpy w $ \wa -> do -- ignore override windows -- need to ignore mapping requests by managed windows not on the current workspace managed <- isClient w when (not (wa_override_redirect wa) && not managed) $ ma...
417
false
false
0
19
94
94
47
47
null
null
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Update.hs
mpl-2.0
-- | OAuth access token. auAccessToken :: Lens' AccountsUpdate (Maybe Text) auAccessToken = lens _auAccessToken (\ s a -> s{_auAccessToken = a})
152
auAccessToken :: Lens' AccountsUpdate (Maybe Text) auAccessToken = lens _auAccessToken (\ s a -> s{_auAccessToken = a})
127
auAccessToken = lens _auAccessToken (\ s a -> s{_auAccessToken = a})
76
true
true
1
9
29
51
25
26
null
null
upsoft/bond
compiler/src/Language/Bond/Syntax/Util.hs
mit
isList (BT_Vector _) = True
27
isList (BT_Vector _) = True
27
isList (BT_Vector _) = True
27
false
false
0
7
4
15
7
8
null
null
athanclark/nested-routes-website
src/Application.hs
bsd-3-clause
contentLayer :: MonadApp m => MiddlewareT m contentLayer = route routes
71
contentLayer :: MonadApp m => MiddlewareT m contentLayer = route routes
71
contentLayer = route routes
27
false
true
0
6
10
24
11
13
null
null
GaloisInc/ivory
ivory-model-check/src/Ivory/ModelCheck/CVC4.hs
bsd-3-clause
mulFunc :: Statement mulFunc = Statement $ B.unwords [ B.pack mulAbs, ":", "(INT, INT)", "->", "INT" ]
104
mulFunc :: Statement mulFunc = Statement $ B.unwords [ B.pack mulAbs, ":", "(INT, INT)", "->", "INT" ]
104
mulFunc = Statement $ B.unwords [ B.pack mulAbs, ":", "(INT, INT)", "->", "INT" ]
83
false
true
0
8
18
47
23
24
null
null
meditans/documentator
src/Documentator/Descriptors.hs
gpl-3.0
resultTyCon t@(TyPromoted _ _) = t
34
resultTyCon t@(TyPromoted _ _) = t
34
resultTyCon t@(TyPromoted _ _) = t
34
false
false
0
8
5
20
10
10
null
null
Erdwolf/autotool-bonn
src/Uni/SS04/Serie6.hs
gpl-2.0
conformwhile bs prog = do builtins bs prog
51
conformwhile bs prog = do builtins bs prog
51
conformwhile bs prog = do builtins bs prog
51
false
false
0
7
16
19
8
11
null
null
koba-e964/hayashii-mcc
llvm/Emit.hs
bsd-3-clause
-- 64-bit integer int64 :: AST.Type int64 = IntegerType 64
58
int64 :: AST.Type int64 = IntegerType 64
40
int64 = IntegerType 64
22
true
true
0
5
9
17
9
8
null
null
xu-hao/QueryArrow
QueryArrow-common/src/QueryArrow/DB/ResultStream.hs
bsd-3-clause
isResultStreamEmpty :: (Monad m) => ResultStream m a -> m Bool isResultStreamEmpty rs = runConduit (rs =$ null)
112
isResultStreamEmpty :: (Monad m) => ResultStream m a -> m Bool isResultStreamEmpty rs = runConduit (rs =$ null)
111
isResultStreamEmpty rs = runConduit (rs =$ null)
48
false
true
0
7
18
45
22
23
null
null
alekar/hugs
packages/base/Data/Map.hs
bsd-3-clause
intersectionWithKey f t Tip = Tip
33
intersectionWithKey f t Tip = Tip
33
intersectionWithKey f t Tip = Tip
33
false
false
0
5
5
13
6
7
null
null
ExpHP/haskell-memory-halp
app/Attempt3.hs
bsd-3-clause
main :: IO () main = doMain $ do _ <- readYaml "band.yaml" :: IO Value pure ()
86
main :: IO () main = doMain $ do _ <- readYaml "band.yaml" :: IO Value pure ()
86
main = doMain $ do _ <- readYaml "band.yaml" :: IO Value pure ()
72
false
true
0
9
25
44
20
24
null
null
SimSaladin/haikubot
Haikubot/Plugins/Runot.hs
bsd-3-clause
implicitMonogatari :: Text -> Action Runot Res implicitMonogatari title = do from <- liftM (fromMaybe "(no-one)") origin iam <- liftM (fromMaybe "(no-one)") whoami haikuFile <- aget rHaikuFile exists <- liftIO $ doesFileExist haikuFile if exists then do haikus <- l...
1,200
implicitMonogatari :: Text -> Action Runot Res implicitMonogatari title = do from <- liftM (fromMaybe "(no-one)") origin iam <- liftM (fromMaybe "(no-one)") whoami haikuFile <- aget rHaikuFile exists <- liftIO $ doesFileExist haikuFile if exists then do haikus <- l...
1,200
implicitMonogatari title = do from <- liftM (fromMaybe "(no-one)") origin iam <- liftM (fromMaybe "(no-one)") whoami haikuFile <- aget rHaikuFile exists <- liftIO $ doesFileExist haikuFile if exists then do haikus <- liftIO $ liftM (map read . reverse . lines) $ re...
1,153
false
true
0
23
514
327
150
177
null
null
gcampax/ghc
compiler/rename/RnTypes.hs
bsd-3-clause
mkHsOpTyRn mk1 _ _ ty1 ty2 -- Default case, no rearrangment = return (mk1 ty1 ty2)
97
mkHsOpTyRn mk1 _ _ ty1 ty2 -- Default case, no rearrangment = return (mk1 ty1 ty2)
97
mkHsOpTyRn mk1 _ _ ty1 ty2 -- Default case, no rearrangment = return (mk1 ty1 ty2)
97
false
false
0
7
30
29
14
15
null
null
stevezhee/pec
Pec/PUtil.hs
bsd-3-clause
parse_pec :: FilePath -> IO (P.Module Point) parse_pec = parse_m P.grmLexFilePath (PP.grmParse . layout) modid_p
112
parse_pec :: FilePath -> IO (P.Module Point) parse_pec = parse_m P.grmLexFilePath (PP.grmParse . layout) modid_p
112
parse_pec = parse_m P.grmLexFilePath (PP.grmParse . layout) modid_p
67
false
true
0
9
14
44
22
22
null
null
sw17ch/gator
src/Language/Gator/Logic.hs
bsd-3-clause
initGI :: GateIDs initGI = GateIDs 0 0 0 0 0 0
46
initGI :: GateIDs initGI = GateIDs 0 0 0 0 0 0
46
initGI = GateIDs 0 0 0 0 0 0
28
false
true
0
6
11
31
13
18
null
null
bakineggs/k-framework
tools/language-k/Language/K/Core/Pretty/KMode.hs
gpl-2.0
ppKLabel (KString s) = "String " ++ show s
44
ppKLabel (KString s) = "String " ++ show s
44
ppKLabel (KString s) = "String " ++ show s
44
false
false
2
6
10
24
10
14
null
null
plow-technologies/cabal
cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs
bsd-3-clause
mapCompFlaggedDep g (Simple pn a ) = Simple pn (g a)
59
mapCompFlaggedDep g (Simple pn a ) = Simple pn (g a)
59
mapCompFlaggedDep g (Simple pn a ) = Simple pn (g a)
59
false
false
0
7
17
32
14
18
null
null
kawu/ltag
src/NLP/LTAG/V1.hs
bsd-2-clause
alternate xs = mapMaybe hd xs ++ alternate (mapMaybe tl xs) where hd (x:_) = Just x hd _ = Nothing tl (_:ys) = Just ys tl _ = Nothing -- | Get root non-terminal.
196
alternate xs = mapMaybe hd xs ++ alternate (mapMaybe tl xs) where hd (x:_) = Just x hd _ = Nothing tl (_:ys) = Just ys tl _ = Nothing -- | Get root non-terminal.
196
alternate xs = mapMaybe hd xs ++ alternate (mapMaybe tl xs) where hd (x:_) = Just x hd _ = Nothing tl (_:ys) = Just ys tl _ = Nothing -- | Get root non-terminal.
196
false
false
0
8
69
89
41
48
null
null
ryzhyk/cocoon
cocoon/Boogie/BoogieExpr.hs
apache-2.0
mkExpr' (EBuiltin _ f as) = (bfuncPrintBoogie $ getBuiltin f) ?r ?c as $ map mkExpr' as
93
mkExpr' (EBuiltin _ f as) = (bfuncPrintBoogie $ getBuiltin f) ?r ?c as $ map mkExpr' as
93
mkExpr' (EBuiltin _ f as) = (bfuncPrintBoogie $ getBuiltin f) ?r ?c as $ map mkExpr' as
93
false
false
0
9
22
46
21
25
null
null
ksallberg/valuecalc
Tests/QCTests.hs
unlicense
prop_whiteSpacesDropped x = let ws = [' ','\t','\n','\v','\f','\r','\160'] in dropWhitespace (TagText x) == TagText [c | c <- x, not $ elem c ws]
150
prop_whiteSpacesDropped x = let ws = [' ','\t','\n','\v','\f','\r','\160'] in dropWhitespace (TagText x) == TagText [c | c <- x, not $ elem c ws]
150
prop_whiteSpacesDropped x = let ws = [' ','\t','\n','\v','\f','\r','\160'] in dropWhitespace (TagText x) == TagText [c | c <- x, not $ elem c ws]
150
false
false
3
9
28
69
32
37
null
null
rueshyna/gogol
gogol-books/gen/Network/Google/Resource/Books/MyLibrary/Bookshelves/List.hs
mpl-2.0
-- | Creates a value of 'MyLibraryBookshelvesList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'mlblSource' myLibraryBookshelvesList :: MyLibraryBookshelvesList myLibraryBookshelvesList = MyLibraryBookshelvesList' { _ml...
344
myLibraryBookshelvesList :: MyLibraryBookshelvesList myLibraryBookshelvesList = MyLibraryBookshelvesList' { _mlblSource = Nothing }
147
myLibraryBookshelvesList = MyLibraryBookshelvesList' { _mlblSource = Nothing }
90
true
true
0
7
60
34
18
16
null
null
siddhanathan/ghc
compiler/nativeGen/AsmCodeGen.hs
bsd-3-clause
-- The algorithm is very simple (and stupid): we make a graph out of -- the blocks where there is an edge from one block to another iff the -- first block ends by jumping to the second. Then we topologically -- sort this graph. Then traverse the list: for each block, we first -- output the block, then if it has an ou...
677
sequenceBlocks :: Instruction instr => BlockEnv i -> [NatBasicBlock instr] -> [NatBasicBlock instr] sequenceBlocks _ [] = []
156
sequenceBlocks _ [] = []
24
true
true
0
9
154
58
32
26
null
null
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Emacs/Config.hs
gpl-2.0
haskell_interactive_bring = W.press "C-`"
41
haskell_interactive_bring = W.press "C-`"
41
haskell_interactive_bring = W.press "C-`"
41
false
false
0
6
3
11
5
6
null
null
shlevy/arithmoi
Math/NumberTheory/Primes/Heap.hs
mit
step :: Integral a => Int -> a -- {-# INLINE step #-} step i = fromIntegral (steps `unsafeAt` i)
96
step :: Integral a => Int -> a step i = fromIntegral (steps `unsafeAt` i)
73
step i = fromIntegral (steps `unsafeAt` i)
42
true
true
0
7
19
41
21
20
null
null
Axiomatic-/nano-md5
Data/Digest/OpenSSL/MD5.hs
bsd-3-clause
-- -- | Fast md5 using OpenSSL. The md5 hash should be referentially transparent.. -- The ByteString is guaranteed not to be copied. -- -- The result string should be identical to the output of MD5(1). -- That is: -- -- > $ md5 /usr/share/dict/words -- > MD5 (/usr/share/dict/words) = e5c152147e93b81424c13772330e74b3 -...
1,122
md5sum :: B.ByteString -> String md5sum p = unsafePerformIO $ B.unsafeUseAsCStringLen p $ \(ptr,n) -> do allocaBytes md5_digest_length $ \digest_ptr -> do digest <- c_md5 ptr (fromIntegral n) digest_ptr go digest 0 [] where -- print it in 0-padded hex format go :: Ptr Word8 -> Int -> [St...
755
md5sum p = unsafePerformIO $ B.unsafeUseAsCStringLen p $ \(ptr,n) -> do allocaBytes md5_digest_length $ \digest_ptr -> do digest <- c_md5 ptr (fromIntegral n) digest_ptr go digest 0 [] where -- print it in 0-padded hex format go :: Ptr Word8 -> Int -> [String] -> IO String #ifndef __HADD...
722
true
true
5
16
310
301
151
150
null
null
gaborhermann/marvin
src/Marvin/API/Preprocess/FeatureScaling.hs
apache-2.0
-- | Scales the elements of all columns in the table linearly, -- so that every element is between 0 and 1. minMaxScale :: NumericTable -> (NumericTable -> Fallible NumericTable) minMaxScale = transformEveryColumn "While scaling by min-max." $ \x -> return . (minMaxScaleColumn x)
282
minMaxScale :: NumericTable -> (NumericTable -> Fallible NumericTable) minMaxScale = transformEveryColumn "While scaling by min-max." $ \x -> return . (minMaxScaleColumn x)
174
minMaxScale = transformEveryColumn "While scaling by min-max." $ \x -> return . (minMaxScaleColumn x)
103
true
true
0
9
45
49
26
23
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
ornamentally = id
17
ornamentally = id
17
ornamentally = id
17
false
false
0
4
2
6
3
3
null
null
netom/haskell-ray
src/haskell-ray.hs
lgpl-3.0
-- Takes transformation into account incidence' :: Ray -> Object -> Maybe Incidence incidence' (Ray rv d) (Object s _ t) | isNothing i = Nothing | otherwise = Just $ Incidence (correct $ trans t iv) (correct $ itrans (stripTrans t) n) where i = incidence (Ray (correct $ itrans t rv) (correct $ itrans (s...
368
incidence' :: Ray -> Object -> Maybe Incidence incidence' (Ray rv d) (Object s _ t) | isNothing i = Nothing | otherwise = Just $ Incidence (correct $ trans t iv) (correct $ itrans (stripTrans t) n) where i = incidence (Ray (correct $ itrans t rv) (correct $ itrans (stripTrans t) d)) s Just (Incidenc...
331
incidence' (Ray rv d) (Object s _ t) | isNothing i = Nothing | otherwise = Just $ Incidence (correct $ trans t iv) (correct $ itrans (stripTrans t) n) where i = incidence (Ray (correct $ itrans t rv) (correct $ itrans (stripTrans t) d)) s Just (Incidence iv n) = i
284
true
true
3
12
85
183
84
99
null
null
gorkinovich/Haskell
Problems/Problem0010b.hs
mit
sumPrimes :: Integer -> Integer sumPrimes limit = sp limit 2 [] 0 where sp lmt x ps acc | x >= lmt = acc | otherwise = sp lmt y (ps ++ [x]) (acc + x) where y = head [z | z <- [x + 1..], isPrime z ps]
245
sumPrimes :: Integer -> Integer sumPrimes limit = sp limit 2 [] 0 where sp lmt x ps acc | x >= lmt = acc | otherwise = sp lmt y (ps ++ [x]) (acc + x) where y = head [z | z <- [x + 1..], isPrime z ps]
245
sumPrimes limit = sp limit 2 [] 0 where sp lmt x ps acc | x >= lmt = acc | otherwise = sp lmt y (ps ++ [x]) (acc + x) where y = head [z | z <- [x + 1..], isPrime z ps]
213
false
true
1
10
96
151
66
85
null
null
oldmanmike/ghc
compiler/types/Type.hs
bsd-3-clause
mkCastTy :: Type -> Coercion -> Type -- Running example: -- T :: forall k1. k1 -> forall k2. k2 -> Bool -> Maybe k1 -> * -- co :: * ~R X (maybe X is a newtype around *) -- ty = T Nat 3 Symbol "foo" True (Just 2) -- -- We wish to "push" the cast down as far as possible. See also -- Note [Pushing down casts] in ...
494
mkCastTy :: Type -> Coercion -> Type mkCastTy ty co | isReflexiveCo co = ty
75
mkCastTy ty co | isReflexiveCo co = ty
38
true
true
0
8
124
51
28
23
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
gpl-2.0
-- KATAKANA LETTER DE switch 'T' 'o' = '\x30C8'
47
switch 'T' 'o' = '\x30C8'
25
switch 'T' 'o' = '\x30C8'
25
true
false
0
5
8
12
6
6
null
null
bergmark/hakyll
src/Hakyll/Web/Tags.hs
bsd-3-clause
renderTagCloud :: Double -- ^ Smallest font size, in percent -> Double -- ^ Biggest font size, in percent -> Tags -- ^ Input tags -> Compiler String -- ^ Rendered cloud renderTagCloud minSize maxSize = renderTags ma...
1,055
renderTagCloud :: Double -- ^ Smallest font size, in percent -> Double -- ^ Biggest font size, in percent -> Tags -- ^ Input tags -> Compiler String renderTagCloud minSize maxSize = renderTags makeLink (intercalate " ") where ...
1,020
renderTagCloud minSize maxSize = renderTags makeLink (intercalate " ") where makeLink tag url count min' max' = renderHtml $ H.a ! A.style (toValue $ "font-size: " ++ size count min' max') ! A.href (toValue url) $ toHtml tag -- Show the relative size of one 'count' in percent ...
781
true
true
0
12
340
220
111
109
null
null
naohaq/gf256-hs
example/RSdecode.hs
mit
main :: IO () main = do putStrLn $ "RS Code: (" ++ show code_N ++ "," ++ show (code_N - code_2t) ++ ")" putStrLn $ "Received message: " mapM_ (putStrLn . (" " ++)) (dumpMsg rws) let csum = check_ecc200 rws putStrLn $ "Checksum : " ++ showHex csum let synd = calcSyndrome pow2 csum putStrLn $ "Syndromes: ...
1,027
main :: IO () main = do putStrLn $ "RS Code: (" ++ show code_N ++ "," ++ show (code_N - code_2t) ++ ")" putStrLn $ "Received message: " mapM_ (putStrLn . (" " ++)) (dumpMsg rws) let csum = check_ecc200 rws putStrLn $ "Checksum : " ++ showHex csum let synd = calcSyndrome pow2 csum putStrLn $ "Syndromes: ...
1,027
main = do putStrLn $ "RS Code: (" ++ show code_N ++ "," ++ show (code_N - code_2t) ++ ")" putStrLn $ "Received message: " mapM_ (putStrLn . (" " ++)) (dumpMsg rws) let csum = check_ecc200 rws putStrLn $ "Checksum : " ++ showHex csum let synd = calcSyndrome pow2 csum putStrLn $ "Syndromes: " ++ showHex s...
1,013
false
true
0
14
229
403
186
217
null
null
sharpjs/haskell-learning
src/Aex/Types.hs
gpl-3.0
i8 = IntT (Just ( 8, 8, True ))
33
i8 = IntT (Just ( 8, 8, True ))
33
i8 = IntT (Just ( 8, 8, True ))
33
false
false
1
7
10
27
13
14
null
null
AndrewRademacher/zotac
lib/Data/Raft/Node/Internal.hs
mit
defaultBallots :: (Ord id) => Peers id -> Ballots id defaultBallots peers = Map.fromList $ zip (Set.toList peers) (repeat def)
126
defaultBallots :: (Ord id) => Peers id -> Ballots id defaultBallots peers = Map.fromList $ zip (Set.toList peers) (repeat def)
126
defaultBallots peers = Map.fromList $ zip (Set.toList peers) (repeat def)
73
false
true
0
9
19
62
29
33
null
null
joelelmercarlson/stack
haskell/travel.hs
mit
display' :: ([Int], Float) -> IO () display' (k, v) = printf "route %s is length %2.2f\n" (show k) v
102
display' :: ([Int], Float) -> IO () display' (k, v) = printf "route %s is length %2.2f\n" (show k) v
100
display' (k, v) = printf "route %s is length %2.2f\n" (show k) v
64
false
true
0
7
21
51
27
24
null
null
cullina/Extractor
src/SortingNetwork.hs
bsd-3-clause
bs = outputs hNet 16
20
bs = outputs hNet 16
20
bs = outputs hNet 16
20
false
false
1
5
4
14
5
9
null
null
ml9951/ghc
libraries/pastm/Control/TL2/STM.hs
bsd-3-clause
newTVar :: a -> STM (TVar a) newTVar x = STM $ \s -> case unsafeCoerce# newTVar# x s of (# s', tv #) -> (# s', TVar tv #)
151
newTVar :: a -> STM (TVar a) newTVar x = STM $ \s -> case unsafeCoerce# newTVar# x s of (# s', tv #) -> (# s', TVar tv #)
151
newTVar x = STM $ \s -> case unsafeCoerce# newTVar# x s of (# s', tv #) -> (# s', TVar tv #)
122
false
true
0
11
59
66
33
33
null
null
andgate/vish
src/Vish/Layout.hs
bsd-3-clause
alignH AlignRight = alignRight
32
alignH AlignRight = alignRight
32
alignH AlignRight = alignRight
32
false
false
0
5
5
9
4
5
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
wondrously = id
15
wondrously = id
15
wondrously = id
15
false
false
0
4
2
6
3
3
null
null
LTI2000/hinterface
src/Foreign/Erlang/Handshake.hs
bsd-3-clause
checkCookie :: MonadThrow m => BS.ByteString -> Word32 -> BS.ByteString -> m () checkCookie her_digest our_challenge cookie = unless (her_digest == genDigest our_challenge cookie) (throwM CookieMismatch)
218
checkCookie :: MonadThrow m => BS.ByteString -> Word32 -> BS.ByteString -> m () checkCookie her_digest our_challenge cookie = unless (her_digest == genDigest our_challenge cookie) (throwM CookieMismatch)
218
checkCookie her_digest our_challenge cookie = unless (her_digest == genDigest our_challenge cookie) (throwM CookieMismatch)
138
false
true
0
10
40
69
33
36
null
null
ysnrkdm/Hamlet
src/Eval.hs
mit
opennessHelper board bb = fromIntegral opennessAtHead + opennessHelper board newBb where opennessAtHead = BitBoard.numPeripherals board Piece.Empty pos (pos, newBb) = BitBoard.takeOneAndSetZero bb -- Yet implemented but ok
239
opennessHelper board bb = fromIntegral opennessAtHead + opennessHelper board newBb where opennessAtHead = BitBoard.numPeripherals board Piece.Empty pos (pos, newBb) = BitBoard.takeOneAndSetZero bb -- Yet implemented but ok
239
opennessHelper board bb = fromIntegral opennessAtHead + opennessHelper board newBb where opennessAtHead = BitBoard.numPeripherals board Piece.Empty pos (pos, newBb) = BitBoard.takeOneAndSetZero bb -- Yet implemented but ok
239
false
false
0
6
43
60
29
31
null
null
d-rive/rivers
Data/Rivers/Streams.hs
bsd-3-clause
anyA = anyA
40
anyA = anyA
40
anyA = anyA
40
false
false
0
4
31
6
3
3
null
null
govindkrjoshi/darwin
app/Main.hs
bsd-3-clause
main :: IO () main = do args <- getArgs case args of ["train", inputDataDir, outputFile] -> trainClassifier inputDataDir outputFile _ -> notImplemented
171
main :: IO () main = do args <- getArgs case args of ["train", inputDataDir, outputFile] -> trainClassifier inputDataDir outputFile _ -> notImplemented
171
main = do args <- getArgs case args of ["train", inputDataDir, outputFile] -> trainClassifier inputDataDir outputFile _ -> notImplemented
157
false
true
1
11
42
61
28
33
null
null
pparkkin/eta
compiler/ETA/Utils/Util.hs
bsd-3-clause
-- | 'zipLazy' is a kind of 'zip' that is lazy in the second list (observe the ~) zipLazy :: [a] -> [b] -> [(a,b)] zipLazy [] _ = []
142
zipLazy :: [a] -> [b] -> [(a,b)] zipLazy [] _ = []
60
zipLazy [] _ = []
27
true
true
0
10
39
50
26
24
null
null
spechub/Hets
OWL2/OWL22CommonLogic.hs
gpl-2.0
mkEDPairs :: Sign -> [Int] -> Maybe Relation -> [(SENTENCE, SENTENCE)] -> Result ([TEXT], Sign) mkEDPairs s il med pairs = do let ls = case fromMaybe (error "expected EDRelation") med of EDRelation Equivalent -> map (uncurry mkBB) pairs EDRelation Disjoint -> map (\ (x, y) -> mkBN $ mkBC [x, y...
8,731
mkEDPairs :: Sign -> [Int] -> Maybe Relation -> [(SENTENCE, SENTENCE)] -> Result ([TEXT], Sign) mkEDPairs s il med pairs = do let ls = case fromMaybe (error "expected EDRelation") med of EDRelation Equivalent -> map (uncurry mkBB) pairs EDRelation Disjoint -> map (\ (x, y) -> mkBN $ mkBC [x, y...
8,731
mkEDPairs s il med pairs = do let ls = case fromMaybe (error "expected EDRelation") med of EDRelation Equivalent -> map (uncurry mkBB) pairs EDRelation Disjoint -> map (\ (x, y) -> mkBN $ mkBC [x, y]) pairs _ -> error "expected EDRelation" return ([eqFB il ls], s) -- | Mapping of Lis...
8,631
false
true
0
18
3,581
342
254
88
null
null