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
foreverbell/project-euler-solutions
lib/Common/Numbers/Primes.hs
bsd-3-clause
countPrimeApprox :: Int -> Int countPrimeApprox = truncate . appi . fromIntegral where appi x = y - y / 300000 + 7 * l' where y = x * l * (1 + l * (1 + l * h)) w = log x l = 1 / w l' = log w h | x < 10000000 = 2.5625 | x < 50000000 = 2.5 | x < ...
460
countPrimeApprox :: Int -> Int countPrimeApprox = truncate . appi . fromIntegral where appi x = y - y / 300000 + 7 * l' where y = x * l * (1 + l * (1 + l * h)) w = log x l = 1 / w l' = log w h | x < 10000000 = 2.5625 | x < 50000000 = 2.5 | x < ...
460
countPrimeApprox = truncate . appi . fromIntegral where appi x = y - y / 300000 + 7 * l' where y = x * l * (1 + l * (1 + l * h)) w = log x l = 1 / w l' = log w h | x < 10000000 = 2.5625 | x < 50000000 = 2.5 | x < 120000000 = 617 / 256 ...
429
false
true
13
20
203
226
111
115
null
null
aochagavia/CompilerConstruction
mf/src/StronglyLiveVariables.hs
apache-2.0
kill (Malloc' _ name _) = Set.singleton name
45
kill (Malloc' _ name _) = Set.singleton name
45
kill (Malloc' _ name _) = Set.singleton name
45
false
false
0
7
8
24
11
13
null
null
vladimir-ipatov/ganeti
src/Ganeti/Types.hs
gpl-2.0
diskTemplateToStorageType DTDrbd8 = StorageLvmVg
48
diskTemplateToStorageType DTDrbd8 = StorageLvmVg
48
diskTemplateToStorageType DTDrbd8 = StorageLvmVg
48
false
false
0
5
3
9
4
5
null
null
spechub/Hets
Propositional/Parse_AS_Basic.hs
gpl-2.0
-- | parser for Axiom_items parseAxItems :: AParser st AS_BASIC.BASIC_ITEMS parseAxItems = do d <- dotT (fs, ds) <- aFormula `separatedBy` dotT (_, an) <- optSemi let _ = catRange (d : ds) ns = init fs ++ [appendAnno (last fs) an] return $ AS_BASIC.Axiom_items ns -- | Any ...
333
parseAxItems :: AParser st AS_BASIC.BASIC_ITEMS parseAxItems = do d <- dotT (fs, ds) <- aFormula `separatedBy` dotT (_, an) <- optSemi let _ = catRange (d : ds) ns = init fs ++ [appendAnno (last fs) an] return $ AS_BASIC.Axiom_items ns -- | Any word to token
305
parseAxItems = do d <- dotT (fs, ds) <- aFormula `separatedBy` dotT (_, an) <- optSemi let _ = catRange (d : ds) ns = init fs ++ [appendAnno (last fs) an] return $ AS_BASIC.Axiom_items ns -- | Any word to token
257
true
true
0
14
98
117
59
58
null
null
tolysz/postgresql-simple
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs
bsd-3-clause
array_timestamptz :: TypeInfo array_timestamptz = Array { typoid = Oid 1185, typcategory = 'A', typdelim = ',', typname = "_timestamptz", typelem = timestamptz }
200
array_timestamptz :: TypeInfo array_timestamptz = Array { typoid = Oid 1185, typcategory = 'A', typdelim = ',', typname = "_timestamptz", typelem = timestamptz }
200
array_timestamptz = Array { typoid = Oid 1185, typcategory = 'A', typdelim = ',', typname = "_timestamptz", typelem = timestamptz }
170
false
true
0
7
62
46
28
18
null
null
CalumMcCall/hokey
src/Hokey/Card.hs
gpl-3.0
getNextLowerRank Six = Five
29
getNextLowerRank Six = Five
29
getNextLowerRank Six = Five
29
false
false
1
5
5
13
4
9
null
null
jkarlson/fdo-trash
fdo-trash.hs
bsd-3-clause
timeOffsetString = do sign <- (char '-' >> return (-1)) <|> (option 1 (char '+' >> return 1)) num <- option 1 (fmap read $ many1 digit) mult <- option 'd' (oneOf "SMHdmy") let multNum = case mult of 'S' -> 1 'M' -> minSecs 'H' -> hourSecs 'd' -> daySecs ...
430
timeOffsetString = do sign <- (char '-' >> return (-1)) <|> (option 1 (char '+' >> return 1)) num <- option 1 (fmap read $ many1 digit) mult <- option 'd' (oneOf "SMHdmy") let multNum = case mult of 'S' -> 1 'M' -> minSecs 'H' -> hourSecs 'd' -> daySecs ...
430
timeOffsetString = do sign <- (char '-' >> return (-1)) <|> (option 1 (char '+' >> return 1)) num <- option 1 (fmap read $ many1 digit) mult <- option 'd' (oneOf "SMHdmy") let multNum = case mult of 'S' -> 1 'M' -> minSecs 'H' -> hourSecs 'd' -> daySecs ...
430
false
false
0
13
162
172
81
91
null
null
ssaavedra/liquidhaskell
tests/equationalproofs/neg/Axiomatize.hs
bsd-3-clause
sep = "_"
9
sep = "_"
9
sep = "_"
9
false
false
0
4
2
6
3
3
null
null
flannelhead/brainhug
src/Brainfuck.hs
mit
runBrainfuck (Free (ByteIn next)) (n, ptr, mem) = getChar >>= \c -> runBrainfuck next (n, ptr, mem V.// [(ptr, ord c)])
123
runBrainfuck (Free (ByteIn next)) (n, ptr, mem) = getChar >>= \c -> runBrainfuck next (n, ptr, mem V.// [(ptr, ord c)])
123
runBrainfuck (Free (ByteIn next)) (n, ptr, mem) = getChar >>= \c -> runBrainfuck next (n, ptr, mem V.// [(ptr, ord c)])
123
false
false
0
12
24
73
40
33
null
null
daz-li/svm_sgd_haskell
src/Sgd/Svm/Train.hs
mit
determineEta0 :: ([Double] -> PredLoss) -- fTest . fTrain params: given [eta] return PredLoss -> (Double, Double, Double) -- (factor, lowEta, highEta) -> Double -- eta determineEta0 f e@(factor, loEta, hiEta) | loCost < hiCost = slideEta f e hiCost | loCost > h...
432
determineEta0 :: ([Double] -> PredLoss) -- fTest . fTrain params: given [eta] return PredLoss -> (Double, Double, Double) -- (factor, lowEta, highEta) -> Double determineEta0 f e@(factor, loEta, hiEta) | loCost < hiCost = slideEta f e hiCost | loCost > hiCost = climbEta f e loCost...
405
determineEta0 f e@(factor, loEta, hiEta) | loCost < hiCost = slideEta f e hiCost | loCost > hiCost = climbEta f e loCost where (_, loCost, _) = f $ repeat loEta (_, hiCost, _) = f $ repeat hiEta
210
true
true
2
8
135
141
76
65
null
null
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/PackageIndex.hs
gpl-3.0
mergeBuckets xs@(x:xs') ys@(y:ys') = case packageId x `compare` packageId y of GT -> y : mergeBuckets xs ys' EQ -> y : mergeBuckets xs' ys' LT -> x : mergeBuckets xs' ys -- | Inserts a single package into the index. -- -- This is equivalent to (but slightly quicker than) using 'mappend' ...
360
mergeBuckets xs@(x:xs') ys@(y:ys') = case packageId x `compare` packageId y of GT -> y : mergeBuckets xs ys' EQ -> y : mergeBuckets xs' ys' LT -> x : mergeBuckets xs' ys -- | Inserts a single package into the index. -- -- This is equivalent to (but slightly quicker than) using 'mappend' ...
360
mergeBuckets xs@(x:xs') ys@(y:ys') = case packageId x `compare` packageId y of GT -> y : mergeBuckets xs ys' EQ -> y : mergeBuckets xs' ys' LT -> x : mergeBuckets xs' ys -- | Inserts a single package into the index. -- -- This is equivalent to (but slightly quicker than) using 'mappend' ...
360
false
false
1
9
92
105
51
54
null
null
facebook/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/MyService_Client.hs
apache-2.0
send_query op arg_s arg_i = do seq <- seqid seqn <- readIORef seq Thrift.writeMessage op ("query", Types.M_CALL, seqn) $ MyService.write_Query_args op (MyService.Query_args{MyService.query_args_s=arg_s,MyService.query_args_i=arg_i}) Thrift.tFlush (Thrift.getTransport op)
283
send_query op arg_s arg_i = do seq <- seqid seqn <- readIORef seq Thrift.writeMessage op ("query", Types.M_CALL, seqn) $ MyService.write_Query_args op (MyService.Query_args{MyService.query_args_s=arg_s,MyService.query_args_i=arg_i}) Thrift.tFlush (Thrift.getTransport op)
283
send_query op arg_s arg_i = do seq <- seqid seqn <- readIORef seq Thrift.writeMessage op ("query", Types.M_CALL, seqn) $ MyService.write_Query_args op (MyService.Query_args{MyService.query_args_s=arg_s,MyService.query_args_i=arg_i}) Thrift.tFlush (Thrift.getTransport op)
283
false
false
0
11
36
101
50
51
null
null
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Internal/FiniteMap.hs
gpl-3.0
addToFM :: (Ord a) => FiniteMap a b -> a -> b -> FiniteMap a b; addToFM (Empty) i x = node Empty (i, x) Empty
111
addToFM :: (Ord a) => FiniteMap a b -> a -> b -> FiniteMap a b addToFM (Empty) i x = node Empty (i, x) Empty
108
addToFM (Empty) i x = node Empty (i, x) Empty
45
false
true
0
9
27
66
34
32
null
null
delta4d/codewars
kata/isomorphism/ISO.hs
mit
-- isomorphism is reflexive refl :: ISO a a refl = (id, id)
59
refl :: ISO a a refl = (id, id)
31
refl = (id, id)
15
true
true
0
5
12
23
13
10
null
null
DiegoNolan/Asciify
Asciify.hs
mit
charToNovem '/' = Novemant Bnk Bnk Drk Bnk Drk Bnk Drk Bnk Bnk
64
charToNovem '/' = Novemant Bnk Bnk Drk Bnk Drk Bnk Drk Bnk Bnk
64
charToNovem '/' = Novemant Bnk Bnk Drk Bnk Drk Bnk Drk Bnk Bnk
64
false
false
0
5
14
29
13
16
null
null
ssaavedra/liquidhaskell
benchmarks/containers-0.5.0.0/Data/Map/Base1.hs
bsd-3-clause
-- | /O(n+m)/. Is this a proper submap? (ie. a submap but not equal). -- Defined as (@'isProperSubmapOf' = 'isProperSubmapOfBy' (==)@). isProperSubmapOf :: (Ord k,Eq a) => Map k a -> Map k a -> Bool isProperSubmapOf m1 m2 = isProperSubmapOfBy (==) m1 m2
255
isProperSubmapOf :: (Ord k,Eq a) => Map k a -> Map k a -> Bool isProperSubmapOf m1 m2 = isProperSubmapOfBy (==) m1 m2
119
isProperSubmapOf m1 m2 = isProperSubmapOfBy (==) m1 m2
56
true
true
0
9
45
68
32
36
null
null
capn-freako/lambda-ccc
src/LambdaCCC/Unused/CoerceEncode.hs
bsd-3-clause
ttrace :: String -> a -> a ttrace | tracing = trace | otherwise = flip const
85
ttrace :: String -> a -> a ttrace | tracing = trace | otherwise = flip const
85
ttrace | tracing = trace | otherwise = flip const
58
false
true
0
8
25
46
19
27
null
null
nominolo/haddock2
src/Haddock/Interface/Create.hs
bsd-2-clause
findNamedDoc :: String -> [HsDecl Name] -> ErrMsgM (Maybe HsDocString) findNamedDoc name decls = search decls where search [] = do tell ["Cannot find documentation for: $" ++ name] return Nothing search ((DocD (DocCommentNamed name' doc)):rest) | name == name' = return (Just doc) | oth...
386
findNamedDoc :: String -> [HsDecl Name] -> ErrMsgM (Maybe HsDocString) findNamedDoc name decls = search decls where search [] = do tell ["Cannot find documentation for: $" ++ name] return Nothing search ((DocD (DocCommentNamed name' doc)):rest) | name == name' = return (Just doc) | oth...
386
findNamedDoc name decls = search decls where search [] = do tell ["Cannot find documentation for: $" ++ name] return Nothing search ((DocD (DocCommentNamed name' doc)):rest) | name == name' = return (Just doc) | otherwise = search rest search (_other_decl : rest) = search rest
315
false
true
4
13
93
150
71
79
null
null
stevedonnelly/haskell
code/Physics/ConvexRigidBody2d.hs
mit
transformedPolygon = \polygonal_body -> let body = (rigidBody polygonal_body) center_mass = (V.zero 2) transform = \p -> (Polygon.transform p center_mass (RB.orientation body) (RB.position body)) in (transform (polygon polygonal_body))
251
transformedPolygon = \polygonal_body -> let body = (rigidBody polygonal_body) center_mass = (V.zero 2) transform = \p -> (Polygon.transform p center_mass (RB.orientation body) (RB.position body)) in (transform (polygon polygonal_body))
251
transformedPolygon = \polygonal_body -> let body = (rigidBody polygonal_body) center_mass = (V.zero 2) transform = \p -> (Polygon.transform p center_mass (RB.orientation body) (RB.position body)) in (transform (polygon polygonal_body))
251
false
false
0
15
43
93
48
45
null
null
kajigor/uKanren_transformations
test/resources/Program/Prop.hs
bsd-3-clause
query = Program evalo $ fresh ["st"] (call "evalo" [V "st", fm, trueo])
72
query = Program evalo $ fresh ["st"] (call "evalo" [V "st", fm, trueo])
72
query = Program evalo $ fresh ["st"] (call "evalo" [V "st", fm, trueo])
72
false
false
0
10
13
41
21
20
null
null
aaronc/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
jsPackUBits32 :: JS -> JS jsPackUBits32 js = JSNew "Uint32Array" [JSArray [js]]
79
jsPackUBits32 :: JS -> JS jsPackUBits32 js = JSNew "Uint32Array" [JSArray [js]]
79
jsPackUBits32 js = JSNew "Uint32Array" [JSArray [js]]
53
false
true
0
8
11
32
16
16
null
null
devtype-blogspot-com/Haskell-Examples
ExecLoggers/Demo.hs
gpl-3.0
getValue :: Log b -> b getValue (Log _ a) = a
45
getValue :: Log b -> b getValue (Log _ a) = a
45
getValue (Log _ a) = a
22
false
true
0
7
11
29
14
15
null
null
deadfoxygrandpa/Elm
server/Server.hs
bsd-3-clause
flags :: Flags flags = Flags { port = 8000 &= help "set the port of the server" , runtime = Nothing &= typFile &= help "Specify a custom location for Elm's runtime system." } &= help "Quickly reload Elm projects in your browser. Just refresh to recompile.\n\ \It serves static files and f...
645
flags :: Flags flags = Flags { port = 8000 &= help "set the port of the server" , runtime = Nothing &= typFile &= help "Specify a custom location for Elm's runtime system." } &= help "Quickly reload Elm projects in your browser. Just refresh to recompile.\n\ \It serves static files and f...
645
flags = Flags { port = 8000 &= help "set the port of the server" , runtime = Nothing &= typFile &= help "Specify a custom location for Elm's runtime system." } &= help "Quickly reload Elm projects in your browser. Just refresh to recompile.\n\ \It serves static files and freshly recompil...
630
false
true
8
10
186
148
72
76
null
null
acowley/ghc
compiler/rename/RnTypes.hs
bsd-3-clause
ppr_opfix :: (Name, Fixity) -> SDoc ppr_opfix (op, fixity) = pp_op <+> brackets (ppr fixity) where pp_op | op == negateName = ptext (sLit "prefix `-'") | otherwise = quotes (ppr op) {- ********************************************************* * ...
464
ppr_opfix :: (Name, Fixity) -> SDoc ppr_opfix (op, fixity) = pp_op <+> brackets (ppr fixity) where pp_op | op == negateName = ptext (sLit "prefix `-'") | otherwise = quotes (ppr op) {- ********************************************************* * ...
464
ppr_opfix (op, fixity) = pp_op <+> brackets (ppr fixity) where pp_op | op == negateName = ptext (sLit "prefix `-'") | otherwise = quotes (ppr op) {- ********************************************************* * * \subsection{Errors} * ...
428
false
true
1
8
173
94
46
48
null
null
JamesSullivan1/Mpp
src/MppCodeGen.hs
mit
gen_expr (I_APP (op, es)) = gen_exprs es ++ gen_op op
62
gen_expr (I_APP (op, es)) = gen_exprs es ++ gen_op op
62
gen_expr (I_APP (op, es)) = gen_exprs es ++ gen_op op
62
false
false
2
8
18
32
15
17
null
null
TikhonJelvis/TPL
src/TPL/Eval.hs
gpl-3.0
evalString :: FilePath -> EnvRef -> String -> IO String evalString source env inp = showRes <$> runErrorT (Err.liftEither (readExpr source inp) >>= eval env) where showRes (Left err) = Err.showErrorStack err showRes (Right res) = displayVal res -- TODO: Add support for deferred parents.
307
evalString :: FilePath -> EnvRef -> String -> IO String evalString source env inp = showRes <$> runErrorT (Err.liftEither (readExpr source inp) >>= eval env) where showRes (Left err) = Err.showErrorStack err showRes (Right res) = displayVal res -- TODO: Add support for deferred parents.
307
evalString source env inp = showRes <$> runErrorT (Err.liftEither (readExpr source inp) >>= eval env) where showRes (Left err) = Err.showErrorStack err showRes (Right res) = displayVal res -- TODO: Add support for deferred parents.
251
false
true
1
11
64
101
49
52
null
null
alios/bittorrent
Data/Bittorrent/Types.hs
bsd-3-clause
getDictDict :: String -> (TT TDict) -> Maybe (TT TDict) getDictDict k (TD d) = let r = M.lookup (TS $ UTF8.encode k) d in case (r) of Nothing -> Nothing Just s -> fromTorrentType s
193
getDictDict :: String -> (TT TDict) -> Maybe (TT TDict) getDictDict k (TD d) = let r = M.lookup (TS $ UTF8.encode k) d in case (r) of Nothing -> Nothing Just s -> fromTorrentType s
193
getDictDict k (TD d) = let r = M.lookup (TS $ UTF8.encode k) d in case (r) of Nothing -> Nothing Just s -> fromTorrentType s
137
false
true
0
13
48
100
48
52
null
null
cwbriones/mal-hs
src/Main.hs
mit
apply (Func Fn{f = f}:args) = f args
36
apply (Func Fn{f = f}:args) = f args
36
apply (Func Fn{f = f}:args) = f args
36
false
false
0
11
7
31
15
16
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/MediaWiki.hs
gpl-2.0
internalLink :: MWParser Inlines internalLink = try $ do sym "[[" pagename <- unwords . words <$> many (noneOf "|]") label <- option (B.text pagename) $ char '|' *> ( (mconcat <$> many1 (notFollowedBy (char ']') *> inline)) -- the "pipe trick" -- [[Help:Contents|] -> "Conte...
699
internalLink :: MWParser Inlines internalLink = try $ do sym "[[" pagename <- unwords . words <$> many (noneOf "|]") label <- option (B.text pagename) $ char '|' *> ( (mconcat <$> many1 (notFollowedBy (char ']') *> inline)) -- the "pipe trick" -- [[Help:Contents|] -> "Conte...
699
internalLink = try $ do sym "[[" pagename <- unwords . words <$> many (noneOf "|]") label <- option (B.text pagename) $ char '|' *> ( (mconcat <$> many1 (notFollowedBy (char ']') *> inline)) -- the "pipe trick" -- [[Help:Contents|] -> "Contents" <|> (return $ B...
666
false
true
0
19
189
247
120
127
null
null
MaxGabriel/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Deprecated synonym for 'withUrlRenderer'. -- -- Since 1.2.0 giveUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output giveUrlRenderer = withUrlRenderer
241
giveUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output giveUrlRenderer = withUrlRenderer
176
giveUrlRenderer = withUrlRenderer
33
true
true
0
13
62
64
35
29
null
null
artuuge/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/BoundedFloatText.hs
mit
-- | Create a new widget mkBoundedFloatText :: IO BoundedFloatText mkBoundedFloatText = do -- Default properties, with a random uuid uuid <- U.random let widgetState = WidgetState $ defaultBoundedFloatWidget "FloatTextView" stateIO <- newIORef widgetState let widget = IPythonWidget uuid stateIO -- Open ...
461
mkBoundedFloatText :: IO BoundedFloatText mkBoundedFloatText = do -- Default properties, with a random uuid uuid <- U.random let widgetState = WidgetState $ defaultBoundedFloatWidget "FloatTextView" stateIO <- newIORef widgetState let widget = IPythonWidget uuid stateIO -- Open a comm for this widget, a...
436
mkBoundedFloatText = do -- Default properties, with a random uuid uuid <- U.random let widgetState = WidgetState $ defaultBoundedFloatWidget "FloatTextView" stateIO <- newIORef widgetState let widget = IPythonWidget uuid stateIO -- Open a comm for this widget, and store it in the kernel state widgetSe...
394
true
true
0
11
87
86
39
47
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_H_SGML_SPECIAL :: Int wxSTC_H_SGML_SPECIAL = 27
53
wxSTC_H_SGML_SPECIAL :: Int wxSTC_H_SGML_SPECIAL = 27
53
wxSTC_H_SGML_SPECIAL = 27
25
false
true
0
6
5
18
7
11
null
null
noraesae/euler
src/Problem33.hs
bsd-3-clause
cancelDigit :: Int -> Int -> Int cancelDigit n d = fromDigits $ delete d (digits n)
83
cancelDigit :: Int -> Int -> Int cancelDigit n d = fromDigits $ delete d (digits n)
83
cancelDigit n d = fromDigits $ delete d (digits n)
50
false
true
2
8
16
45
20
25
null
null
tjakway/ghcjvm
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
successIf False = Failed
24
successIf False = Failed
24
successIf False = Failed
24
false
false
1
5
3
13
4
9
null
null
sorindumitru/adventofcode
day4/Main.hs
bsd-3-clause
rstrip = reverse . dropWhile isSpace . reverse
46
rstrip = reverse . dropWhile isSpace . reverse
46
rstrip = reverse . dropWhile isSpace . reverse
46
false
false
2
5
7
21
8
13
null
null
anttisalonen/starrover
src/Utils.hs
mit
density :: Flt -> Flt -> Flt density mass' volume' = mass' / volume'
68
density :: Flt -> Flt -> Flt density mass' volume' = mass' / volume'
68
density mass' volume' = mass' / volume'
39
false
true
0
6
13
28
14
14
null
null
geophf/1HaskellADay
exercises/HAD/Y2016/M10/D17/Exercise.hs
mit
-- What stocks show up on the leaders one day and the losers the next day? leadThenLose :: Hist -> [Stock] leadThenLose priceHistory = undefined
145
leadThenLose :: Hist -> [Stock] leadThenLose priceHistory = undefined
69
leadThenLose priceHistory = undefined
37
true
true
0
6
25
22
12
10
null
null
alexlegg/couchgames
src/CouchGames/Util.hs
bsd-3-clause
selectRandom :: [a] -> IO a selectRandom xs = do i <- getStdRandom (randomR (0, (length xs) - 1)) return (xs !! i)
122
selectRandom :: [a] -> IO a selectRandom xs = do i <- getStdRandom (randomR (0, (length xs) - 1)) return (xs !! i)
122
selectRandom xs = do i <- getStdRandom (randomR (0, (length xs) - 1)) return (xs !! i)
94
false
true
0
14
30
69
34
35
null
null
jaalonso/I1M-Cod-Temas
src/Tema_26/ArbolFractalColoreado.hs
gpl-2.0
dibujo :: Int -> Picture dibujo grado = Translate 0 (-300) (arbol grado marron)
79
dibujo :: Int -> Picture dibujo grado = Translate 0 (-300) (arbol grado marron)
79
dibujo grado = Translate 0 (-300) (arbol grado marron)
54
false
true
0
7
13
45
20
25
null
null
nbrunt/JSHOP
src/old/ver0/posix_prototype.hs
mit
-- Multi line comments e.g. /* comment */ cComments = "/\\*@[^*]*\\*+([^/][^*]*(@\\*)+)*/"
103
cComments = "/\\*@[^*]*\\*+([^/][^*]*(@\\*)+)*/"
48
cComments = "/\\*@[^*]*\\*+([^/][^*]*(@\\*)+)*/"
48
true
false
1
5
23
11
4
7
null
null
NickolayStorm/PetriNet
Analys.hs
mit
isTransferAlife (AttainTree _ _ (Tree pairs)) t = let (curTranses, subTrees) = unzip pairs in elem t curTranses && all (`isTransferAlife` t) subTrees
159
isTransferAlife (AttainTree _ _ (Tree pairs)) t = let (curTranses, subTrees) = unzip pairs in elem t curTranses && all (`isTransferAlife` t) subTrees
159
isTransferAlife (AttainTree _ _ (Tree pairs)) t = let (curTranses, subTrees) = unzip pairs in elem t curTranses && all (`isTransferAlife` t) subTrees
159
false
false
0
9
32
68
34
34
null
null
jdnavarro/graphql-haskell
Data/GraphQL/Encoder.hs
bsd-3-clause
defaultValue :: DefaultValue -> Text defaultValue val = "=" <> value val
72
defaultValue :: DefaultValue -> Text defaultValue val = "=" <> value val
72
defaultValue val = "=" <> value val
35
false
true
2
7
11
32
13
19
null
null
nushio3/unittyped
src/UnitTyped/SI/Show.hs
lgpl-2.1
-- |End the chain of formatters. format_end :: (Convertible' a b, Convertible' a d) => Value a d Rational -> (String, Value a b Rational) -> String format_end u (s, v) = (s ++ (if val v == 0 then "" else ((if not $ null s then ", " else "") ++ (show $ fromRational $ val (coerce v u)) ++ " " ++ (showunit' $ proxy' u))))
320
format_end :: (Convertible' a b, Convertible' a d) => Value a d Rational -> (String, Value a b Rational) -> String format_end u (s, v) = (s ++ (if val v == 0 then "" else ((if not $ null s then ", " else "") ++ (show $ fromRational $ val (coerce v u)) ++ " " ++ (showunit' $ proxy' u))))
287
format_end u (s, v) = (s ++ (if val v == 0 then "" else ((if not $ null s then ", " else "") ++ (show $ fromRational $ val (coerce v u)) ++ " " ++ (showunit' $ proxy' u))))
172
true
true
0
17
68
165
86
79
null
null
majecty/SpaceKite
app/SpaceKite.hs
bsd-3-clause
readPos :: Parser Position readPos = (,,) `fmap` x <*> y <*> z where x = readFloat y = readWhiteSpace *> readFloat z = readWhiteSpace *> readFloat
160
readPos :: Parser Position readPos = (,,) `fmap` x <*> y <*> z where x = readFloat y = readWhiteSpace *> readFloat z = readWhiteSpace *> readFloat
160
readPos = (,,) `fmap` x <*> y <*> z where x = readFloat y = readWhiteSpace *> readFloat z = readWhiteSpace *> readFloat
133
false
true
13
6
40
86
40
46
null
null
tjakway/ghcjvm
compiler/nativeGen/SPARC/Ppr.hs
bsd-3-clause
pprInstr (CALL (Left imm) n _) = hcat [ text "\tcall\t", pprImm imm, comma, int n ]
85
pprInstr (CALL (Left imm) n _) = hcat [ text "\tcall\t", pprImm imm, comma, int n ]
85
pprInstr (CALL (Left imm) n _) = hcat [ text "\tcall\t", pprImm imm, comma, int n ]
85
false
false
0
9
18
49
24
25
null
null
maarons/Cortex
Saffron/AppManager.hs
agpl-3.0
runAppManager' :: AppManagerMonadStack () runAppManager' = do { (_, app, mv) <- get ; iPrintLog $ "Running app manager for a new app: " ++ (LBS.unpack app) ; lock <- newEmptyMVar ; t1 <- addTimer lock Config.managerUpdateTime checkSource ; t2 <- addTimer lock Config.managerUpdateTime addInstance ...
774
runAppManager' :: AppManagerMonadStack () runAppManager' = do { (_, app, mv) <- get ; iPrintLog $ "Running app manager for a new app: " ++ (LBS.unpack app) ; lock <- newEmptyMVar ; t1 <- addTimer lock Config.managerUpdateTime checkSource ; t2 <- addTimer lock Config.managerUpdateTime addInstance ...
774
runAppManager' = do { (_, app, mv) <- get ; iPrintLog $ "Running app manager for a new app: " ++ (LBS.unpack app) ; lock <- newEmptyMVar ; t1 <- addTimer lock Config.managerUpdateTime checkSource ; t2 <- addTimer lock Config.managerUpdateTime addInstance -- Don't kill too often, let the CPU use ...
732
false
true
0
11
172
221
110
111
null
null
egison/egison
hs-src/Language/Egison/Completion.hs
mit
completeParen :: Monad m => CompletionFunc m completeParen (lstr, _) = case closeParen lstr of Nothing -> return (lstr, []) Just paren -> return (lstr, [Completion paren paren False])
190
completeParen :: Monad m => CompletionFunc m completeParen (lstr, _) = case closeParen lstr of Nothing -> return (lstr, []) Just paren -> return (lstr, [Completion paren paren False])
190
completeParen (lstr, _) = case closeParen lstr of Nothing -> return (lstr, []) Just paren -> return (lstr, [Completion paren paren False])
145
false
true
0
11
35
86
42
44
null
null
mrshannon/trees
src/Input/Keyboard/GLUT.hs
gpl-2.0
changeAsciiKeyState '5' ns k = k { key5 = ns }
46
changeAsciiKeyState '5' ns k = k { key5 = ns }
46
changeAsciiKeyState '5' ns k = k { key5 = ns }
46
false
false
0
6
10
21
11
10
null
null
sajith/betty-web
Settings.hs
agpl-3.0
-- The rest of this file contains settings which rarely need changing by a -- user. widgetFile :: String -> Q Exp widgetFile = (if appReloadTemplates compileTimeAppSettings then widgetFileReload else widgetFileNoReload) widgetFileSettings
285
widgetFile :: String -> Q Exp widgetFile = (if appReloadTemplates compileTimeAppSettings then widgetFileReload else widgetFileNoReload) widgetFileSettings
200
widgetFile = (if appReloadTemplates compileTimeAppSettings then widgetFileReload else widgetFileNoReload) widgetFileSettings
170
true
true
0
8
78
37
20
17
null
null
jwiegley/hsubconvert
Main.hs
bsd-3-clause
opFilePath :: Operation -> FilePath opFilePath = toFilePath . opPathname
72
opFilePath :: Operation -> FilePath opFilePath = toFilePath . opPathname
72
opFilePath = toFilePath . opPathname
36
false
true
1
7
9
27
11
16
null
null
lamdu/lamdu
src/Lamdu/Opts.hs
gpl-3.0
editorOpts :: P.Parser EditorOpts editorOpts = EditorOpts <$> windowMode <*> jsDebugOpts <*> P.option P.str ( P.long "windowtitle" <> P.value "Lamdu" <> P.metavar "TITLE" <> P.showDefault <> P.help "Override window title" ) <*> inverseSwitch ...
771
editorOpts :: P.Parser EditorOpts editorOpts = EditorOpts <$> windowMode <*> jsDebugOpts <*> P.option P.str ( P.long "windowtitle" <> P.value "Lamdu" <> P.metavar "TITLE" <> P.showDefault <> P.help "Override window title" ) <*> inverseSwitch ...
771
editorOpts = EditorOpts <$> windowMode <*> jsDebugOpts <*> P.option P.str ( P.long "windowtitle" <> P.value "Lamdu" <> P.metavar "TITLE" <> P.showDefault <> P.help "Override window title" ) <*> inverseSwitch (P.long "disable-lcd-render...
737
false
true
17
11
293
183
88
95
null
null
hguenther/nbis
MemoryModel.hs
agpl-3.0
memInstrSrc (MIIndex _ _ _ _ _) = Nothing
41
memInstrSrc (MIIndex _ _ _ _ _) = Nothing
41
memInstrSrc (MIIndex _ _ _ _ _) = Nothing
41
false
false
0
6
8
24
11
13
null
null
lueck/standoff-tools
testsuite/Test/StandOff/TestSetup.hs
gpl-3.0
mRng :: String -> String -> String -> Int -> Int -> A.Annotation mRng rid mid typ s e = (A.MarkupRange { A.rangeId = Just $ mkTestUUID rid , A.elementId = mkTestUUID mid , A.markupType = typ , A.startOffset...
505
mRng :: String -> String -> String -> Int -> Int -> A.Annotation mRng rid mid typ s e = (A.MarkupRange { A.rangeId = Just $ mkTestUUID rid , A.elementId = mkTestUUID mid , A.markupType = typ , A.startOffset...
505
mRng rid mid typ s e = (A.MarkupRange { A.rangeId = Just $ mkTestUUID rid , A.elementId = mkTestUUID mid , A.markupType = typ , A.startOffset = s , A.endOffset = e ...
440
false
true
0
10
282
122
67
55
null
null
michaeljklein/CPlug
src/Data/Text/Aux.hs
bsd-3-clause
-- | Example: -- -- >>> unwords2 (T.pack "Hello") (T.pack "World") -- "Hello World" -- unwords2 :: T.Text -> T.Text -> T.Text unwords2 = appendAfter (T.pack " ")
161
unwords2 :: T.Text -> T.Text -> T.Text unwords2 = appendAfter (T.pack " ")
74
unwords2 = appendAfter (T.pack " ")
35
true
true
0
9
27
47
24
23
null
null
vinnymac/glot-www
Util/Slug.hs
mit
replace' :: String -> String -> String -> String replace' pattern replacement str = subRegex (mkRegex pattern) str replacement
126
replace' :: String -> String -> String -> String replace' pattern replacement str = subRegex (mkRegex pattern) str replacement
126
replace' pattern replacement str = subRegex (mkRegex pattern) str replacement
77
false
true
0
7
18
43
21
22
null
null
facebookincubator/duckling
Duckling/Rules/SV.hs
bsd-3-clause
langRules (Seal CreditCardNumber) = []
38
langRules (Seal CreditCardNumber) = []
38
langRules (Seal CreditCardNumber) = []
38
false
false
0
6
4
18
8
10
null
null
francesquini/itau-lib
src/Itau.hs
bsd-3-clause
goToFaturaAtual :: WD () goToFaturaAtual = do tryClickAndWaitElem (ByCSS "img[alt=\"Fatura atual\"]") _ <- waitElemFound (ByCSS "img[alt=\"Fatura anterior\"]") -- o link clicado some, checa outro item return () --precisa ja estar dentro do cartao e nao pode estar na fatura anterior
295
goToFaturaAtual :: WD () goToFaturaAtual = do tryClickAndWaitElem (ByCSS "img[alt=\"Fatura atual\"]") _ <- waitElemFound (ByCSS "img[alt=\"Fatura anterior\"]") -- o link clicado some, checa outro item return () --precisa ja estar dentro do cartao e nao pode estar na fatura anterior
295
goToFaturaAtual = do tryClickAndWaitElem (ByCSS "img[alt=\"Fatura atual\"]") _ <- waitElemFound (ByCSS "img[alt=\"Fatura anterior\"]") -- o link clicado some, checa outro item return () --precisa ja estar dentro do cartao e nao pode estar na fatura anterior
270
false
true
0
11
52
60
26
34
null
null
begriffs/hasql-postgres
library/Hasql/Postgres/ErrorCode.hs
mit
windowing_error :: ErrorCode = "42P20"
75
windowing_error :: ErrorCode = "42P20"
75
windowing_error :: ErrorCode = "42P20"
75
false
false
0
5
41
11
5
6
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1951481 = 4323
34
getValueFromProduct 1951481 = 4323
34
getValueFromProduct 1951481 = 4323
34
false
false
0
5
3
9
4
5
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/S3BucketStorageClassAnalysis.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-storageclassanalysis.html#cfn-s3-bucket-storageclassanalysis-dataexport sbscaDataExport :: Lens' S3BucketStorageClassAnalysis (Maybe S3BucketDataExport) sbscaDataExport = lens _s3BucketStorageClassAnalysisDataExport (\s a -> s {...
367
sbscaDataExport :: Lens' S3BucketStorageClassAnalysis (Maybe S3BucketDataExport) sbscaDataExport = lens _s3BucketStorageClassAnalysisDataExport (\s a -> s { _s3BucketStorageClassAnalysisDataExport = a })
203
sbscaDataExport = lens _s3BucketStorageClassAnalysisDataExport (\s a -> s { _s3BucketStorageClassAnalysisDataExport = a })
122
true
true
1
9
21
50
25
25
null
null
topliceanu/learn
haskell/functions.hs
mit
maximum' (x:[]) = x
19
maximum' (x:[]) = x
19
maximum' (x:[]) = x
19
false
false
0
7
3
19
9
10
null
null
limaner2002/EPC-tools
RapidFire/src/Util/Parallel.hs
bsd-3-clause
runDistributeTasks :: (MonadMask m, MonadIO m, MonadLogger m) => DistributeTasksT b m a -> ParallelT b m a runDistributeTasks d = runDistributeTasksT $ finally d resetConf
171
runDistributeTasks :: (MonadMask m, MonadIO m, MonadLogger m) => DistributeTasksT b m a -> ParallelT b m a runDistributeTasks d = runDistributeTasksT $ finally d resetConf
171
runDistributeTasks d = runDistributeTasksT $ finally d resetConf
64
false
true
0
8
25
66
31
35
null
null
jtapolczai/Scratchpad
Differentiate.hs
apache-2.0
d v (Var x :^ a) | isConst v a = a :* (Var x :^ (a - 1))
56
d v (Var x :^ a) | isConst v a = a :* (Var x :^ (a - 1))
56
d v (Var x :^ a) | isConst v a = a :* (Var x :^ (a - 1))
56
false
false
0
10
18
54
25
29
null
null
gafiatulin/codewars
src/6 kyu/Manhattan.hs
mit
manhattanDistance :: (Int, Int) -> (Int, Int) -> Int manhattanDistance (x1, y1) (x2, y2) = abs (x1-x2) + abs (y1-y2)
116
manhattanDistance :: (Int, Int) -> (Int, Int) -> Int manhattanDistance (x1, y1) (x2, y2) = abs (x1-x2) + abs (y1-y2)
116
manhattanDistance (x1, y1) (x2, y2) = abs (x1-x2) + abs (y1-y2)
63
false
true
0
8
19
72
40
32
null
null
RAFIRAF/HASKELL
baby.hs
mit
calcBMIs' :: Fractional a => [(Double,Double)] -> [Double] calcBMIs' [] = error "BRAK DANHY"
92
calcBMIs' :: Fractional a => [(Double,Double)] -> [Double] calcBMIs' [] = error "BRAK DANHY"
92
calcBMIs' [] = error "BRAK DANHY"
33
false
true
0
9
13
48
23
25
null
null
adept/hledger
hledger-lib/Text/Tabular/AsciiWide.hs
gpl-3.0
renderHLine vpos borders pretty w h prop = [renderHLine' vpos borders pretty prop w h]
86
renderHLine vpos borders pretty w h prop = [renderHLine' vpos borders pretty prop w h]
86
renderHLine vpos borders pretty w h prop = [renderHLine' vpos borders pretty prop w h]
86
false
false
0
6
14
36
17
19
null
null
kawu/concraft
src/NLP/Concraft/DAG.hs
bsd-2-clause
-- | Load model from a file. loadModel :: FilePath -> IO Concraft loadModel path = do x <- Binary.decode . GZip.decompress <$> BL.readFile path x `seq` return x --------------------- -- Tagging --------------------- -- -- | Tag sentence using the model. In your code you should probably -- -- use your analy...
1,499
loadModel :: FilePath -> IO Concraft loadModel path = do x <- Binary.decode . GZip.decompress <$> BL.readFile path x `seq` return x --------------------- -- Tagging --------------------- -- -- | Tag sentence using the model. In your code you should probably -- -- use your analysis function, translate resul...
1,470
loadModel path = do x <- Binary.decode . GZip.decompress <$> BL.readFile path x `seq` return x --------------------- -- Tagging --------------------- -- -- | Tag sentence using the model. In your code you should probably -- -- use your analysis function, translate results into a container of -- -- `Sent`en...
1,433
true
true
0
10
288
87
57
30
null
null
Gabriel439/succinct
src/Succinct/Internal/Binomial.hs
bsd-2-clause
classOffsets :: P.Vector Word16 classOffsets = P.fromListN (_N+1) $ List.scanl (\a k -> a + fromIntegral (binomial _N k)) 0 [0.._N]
131
classOffsets :: P.Vector Word16 classOffsets = P.fromListN (_N+1) $ List.scanl (\a k -> a + fromIntegral (binomial _N k)) 0 [0.._N]
131
classOffsets = P.fromListN (_N+1) $ List.scanl (\a k -> a + fromIntegral (binomial _N k)) 0 [0.._N]
99
false
true
0
12
20
71
36
35
null
null
mgrebenets/hackerrank
alg/warmup/service-lane.hs
mit
minVehicle lanes (i, j) = V.minimum s where s = V.slice i (j - i + 1) lanes
87
minVehicle lanes (i, j) = V.minimum s where s = V.slice i (j - i + 1) lanes
87
minVehicle lanes (i, j) = V.minimum s where s = V.slice i (j - i + 1) lanes
87
false
false
1
8
29
57
25
32
null
null
phischu/fragnix
tests/packages/scotty/Control.Monad.Trans.Select.hs
bsd-3-clause
-- | Runs a @Select@ computation with a function for evaluating answers -- to select a particular answer. (The inverse of 'select'.) runSelect :: Select r a -> (a -> r) -> a runSelect m k = runIdentity (runSelectT m (Identity . k))
232
runSelect :: Select r a -> (a -> r) -> a runSelect m k = runIdentity (runSelectT m (Identity . k))
98
runSelect m k = runIdentity (runSelectT m (Identity . k))
57
true
true
0
9
43
61
30
31
null
null
sdiehl/ghc
libraries/ghc-compact/GHC/Compact.hs
bsd-3-clause
-- | Compact a value. /O(size of unshared data)/ -- -- If the structure contains any internal sharing, the shared data -- will be duplicated during the compaction process. This will -- not terminate if the structure contains cycles (use 'compactWithSharing' -- instead). -- -- The object in question must not contain an...
587
compact :: a -> IO (Compact a) compact = compactSized 31268 False
65
compact = compactSized 31268 False
34
true
true
0
8
104
41
26
15
null
null
khibino/haskell-debian-build.rebuild
mains/odebuild.hs
bsd-3-clause
source :: ODebuildOptions -> [String] -> Build (Source, Maybe Hackage) source = build' [Src]
92
source :: ODebuildOptions -> [String] -> Build (Source, Maybe Hackage) source = build' [Src]
92
source = build' [Src]
21
false
true
0
10
13
45
22
23
null
null
markflorisson/hpack
testrepo/bytestring-0.10.4.1/Data/ByteString/Lazy.hs
bsd-3-clause
-- | The 'findIndex' function takes a predicate and a 'ByteString' and -- returns the index of the first element in the ByteString -- satisfying the predicate. findIndex :: (Word8 -> Bool) -> ByteString -> Maybe Int64 findIndex k cs0 = findIndex' 0 cs0 where findIndex' _ Empty = Nothing findIndex' n (C...
485
findIndex :: (Word8 -> Bool) -> ByteString -> Maybe Int64 findIndex k cs0 = findIndex' 0 cs0 where findIndex' _ Empty = Nothing findIndex' n (Chunk c cs) = case S.findIndex k c of Nothing -> findIndex' (n + fromIntegral (S.length c)) cs Just i -> Just (n + fromIntegra...
325
findIndex k cs0 = findIndex' 0 cs0 where findIndex' _ Empty = Nothing findIndex' n (Chunk c cs) = case S.findIndex k c of Nothing -> findIndex' (n + fromIntegral (S.length c)) cs Just i -> Just (n + fromIntegral i)
267
true
true
1
15
130
135
66
69
null
null
rkaippully/haskell-ants
src/Ants/UI.hs
apache-2.0
scaled :: Color -> Int -> Int -> Color scaled (Color r g b) v s = Color (trans r) (trans g) (trans b) where trans :: Word16 -> Word16 trans x = if x == 65535 then 65535 else 55000 - fromIntegral (v * s) --trans x = min 65535 (round (fromIntegral x * s / fromIntegral v))
312
scaled :: Color -> Int -> Int -> Color scaled (Color r g b) v s = Color (trans r) (trans g) (trans b) where trans :: Word16 -> Word16 trans x = if x == 65535 then 65535 else 55000 - fromIntegral (v * s) --trans x = min 65535 (round (fromIntegral x * s / fromIntegral v))
312
scaled (Color r g b) v s = Color (trans r) (trans g) (trans b) where trans :: Word16 -> Word16 trans x = if x == 65535 then 65535 else 55000 - fromIntegral (v * s) --trans x = min 65535 (round (fromIntegral x * s / fromIntegral v))
273
false
true
2
9
100
112
57
55
null
null
lucasdicioccio/laborantin-hs
Laborantin/DSL.hs
apache-2.0
resolve :: ((Execution m, Backend m) -> m (Execution m)) -> State (Dependency m) () resolve f = do dep0 <- get put $ dep0 { dSolve = f } -- | Set default values for the paramater
183
resolve :: ((Execution m, Backend m) -> m (Execution m)) -> State (Dependency m) () resolve f = do dep0 <- get put $ dep0 { dSolve = f } -- | Set default values for the paramater
183
resolve f = do dep0 <- get put $ dep0 { dSolve = f } -- | Set default values for the paramater
99
false
true
0
10
42
82
41
41
null
null
ttylec/QLogic
src/QLogic/Utils.hs
gpl-3.0
iff False True = False
22
iff False True = False
22
iff False True = False
22
false
false
0
5
4
11
5
6
null
null
dosenfrucht/mcasm
src/Transform.hs
gpl-2.0
getSize size (Op _ : xs) = getSize (size + 2) xs
62
getSize size (Op _ : xs) = getSize (size + 2) xs
62
getSize size (Op _ : xs) = getSize (size + 2) xs
62
false
false
0
7
25
35
16
19
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_514 (43#) = happyGoto action_272
39
action_514 (43#) = happyGoto action_272
39
action_514 (43#) = happyGoto action_272
39
false
false
0
6
4
15
7
8
null
null
snoyberg/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
unTypeQ :: Q (TExp a) -> Q Exp unTypeQ m = do { TExp e <- m ; return e }
87
unTypeQ :: Q (TExp a) -> Q Exp unTypeQ m = do { TExp e <- m ; return e }
87
unTypeQ m = do { TExp e <- m ; return e }
56
false
true
0
8
35
49
23
26
null
null
gnn/Hets
Proofs/DGFlattening.hs
gpl-2.0
matchCombinations ([_]) _ = Nothing
35
matchCombinations ([_]) _ = Nothing
35
matchCombinations ([_]) _ = Nothing
35
false
false
0
7
4
17
9
8
null
null
zchn/ethereum-analyzer
ethereum-analyzer-deps/src/Blockchain/VM/Opcodes.hs
apache-2.0
opLen _ = 1
11
opLen _ = 1
11
opLen _ = 1
11
false
false
0
5
3
9
4
5
null
null
albertov/hs-mapnik
bindings/src/Mapnik/Bindings/Symbolizer.hs
bsd-3-clause
createTextPlacements (Mapnik.Simple defs (Val poss)) = unsafeNewPlacements $ \p -> do let s = encodeUtf8 (placementPositionToText (Val poss)) szs = V.fromList (poss^.textSizes) dirs = V.fromList (poss^.directions.to (map fromEnum)) :: V.Vector Int defaults <- createTextSymProps defs [C.block|void { ...
688
createTextPlacements (Mapnik.Simple defs (Val poss)) = unsafeNewPlacements $ \p -> do let s = encodeUtf8 (placementPositionToText (Val poss)) szs = V.fromList (poss^.textSizes) dirs = V.fromList (poss^.directions.to (map fromEnum)) :: V.Vector Int defaults <- createTextSymProps defs [C.block|void { ...
688
createTextPlacements (Mapnik.Simple defs (Val poss)) = unsafeNewPlacements $ \p -> do let s = encodeUtf8 (placementPositionToText (Val poss)) szs = V.fromList (poss^.textSizes) dirs = V.fromList (poss^.directions.to (map fromEnum)) :: V.Vector Int defaults <- createTextSymProps defs [C.block|void { ...
688
false
false
0
17
105
131
65
66
null
null
facebookincubator/duckling
Duckling/Duration/RU/Rules.hs
bsd-3-clause
minuteDiminutive :: Rule minuteDiminutive = Rule { name = "minute diminutive" , pattern = [ regex "минутк.|минуточк." ] , prod = \case _ -> Just $ Token Duration $ duration Minute 1 }
205
minuteDiminutive :: Rule minuteDiminutive = Rule { name = "minute diminutive" , pattern = [ regex "минутк.|минуточк." ] , prod = \case _ -> Just $ Token Duration $ duration Minute 1 }
205
minuteDiminutive = Rule { name = "minute diminutive" , pattern = [ regex "минутк.|минуточк." ] , prod = \case _ -> Just $ Token Duration $ duration Minute 1 }
180
false
true
0
13
54
65
34
31
null
null
ezyang/ghc
compiler/main/HscTypes.hs
bsd-3-clause
typeEnvCoAxioms env = [ax | ACoAxiom ax <- typeEnvElts env]
59
typeEnvCoAxioms env = [ax | ACoAxiom ax <- typeEnvElts env]
59
typeEnvCoAxioms env = [ax | ACoAxiom ax <- typeEnvElts env]
59
false
false
0
8
9
26
12
14
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | The reason code for the Spot instance state change. sisfCode :: Lens' SpotInstanceStateFault (Maybe Text) sisfCode = lens _sisfCode (\ s a -> s{_sisfCode = a})
164
sisfCode :: Lens' SpotInstanceStateFault (Maybe Text) sisfCode = lens _sisfCode (\ s a -> s{_sisfCode = a})
107
sisfCode = lens _sisfCode (\ s a -> s{_sisfCode = a})
53
true
true
0
9
27
46
25
21
null
null
kim/amazonka
amazonka-importexport/gen/Network/AWS/ImportExport/UpdateJob.hs
mpl-2.0
ujrArtifactList :: Lens' UpdateJobResponse [Artifact] ujrArtifactList = lens _ujrArtifactList (\s a -> s { _ujrArtifactList = a }) . _List
138
ujrArtifactList :: Lens' UpdateJobResponse [Artifact] ujrArtifactList = lens _ujrArtifactList (\s a -> s { _ujrArtifactList = a }) . _List
138
ujrArtifactList = lens _ujrArtifactList (\s a -> s { _ujrArtifactList = a }) . _List
84
false
true
0
10
19
46
25
21
null
null
cobbpg/dow
src/HighScore.hs
bsd-3-clause
getAppDir :: IO FilePath getAppDir = do dir <- getAppUserDataDirectory "dow" dirChk <- doesDirectoryExist dir unless dirChk $ createDirectory dir return dir
164
getAppDir :: IO FilePath getAppDir = do dir <- getAppUserDataDirectory "dow" dirChk <- doesDirectoryExist dir unless dirChk $ createDirectory dir return dir
164
getAppDir = do dir <- getAppUserDataDirectory "dow" dirChk <- doesDirectoryExist dir unless dirChk $ createDirectory dir return dir
139
false
true
0
8
29
53
22
31
null
null
jgoerzen/dtmconv
HaXml-1.12/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
gpl-2.0
-- | Pretty print XML name. ppXName :: Name -> Doc ppXName (Name s _) = text s
78
ppXName :: Name -> Doc ppXName (Name s _) = text s
50
ppXName (Name s _) = text s
27
true
true
0
9
17
36
16
20
null
null
Melvar/Idris-dev
src/Idris/Core/ProofState.hs
bsd-3-clause
getProvenance _ = (Nothing, Nothing)
36
getProvenance _ = (Nothing, Nothing)
36
getProvenance _ = (Nothing, Nothing)
36
false
false
0
5
4
16
8
8
null
null
hakuch/Pulsar
src/Pulsar/Encode.hs
apache-2.0
emptyState :: Ast SourcePos -> Either EncoderError EncoderState emptyState ast = case Label.scan ast of Left (pos, name) -> Left $ PreviousLabelDefinition pos name Right lbs -> Right EncoderState {labels = lbs, sections = Section.defaults} -- | Enocode the symbol table. -- The table format is documented in /...
347
emptyState :: Ast SourcePos -> Either EncoderError EncoderState emptyState ast = case Label.scan ast of Left (pos, name) -> Left $ PreviousLabelDefinition pos name Right lbs -> Right EncoderState {labels = lbs, sections = Section.defaults} -- | Enocode the symbol table. -- The table format is documented in /...
347
emptyState ast = case Label.scan ast of Left (pos, name) -> Left $ PreviousLabelDefinition pos name Right lbs -> Right EncoderState {labels = lbs, sections = Section.defaults} -- | Enocode the symbol table. -- The table format is documented in /pulsar/doc/symbol-table.md.
283
false
true
0
11
59
93
46
47
null
null
mrkkrp/stack
src/test/Stack/GhciSpec.hs
bsd-3-clause
textToLazy :: Text -> LBS.ByteString textToLazy = LBS.fromStrict . T.encodeUtf8
79
textToLazy :: Text -> LBS.ByteString textToLazy = LBS.fromStrict . T.encodeUtf8
79
textToLazy = LBS.fromStrict . T.encodeUtf8
42
false
true
0
8
9
32
14
18
null
null
ekmett/monad-ran
Control/Monad/Ran.hs
bsd-3-clause
liftRanWorld :: (G m ~ World w, H m ~ World w) => (State# w -> (# State# w, a #)) -> Ran m a liftRanWorld f = Ran (\k -> World (\w -> case f w of (# w', a #) -> runWorld (k a) w'))
180
liftRanWorld :: (G m ~ World w, H m ~ World w) => (State# w -> (# State# w, a #)) -> Ran m a liftRanWorld f = Ran (\k -> World (\w -> case f w of (# w', a #) -> runWorld (k a) w'))
180
liftRanWorld f = Ran (\k -> World (\w -> case f w of (# w', a #) -> runWorld (k a) w'))
87
false
true
0
16
46
123
60
63
null
null
christiaanb/Idris-dev
src/Core/CoreParser.hs
bsd-3-clause
reservedOp= PTok.reservedOp lexer
33
reservedOp= PTok.reservedOp lexer
33
reservedOp= PTok.reservedOp lexer
33
false
false
1
6
2
15
5
10
null
null
gcampax/ghc
compiler/types/TyCon.hs
bsd-3-clause
-- | Find the size of a 'PrimRep', in words primRepSizeW :: DynFlags -> PrimRep -> Int primRepSizeW _ IntRep = 1
127
primRepSizeW :: DynFlags -> PrimRep -> Int primRepSizeW _ IntRep = 1
83
primRepSizeW _ IntRep = 1
40
true
true
0
6
36
25
13
12
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs
mpl-2.0
-- | The next pagination token in the list response. It should be used as -- \`page_token\` for the following request. An empty value means no more -- results. lnrNextPageToken :: Lens' ListNotesResponse (Maybe Text) lnrNextPageToken = lens _lnrNextPageToken (\ s a -> s{_lnrNextPageToken = a})
302
lnrNextPageToken :: Lens' ListNotesResponse (Maybe Text) lnrNextPageToken = lens _lnrNextPageToken (\ s a -> s{_lnrNextPageToken = a})
142
lnrNextPageToken = lens _lnrNextPageToken (\ s a -> s{_lnrNextPageToken = a})
85
true
true
0
8
53
51
27
24
null
null
psibi/yesod
yesod-core/Yesod/Core/Handler.hs
mit
tell :: MonadHandler m => Endo [Header] -> m () tell hs = modify $ \g -> g { ghsHeaders = ghsHeaders g `mappend` hs }
117
tell :: MonadHandler m => Endo [Header] -> m () tell hs = modify $ \g -> g { ghsHeaders = ghsHeaders g `mappend` hs }
117
tell hs = modify $ \g -> g { ghsHeaders = ghsHeaders g `mappend` hs }
69
false
true
0
10
25
62
32
30
null
null
tavisrudd/ghcjs-base
JavaScript/TypedArray/DataView/ST.hs
mit
readUint32LE, readUint32BE, unsafeReadUint32LE, unsafeReadUint32BE :: Int -> STDataView s -> ST s Word readUint32LE idx dv = ST (I.js_m_getUint32LE idx dv)
169
readUint32LE, readUint32BE, unsafeReadUint32LE, unsafeReadUint32BE :: Int -> STDataView s -> ST s Word readUint32LE idx dv = ST (I.js_m_getUint32LE idx dv)
169
readUint32LE idx dv = ST (I.js_m_getUint32LE idx dv)
64
false
true
0
8
34
51
27
24
null
null
sjakobi/brick
src/Brick/Forms.hs
bsd-3-clause
-- | A form field using a single-line editor to edit a free-form text -- value represented as a password. The value is always considered valid -- and is always represented with one asterisk per password character. -- -- This field responds to all events handled by 'editor', including -- mouse events. editPasswordField ...
810
editPasswordField :: (Ord n, Show n) => Lens' s T.Text -- ^ The state lens for this value. -> n -- ^ The resource name for the input field. -> s -- ^ The initial form state. -> FormFieldState s ...
508
editPasswordField stLens n = let ini = id val = Just . T.concat limit = Just 1 renderText = toPassword in editField stLens n limit ini val renderText id
184
true
true
0
10
280
116
62
54
null
null
acowley/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
resultVariableName _ = Nothing
43
resultVariableName _ = Nothing
43
resultVariableName _ = Nothing
43
false
false
0
5
16
9
4
5
null
null
mightybyte/reflex-dom-stubs
src/GHCJS/DOM/Navigator.hs
bsd-3-clause
toNavigator = undefined
23
toNavigator = undefined
23
toNavigator = undefined
23
false
false
1
5
2
10
3
7
null
null