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
joelburget/haste-compiler
src/haste-install-his.hs
bsd-3-clause
main :: IO () main = do args <- getArgs case args of [package, dir] -> shell $ installFromDir (pkgSysLibDir </> package) dir _ -> shell $ echo "Usage: haste-install-his pkgname dir" return ()
218
main :: IO () main = do args <- getArgs case args of [package, dir] -> shell $ installFromDir (pkgSysLibDir </> package) dir _ -> shell $ echo "Usage: haste-install-his pkgname dir" return ()
218
main = do args <- getArgs case args of [package, dir] -> shell $ installFromDir (pkgSysLibDir </> package) dir _ -> shell $ echo "Usage: haste-install-his pkgname dir" return ()
204
false
true
1
14
60
83
38
45
null
null
advancedtelematic/quickcheck-state-machine-model
src/Test/StateMachine/Logic.hs
bsd-3-clause
logic (LogicPredicate p) = evalLogicPredicate p
47
logic (LogicPredicate p) = evalLogicPredicate p
47
logic (LogicPredicate p) = evalLogicPredicate p
47
false
false
0
7
5
18
8
10
null
null
hmemcpy/milewski-ctfp-pdf
src/content/3.10/code/haskell/snippet12.hs
gpl-3.0
rhoP :: Profunctor p => DiaProd p -> ProdP p rhoP (DiaProd pbb) = rho pbb
73
rhoP :: Profunctor p => DiaProd p -> ProdP p rhoP (DiaProd pbb) = rho pbb
73
rhoP (DiaProd pbb) = rho pbb
28
false
true
0
7
15
40
18
22
null
null
NewMountain/hangmanSimple
src/Game.hs
bsd-3-clause
gameWin :: Puzzle -> IO () gameWin (Puzzle _ hits _) = when (all isJust hits) $ do putStrLn "You win!" exitSuccess
151
gameWin :: Puzzle -> IO () gameWin (Puzzle _ hits _) = when (all isJust hits) $ do putStrLn "You win!" exitSuccess
151
gameWin (Puzzle _ hits _) = when (all isJust hits) $ do putStrLn "You win!" exitSuccess
124
false
true
0
8
58
57
26
31
null
null
thalerjonathan/phd
coding/libraries/chimera/examples/SD/SDSir/Model.hs
gpl-3.0
avgIllnessDuration :: Double avgIllnessDuration = 15
52
avgIllnessDuration :: Double avgIllnessDuration = 15
52
avgIllnessDuration = 15
23
false
true
0
6
5
18
7
11
null
null
khajavi/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
-- Parse a raw line and split it into chunks by indices. rawTableLine :: [Int] -> GenParser Char ParserState [String] rawTableLine indices = do notFollowedBy' (blanklines <|> tableFooter) line <- many1Till anyChar newline return $ map removeLeadingTrailingSpace $ tail $ splitByIndices (in...
407
rawTableLine :: [Int] -> GenParser Char ParserState [String] rawTableLine indices = do notFollowedBy' (blanklines <|> tableFooter) line <- many1Till anyChar newline return $ map removeLeadingTrailingSpace $ tail $ splitByIndices (init indices) line -- Parse a table line and return a list...
350
rawTableLine indices = do notFollowedBy' (blanklines <|> tableFooter) line <- many1Till anyChar newline return $ map removeLeadingTrailingSpace $ tail $ splitByIndices (init indices) line -- Parse a table line and return a list of lists of blocks (columns).
276
true
true
0
11
89
92
43
49
null
null
mlitchard/cosmos
library/Example.hs
mit
-- | An example function. main :: IO () main = return ()
56
main :: IO () main = return ()
30
main = return ()
16
true
true
1
6
12
25
11
14
null
null
oldmanmike/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getNonClobberedOperand e = getNonClobberedOperand_generic e
59
getNonClobberedOperand e = getNonClobberedOperand_generic e
59
getNonClobberedOperand e = getNonClobberedOperand_generic e
59
false
false
1
5
4
15
5
10
null
null
KaneTW/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
process fn (AddClauseFrom updatefile l n) = addClauseFrom fn updatefile l n
79
process fn (AddClauseFrom updatefile l n) = addClauseFrom fn updatefile l n
79
process fn (AddClauseFrom updatefile l n) = addClauseFrom fn updatefile l n
79
false
false
0
7
15
30
14
16
null
null
schell/bindings-objc
src/Example.hs
mit
arbitraryFunctionTest :: IO () arbitraryFunctionTest = do nsObject <- withCString "NSObject" c'objc_getClass nsHaskell <- withCString "NSHaskell" $ \ptr -> c'objc_allocateClassPair nsObject ptr 0 sel <- withCString "nshaskellprint" c'sel_getUid if (sel == c'nil) then putStrLn "Selector is nil...
726
arbitraryFunctionTest :: IO () arbitraryFunctionTest = do nsObject <- withCString "NSObject" c'objc_getClass nsHaskell <- withCString "NSHaskell" $ \ptr -> c'objc_allocateClassPair nsObject ptr 0 sel <- withCString "nshaskellprint" c'sel_getUid if (sel == c'nil) then putStrLn "Selector is nil...
726
arbitraryFunctionTest = do nsObject <- withCString "NSObject" c'objc_getClass nsHaskell <- withCString "NSHaskell" $ \ptr -> c'objc_allocateClassPair nsObject ptr 0 sel <- withCString "nshaskellprint" c'sel_getUid if (sel == c'nil) then putStrLn "Selector is nil." else putStrLn "Got selec...
695
false
true
0
11
178
189
85
104
null
null
kmein/markov
src/Text/Random/Markov.hs
bsd-3-clause
createStatistics :: TextCorpus -> TextCache createStatistics = V.foldl' insertTriple M.empty . triplets where insertTriple acc t = case t of Just (w1, w2, w3) -> M.insertWith (M.unionWith (+)) (w1, w2) (M.singleton w3 1) acc Nothing -> acc triplets wrds ...
708
createStatistics :: TextCorpus -> TextCache createStatistics = V.foldl' insertTriple M.empty . triplets where insertTriple acc t = case t of Just (w1, w2, w3) -> M.insertWith (M.unionWith (+)) (w1, w2) (M.singleton w3 1) acc Nothing -> acc triplets wrds ...
708
createStatistics = V.foldl' insertTriple M.empty . triplets where insertTriple acc t = case t of Just (w1, w2, w3) -> M.insertWith (M.unionWith (+)) (w1, w2) (M.singleton w3 1) acc Nothing -> acc triplets wrds = if size < 3 then V.emp...
664
false
true
1
12
286
262
138
124
null
null
fgrsnau/spell
src/Spell.hs
mit
-- | Determines the replacement for the given word and suggestion list. The -- first argument specifies if batch mode is enabled. determine :: Bool -> TS.Text -> [TS.Text] -> IO TS.Text determine True w ss = return . fromMaybe w $ listToMaybe ss
246
determine :: Bool -> TS.Text -> [TS.Text] -> IO TS.Text determine True w ss = return . fromMaybe w $ listToMaybe ss
116
determine True w ss = return . fromMaybe w $ listToMaybe ss
60
true
true
0
9
44
58
29
29
null
null
MichaelBurge/ToxicSludgeDB
Tests/Database/Toxic/TSql/Protocol.hs
mit
test_parameter_status :: Assertion test_parameter_status = let message = MParameterStatus ParameterStatus { parameterStatusName = "application_name", parameterStatusValue = "psql" } -- From strace'ing psql expectedSerialized = "\x53\x00\x00\x00\x1a\x61\x70\x70\x6c\x69\x63\x61\x74\x...
427
test_parameter_status :: Assertion test_parameter_status = let message = MParameterStatus ParameterStatus { parameterStatusName = "application_name", parameterStatusValue = "psql" } -- From strace'ing psql expectedSerialized = "\x53\x00\x00\x00\x1a\x61\x70\x70\x6c\x69\x63\x61\x74\x...
427
test_parameter_status = let message = MParameterStatus ParameterStatus { parameterStatusName = "application_name", parameterStatusValue = "psql" } -- From strace'ing psql expectedSerialized = "\x53\x00\x00\x00\x1a\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x5f\x6e\x61\x6d\x65\x00\...
392
false
true
0
11
68
50
27
23
null
null
rueshyna/gogol
gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Product.hs
mpl-2.0
-- | Whether the enum item is active. Jobs may contain inactive enum values; -- however, setting an enum to an inactive value when creating or updating -- a job will result in a 500 error. eidActive :: Lens' EnumItemDef (Maybe Bool) eidActive = lens _eidActive (\ s a -> s{_eidActive = a})
291
eidActive :: Lens' EnumItemDef (Maybe Bool) eidActive = lens _eidActive (\ s a -> s{_eidActive = a})
102
eidActive = lens _eidActive (\ s a -> s{_eidActive = a})
58
true
true
0
9
54
50
27
23
null
null
ezyang/ghc
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
mkCmmIfThenElse' :: CmmExpr -> CmmAGraph -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph mkCmmIfThenElse' e tbranch fbranch likely = do tscp <- getTickScope endif <- newBlockId tid <- newBlockId fid <- newBlockId let (test, then_, else_, likely') = case likely of Just False | Ju...
812
mkCmmIfThenElse' :: CmmExpr -> CmmAGraph -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph mkCmmIfThenElse' e tbranch fbranch likely = do tscp <- getTickScope endif <- newBlockId tid <- newBlockId fid <- newBlockId let (test, then_, else_, likely') = case likely of Just False | Ju...
812
mkCmmIfThenElse' e tbranch fbranch likely = do tscp <- getTickScope endif <- newBlockId tid <- newBlockId fid <- newBlockId let (test, then_, else_, likely') = case likely of Just False | Just e' <- maybeInvertCmmExpr e -- currently NCG doesn't know about likely -- annotations....
708
false
true
0
17
247
216
109
107
null
null
karun012/doctest-discover
src/Main.hs
unlicense
main :: IO () main = do (_ : _ : dst : args) <- getArgs maybeConfiguration <- readConfig (listToMaybe args) testDriverFileContents <- buildDriverFileContents maybeConfiguration writeFile dst testDriverFileContents -- | Obtain configuration, given a configuration file. -- -- >>> readConfig (Just "test/t...
412
main :: IO () main = do (_ : _ : dst : args) <- getArgs maybeConfiguration <- readConfig (listToMaybe args) testDriverFileContents <- buildDriverFileContents maybeConfiguration writeFile dst testDriverFileContents -- | Obtain configuration, given a configuration file. -- -- >>> readConfig (Just "test/t...
412
main = do (_ : _ : dst : args) <- getArgs maybeConfiguration <- readConfig (listToMaybe args) testDriverFileContents <- buildDriverFileContents maybeConfiguration writeFile dst testDriverFileContents -- | Obtain configuration, given a configuration file. -- -- >>> readConfig (Just "test/test-config.jso...
398
false
true
0
11
70
76
37
39
null
null
bgamari/pandoc
src/Text/Pandoc/Parsing.hs
gpl-2.0
defaultParserState :: ParserState defaultParserState = ParserState { stateOptions = def, stateParserContext = NullState, stateQuoteContext = NoQuote, stateAllowLinks = True, stateMaxNestingLevel = 6, stateLas...
1,274
defaultParserState :: ParserState defaultParserState = ParserState { stateOptions = def, stateParserContext = NullState, stateQuoteContext = NoQuote, stateAllowLinks = True, stateMaxNestingLevel = 6, stateLas...
1,274
defaultParserState = ParserState { stateOptions = def, stateParserContext = NullState, stateQuoteContext = NoQuote, stateAllowLinks = True, stateMaxNestingLevel = 6, stateLastStrPos = Nothing, ...
1,240
false
true
0
8
655
198
121
77
null
null
dylex/blaze-markup
src/Text/Blaze/Internal.hs
bsd-3-clause
contents (CustomParent _ c) = contents c
48
contents (CustomParent _ c) = contents c
48
contents (CustomParent _ c) = contents c
48
false
false
0
7
14
20
9
11
null
null
databrary/databrary
src/Model/Authorize.hs
agpl-3.0
-- | Get authorizations where the given party is the child. When the permission argument has a value, -- then only provide active, approved authorizations, filtering out authorizations lower than the -- provided level. lookupAuthorizedParents :: (MonadDB c m, MonadHasIdentity c m) => Party -> Maybe Permission -> m [Aut...
986
lookupAuthorizedParents :: (MonadDB c m, MonadHasIdentity c m) => Party -> Maybe Permission -> m [Authorize] lookupAuthorizedParents child perm = do -- TODO: specialize the argument to be AuthorizeFilter for this and Children function below ident <- peek dbQuery $ maybe $(selectQuery (selectAuthorizeParent 'c...
767
lookupAuthorizedParents child perm = do -- TODO: specialize the argument to be AuthorizeFilter for this and Children function below ident <- peek dbQuery $ maybe $(selectQuery (selectAuthorizeParent 'child 'ident) "$") (\p -> $(selectQuery (selectAuthorizeParent 'child 'ident) "$WHERE (expires IS NULL OR ...
658
true
true
0
15
163
126
67
59
null
null
bergey/plots
examples/Dataset.hs
bsd-3-clause
datadoubleB = [111.0, 140.0, 150.0, 155.0, 167.0, 191.0, 200.0, 211.0, 233.0, 250.0, 270.0]
92
datadoubleB = [111.0, 140.0, 150.0, 155.0, 167.0, 191.0, 200.0, 211.0, 233.0, 250.0, 270.0]
92
datadoubleB = [111.0, 140.0, 150.0, 155.0, 167.0, 191.0, 200.0, 211.0, 233.0, 250.0, 270.0]
92
false
false
0
5
13
39
25
14
null
null
fishbee/pfds-haskell
chapter3/Ex3_3.hs
gpl-3.0
sampleList = ['a', 'b', 'c', 'd', 'g', 'f', 'h']
48
sampleList = ['a', 'b', 'c', 'd', 'g', 'f', 'h']
48
sampleList = ['a', 'b', 'c', 'd', 'g', 'f', 'h']
48
false
false
0
5
8
27
17
10
null
null
elieux/ghc
compiler/deSugar/DsUtils.hs
bsd-3-clause
combineMatchResults :: MatchResult -> MatchResult -> MatchResult combineMatchResults (MatchResult CanFail body_fn1) (MatchResult can_it_fail2 body_fn2) = MatchResult can_it_fail2 body_fn where body_fn fail = do body2 <- body_fn2 fail (fail_bind, duplicatable_expr) ...
451
combineMatchResults :: MatchResult -> MatchResult -> MatchResult combineMatchResults (MatchResult CanFail body_fn1) (MatchResult can_it_fail2 body_fn2) = MatchResult can_it_fail2 body_fn where body_fn fail = do body2 <- body_fn2 fail (fail_bind, duplicatable_expr) ...
451
combineMatchResults (MatchResult CanFail body_fn1) (MatchResult can_it_fail2 body_fn2) = MatchResult can_it_fail2 body_fn where body_fn fail = do body2 <- body_fn2 fail (fail_bind, duplicatable_expr) <- mkFailurePair body2 body1 <- body_fn1 du...
386
false
true
1
10
138
116
50
66
null
null
alexander-at-github/eta
eta/GhciTags.hs
bsd-3-clause
createETagsFileCmd file = ghciCreateTagsFile ETags file
56
createETagsFileCmd file = ghciCreateTagsFile ETags file
56
createETagsFileCmd file = ghciCreateTagsFile ETags file
56
false
false
1
5
6
17
6
11
null
null
DanielSchiavini/ampersand
src/Database/Design/Ampersand/Output/FSpec2Pandoc.hs
gpl-3.0
--import Debug.Trace --DESCR -> --The functional specification starts with an introduction --The second chapter defines the functionality of the system for stakeholders. --Because we assume these stakeholders to speak the language of the primary process without any technical knowledge, --the second chapter contains nat...
5,496
fSpec2Pandoc :: FSpec -> (Pandoc, [Picture]) fSpec2Pandoc fSpec = ( myDoc , concat picturesByChapter ) where myDoc = ( (setTitle (case metaValues "title" fSpec of [] -> text (case (fsLang fSpec, diagnosisOnly (getOpts fSpec)) of (Dutch , False) ->...
2,685
fSpec2Pandoc fSpec = ( myDoc , concat picturesByChapter ) where myDoc = ( (setTitle (case metaValues "title" fSpec of [] -> text (case (fsLang fSpec, diagnosisOnly (getOpts fSpec)) of (Dutch , False) -> "Functionele Specificatie van " ...
2,640
true
true
0
21
1,280
660
362
298
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Total values for the requested metrics over all the results, not just -- the results returned in this response. The order of the metric totals is -- same as the metric order specified in the request. mdTotalsForAllResults :: Lens' McfData (Maybe McfDataTotalsForAllResults) mdTotalsForAllResults = lens _mdTotalsF...
379
mdTotalsForAllResults :: Lens' McfData (Maybe McfDataTotalsForAllResults) mdTotalsForAllResults = lens _mdTotalsForAllResults (\ s a -> s{_mdTotalsForAllResults = a})
174
mdTotalsForAllResults = lens _mdTotalsForAllResults (\ s a -> s{_mdTotalsForAllResults = a})
100
true
true
0
9
62
50
27
23
null
null
edom/sound
src/Sound/InfList.hs
bsd-3-clause
{- | @ lcfoldr n r a x c ~ c (foldr r a (take n x)) (drop n x) @ -} lcfoldr :: Int -- ^ length of prefix to be folded -> (e -> a -> a) -- ^ reducing function -> a -- ^ initial accumulator value -> L e -- ^ stream whose prefix is to be folded -> (a -> L e -...
528
lcfoldr :: Int -- ^ length of prefix to be folded -> (e -> a -> a) -- ^ reducing function -> a -- ^ initial accumulator value -> L e -- ^ stream whose prefix is to be folded -> (a -> L e -> r) -- ^ continuation -> r lcfoldr n_ r a_ x_ c = loop n_ ...
460
lcfoldr n_ r a_ x_ c = loop n_ a_ x_ where loop n a x@(MkL h t) = if n <= 0 then c a x else loop (n - 1) (r h a) t
175
true
true
1
14
239
162
78
84
null
null
joelburget/sdl2-ttf
Graphics/UI/SDL/TTF/Attributes.hs
bsd-3-clause
textSize :: Font -> String -> IO (Int,Int) textSize font string = unwrapMaybe "TTF_SizeText" (tryTextSize font string)
118
textSize :: Font -> String -> IO (Int,Int) textSize font string = unwrapMaybe "TTF_SizeText" (tryTextSize font string)
118
textSize font string = unwrapMaybe "TTF_SizeText" (tryTextSize font string)
75
false
true
0
8
16
50
24
26
null
null
jberryman/wai
warp/attic/bigtable-stream.hs
mit
bigtable :: [Builder] bigtable = fromByteString "<table>" : foldr (:) [fromByteString "</table>"] (replicate 2 row) where row = fromByteString "<tr>" `mappend` foldr go (fromByteString "</tr>") [1..2] go i rest = fromByteString "<td>" `mappend` fromShow i `map...
379
bigtable :: [Builder] bigtable = fromByteString "<table>" : foldr (:) [fromByteString "</table>"] (replicate 2 row) where row = fromByteString "<tr>" `mappend` foldr go (fromByteString "</tr>") [1..2] go i rest = fromByteString "<td>" `mappend` fromShow i `map...
379
bigtable = fromByteString "<table>" : foldr (:) [fromByteString "</table>"] (replicate 2 row) where row = fromByteString "<tr>" `mappend` foldr go (fromByteString "</tr>") [1..2] go i rest = fromByteString "<td>" `mappend` fromShow i `mappend` fromByteString "...
357
false
true
2
8
115
118
61
57
null
null
joelburget/haste-compiler
libraries/base-ghc-7.6/GHC/Word.hs
bsd-3-clause
-- give the 64-bit shift operations the same treatment as the 32-bit -- ones (see GHC.Base), namely we wrap them in tests to catch the -- cases when we're shifting more than 64 bits to avoid unspecified -- behaviour in the C shift operations. shiftL64#, shiftRL64# :: Word64# -> Int# -> Word64# a `shiftL64#` b | b >=...
403
shiftL64#, shiftRL64# :: Word64# -> Int# -> Word64# a `shiftL64#` b | b >=# 64# = wordToWord64# 0## | otherwise = a `uncheckedShiftL64#` b
158
a `shiftL64#` b | b >=# 64# = wordToWord64# 0## | otherwise = a `uncheckedShiftL64#` b
106
true
true
2
8
89
69
34
35
null
null
FranklinChen/wonderland-katas-haskell
test/Kata/WonderlandNumberSpec.hs
bsd-3-clause
hasAllTheSameDigitsAs :: Int -> Int -> Expectation hasAllTheSameDigitsAs n m = toDigitSet n `shouldBe` toDigitSet m
115
hasAllTheSameDigitsAs :: Int -> Int -> Expectation hasAllTheSameDigitsAs n m = toDigitSet n `shouldBe` toDigitSet m
115
hasAllTheSameDigitsAs n m = toDigitSet n `shouldBe` toDigitSet m
64
false
true
0
6
15
36
18
18
null
null
tpoulsen/generate-component
src/Templates/Containers.hs
bsd-3-clause
containerTemplate :: Template containerTemplate = Template "COMPONENTContainer.js" [q|// @flow /* NOTE: This file was auto-generated for a component named "COMPONENT"; it is intended to be modified as needed to be useful. */ import {connect} from 'react-redux'; import COMPONENT from './COMPONENT'; const map...
608
containerTemplate :: Template containerTemplate = Template "COMPONENTContainer.js" [q|// @flow /* NOTE: This file was auto-generated for a component named "COMPONENT"; it is intended to be modified as needed to be useful. */ import {connect} from 'react-redux'; import COMPONENT from './COMPONENT'; const map...
608
containerTemplate = Template "COMPONENTContainer.js" [q|// @flow /* NOTE: This file was auto-generated for a component named "COMPONENT"; it is intended to be modified as needed to be useful. */ import {connect} from 'react-redux'; import COMPONENT from './COMPONENT'; const mapStateToProps = (state: Object)...
578
false
true
0
5
118
20
12
8
null
null
anobi/hopsu
src/Hopsu/Bot.hs
mit
-- handle and obey the master's orders eval :: String -> Net () eval x | "!id " `isPrefixOf` x = privmsg $ drop 4 x
115
eval :: String -> Net () eval x | "!id " `isPrefixOf` x = privmsg $ drop 4 x
76
eval x | "!id " `isPrefixOf` x = privmsg $ drop 4 x
51
true
true
0
8
25
45
22
23
null
null
hvr/containers
Data/IntSet/Base.hs
bsd-3-clause
union t@(Bin _ _ _ _) Nil = t
29
union t@(Bin _ _ _ _) Nil = t
29
union t@(Bin _ _ _ _) Nil = t
29
false
false
0
8
8
26
13
13
null
null
qux-lang/language-qux
src/Language/Qux/Lexer.hs
bsd-3-clause
quxDef :: Monad m => Token.GenLanguageDef String u m quxDef = Token.LanguageDef commentStart commentEnd commentLine nestedComments identStart identLetter opStart opLetter reservedNames reservedOpNames caseSensitive where commentStart = "/*" commentEnd = "*/" comme...
675
quxDef :: Monad m => Token.GenLanguageDef String u m quxDef = Token.LanguageDef commentStart commentEnd commentLine nestedComments identStart identLetter opStart opLetter reservedNames reservedOpNames caseSensitive where commentStart = "/*" commentEnd = "*/" comme...
675
quxDef = Token.LanguageDef commentStart commentEnd commentLine nestedComments identStart identLetter opStart opLetter reservedNames reservedOpNames caseSensitive where commentStart = "/*" commentEnd = "*/" commentLine = "#" nestedComments = False ...
622
false
true
0
8
250
149
74
75
null
null
brenov/set
interpreter/Expressions.hs
mit
eval (Int x p) (GreaterOrEqual _) (Nat y _) = Bool (integerToFloat(x) >= integerToFloat(y)) p
95
eval (Int x p) (GreaterOrEqual _) (Nat y _) = Bool (integerToFloat(x) >= integerToFloat(y)) p
95
eval (Int x p) (GreaterOrEqual _) (Nat y _) = Bool (integerToFloat(x) >= integerToFloat(y)) p
95
false
false
0
9
16
63
30
33
null
null
vitiaaap29/fcm1
src/Parser.hs
bsd-3-clause
filterObjectLine options stringsLines | (Map.member "-skip-first" options) && (Map.member "-skip-last" options) = init $ tail stringsLines | (Map.member "-skip-first" options) = tail stringsLines | (Map.member "-skip-last" options) = init stringsLines | otherwise = stringsLines
287
filterObjectLine options stringsLines | (Map.member "-skip-first" options) && (Map.member "-skip-last" options) = init $ tail stringsLines | (Map.member "-skip-first" options) = tail stringsLines | (Map.member "-skip-last" options) = init stringsLines | otherwise = stringsLines
287
filterObjectLine options stringsLines | (Map.member "-skip-first" options) && (Map.member "-skip-last" options) = init $ tail stringsLines | (Map.member "-skip-first" options) = tail stringsLines | (Map.member "-skip-last" options) = init stringsLines | otherwise = stringsLines
287
false
false
0
11
42
109
49
60
null
null
kawu/ltag
src/NLP/LTAG/Early3.hs
bsd-2-clause
treeRules _ G.FNode{..} = return $ Term labelF
46
treeRules _ G.FNode{..} = return $ Term labelF
46
treeRules _ G.FNode{..} = return $ Term labelF
46
false
false
0
7
7
26
12
14
null
null
ScrambledEggsOnToast/kdt
app-src/Tests/StaticTest.hs
mit
nearestLinear :: Real a => KDM.PointAsListFn a p -> [(p, v)] -> p -> (p, v) nearestLinear pointAsList xs query = minimumBy (comparing (KDM.defaultSqrDist pointAsList query . fst)) xs
184
nearestLinear :: Real a => KDM.PointAsListFn a p -> [(p, v)] -> p -> (p, v) nearestLinear pointAsList xs query = minimumBy (comparing (KDM.defaultSqrDist pointAsList query . fst)) xs
184
nearestLinear pointAsList xs query = minimumBy (comparing (KDM.defaultSqrDist pointAsList query . fst)) xs
108
false
true
0
11
30
84
43
41
null
null
lally/libmet
src/Ppt/Agent/ElfProtocol.hs
bsd-3-clause
strstr :: String -> String -> Bool strstr y x = isJust $ (y `L.isPrefixOf`) `L.findIndex` (L.tails x)
102
strstr :: String -> String -> Bool strstr y x = isJust $ (y `L.isPrefixOf`) `L.findIndex` (L.tails x)
102
strstr y x = isJust $ (y `L.isPrefixOf`) `L.findIndex` (L.tails x)
67
false
true
2
9
18
59
30
29
null
null
jystic/diffarray
tst/TestMain.hs
bsd-3-clause
prop_bounds = bounds `eq` bounds
32
prop_bounds = bounds `eq` bounds
32
prop_bounds = bounds `eq` bounds
32
false
false
1
5
4
18
8
10
null
null
lamefun/haddock
haddock-api/src/Haddock/Backends/LaTeX.hs
bsd-2-clause
ppLPatSig :: SrcSpan -> DocForDecl DocName -> Located DocName -> (HsExplicitFlag, LHsTyVarBndrs DocName) -> LHsContext DocName -> LHsContext DocName -> LHsType DocName -> Bool -> LaTeX ppLPatSig _loc (doc, _argDocs) (L _ name) (expl, qtvs) lprov lreq (L _ ty) unicode = declWith...
931
ppLPatSig :: SrcSpan -> DocForDecl DocName -> Located DocName -> (HsExplicitFlag, LHsTyVarBndrs DocName) -> LHsContext DocName -> LHsContext DocName -> LHsType DocName -> Bool -> LaTeX ppLPatSig _loc (doc, _argDocs) (L _ name) (expl, qtvs) lprov lreq (L _ ty) unicode = declWith...
931
ppLPatSig _loc (doc, _argDocs) (L _ name) (expl, qtvs) lprov lreq (L _ ty) unicode = declWithDoc pref1 (documentationToLaTeX doc) where pref1 = hsep [ keyword "pattern" , ppDocBinder name , dcolon unicode , ppLTyVarBndrs expl qtvs unicode , ctx...
706
false
true
2
12
317
292
147
145
null
null
TomMD/cryptol
src/Cryptol/Eval/Value.hs
bsd-3-clause
toFinSeq :: TValue -> [GenValue b w] -> GenValue b w toFinSeq elty = VSeq (isTBit elty)
87
toFinSeq :: TValue -> [GenValue b w] -> GenValue b w toFinSeq elty = VSeq (isTBit elty)
87
toFinSeq elty = VSeq (isTBit elty)
34
false
true
0
8
16
44
21
23
null
null
UltimatePea/UniversalLanguageInterface
test/test_files/HaskellCallee.hs
bsd-2-clause
main = exportAndStart' [("testFunc", FC.testFunc)]
50
main = exportAndStart' [("testFunc", FC.testFunc)]
50
main = exportAndStart' [("testFunc", FC.testFunc)]
50
false
false
1
8
4
23
11
12
null
null
vikraman/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
voidArgId :: Id -- Local lambda-bound :: Void# voidArgId = mkSysLocal (fsLit "void") voidArgIdKey voidPrimTy
114
voidArgId :: Id voidArgId = mkSysLocal (fsLit "void") voidArgIdKey voidPrimTy
77
voidArgId = mkSysLocal (fsLit "void") voidArgIdKey voidPrimTy
61
true
true
0
7
20
31
14
17
null
null
lukexi/rumpus
pristine/Synthesis/Verylogue2.hs
bsd-3-clause
createWaveformChildren = V.generateM numScopeSamples $ \i -> do let x = fromIntegral i * 0.01 + 1 spawnChild $ do myShape ==> Cube mySize ==> 0.01 myColor ==> V4 0.8 0.9 0.4 1 myPose ==> position (V3...
327
createWaveformChildren = V.generateM numScopeSamples $ \i -> do let x = fromIntegral i * 0.01 + 1 spawnChild $ do myShape ==> Cube mySize ==> 0.01 myColor ==> V4 0.8 0.9 0.4 1 myPose ==> position (V3...
327
createWaveformChildren = V.generateM numScopeSamples $ \i -> do let x = fromIntegral i * 0.01 + 1 spawnChild $ do myShape ==> Cube mySize ==> 0.01 myColor ==> V4 0.8 0.9 0.4 1 myPose ==> position (V3...
327
false
false
0
15
160
97
44
53
null
null
owestphal/LootLanguage
src/Category.hs
bsd-3-clause
readItemClass "Body Armour" = BodyArmour
54
readItemClass "Body Armour" = BodyArmour
54
readItemClass "Body Armour" = BodyArmour
54
false
false
0
5
18
9
4
5
null
null
WraithM/network-bitcoin
src/Network/Bitcoin/Mining.hs
bsd-3-clause
-- | Returns whether or not bitcoind is generating bitcoins. getGenerate :: Client -- ^ bitcoind RPC client -> IO Bool getGenerate client = callApi client "getgenerate" []
183
getGenerate :: Client -- ^ bitcoind RPC client -> IO Bool getGenerate client = callApi client "getgenerate" []
122
getGenerate client = callApi client "getgenerate" []
52
true
true
0
7
39
38
17
21
null
null
ezyang/ghc
compiler/parser/ApiAnnotation.hs
bsd-3-clause
getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment] getAnnotationComments (_,anns) span = case Map.lookup span anns of Just cs -> cs Nothing -> [] -- |Retrieve the comments allocated to the current 'SrcSpan', and -- remove them from the annotations
282
getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment] getAnnotationComments (_,anns) span = case Map.lookup span anns of Just cs -> cs Nothing -> [] -- |Retrieve the comments allocated to the current 'SrcSpan', and -- remove them from the annotations
282
getAnnotationComments (_,anns) span = case Map.lookup span anns of Just cs -> cs Nothing -> [] -- |Retrieve the comments allocated to the current 'SrcSpan', and -- remove them from the annotations
207
false
true
0
8
50
66
34
32
null
null
meiersi/scyther-proof
src/Scyther/Message.hs
gpl-3.0
msgTIDs (MShrK m1 m2) = msgTIDs m1 `mappend` msgTIDs m2
55
msgTIDs (MShrK m1 m2) = msgTIDs m1 `mappend` msgTIDs m2
55
msgTIDs (MShrK m1 m2) = msgTIDs m1 `mappend` msgTIDs m2
55
false
false
0
7
9
29
14
15
null
null
plow-technologies/Vinyl
benchmarks/StorableBench.hs
mit
flatNSum :: (Num a, Storable a) => V.Vector (TotallyFlat a) -> a flatNSum = V.sum . V.map (\v -> nx v + ny v + nz v)
116
flatNSum :: (Num a, Storable a) => V.Vector (TotallyFlat a) -> a flatNSum = V.sum . V.map (\v -> nx v + ny v + nz v)
116
flatNSum = V.sum . V.map (\v -> nx v + ny v + nz v)
51
false
true
0
11
26
83
39
44
null
null
sdiehl/hakyll-bootstrap
Main.hs
mit
main :: IO () main = hakyllWith cfg $ do static pages posts archive index templates
95
main :: IO () main = hakyllWith cfg $ do static pages posts archive index templates
95
main = hakyllWith cfg $ do static pages posts archive index templates
81
false
true
0
8
27
47
18
29
null
null
adrienhaxaire/adrienhaxaire.org
update.hs
bsd-3-clause
expireDate :: Entry -> String expireDate e = let cal = entryDate e cty = ctYear cal d = cal {ctYear = cty + 1} in rfc882 $ e {entryDate = d}
193
expireDate :: Entry -> String expireDate e = let cal = entryDate e cty = ctYear cal d = cal {ctYear = cty + 1} in rfc882 $ e {entryDate = d}
193
expireDate e = let cal = entryDate e cty = ctYear cal d = cal {ctYear = cty + 1} in rfc882 $ e {entryDate = d}
163
false
true
2
11
84
79
38
41
null
null
rawlep/EQS
sourceCode/Parallel.hs
mit
--threadFinished test = forkProcess Nothing (\_ -> return ()) printFact (Just (print "fininshed")) where printFact = do let k = sort ([1 .. 500] ++ [700 .. 100]) print (show $ (k !! 200)) --- forking processes with messages
261
test = forkProcess Nothing (\_ -> return ()) printFact (Just (print "fininshed")) where printFact = do let k = sort ([1 .. 500] ++ [700 .. 100]) print (show $ (k !! 200)) --- forking processes with messages
243
test = forkProcess Nothing (\_ -> return ()) printFact (Just (print "fininshed")) where printFact = do let k = sort ([1 .. 500] ++ [700 .. 100]) print (show $ (k !! 200)) --- forking processes with messages
243
true
false
0
13
76
101
53
48
null
null
brendanhay/gogol
gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs
mpl-2.0
-- | Specify which project (field value is actually project id) to operate. -- Only used when provided credential. iTargetProjectId :: Lens' IdentitytoolkitRelyingPartyDownloadAccountRequest (Maybe Text) iTargetProjectId = lens _iTargetProjectId (\ s a -> s{_iTargetProjectId = a})
289
iTargetProjectId :: Lens' IdentitytoolkitRelyingPartyDownloadAccountRequest (Maybe Text) iTargetProjectId = lens _iTargetProjectId (\ s a -> s{_iTargetProjectId = a})
174
iTargetProjectId = lens _iTargetProjectId (\ s a -> s{_iTargetProjectId = a})
85
true
true
0
9
43
49
26
23
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'VF.singleton' vf_singleton = VF.singleton
46
vf_singleton = VF.singleton
27
vf_singleton = VF.singleton
27
true
false
0
5
4
9
5
4
null
null
netogallo/polyvariant
src/Analysis/Types/LambdaCalc.hs
bsd-3-clause
shadows v = runIdentity . (foldALambdaCalcM alg) where varF i _ = return $ M.fromList [(i,False)] falseF i = return $ M.fromList [(i,False)] trueF i = return $ M.fromList [(i,False)] absF i v' s = let s' = if C.name v' == v then M.map (const True) s else s in ...
836
shadows v = runIdentity . (foldALambdaCalcM alg) where varF i _ = return $ M.fromList [(i,False)] falseF i = return $ M.fromList [(i,False)] trueF i = return $ M.fromList [(i,False)] absF i v' s = let s' = if C.name v' == v then M.map (const True) s else s in ...
836
shadows v = runIdentity . (foldALambdaCalcM alg) where varF i _ = return $ M.fromList [(i,False)] falseF i = return $ M.fromList [(i,False)] trueF i = return $ M.fromList [(i,False)] absF i v' s = let s' = if C.name v' == v then M.map (const True) s else s in ...
836
false
false
7
18
270
323
171
152
null
null
taktoa/HsCalculator
src/Parse.hs
gpl-3.0
sgnNumParse :: Parser String sgnNumParse = plus <|> minus <|> number where plus = char '+' *> number minus = (:) <$> char '-' <*> number number = many1 digit
178
sgnNumParse :: Parser String sgnNumParse = plus <|> minus <|> number where plus = char '+' *> number minus = (:) <$> char '-' <*> number number = many1 digit
178
sgnNumParse = plus <|> minus <|> number where plus = char '+' *> number minus = (:) <$> char '-' <*> number number = many1 digit
149
false
true
2
8
50
66
32
34
null
null
d0kt0r0/InnerEar
src/InnerEar/Exercises/HarmonicDistortion.hs
gpl-3.0
answers = [Answer False,Answer True]
36
answers = [Answer False,Answer True]
36
answers = [Answer False,Answer True]
36
false
false
0
6
4
18
9
9
null
null
jml/haskell-spake2
tests/Groups.hs
apache-2.0
makeScalar :: Integer -> Gen Integer makeScalar k = do i <- arbitrary pure $ i `mod` k
90
makeScalar :: Integer -> Gen Integer makeScalar k = do i <- arbitrary pure $ i `mod` k
90
makeScalar k = do i <- arbitrary pure $ i `mod` k
53
false
true
0
8
21
41
20
21
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/GHC.hs
gpl-3.0
substTopDir :: FilePath -> InstalledPackageInfo -> InstalledPackageInfo substTopDir topDir ipo = ipo { InstalledPackageInfo.importDirs = map f (InstalledPackageInfo.importDirs ipo), InstalledPackageInfo.libraryDirs = map f (InstalledPackageInfo.libraryDirs ipo), InstalledPack...
928
substTopDir :: FilePath -> InstalledPackageInfo -> InstalledPackageInfo substTopDir topDir ipo = ipo { InstalledPackageInfo.importDirs = map f (InstalledPackageInfo.importDirs ipo), InstalledPackageInfo.libraryDirs = map f (InstalledPackageInfo.libraryDirs ipo), InstalledPack...
928
substTopDir topDir ipo = ipo { InstalledPackageInfo.importDirs = map f (InstalledPackageInfo.importDirs ipo), InstalledPackageInfo.libraryDirs = map f (InstalledPackageInfo.libraryDirs ipo), InstalledPackageInfo.includeDirs = map f (InstalledPackageInfo.includeDirs...
856
false
true
0
15
200
209
110
99
null
null
keera-studios/hsQt
demos/dem_01.hs
bsd-2-clause
adjustScrollBar :: QScrollBar () -> Double -> IO () adjustScrollBar b f = do v <- value b () p <- pageStep b () let vf = f * (fromIntegral v) fp = (f - 1) * ((fromIntegral p) / 2) setValue b $ (round (vf + fp)::Int)
241
adjustScrollBar :: QScrollBar () -> Double -> IO () adjustScrollBar b f = do v <- value b () p <- pageStep b () let vf = f * (fromIntegral v) fp = (f - 1) * ((fromIntegral p) / 2) setValue b $ (round (vf + fp)::Int)
241
adjustScrollBar b f = do v <- value b () p <- pageStep b () let vf = f * (fromIntegral v) fp = (f - 1) * ((fromIntegral p) / 2) setValue b $ (round (vf + fp)::Int)
189
false
true
0
14
73
136
66
70
null
null
amccausl/Swish
Swish/HaskellRDF/N3FormatterTest.hs
lgpl-2.1
g82 = NSGraph { namespaces = nslist , formulae = emptyFormulaMap , statements = [t803,t804,t805,t806] }
141
g82 = NSGraph { namespaces = nslist , formulae = emptyFormulaMap , statements = [t803,t804,t805,t806] }
141
g82 = NSGraph { namespaces = nslist , formulae = emptyFormulaMap , statements = [t803,t804,t805,t806] }
141
false
false
1
7
53
41
24
17
null
null
tolysz/zlib
test/Test.hs
bsd-2-clause
threeChunkSplits :: BL.ByteString -> [BL.ByteString] threeChunkSplits bs = [ BL.fromChunks [a,b,c] | (a,x) <- zip (BS.inits sbs) (BS.tails sbs) , (b,c) <- zip (BS.inits x) (BS.tails x) ] where sbs = toStrict bs -------------- -- HUnit Utils
259
threeChunkSplits :: BL.ByteString -> [BL.ByteString] threeChunkSplits bs = [ BL.fromChunks [a,b,c] | (a,x) <- zip (BS.inits sbs) (BS.tails sbs) , (b,c) <- zip (BS.inits x) (BS.tails x) ] where sbs = toStrict bs -------------- -- HUnit Utils
259
threeChunkSplits bs = [ BL.fromChunks [a,b,c] | (a,x) <- zip (BS.inits sbs) (BS.tails sbs) , (b,c) <- zip (BS.inits x) (BS.tails x) ] where sbs = toStrict bs -------------- -- HUnit Utils
206
false
true
0
11
55
125
66
59
null
null
kolmodin/cabal
cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs
bsd-3-clause
getVersion :: TestPackage -> PV getVersion = PV . either exInstVersion exAvVersion
82
getVersion :: TestPackage -> PV getVersion = PV . either exInstVersion exAvVersion
82
getVersion = PV . either exInstVersion exAvVersion
50
false
true
0
6
11
24
12
12
null
null
jbaum98/graphics
src/Data/Color.hs
bsd-3-clause
getGreen (Triple _ g _) = g
27
getGreen (Triple _ g _) = g
27
getGreen (Triple _ g _) = g
27
false
false
0
7
6
19
9
10
null
null
Alexander-Ignatyev/astro
test/Data/Astro/CoordinateTest.hs
bsd-3-clause
ro :: GeographicCoordinates ro = GeoC (fromDMS 51 28 40) (-(fromDMS 0 0 5))
75
ro :: GeographicCoordinates ro = GeoC (fromDMS 51 28 40) (-(fromDMS 0 0 5))
75
ro = GeoC (fromDMS 51 28 40) (-(fromDMS 0 0 5))
47
false
true
0
9
13
49
22
27
null
null
Lainepress/easy
Text/RE/TDFA/ByteString/Lazy.hs
bsd-3-clause
-- | the regex-base polymorphic match operator (=~) :: ( Typeable a , RegexContext TDFA.Regex LBS.ByteString a , RegexMaker TDFA.Regex TDFA.CompOption TDFA.ExecOption String ) => LBS.ByteString -> RE -> a (=~) bs rex = addCaptureNames (reCaptureNames rex) $ match (reRegex rex) b...
321
(=~) :: ( Typeable a , RegexContext TDFA.Regex LBS.ByteString a , RegexMaker TDFA.Regex TDFA.CompOption TDFA.ExecOption String ) => LBS.ByteString -> RE -> a (=~) bs rex = addCaptureNames (reCaptureNames rex) $ match (reRegex rex) bs
274
(=~) bs rex = addCaptureNames (reCaptureNames rex) $ match (reRegex rex) bs
75
true
true
0
8
82
96
50
46
null
null
solatis/dissent
src/Dissent/Quorum.hs
mit
-- | Retrieves the Peer object of a Slave's sucessor lookupSuccessorPeer :: TQ.Quorum -> TP.Peer lookupSuccessorPeer quorum = lookupPeer quorum (successorId quorum)
166
lookupSuccessorPeer :: TQ.Quorum -> TP.Peer lookupSuccessorPeer quorum = lookupPeer quorum (successorId quorum)
113
lookupSuccessorPeer quorum = lookupPeer quorum (successorId quorum)
69
true
true
0
7
23
34
17
17
null
null
bredelings/BAli-Phy
haskell/Probability/Distribution/DirichletProcess.hs
gpl-2.0
crp alpha n d = Distribution "crp" (make_densities $ density) (no_quantile "crp") (RandomStructure (crp_effect n d) (triggered_modifiable_list n) (sample_crp alpha n d)) (ListRange $ replicate n subrange) where subrange = integer_between 0 (n+d-1) density = crp_density alpha n ...
321
crp alpha n d = Distribution "crp" (make_densities $ density) (no_quantile "crp") (RandomStructure (crp_effect n d) (triggered_modifiable_list n) (sample_crp alpha n d)) (ListRange $ replicate n subrange) where subrange = integer_between 0 (n+d-1) density = crp_density alpha n ...
321
crp alpha n d = Distribution "crp" (make_densities $ density) (no_quantile "crp") (RandomStructure (crp_effect n d) (triggered_modifiable_list n) (sample_crp alpha n d)) (ListRange $ replicate n subrange) where subrange = integer_between 0 (n+d-1) density = crp_density alpha n ...
321
false
false
3
9
80
132
59
73
null
null
ShellShoccar-jpn/Open-usp-Tukubai
COMMANDS.HS/delf.hs
mit
deleteFields fs [] = []
23
deleteFields fs [] = []
23
deleteFields fs [] = []
23
false
false
0
6
4
15
7
8
null
null
othercriteria/website
generator/Main.hs
mit
aboutCtx :: Context String aboutCtx = constField "page-about" "" <> baseCtx
83
aboutCtx :: Context String aboutCtx = constField "page-about" "" <> baseCtx
83
aboutCtx = constField "page-about" "" <> baseCtx
56
false
true
0
6
18
23
11
12
null
null
nomeata/ghc
compiler/nativeGen/PPC/Regs.hs
bsd-3-clause
argRegs 7 = map regSingle [3..9]
32
argRegs 7 = map regSingle [3..9]
32
argRegs 7 = map regSingle [3..9]
32
false
false
1
6
5
23
9
14
null
null
snapframework/io-streams
src/System/IO/Streams/Combinators.hs
bsd-3-clause
inputFoldM :: (a -> b -> IO a) -- ^ fold function -> a -- ^ initial seed -> InputStream b -- ^ input stream -> IO (InputStream b, IO a) -- ^ returns a new stream as well as an -- IO action to fetch and...
1,088
inputFoldM :: (a -> b -> IO a) -- ^ fold function -> a -- ^ initial seed -> InputStream b -- ^ input stream -> IO (InputStream b, IO a) inputFoldM f initial stream = do ref <- newIORef initial is <- makeInputStream (rd ref) retur...
908
inputFoldM f initial stream = do ref <- newIORef initial is <- makeInputStream (rd ref) return (is, fetch ref) where twiddle _ Nothing = return Nothing twiddle ref mb@(Just x) = do !z <- readIORef ref !z' <- f z x writeIORef ref z' return mb rd ref = read s...
694
true
true
5
11
382
251
119
132
null
null
budgefeeney/amixtureofmusings
Site/Pandoc.hs
gpl-3.0
getBodyWithoutCr :: Compiler (Item String) getBodyWithoutCr = fmap (fmap removeCr) getResourceBody
98
getBodyWithoutCr :: Compiler (Item String) getBodyWithoutCr = fmap (fmap removeCr) getResourceBody
98
getBodyWithoutCr = fmap (fmap removeCr) getResourceBody
55
false
true
0
7
10
31
15
16
null
null
peter-fogg/pardoc
src/Text/Pandoc/Pretty.hs
gpl-2.0
-- | Like 'lblock' but aligned centered. cblock :: Int -> Doc -> Doc cblock w = block (\s -> replicate ((w - realLength s) `div` 2) ' ' ++ s) w
143
cblock :: Int -> Doc -> Doc cblock w = block (\s -> replicate ((w - realLength s) `div` 2) ' ' ++ s) w
102
cblock w = block (\s -> replicate ((w - realLength s) `div` 2) ' ' ++ s) w
74
true
true
0
14
31
64
34
30
null
null
kim/amazonka
amazonka-lambda/gen/Network/AWS/Lambda/AddEventSource.hs
mpl-2.0
-- | The ARN of the IAM role (invocation role) that AWS Lambda can assume to read -- from the stream and invoke the function. aesRole :: Lens' AddEventSource Text aesRole = lens _aesRole (\s a -> s { _aesRole = a })
215
aesRole :: Lens' AddEventSource Text aesRole = lens _aesRole (\s a -> s { _aesRole = a })
89
aesRole = lens _aesRole (\s a -> s { _aesRole = a })
52
true
true
0
9
42
48
24
24
null
null
bigs/7inch
src/Main.hs
mit
botNick = ["clbz"]
18
botNick = ["clbz"]
18
botNick = ["clbz"]
18
false
false
1
5
2
12
5
7
null
null
sebassimoes/haskell-bayesian
src/Bayesian/BayesianNetwork.hs
bsd-3-clause
bnet = buildBN $ do a <- variable "A" ["0", "1"] b <- variable "B" ["0", "1"] cpt a [b] [0.5, 0.3, 0.5, 0.7] p b [0.3, 0.7]
183
bnet = buildBN $ do a <- variable "A" ["0", "1"] b <- variable "B" ["0", "1"] cpt a [b] [0.5, 0.3, 0.5, 0.7] p b [0.3, 0.7]
183
bnet = buildBN $ do a <- variable "A" ["0", "1"] b <- variable "B" ["0", "1"] cpt a [b] [0.5, 0.3, 0.5, 0.7] p b [0.3, 0.7]
183
false
false
0
10
87
85
44
41
null
null
ItsLastDay/academic_university_2016-2018
subjects/Haskell/4/fp.hs
gpl-3.0
f3 = (+ 3)
10
f3 = (+ 3)
10
f3 = (+ 3)
10
false
false
1
6
3
14
6
8
null
null
BlackBrane/microsoft-translator
src/Microsoft/Translator/API/Auth.hs
mit
authClient :: Maybe SubscriptionKey -> ClientM AuthToken authClient = client (Proxy @ AuthAPI)
94
authClient :: Maybe SubscriptionKey -> ClientM AuthToken authClient = client (Proxy @ AuthAPI)
94
authClient = client (Proxy @ AuthAPI)
37
false
true
0
8
12
32
15
17
null
null
nikita-volkov/hasql-th
library/Hasql/TH/Extraction/ChildExprList.hs
mit
selectClause = either simpleSelect selectWithParens
51
selectClause = either simpleSelect selectWithParens
51
selectClause = either simpleSelect selectWithParens
51
false
false
1
5
4
15
5
10
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/Pretty.hs
bsd-3-clause
-- Externally callable version -- mkNest checks for Nest's invariant that it doesn't have an Empty inside it mkNest :: Int# -> Doc -> Doc mkNest k (Nest k1 p) = mkNest (k +# k1) p
186
mkNest :: Int# -> Doc -> Doc mkNest k (Nest k1 p) = mkNest (k +# k1) p
76
mkNest k (Nest k1 p) = mkNest (k +# k1) p
47
true
true
0
7
42
46
24
22
null
null
plow-technologies/vinyl-test
src/VinylTest.hs
bsd-3-clause
otcHighTankLevel5 t = otcTemplate 1 5 2 "Low Tank Warning" 1 1 0 t "0" "" 1 0
77
otcHighTankLevel5 t = otcTemplate 1 5 2 "Low Tank Warning" 1 1 0 t "0" "" 1 0
77
otcHighTankLevel5 t = otcTemplate 1 5 2 "Low Tank Warning" 1 1 0 t "0" "" 1 0
77
false
false
0
5
17
34
16
18
null
null
rueshyna/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | URL for this goal. guddURL :: Lens' GoalURLDestinationDetails (Maybe Text) guddURL = lens _guddURL (\ s a -> s{_guddURL = a})
130
guddURL :: Lens' GoalURLDestinationDetails (Maybe Text) guddURL = lens _guddURL (\ s a -> s{_guddURL = a})
106
guddURL = lens _guddURL (\ s a -> s{_guddURL = a})
50
true
true
0
9
22
46
25
21
null
null
erikd/yesod
yesod-core/Yesod/Core/Handler.hs
mit
defaultCsrfParamName :: Text defaultCsrfParamName = "_token"
60
defaultCsrfParamName :: Text defaultCsrfParamName = "_token"
60
defaultCsrfParamName = "_token"
31
false
true
0
4
5
11
6
5
null
null
antalsz/hs-to-coq
examples/ghc/gen-files/Lexer.hs
mit
pushCurrentContext :: GenSemic -> P () pushCurrentContext gen_semic = P $ \ s@PState{ last_loc=loc, context=ctx } -> POk s{context = Layout (srcSpanStartCol loc) gen_semic : ctx} ()
185
pushCurrentContext :: GenSemic -> P () pushCurrentContext gen_semic = P $ \ s@PState{ last_loc=loc, context=ctx } -> POk s{context = Layout (srcSpanStartCol loc) gen_semic : ctx} ()
185
pushCurrentContext gen_semic = P $ \ s@PState{ last_loc=loc, context=ctx } -> POk s{context = Layout (srcSpanStartCol loc) gen_semic : ctx} ()
146
false
true
0
13
30
80
42
38
null
null
noteed/concepted
Concepted/Graphics.hs
bsd-3-clause
magenta :: RGBA magenta = (1,0,1,1)
35
magenta :: RGBA magenta = (1,0,1,1)
35
magenta = (1,0,1,1)
19
false
true
0
5
5
23
14
9
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/OpParams.hs
bsd-2-clause
pTempOsParams :: Field pTempOsParams = withDoc "Temporary OS parameters (currently only in reinstall, might be\ \ added to install as well)" . renameField "TempOsParams" . optionalField $ simpleField "osparams" [t| JSObject JSValue |]
250
pTempOsParams :: Field pTempOsParams = withDoc "Temporary OS parameters (currently only in reinstall, might be\ \ added to install as well)" . renameField "TempOsParams" . optionalField $ simpleField "osparams" [t| JSObject JSValue |]
250
pTempOsParams = withDoc "Temporary OS parameters (currently only in reinstall, might be\ \ added to install as well)" . renameField "TempOsParams" . optionalField $ simpleField "osparams" [t| JSObject JSValue |]
227
false
true
2
6
48
45
21
24
null
null
AmpersandTarski/ampersand
src/Ampersand/Output/ToJSON/JSONutils.hs
gpl-3.0
ampersandDefault :: AT.Options ampersandDefault = defaultOptions {AT.fieldLabelModifier = alterLabel} where -- The label of a field is modified before it is written in the JSON file. -- this is done because of different restrictions at the Haskell side and at -- the .json side. In our case, we strip all...
791
ampersandDefault :: AT.Options ampersandDefault = defaultOptions {AT.fieldLabelModifier = alterLabel} where -- The label of a field is modified before it is written in the JSON file. -- this is done because of different restrictions at the Haskell side and at -- the .json side. In our case, we strip all...
791
ampersandDefault = defaultOptions {AT.fieldLabelModifier = alterLabel} where -- The label of a field is modified before it is written in the JSON file. -- this is done because of different restrictions at the Haskell side and at -- the .json side. In our case, we strip all characters upto the first occu...
760
false
true
2
10
187
125
64
61
null
null
thoferon/seakale
src/Database/Seakale/FromRow.hs
bsd-3-clause
preturn = ppure
15
preturn = ppure
15
preturn = ppure
15
false
false
1
5
2
10
3
7
null
null
gridaphobe/ghc
compiler/types/Type.hs
bsd-3-clause
tcRepSplitAppTy_maybe (AppTy ty1 ty2) = Just (ty1, ty2)
57
tcRepSplitAppTy_maybe (AppTy ty1 ty2) = Just (ty1, ty2)
57
tcRepSplitAppTy_maybe (AppTy ty1 ty2) = Just (ty1, ty2)
57
false
false
0
7
9
26
13
13
null
null
mgrabmueller/harpy
Harpy/X86CodeGen.hs
bsd-3-clause
x86_neg_mem mem = emit8 0xf7 >> x86_mem_emit 3 mem
50
x86_neg_mem mem = emit8 0xf7 >> x86_mem_emit 3 mem
50
x86_neg_mem mem = emit8 0xf7 >> x86_mem_emit 3 mem
50
false
false
0
6
8
21
9
12
null
null
UBMLtonGroup/timberc
src/Desugar1.hs
bsd-3-clause
ds1Forall env (QExp e : qs) ss = EIf e (eDo env []) (ds1Forall env qs ss)
76
ds1Forall env (QExp e : qs) ss = EIf e (eDo env []) (ds1Forall env qs ss)
76
ds1Forall env (QExp e : qs) ss = EIf e (eDo env []) (ds1Forall env qs ss)
76
false
false
1
8
19
53
24
29
null
null
pharpend/tropical
src/Data/Semiring/Tropical.hs
bsd-3-clause
logT (Tropical base) (Tropical value) = Tropical $ value / base
63
logT (Tropical base) (Tropical value) = Tropical $ value / base
63
logT (Tropical base) (Tropical value) = Tropical $ value / base
63
false
false
0
6
10
33
15
18
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x1ED4' = "\x004F\x0302\x0309"
45
decomposeChar '\x1ED4' = "\x004F\x0302\x0309"
45
decomposeChar '\x1ED4' = "\x004F\x0302\x0309"
45
false
false
1
5
3
13
4
9
null
null
IvanIvanov/haskell-lisp-interpreter
src/Parser.hs
mit
buildDefinitionExpression :: Expression -> Expression buildDefinitionExpression (Pair _ (Pair variable (Pair value Null))) = Definition variable (analyzeExpression value)
172
buildDefinitionExpression :: Expression -> Expression buildDefinitionExpression (Pair _ (Pair variable (Pair value Null))) = Definition variable (analyzeExpression value)
172
buildDefinitionExpression (Pair _ (Pair variable (Pair value Null))) = Definition variable (analyzeExpression value)
118
false
true
0
11
19
53
26
27
null
null
Concomitant/LambdaHack
Game/LambdaHack/Common/Flavour.hs
bsd-3-clause
colorToFancyName Magenta = "indigo"
37
colorToFancyName Magenta = "indigo"
37
colorToFancyName Magenta = "indigo"
37
false
false
0
5
5
9
4
5
null
null
jaimerson/project-euler
haskell/03.hs
mit
primeFactors :: Integer -> [Integer] primeFactors a = nub (primeFactors' a primes)
82
primeFactors :: Integer -> [Integer] primeFactors a = nub (primeFactors' a primes)
82
primeFactors a = nub (primeFactors' a primes)
45
false
true
0
7
11
32
16
16
null
null
nek0/yammat
Handler/Supplier.hs
agpl-3.0
postModifySupplierR :: SupplierId -> Handler Html postModifySupplierR sId = do mSup <- runDB $ get sId case mSup of Just sup -> do ((res, _), _) <- runFormPost $ renderBootstrap3 BootstrapBasicForm $ modifySupplierForm sup case res of FormSuccess msup -> do runDB $ ...
884
postModifySupplierR :: SupplierId -> Handler Html postModifySupplierR sId = do mSup <- runDB $ get sId case mSup of Just sup -> do ((res, _), _) <- runFormPost $ renderBootstrap3 BootstrapBasicForm $ modifySupplierForm sup case res of FormSuccess msup -> do runDB $ ...
884
postModifySupplierR sId = do mSup <- runDB $ get sId case mSup of Just sup -> do ((res, _), _) <- runFormPost $ renderBootstrap3 BootstrapBasicForm $ modifySupplierForm sup case res of FormSuccess msup -> do runDB $ update sId [ SupplierIdent =. supConfI...
834
false
true
0
21
295
220
100
120
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F09.hs
bsd-3-clause
-- glGetConvolutionParameterfvEXT ---------------------------------------------- glGetConvolutionParameterfvEXT :: MonadIO m => GLenum -- ^ @target@ of type [ConvolutionTargetEXT](Graphics-GL-Groups.html#ConvolutionTargetEXT). -> GLenum -- ^ @pname@ of type [ConvolutionParameterEXT](Graphics-GL-Groups.html#Convo...
541
glGetConvolutionParameterfvEXT :: MonadIO m => GLenum -- ^ @target@ of type [ConvolutionTargetEXT](Graphics-GL-Groups.html#ConvolutionTargetEXT). -> GLenum -- ^ @pname@ of type [ConvolutionParameterEXT](Graphics-GL-Groups.html#ConvolutionParameterEXT). -> Ptr GLfloat -- ^ @params@ pointing to @COMPSIZE(pname)@ ...
459
glGetConvolutionParameterfvEXT v1 v2 v3 = liftIO $ dyn139 ptr_glGetConvolutionParameterfvEXT v1 v2 v3
101
true
true
0
11
61
66
32
34
null
null