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
gridaphobe/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
-- New, auxiliary instances {- ************************************************************************ * * Class deriving diagnostics * * **************************...
4,251
hasBuiltinDeriving :: DynFlags -> (Name -> Fixity) -> Class -> Maybe (SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)) hasBuiltinDeriving dflags fix_env clas = assocMaybe gen_list (getUnique clas) ...
3,489
hasBuiltinDeriving dflags fix_env clas = assocMaybe gen_list (getUnique clas) where gen_list :: [(Unique, SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff))] gen_list = [ (eqClassKey, gen_Eq_binds) , (ordClassKey, gen_Ord_binds) , (enumClassKey, gen_En...
3,249
true
true
0
13
1,384
230
136
94
null
null
gbataille/pandoc
src/Text/Pandoc.hs
gpl-2.0
getDefaultExtensions "markdown_mmd" = multimarkdownExtensions
61
getDefaultExtensions "markdown_mmd" = multimarkdownExtensions
61
getDefaultExtensions "markdown_mmd" = multimarkdownExtensions
61
false
false
0
5
3
9
4
5
null
null
ekmett/hmpfr
tests/RunTests.hs
bsd-3-clause
tests = [testGroup "Comparison functions" [testProperty "cmp" prop_cmp, testProperty "isNaN" prop_isNaN, testProperty "isNumber" prop_isNumber, testProperty "isZero" prop_isZero, testProperty "isInfin...
1,721
tests = [testGroup "Comparison functions" [testProperty "cmp" prop_cmp, testProperty "isNaN" prop_isNaN, testProperty "isNumber" prop_isNumber, testProperty "isZero" prop_isZero, testProperty "isInfin...
1,721
tests = [testGroup "Comparison functions" [testProperty "cmp" prop_cmp, testProperty "isNaN" prop_isNaN, testProperty "isNumber" prop_isNumber, testProperty "isZero" prop_isZero, testProperty "isInfin...
1,721
false
false
0
8
847
246
123
123
null
null
kyren/hsgb
lib/Gameboy/Instructions.hs
unlicense
encodeInstruction (SET_B_R Bit3 DRegister) = [0xcb, 0xda]
57
encodeInstruction (SET_B_R Bit3 DRegister) = [0xcb, 0xda]
57
encodeInstruction (SET_B_R Bit3 DRegister) = [0xcb, 0xda]
57
false
false
0
6
6
24
12
12
null
null
rvion/ride
jetpack/src/Data/Text/AsT.hs
bsd-3-clause
-- t_uncons :: Text -> Maybe (Char, Text) t_uncons = I.uncons
61
t_uncons = I.uncons
19
t_uncons = I.uncons
19
true
false
0
5
10
9
5
4
null
null
acowley/ghc
compiler/main/Packages.hs
bsd-3-clause
pprReason :: SDoc -> UnusablePackageReason -> SDoc pprReason pref reason = case reason of IgnoredWithFlag -> pref <+> ptext (sLit "ignored due to an -ignore-package flag") MissingDependencies deps -> pref <+> ptext (sLit "unusable due to missing or recursive dependencies:") $$ nest 2 (hsep...
420
pprReason :: SDoc -> UnusablePackageReason -> SDoc pprReason pref reason = case reason of IgnoredWithFlag -> pref <+> ptext (sLit "ignored due to an -ignore-package flag") MissingDependencies deps -> pref <+> ptext (sLit "unusable due to missing or recursive dependencies:") $$ nest 2 (hsep...
420
pprReason pref reason = case reason of IgnoredWithFlag -> pref <+> ptext (sLit "ignored due to an -ignore-package flag") MissingDependencies deps -> pref <+> ptext (sLit "unusable due to missing or recursive dependencies:") $$ nest 2 (hsep (map ppr deps)) ShadowedBy ipid -> pref <+...
369
false
true
0
13
98
121
57
64
null
null
wiggly/functional-pokering
src/Main.hs
mit
main :: IO () main = execParser opts >>= runEquity where opts = info (helper <*> pokerOpts) (fullDesc <> progDesc "Calculate equity for multiple hands" <> header "fp - poker equity calculator")
219
main :: IO () main = execParser opts >>= runEquity where opts = info (helper <*> pokerOpts) (fullDesc <> progDesc "Calculate equity for multiple hands" <> header "fp - poker equity calculator")
219
main = execParser opts >>= runEquity where opts = info (helper <*> pokerOpts) (fullDesc <> progDesc "Calculate equity for multiple hands" <> header "fp - poker equity calculator")
205
false
true
3
9
57
72
31
41
null
null
kelnage/tamarin-prover
lib/utils/src/Text/PrettyPrint/Html.hs
gpl-3.0
-- | @withTagNonEmpty tag attrs inner@ adds the tag @tag@ with the attributes -- @attrs@ around the @inner@ document iff @inner@ is a non-empty document. withTagNonEmpty :: HtmlDocument d => String -> [(String,String)] -> d -> d withTagNonEmpty tag attrs inner = caseEmptyDoc inner emptyDoc $ withTag tag attrs inner
320
withTagNonEmpty :: HtmlDocument d => String -> [(String,String)] -> d -> d withTagNonEmpty tag attrs inner = caseEmptyDoc inner emptyDoc $ withTag tag attrs inner
166
withTagNonEmpty tag attrs inner = caseEmptyDoc inner emptyDoc $ withTag tag attrs inner
91
true
true
0
9
53
64
33
31
null
null
eb-gh-cr/XMonadContrib1
XMonad/Hooks/DebugEvents.hs
bsd-3-clause
-- and the same but for errors failure :: String -> Decoder Bool failure = append' False
89
failure :: String -> Decoder Bool failure = append' False
58
failure = append' False
24
true
true
0
7
17
28
12
16
null
null
marklar/jaml
Jaml/Parser/JavaScript/BacktickedValue.hs
mit
arrayVal :: Parser String arrayVal = between optSpaces (many $ noneOf ",]") (stringInside '\'' <|> stringInside '"' <|> many (noneOf " ,]"))
160
arrayVal :: Parser String arrayVal = between optSpaces (many $ noneOf ",]") (stringInside '\'' <|> stringInside '"' <|> many (noneOf " ,]"))
160
arrayVal = between optSpaces (many $ noneOf ",]") (stringInside '\'' <|> stringInside '"' <|> many (noneOf " ,]"))
134
false
true
0
10
41
57
27
30
null
null
meiersi/scyther-proof
src/Scyther/Theory/Html.hs
gpl-3.0
runHtmlMarkup :: HtmlMarkup a -> (a, (HtmlMarkupState, M.Map GraphDesc GraphIdx)) runHtmlMarkup m = case runIdentity . flip runConsistentLabelsT [1..] . flip runStateT emptyHtmlMarkupState . unHtmlMarkup $ m of ((res, st), (_, sequentIdxs)) -> (res, (st, sequentIdxs))
281
runHtmlMarkup :: HtmlMarkup a -> (a, (HtmlMarkupState, M.Map GraphDesc GraphIdx)) runHtmlMarkup m = case runIdentity . flip runConsistentLabelsT [1..] . flip runStateT emptyHtmlMarkupState . unHtmlMarkup $ m of ((res, st), (_, sequentIdxs)) -> (res, (st, sequentIdxs))
281
runHtmlMarkup m = case runIdentity . flip runConsistentLabelsT [1..] . flip runStateT emptyHtmlMarkupState . unHtmlMarkup $ m of ((res, st), (_, sequentIdxs)) -> (res, (st, sequentIdxs))
199
false
true
1
11
48
109
60
49
null
null
sixohsix/tak
src/Tak/Display.hs
mit
cursesKeyToEvt C.KeyEnd = KeyEvent KeyEnd
51
cursesKeyToEvt C.KeyEnd = KeyEvent KeyEnd
51
cursesKeyToEvt C.KeyEnd = KeyEvent KeyEnd
51
false
false
0
5
14
15
6
9
null
null
mdsteele/fallback
src/Fallback/State/Item.hs
gpl-3.0
accessoryName ShieldRing = "Shield Ring"
40
accessoryName ShieldRing = "Shield Ring"
40
accessoryName ShieldRing = "Shield Ring"
40
false
false
1
5
4
13
4
9
null
null
glguy/advent2016
Day19.hs
isc
part1 :: [a] -> Maybe a part1 = part1' []
41
part1 :: [a] -> Maybe a part1 = part1' []
41
part1 = part1' []
17
false
true
0
7
9
32
14
18
null
null
Tim-Tom/scratch
single-substitution-cipher/single-substitution.hs
unlicense
mergeInclusion :: [Bool] -> [Bool] -> [Bool] mergeInclusion = zipWith (||)
74
mergeInclusion :: [Bool] -> [Bool] -> [Bool] mergeInclusion = zipWith (||)
74
mergeInclusion = zipWith (||)
29
false
true
0
7
10
33
19
14
null
null
sgillespie/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
thunkClosureType :: StandardFormInfo -> ClosureTypeInfo thunkClosureType (SelectorThunk off) = ThunkSelector off
112
thunkClosureType :: StandardFormInfo -> ClosureTypeInfo thunkClosureType (SelectorThunk off) = ThunkSelector off
112
thunkClosureType (SelectorThunk off) = ThunkSelector off
56
false
true
0
7
10
27
13
14
null
null
DavidAlphaFox/darcs
src/Darcs/Patch/OldDate.hs
gpl-2.0
intToMonth 6 = June
19
intToMonth 6 = June
19
intToMonth 6 = June
19
false
false
1
5
3
13
4
9
null
null
cabrera/hdbc
Database/HDBC/Utils.hs
bsd-3-clause
{- | Like 'fetchRow', but return a list of Maybe Strings instead of 'SqlValue's. -} sFetchRow :: Statement -> IO (Maybe [Maybe String]) sFetchRow sth = do res <- fetchRow sth case res of Nothing -> return Nothing Just x -> return $ Just $ map fromSql x {- | Execute some code. If any un...
1,407
sFetchRow :: Statement -> IO (Maybe [Maybe String]) sFetchRow sth = do res <- fetchRow sth case res of Nothing -> return Nothing Just x -> return $ Just $ map fromSql x {- | Execute some code. If any uncaught exception occurs, run 'rollback' and re-raise it. Otherwise, run 'commit' and r...
1,320
sFetchRow sth = do res <- fetchRow sth case res of Nothing -> return Nothing Just x -> return $ Just $ map fromSql x {- | Execute some code. If any uncaught exception occurs, run 'rollback' and re-raise it. Otherwise, run 'commit' and return. This function, therefore, encapsulates the l...
1,268
true
true
0
11
266
83
39
44
null
null
haasn/hsbooru
src/HsBooru/Xapian.hs
gpl-3.0
-- * Internal constants -- Term prefix mapping, for reusable tags booruPrefix = "B"
87
booruPrefix = "B"
20
booruPrefix = "B"
20
true
false
0
4
17
8
5
3
null
null
goshakkk/hadis
src/Hadis/Commands/Sets.hs
mit
sismember :: Key -> String -> CommandReply sismember k v = flip onSet k $ replyBool . Set.member v
98
sismember :: Key -> String -> CommandReply sismember k v = flip onSet k $ replyBool . Set.member v
98
sismember k v = flip onSet k $ replyBool . Set.member v
55
false
true
0
7
18
42
20
22
null
null
mariefarrell/Hets
Common/MathLink.hs
gpl-2.0
{- | Integers are sent as strings, because the interface supports only machine integers with fixed length not arbitrary sized integers. -} mlPutInteger'' :: Integer -> ML CInt mlPutInteger'' i = mlPutFunction' "ToExpression" 1 >> mlPutString (show i)
250
mlPutInteger'' :: Integer -> ML CInt mlPutInteger'' i = mlPutFunction' "ToExpression" 1 >> mlPutString (show i)
111
mlPutInteger'' i = mlPutFunction' "ToExpression" 1 >> mlPutString (show i)
74
true
true
0
8
37
40
19
21
null
null
jgoerzen/dtmconv
HaXml-1.12/src/Text/XML/HaXml/Html/Parse.hs
gpl-2.0
reformatTags ts = concatMap f0 ts where f0 (t,avs) = [TokAnyOpen, TokName t]++reformatAttrs avs++[TokAnyClose]
114
reformatTags ts = concatMap f0 ts where f0 (t,avs) = [TokAnyOpen, TokName t]++reformatAttrs avs++[TokAnyClose]
114
reformatTags ts = concatMap f0 ts where f0 (t,avs) = [TokAnyOpen, TokName t]++reformatAttrs avs++[TokAnyClose]
114
false
false
0
8
17
53
27
26
null
null
vincenthz/socksmaster
Src/Main.hs
bsd-3-clause
logAddr :: SockAddr -> String -> IO () logAddr addr s = withTerminalLock $ do hSetSGR stdout [SetColor Foreground Vivid Blue] hPutStr stdout "[ LOG ] " hSetSGR stdout [SetColor Foreground Vivid Green] hPutStr stdout (show addr) hSetSGR stdout [] hPutStrLn stdout (": " ++ s)
298
logAddr :: SockAddr -> String -> IO () logAddr addr s = withTerminalLock $ do hSetSGR stdout [SetColor Foreground Vivid Blue] hPutStr stdout "[ LOG ] " hSetSGR stdout [SetColor Foreground Vivid Green] hPutStr stdout (show addr) hSetSGR stdout [] hPutStrLn stdout (": " ++ s)
298
logAddr addr s = withTerminalLock $ do hSetSGR stdout [SetColor Foreground Vivid Blue] hPutStr stdout "[ LOG ] " hSetSGR stdout [SetColor Foreground Vivid Green] hPutStr stdout (show addr) hSetSGR stdout [] hPutStrLn stdout (": " ++ s)
259
false
true
0
10
69
116
52
64
null
null
SuperDrew/sql-server-gen
src/Database/SqlServer/Definition/PartitionFunction.hs
bsd-2-clause
renderRange :: Range -> Doc renderRange Left = text "LEFT"
58
renderRange :: Range -> Doc renderRange Left = text "LEFT"
58
renderRange Left = text "LEFT"
30
false
true
0
5
9
21
10
11
null
null
DanielSchuessler/hstri
Math/SparseVector.hs
gpl-3.0
sparse_map :: (Num r', Ord k, Eq r') => (r -> r') -> SparseVector k r -> SparseVector k r' sparse_map f = sparse_mapWithKey (const f)
140
sparse_map :: (Num r', Ord k, Eq r') => (r -> r') -> SparseVector k r -> SparseVector k r' sparse_map f = sparse_mapWithKey (const f)
140
sparse_map f = sparse_mapWithKey (const f)
42
false
true
0
9
32
73
35
38
null
null
JoeyEremondi/haskelm
src/Language/Elm/TH/Json.hs
bsd-3-clause
fromJsonForType t | isTupleType t = do let tList = tupleTypeToList t let n = length tList --Generate the lambda to convert the list into a tuple subFunList <- mapM fromJsonForType tList argNames <- mapM (liftNewName . ("x" ++) . show) [1 .. n] let argValues = map VarE argNames ...
638
fromJsonForType t | isTupleType t = do let tList = tupleTypeToList t let n = length tList --Generate the lambda to convert the list into a tuple subFunList <- mapM fromJsonForType tList argNames <- mapM (liftNewName . ("x" ++) . show) [1 .. n] let argValues = map VarE argNames ...
638
fromJsonForType t | isTupleType t = do let tList = tupleTypeToList t let n = length tList --Generate the lambda to convert the list into a tuple subFunList <- mapM fromJsonForType tList argNames <- mapM (liftNewName . ("x" ++) . show) [1 .. n] let argValues = map VarE argNames ...
638
false
false
0
13
172
222
102
120
null
null
hanshoglund/modulo
src/Language/Modulo/Lisp.hs
gpl-3.0
convertPrimType st UChar = keyword "unsigned-char"
55
convertPrimType st UChar = keyword "unsigned-char"
55
convertPrimType st UChar = keyword "unsigned-char"
55
false
false
0
5
10
14
6
8
null
null
timjb/lens
src/Language/Haskell/TH/Lens.hs
bsd-3-clause
_ConLike :: Prism' RuleMatch () _ConLike = prism' reviewer remitter where reviewer () = ConLike remitter ConLike = Just () remitter _ = Nothing
165
_ConLike :: Prism' RuleMatch () _ConLike = prism' reviewer remitter where reviewer () = ConLike remitter ConLike = Just () remitter _ = Nothing
165
_ConLike = prism' reviewer remitter where reviewer () = ConLike remitter ConLike = Just () remitter _ = Nothing
133
false
true
2
7
45
58
27
31
null
null
AlexeyRaga/eta
compiler/ETA/Main/HscMain.hs
bsd-3-clause
hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts hscDesugar hsc_env mod_summary tc_result = runHsc hsc_env $ hscDesugar' (ms_location mod_summary) tc_result
172
hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts hscDesugar hsc_env mod_summary tc_result = runHsc hsc_env $ hscDesugar' (ms_location mod_summary) tc_result
172
hscDesugar hsc_env mod_summary tc_result = runHsc hsc_env $ hscDesugar' (ms_location mod_summary) tc_result
111
false
true
0
8
25
51
24
27
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Protocol.hs
bsd-3-clause
packageExpr (CeilFloat e) = packageMathExpr EXPRF_CEIL e
56
packageExpr (CeilFloat e) = packageMathExpr EXPRF_CEIL e
56
packageExpr (CeilFloat e) = packageMathExpr EXPRF_CEIL e
56
false
false
0
7
6
20
9
11
null
null
Xandaros/coap
src/Data/Coap/Internal/TH.hs
bsd-2-clause
makeClauses :: [Name] -> Integer -> ([Clause], [Clause]) makeClauses [] _ = ([], [])
84
makeClauses :: [Name] -> Integer -> ([Clause], [Clause]) makeClauses [] _ = ([], [])
84
makeClauses [] _ = ([], [])
27
false
true
0
8
13
51
29
22
null
null
dkandalov/katas
haskell/p99/src/p9x/p50/P50.hs
unlicense
minHbalHeight :: Int -> Int minHbalHeight 0 = 0
47
minHbalHeight :: Int -> Int minHbalHeight 0 = 0
47
minHbalHeight 0 = 0
19
false
true
0
5
8
18
9
9
null
null
rueshyna/gogol
gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Product.hs
mpl-2.0
-- | Type of the resource. This is always \"tasks#task\". ttKind :: Lens' Task Text ttKind = lens _ttKind (\ s a -> s{_ttKind = a})
131
ttKind :: Lens' Task Text ttKind = lens _ttKind (\ s a -> s{_ttKind = a})
73
ttKind = lens _ttKind (\ s a -> s{_ttKind = a})
47
true
true
0
9
25
47
23
24
null
null
SamyNarrainen/SimpleGrammarParser
Haskell/Stack.hs
mit
pop ((:) x xs) = (x, xs)
24
pop ((:) x xs) = (x, xs)
24
pop ((:) x xs) = (x, xs)
24
false
false
0
6
6
26
14
12
null
null
twittner/cql
src/Database/CQL/Protocol/Header.hs
mpl-2.0
-- | Compression flag. If set, the frame body is compressed. compress :: Flags compress = Flags 1
97
compress :: Flags compress = Flags 1
36
compress = Flags 1
18
true
true
0
5
17
15
8
7
null
null
PSU-CS-300-Fall2015/taunet-utils
taunet-node.hs
gpl-3.0
argd :: [ Arg ArgIndex ] argd = [ Arg { argIndex = ArgUser, argDesc = "Specify TauNet username.", argAbbr = Nothing, argName = Nothing, argData = argDataRequired "username" ArgtypeString } ]
245
argd :: [ Arg ArgIndex ] argd = [ Arg { argIndex = ArgUser, argDesc = "Specify TauNet username.", argAbbr = Nothing, argName = Nothing, argData = argDataRequired "username" ArgtypeString } ]
245
argd = [ Arg { argIndex = ArgUser, argDesc = "Specify TauNet username.", argAbbr = Nothing, argName = Nothing, argData = argDataRequired "username" ArgtypeString } ]
220
false
true
0
9
86
64
35
29
null
null
jonaprieto/online-atps
src/OnlineATPs/Utils/Version.hs
mit
oUpperFirst ∷ String → String toUpperFirst [] = []
57
toUpperFirst ∷ String → String toUpperFirst [] = []
57
toUpperFirst [] = []
26
false
true
0
8
15
27
12
15
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'MapS.toAscList' ms_toAscList = MapS.toAscList
50
ms_toAscList = MapS.toAscList
29
ms_toAscList = MapS.toAscList
29
true
false
0
5
4
9
5
4
null
null
petertseng/adventofcode-hs
bin/07_logic_gates.hs
apache-2.0
main :: IO () main = do s <- readInputFile let gates = map (parseGate . words) (lines s) circuit = Map.fromList gates a = values circuit Map.! "a" print a let circuit' = Map.insert "b" (Wire (Constant a)) circuit print (values circuit' Map.! "a")
268
main :: IO () main = do s <- readInputFile let gates = map (parseGate . words) (lines s) circuit = Map.fromList gates a = values circuit Map.! "a" print a let circuit' = Map.insert "b" (Wire (Constant a)) circuit print (values circuit' Map.! "a")
268
main = do s <- readInputFile let gates = map (parseGate . words) (lines s) circuit = Map.fromList gates a = values circuit Map.! "a" print a let circuit' = Map.insert "b" (Wire (Constant a)) circuit print (values circuit' Map.! "a")
254
false
true
0
15
66
134
61
73
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
obligedly = id
14
obligedly = id
14
obligedly = id
14
false
false
0
4
2
6
3
3
null
null
tserduke/hot
lib/iterative/Data/Hot/Generic.hs
bsd-3-clause
runSub :: Sub a r -> r runSub (Sub _ _ x) = x
45
runSub :: Sub a r -> r runSub (Sub _ _ x) = x
45
runSub (Sub _ _ x) = x
22
false
true
0
9
13
39
17
22
null
null
ChrisLane/leksah
src/IDE/Command.hs
gpl-2.0
getActionsFor SensitivityEditor = getActionsFor' ["EditUndo", "EditRedo", "EditGotoLine","EditComment", "EditUncomment", "EditSelectAll", "EditShiftLeft", "EditShiftRight","FileClose", "OpenDocu" ]
229
getActionsFor SensitivityEditor = getActionsFor' ["EditUndo", "EditRedo", "EditGotoLine","EditComment", "EditUncomment", "EditSelectAll", "EditShiftLeft", "EditShiftRight","FileClose", "OpenDocu" ]
229
getActionsFor SensitivityEditor = getActionsFor' ["EditUndo", "EditRedo", "EditGotoLine","EditComment", "EditUncomment", "EditSelectAll", "EditShiftLeft", "EditShiftRight","FileClose", "OpenDocu" ]
229
false
false
0
6
44
42
25
17
null
null
maarons/Cortex
Miranda/ValueStorage.hs
agpl-3.0
----- insert :: Commit -> ValueStorage -> ValueStorage insert c (ValueStorage (vt, cl)) = do let (cl', r) = CL.insert c cl ValueStorage (foldl (flip VT.apply) vt r, cl') -----
185
insert :: Commit -> ValueStorage -> ValueStorage insert c (ValueStorage (vt, cl)) = do let (cl', r) = CL.insert c cl ValueStorage (foldl (flip VT.apply) vt r, cl') -----
178
insert c (ValueStorage (vt, cl)) = do let (cl', r) = CL.insert c cl ValueStorage (foldl (flip VT.apply) vt r, cl') -----
129
true
true
0
12
39
88
45
43
null
null
rueshyna/gogol
gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs
mpl-2.0
-- | [Output Only] A list of resource types supported by Deployment Manager. tlrTypes :: Lens' TypesListResponse [Type] tlrTypes = lens _tlrTypes (\ s a -> s{_tlrTypes = a}) . _Default . _Coerce
208
tlrTypes :: Lens' TypesListResponse [Type] tlrTypes = lens _tlrTypes (\ s a -> s{_tlrTypes = a}) . _Default . _Coerce
131
tlrTypes = lens _tlrTypes (\ s a -> s{_tlrTypes = a}) . _Default . _Coerce
88
true
true
0
11
46
53
28
25
null
null
l-d-s/lambda-repl
src/LambdaCalculus/ExampleTerms.hs
unlicense
ltFalse :: LambdaTerm ltFalse = Lam 0 (Lam 1 (Var 1))
53
ltFalse :: LambdaTerm ltFalse = Lam 0 (Lam 1 (Var 1))
53
ltFalse = Lam 0 (Lam 1 (Var 1))
31
false
true
0
9
10
30
15
15
null
null
Helkafen/cabal
cabal-install/Distribution/Client/HttpUtils.hs
bsd-3-clause
downloadURI verbosity uri path = do let etagPath = path <.> "etag" targetExists <- doesFileExist path etagPathExists <- doesFileExist etagPath -- In rare cases the target file doesn't exist, but the etag does. etag <- if targetExists && etagPathExists then liftM Just $ readFile etagPath ...
1,738
downloadURI verbosity uri path = do let etagPath = path <.> "etag" targetExists <- doesFileExist path etagPathExists <- doesFileExist etagPath -- In rare cases the target file doesn't exist, but the etag does. etag <- if targetExists && etagPathExists then liftM Just $ readFile etagPath ...
1,738
downloadURI verbosity uri path = do let etagPath = path <.> "etag" targetExists <- doesFileExist path etagPathExists <- doesFileExist etagPath -- In rare cases the target file doesn't exist, but the etag does. etag <- if targetExists && etagPathExists then liftM Just $ readFile etagPath ...
1,738
false
false
0
20
535
497
243
254
null
null
Sword-Smith/hfasto
src/MipsRegAlloc.hs
mit
killRegisterH (Mips.SW _ _ _ ) = S.empty
44
killRegisterH (Mips.SW _ _ _ ) = S.empty
44
killRegisterH (Mips.SW _ _ _ ) = S.empty
44
false
false
0
8
11
23
11
12
null
null
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs
mpl-2.0
-- | Token used to access the next page of this result. Omitted if no further -- results are available, in which case nextSyncToken is provided. aNextPageToken :: Lens' ACL (Maybe Text) aNextPageToken = lens _aNextPageToken (\ s a -> s{_aNextPageToken = a})
265
aNextPageToken :: Lens' ACL (Maybe Text) aNextPageToken = lens _aNextPageToken (\ s a -> s{_aNextPageToken = a})
120
aNextPageToken = lens _aNextPageToken (\ s a -> s{_aNextPageToken = a})
79
true
true
1
9
50
52
26
26
null
null
glguy/5puzzle
src/Booleans.hs
isc
getModel :: Codec a => StateT SAT IO a -> IO (Maybe (Decoded a)) getModel m = do res <- solveWith minisat m case res of (Satisfied, Just x) -> return (Just x) (Unsatisfied, _ ) -> return Nothing _ -> fail "panic: ersatz bug" -- | Returns 'true' when at most one element i...
365
getModel :: Codec a => StateT SAT IO a -> IO (Maybe (Decoded a)) getModel m = do res <- solveWith minisat m case res of (Satisfied, Just x) -> return (Just x) (Unsatisfied, _ ) -> return Nothing _ -> fail "panic: ersatz bug" -- | Returns 'true' when at most one element i...
365
getModel m = do res <- solveWith minisat m case res of (Satisfied, Just x) -> return (Just x) (Unsatisfied, _ ) -> return Nothing _ -> fail "panic: ersatz bug" -- | Returns 'true' when at most one element in the given list-like structure -- is 'true'.
300
false
true
0
12
110
116
56
60
null
null
keithodulaigh/Hets
DFOL/Sign.hs
gpl-2.0
-- get the list of declared variables getVars :: CONTEXT -> Set.Set NAME getVars (Context ds) = Set.fromList $ getVarsFromDecls ds
130
getVars :: CONTEXT -> Set.Set NAME getVars (Context ds) = Set.fromList $ getVarsFromDecls ds
92
getVars (Context ds) = Set.fromList $ getVarsFromDecls ds
57
true
true
0
7
20
39
19
20
null
null
zebbo/stack-machine
test/EmulatorTests.hs
gpl-3.0
tests = TestList [TestLabel "testMultibyteInstructions" testMultibyteInstructions]
82
tests = TestList [TestLabel "testMultibyteInstructions" testMultibyteInstructions]
82
tests = TestList [TestLabel "testMultibyteInstructions" testMultibyteInstructions]
82
false
false
1
6
5
20
8
12
null
null
j5b/ps-pc
Reader.hs
gpl-3.0
getMode ('c':'h':'e':'c':'k':rest) = Check
42
getMode ('c':'h':'e':'c':'k':rest) = Check
42
getMode ('c':'h':'e':'c':'k':rest) = Check
42
false
false
0
10
3
33
16
17
null
null
CarmineM74/haskell_craft3e
Chapter16/Queues1.hs
mit
-- 16.11 -- Unique queue -- The only difference from queue defined in -- Queues1.hs is in addQ function -- This function must forbid the insertion of duplicate elements. -- The question is: How should addQ behave when trying to add -- a duplicate element to the queue? -- Possible strategies are: -- 1. addQ throws an e...
573
addQ' :: Eq a => a -> Queue a -> Queue a addQ' y (Queue xs) | elem y xs = Queue xs | otherwise = Queue (xs ++ [y])
122
addQ' y (Queue xs) | elem y xs = Queue xs | otherwise = Queue (xs ++ [y])
81
true
true
0
11
120
97
49
48
null
null
amccausl/Swish
Swish/HaskellRDF/VarBindingTest.hs
lgpl-2.1
testVarBinding44 = test "testVarBinding44" $ not (vbNull vb21)
64
testVarBinding44 = test "testVarBinding44" $ not (vbNull vb21)
64
testVarBinding44 = test "testVarBinding44" $ not (vbNull vb21)
64
false
false
0
8
9
22
10
12
null
null
agrafix/Spock
Spock-core/src/Web/Spock/Internal/Cookies.hs
bsd-3-clause
generateCookieHeaderString :: T.Text -> T.Text -> CookieSettings -> UTCTime -> BS.ByteString generateCookieHeaderString name value cs now = let farFuture = -- don't forget to bump this ... UTCTime (fromGregorian 2030 1 1) 0 (expire, maxAge) = case cs_EOL cs of CookieV...
1,164
generateCookieHeaderString :: T.Text -> T.Text -> CookieSettings -> UTCTime -> BS.ByteString generateCookieHeaderString name value cs now = let farFuture = -- don't forget to bump this ... UTCTime (fromGregorian 2030 1 1) 0 (expire, maxAge) = case cs_EOL cs of CookieV...
1,164
generateCookieHeaderString name value cs now = let farFuture = -- don't forget to bump this ... UTCTime (fromGregorian 2030 1 1) 0 (expire, maxAge) = case cs_EOL cs of CookieValidUntil t -> (Just t, Just (t `diffUTCTime` now)) CookieValidFor x -> ...
1,061
false
true
0
15
390
320
169
151
null
null
jxv/cis-194-winter-2016
src/Homework/Week05/StackVM.hs
mit
execute (BVal s1:BVal s2:ss) (And : xs) = execute (s':ss) xs where s' = BVal (s1 && s2)
95
execute (BVal s1:BVal s2:ss) (And : xs) = execute (s':ss) xs where s' = BVal (s1 && s2)
95
execute (BVal s1:BVal s2:ss) (And : xs) = execute (s':ss) xs where s' = BVal (s1 && s2)
95
false
false
0
9
25
65
32
33
null
null
gcampax/ghc
compiler/main/Packages.hs
bsd-3-clause
getPreloadPackagesAnd :: DynFlags -> [PackageKey] -> IO [PackageConfig] getPreloadPackagesAnd dflags pkgids = let state = pkgState dflags pkg_map = pkgIdMap state ipid_map = installedPackageIdMap state preload = preloadPackages state pairs = zip pkgids (repeat Nothing) in do all_pk...
603
getPreloadPackagesAnd :: DynFlags -> [PackageKey] -> IO [PackageConfig] getPreloadPackagesAnd dflags pkgids = let state = pkgState dflags pkg_map = pkgIdMap state ipid_map = installedPackageIdMap state preload = preloadPackages state pairs = zip pkgids (repeat Nothing) in do all_pk...
603
getPreloadPackagesAnd dflags pkgids = let state = pkgState dflags pkg_map = pkgIdMap state ipid_map = installedPackageIdMap state preload = preloadPackages state pairs = zip pkgids (repeat Nothing) in do all_pkgs <- throwErr dflags (foldM (add_package pkg_map ipid_map) preload pair...
531
false
true
0
14
118
139
68
71
null
null
osa1/chsc
Core/Size.hs
bsd-3-clause
(varSize', termSize, termSize', altsSize, valueSize, valueSize') = mkSize (\f (Identity e) -> f e)
103
(varSize', termSize, termSize', altsSize, valueSize, valueSize') = mkSize (\f (Identity e) -> f e)
103
(varSize', termSize, termSize', altsSize, valueSize, valueSize') = mkSize (\f (Identity e) -> f e)
103
false
false
0
9
18
47
26
21
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types.hs
mpl-2.0
-- | View your Google Compute Engine resources computeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/compute.readonly"] computeReadOnlyScope = Proxy
159
computeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/compute.readonly"] computeReadOnlyScope = Proxy
112
computeReadOnlyScope = Proxy
28
true
true
0
7
14
20
11
9
null
null
theam/haskell-do
src/common/HaskellDo/Compilation/State.hs
apache-2.0
update :: Action -> State -> Cloud State update (WriteWorkingFile content) state = localIO $ do unless (null $ projectPath state) (writeWorkingFile content state) return state
183
update :: Action -> State -> Cloud State update (WriteWorkingFile content) state = localIO $ do unless (null $ projectPath state) (writeWorkingFile content state) return state
183
update (WriteWorkingFile content) state = localIO $ do unless (null $ projectPath state) (writeWorkingFile content state) return state
142
false
true
0
11
33
69
32
37
null
null
VictorDenisov/jdi
src/Language/Java/Jdi/Impl.hs
gpl-2.0
-- | Invalidates this virtual machine mirror. dispose :: MonadIO m => VirtualMachine m () dispose = do h <- getVmHandle cntr <- yieldPacketIdCounter liftIO $ J.sendPacket h $ J.disposeCommand cntr liftIO $ J.waitReply h return () -- | Causes the mirrored VM to terminate with the given error code.
318
dispose :: MonadIO m => VirtualMachine m () dispose = do h <- getVmHandle cntr <- yieldPacketIdCounter liftIO $ J.sendPacket h $ J.disposeCommand cntr liftIO $ J.waitReply h return () -- | Causes the mirrored VM to terminate with the given error code.
272
dispose = do h <- getVmHandle cntr <- yieldPacketIdCounter liftIO $ J.sendPacket h $ J.disposeCommand cntr liftIO $ J.waitReply h return () -- | Causes the mirrored VM to terminate with the given error code.
228
true
true
0
11
70
88
38
50
null
null
snoyberg/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprGloblDecl :: CLabel -> SDoc pprGloblDecl lbl | not (externallyVisibleCLabel lbl) = empty | otherwise = text ".globl " <> ppr lbl
135
pprGloblDecl :: CLabel -> SDoc pprGloblDecl lbl | not (externallyVisibleCLabel lbl) = empty | otherwise = text ".globl " <> ppr lbl
135
pprGloblDecl lbl | not (externallyVisibleCLabel lbl) = empty | otherwise = text ".globl " <> ppr lbl
104
false
true
0
10
25
59
25
34
null
null
asi1024/WXCS
src/Utils.hs
mit
diffTime :: ZonedTime -> ZonedTime -> Int diffTime a b = ceiling $ diffUTCTime (zonedTimeToUTC a) (zonedTimeToUTC b) / 60
121
diffTime :: ZonedTime -> ZonedTime -> Int diffTime a b = ceiling $ diffUTCTime (zonedTimeToUTC a) (zonedTimeToUTC b) / 60
121
diffTime a b = ceiling $ diffUTCTime (zonedTimeToUTC a) (zonedTimeToUTC b) / 60
79
false
true
0
9
19
49
24
25
null
null
karamellpelle/grid
source/Game/Memory/Output/Fancy.hs
gpl-3.0
outputFailure :: MemoryWorld -> RunWorld -> MEnv' (MemoryWorld, RunWorld) outputFailure = \mem run -> do gamedata <- resourceGameData io $ do putStrLn "Memory.iterationFailure" outputSoundFailure gamedata mem run outputScreenFailure gamedata mem run return (mem, run)
299
outputFailure :: MemoryWorld -> RunWorld -> MEnv' (MemoryWorld, RunWorld) outputFailure = \mem run -> do gamedata <- resourceGameData io $ do putStrLn "Memory.iterationFailure" outputSoundFailure gamedata mem run outputScreenFailure gamedata mem run return (mem, run)
299
outputFailure = \mem run -> do gamedata <- resourceGameData io $ do putStrLn "Memory.iterationFailure" outputSoundFailure gamedata mem run outputScreenFailure gamedata mem run return (mem, run)
225
false
true
0
12
65
87
41
46
null
null
ezyang/ghc
compiler/prelude/ForeignCall.hs
bsd-3-clause
ccallConvAttribute CCallConv = empty
44
ccallConvAttribute CCallConv = empty
44
ccallConvAttribute CCallConv = empty
44
false
false
0
5
11
9
4
5
null
null
ublubu/shapes
shapes/src/Physics/Scenes/Stacks.hs
mit
box' :: (Double, Double) -> (Double, Double) -> (Double, Double) -> label -> WorldObj label box' (w, h) center velocity = makeWorldObj (box center velocity) 0.2 0 (makeRectangleHull w h)
208
box' :: (Double, Double) -> (Double, Double) -> (Double, Double) -> label -> WorldObj label box' (w, h) center velocity = makeWorldObj (box center velocity) 0.2 0 (makeRectangleHull w h)
208
box' (w, h) center velocity = makeWorldObj (box center velocity) 0.2 0 (makeRectangleHull w h)
96
false
true
0
9
51
86
46
40
null
null
AndrewRademacher/hs-paypal-rest
src/PayPal/Identity.hs
mit
createIdentity = undefined
26
createIdentity = undefined
26
createIdentity = undefined
26
false
false
0
4
2
6
3
3
null
null
olsner/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
zipCvSubst :: [CoVar] -> [Coercion] -> TCvSubst zipCvSubst cvs cos | debugIsOn , not (all isCoVar cvs) || length cvs /= length cos = pprTrace "zipCvSubst" (ppr cvs $$ ppr cos) emptyTCvSubst | otherwise = TCvSubst (mkInScopeSet (tyCoVarsOfCos cos)) emptyTvSubstEnv cenv where cenv = zipCoEnv cvs cos -- |...
432
zipCvSubst :: [CoVar] -> [Coercion] -> TCvSubst zipCvSubst cvs cos | debugIsOn , not (all isCoVar cvs) || length cvs /= length cos = pprTrace "zipCvSubst" (ppr cvs $$ ppr cos) emptyTCvSubst | otherwise = TCvSubst (mkInScopeSet (tyCoVarsOfCos cos)) emptyTvSubstEnv cenv where cenv = zipCoEnv cvs cos -- |...
432
zipCvSubst cvs cos | debugIsOn , not (all isCoVar cvs) || length cvs /= length cos = pprTrace "zipCvSubst" (ppr cvs $$ ppr cos) emptyTCvSubst | otherwise = TCvSubst (mkInScopeSet (tyCoVarsOfCos cos)) emptyTvSubstEnv cenv where cenv = zipCoEnv cvs cos -- | Generates the in-scope set for the 'TCvSubst' f...
384
false
true
0
12
83
130
62
68
null
null
adk9/haskell-streamit
Language/StreamIt/Graph.hs
bsd-3-clause
evalStream :: (Elt a, Elt b, Monad m) => Int -> StreamItT a b m () -> m (Int, StatementS) evalStream id (StreamItT f) = do (_, x) <- f (id, Empty) return x
159
evalStream :: (Elt a, Elt b, Monad m) => Int -> StreamItT a b m () -> m (Int, StatementS) evalStream id (StreamItT f) = do (_, x) <- f (id, Empty) return x
159
evalStream id (StreamItT f) = do (_, x) <- f (id, Empty) return x
69
false
true
0
9
37
99
50
49
null
null
dmbarbour/Sirea
src/Sirea/Internal/LTypes.hs
bsd-3-clause
-- Thoughts: It might be worth adding some path descriptors to LC -- for debugging purposes, i.e. to answer: "Where am I?" Could do -- this from both sides. -- | ln_zero is a trivial LnkUp state, like LnkDead but opaque. ln_zero :: (Monad m) => LnkUpM m a ln_zero = LnkUp touch update idle cycle where touch = retu...
436
ln_zero :: (Monad m) => LnkUpM m a ln_zero = LnkUp touch update idle cycle where touch = return () update _ _ _ = return () idle _ = return () cycle _ = return () -- duplicate touches and updates.
213
ln_zero = LnkUp touch update idle cycle where touch = return () update _ _ _ = return () idle _ = return () cycle _ = return () -- duplicate touches and updates.
178
true
true
0
8
101
94
48
46
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxTEXT_ATTR_PARA_SPACING_BEFORE :: Int wxTEXT_ATTR_PARA_SPACING_BEFORE = 0x00001000
85
wxTEXT_ATTR_PARA_SPACING_BEFORE :: Int wxTEXT_ATTR_PARA_SPACING_BEFORE = 0x00001000
85
wxTEXT_ATTR_PARA_SPACING_BEFORE = 0x00001000
45
false
true
0
4
7
11
6
5
null
null
Peaker/lamdu
src/Lamdu/GUI/TagPane.hs
gpl-3.0
hspace :: _ => m (TextWidget f) hspace = Spacer.stdHSpace <&> Widget.fromView <&> WithTextPos 0
95
hspace :: _ => m (TextWidget f) hspace = Spacer.stdHSpace <&> Widget.fromView <&> WithTextPos 0
95
hspace = Spacer.stdHSpace <&> Widget.fromView <&> WithTextPos 0
63
false
true
0
9
14
45
20
25
null
null
themoritz/cabal
Cabal/Distribution/PackageDescription/Parsec.hs
bsd-3-clause
-- | Parse a non-recursive list of fields, given a list of field descriptions, -- a structure to accumulate the parsed fields, and a function -- that can decide what to do with fields which don't match any -- of the field descriptions. parseFields :: forall a. [FieldDescr a] -- ^ descriptions of...
1,319
parseFields :: forall a. [FieldDescr a] -- ^ descriptions of fields we know how to parse -> UnknownFieldParser a -- ^ possibly do something with unrecognized fields -> a -- ^ accumulator -> [Field Position] -- ^ fields to be parsed -> ParseResult a parseFields...
1,077
parseFields descrs _unknown = foldM go where go :: a -> Field Position -> ParseResult a go x (Section (Name pos name) _ _) = do -- Even we occur a subsection, we can continue parsing parseFailure pos $ "invalid subsection " ++ show name return x go x (Field (Name pos name) fieldLin...
768
true
true
9
13
409
280
139
141
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
-- | Internal cluster error errorsEcodeFault :: String errorsEcodeFault = "internal_error"
90
errorsEcodeFault :: String errorsEcodeFault = "internal_error"
62
errorsEcodeFault = "internal_error"
35
true
true
0
4
10
12
7
5
null
null
Jefffrey/Verba
src/Verba/Puzzle.hs
mit
-- Function that takes a puzzle and a position -- and returns all valid neightbours from that position. getNeightbours :: (Int, Int) -> Puzzle -> [(Int, Int)] getNeightbours (i, j) (Puzzle puz) = let allNeightbours = [(i - 1, j - 1), (i - 1, j), (i - 1, j + 1), (i , j - 1), ...
585
getNeightbours :: (Int, Int) -> Puzzle -> [(Int, Int)] getNeightbours (i, j) (Puzzle puz) = let allNeightbours = [(i - 1, j - 1), (i - 1, j), (i - 1, j + 1), (i , j - 1), (i , j + 1), (i + 1, j - 1), (i + 1, j), (i + 1, j + 1)] in filter isVa...
481
getNeightbours (i, j) (Puzzle puz) = let allNeightbours = [(i - 1, j - 1), (i - 1, j), (i - 1, j + 1), (i , j - 1), (i , j + 1), (i + 1, j - 1), (i + 1, j), (i + 1, j + 1)] in filter isValid allNeightbours where isValid (i, j) = i > 0...
426
true
true
0
11
202
241
137
104
null
null
llelf/hn
HN/NewComments.hs
bsd-3-clause
sh file s = join $ showSome s <$> pp file
41
sh file s = join $ showSome s <$> pp file
41
sh file s = join $ showSome s <$> pp file
41
false
false
3
6
10
30
11
19
null
null
DavidAlphaFox/darcs
containers-0.5.2.1/Darcs/Data/Map/Base.hs
gpl-2.0
showWide :: Bool -> [String] -> String -> String showWide wide bars | wide = showString (concat (reverse bars)) . showString "|\n" | otherwise = id
156
showWide :: Bool -> [String] -> String -> String showWide wide bars | wide = showString (concat (reverse bars)) . showString "|\n" | otherwise = id
156
showWide wide bars | wide = showString (concat (reverse bars)) . showString "|\n" | otherwise = id
107
false
true
0
9
34
76
34
42
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M06/D25/Exercise.hs
mit
artId :: String artId = "c9d40d94-6b24-11e8-bea5-9b00fce84fd4"
62
artId :: String artId = "c9d40d94-6b24-11e8-bea5-9b00fce84fd4"
62
artId = "c9d40d94-6b24-11e8-bea5-9b00fce84fd4"
46
false
true
0
6
5
18
7
11
null
null
jarmond/locomotive-haskell
src/Loco/Lexer.hs
gpl-3.0
-- | Parse anything between parentheses. parens :: GenParser m => m a -> m a parens = between (symbol "(") (symbol ")")
119
parens :: GenParser m => m a -> m a parens = between (symbol "(") (symbol ")")
78
parens = between (symbol "(") (symbol ")")
42
true
true
0
7
22
46
22
24
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/streaming/pipes/src/PipesTutorial.hs
unlicense
runLoop3 = runEffect $ for stdinLn (lift . putStrLn)
52
runLoop3 = runEffect $ for stdinLn (lift . putStrLn)
52
runLoop3 = runEffect $ for stdinLn (lift . putStrLn)
52
false
false
3
7
8
26
11
15
null
null
bitemyapp/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
hsSigDoc (PatSynSig {}) = ptext (sLit "pattern synonym signature")
74
hsSigDoc (PatSynSig {}) = ptext (sLit "pattern synonym signature")
74
hsSigDoc (PatSynSig {}) = ptext (sLit "pattern synonym signature")
74
false
false
0
7
16
25
12
13
null
null
vigoo/stack
src/Stack/Package.hs
bsd-3-clause
-- | Read the raw, unresolved package information. readPackageUnresolved :: (MonadIO m, MonadThrow m) => Path Abs File -> m ([PWarning],GenericPackageDescription) readPackageUnresolved cabalfp = liftIO (BS.readFile (FL.toFilePath cabalfp)) >>= readPackageUnresolvedBS (Jus...
330
readPackageUnresolved :: (MonadIO m, MonadThrow m) => Path Abs File -> m ([PWarning],GenericPackageDescription) readPackageUnresolved cabalfp = liftIO (BS.readFile (FL.toFilePath cabalfp)) >>= readPackageUnresolvedBS (Just cabalfp)
279
readPackageUnresolved cabalfp = liftIO (BS.readFile (FL.toFilePath cabalfp)) >>= readPackageUnresolvedBS (Just cabalfp)
123
true
true
2
10
79
89
44
45
null
null
joris-r/labaskel
BRec.hs
apache-2.0
k m l n = (mutExpression m) l n
33
k m l n = (mutExpression m) l n
33
k m l n = (mutExpression m) l n
33
false
false
0
7
10
25
11
14
null
null
themoritz/cabal
Cabal/Distribution/Simple/GHCJS.hs
bsd-3-clause
ghcjsProfOptions :: BuildInfo -> [String] ghcjsProfOptions bi = hcProfOptions GHC bi `mappend` hcProfOptions GHCJS bi
119
ghcjsProfOptions :: BuildInfo -> [String] ghcjsProfOptions bi = hcProfOptions GHC bi `mappend` hcProfOptions GHCJS bi
119
ghcjsProfOptions bi = hcProfOptions GHC bi `mappend` hcProfOptions GHCJS bi
77
false
true
0
6
16
37
19
18
null
null
elliottt/dang
src/Dang/ModuleSystem/Rename.hs
bsd-3-clause
rnType (TVar loc v) = withLoc loc $ TVar loc <$> rnTypeName v
66
rnType (TVar loc v) = withLoc loc $ TVar loc <$> rnTypeName v
66
rnType (TVar loc v) = withLoc loc $ TVar loc <$> rnTypeName v
66
false
false
0
7
17
34
15
19
null
null
beni55/hermit
src/HERMIT/Dictionary/WorkerWrapper/Fix.hs
bsd-2-clause
-- | @wrap (unwrap (f a))@ \<==\> @f a@ wwAssB :: Maybe (RewriteH CoreExpr) -- ^ WW Assumption B -> CoreExpr -- ^ wrap -> CoreExpr -- ^ unwrap -> CoreExpr -- ^ f -> BiRewriteH CoreExpr wwAssB mr wrap unwrap f = beforeBiR (whenJust (verifyA...
1,042
wwAssB :: Maybe (RewriteH CoreExpr) -- ^ WW Assumption B -> CoreExpr -- ^ wrap -> CoreExpr -- ^ unwrap -> CoreExpr -- ^ f -> BiRewriteH CoreExpr wwAssB mr wrap unwrap f = beforeBiR (whenJust (verifyAssB wrap unwrap f) mr) ...
1,000
wwAssB mr wrap unwrap f = beforeBiR (whenJust (verifyAssB wrap unwrap f) mr) (\ () -> bidirectional wwBL wwBR) where assA :: BiRewriteH CoreExpr assA = wwAssA Nothing wrap unwrap wwBL :: RewriteH CoreExpr wwBL = withPatFailMsg (wrongExprForm "App wrap (App unwrap (...
776
true
true
11
10
371
237
121
116
null
null
vladimir-ipatov/ganeti
src/Ganeti/Constants.hs
gpl-2.0
jobStatusSuccess :: String jobStatusSuccess = Types.jobStatusToRaw JOB_STATUS_SUCCESS
85
jobStatusSuccess :: String jobStatusSuccess = Types.jobStatusToRaw JOB_STATUS_SUCCESS
85
jobStatusSuccess = Types.jobStatusToRaw JOB_STATUS_SUCCESS
58
false
true
0
6
6
22
9
13
null
null
sdiehl/ghc
compiler/main/Ar.hs
bsd-3-clause
getGNUArchEntries :: Maybe ArchiveEntry -> Get [ArchiveEntry] getGNUArchEntries extInfo = do empty <- isEmpty if empty then return [] else do name <- getByteString 16 time <- getPaddedInt <$> getByteString 12 own <- getPaddedInt <$> getByteString 6 grp <- getPaddedI...
1,868
getGNUArchEntries :: Maybe ArchiveEntry -> Get [ArchiveEntry] getGNUArchEntries extInfo = do empty <- isEmpty if empty then return [] else do name <- getByteString 16 time <- getPaddedInt <$> getByteString 12 own <- getPaddedInt <$> getByteString 6 grp <- getPaddedI...
1,868
getGNUArchEntries extInfo = do empty <- isEmpty if empty then return [] else do name <- getByteString 16 time <- getPaddedInt <$> getByteString 12 own <- getPaddedInt <$> getByteString 6 grp <- getPaddedInt <$> getByteString 6 mode <- getPaddedInt <$> getBy...
1,806
false
true
0
20
546
489
235
254
null
null
pparkkin/eta
compiler/ETA/TypeCheck/TcType.hs
bsd-3-clause
-- | Does the given tyvar appear under a type generative w.r.t. -- representational equality? See Note [Occurs check error] in -- TcCanonical for the motivation for this function. isTyVarUnderDatatype :: TcTyVar -> TcType -> Bool isTyVarUnderDatatype tv = go False where go under_dt ty | Just ty' <- tcView ty = go...
1,248
isTyVarUnderDatatype :: TcTyVar -> TcType -> Bool isTyVarUnderDatatype tv = go False where go under_dt ty | Just ty' <- tcView ty = go under_dt ty' go under_dt (TyVarTy tv') = under_dt && (tv == tv') go under_dt (TyConApp tc tys) = let under_dt' = under_dt || ...
1,068
isTyVarUnderDatatype tv = go False where go under_dt ty | Just ty' <- tcView ty = go under_dt ty' go under_dt (TyVarTy tv') = under_dt && (tv == tv') go under_dt (TyConApp tc tys) = let under_dt' = under_dt || isGenerativeTyCon tc ...
1,018
true
true
2
10
478
286
128
158
null
null
jeremyong/Yaiba
Yaiba/Monomial.hs
bsd-3-clause
-- | Determines if a is a factor of b isFactor :: Mon ord -> Mon ord -> Bool isFactor Constant Constant = True
110
isFactor :: Mon ord -> Mon ord -> Bool isFactor Constant Constant = True
72
isFactor Constant Constant = True
33
true
true
0
7
23
31
15
16
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1024309 = 5010
34
getValueFromProduct 1024309 = 5010
34
getValueFromProduct 1024309 = 5010
34
false
false
0
5
3
9
4
5
null
null
shlevy/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isConLikeUnfolding _ = False
67
isConLikeUnfolding _ = False
67
isConLikeUnfolding _ = False
67
false
false
0
5
42
9
4
5
null
null
jtdaugherty/mix-assembler
src/MIX/Assembler.hs
bsd-3-clause
nextLitConstSym :: M S.Symbol nextLitConstSym = do v <- litConstCounter <$> get let sname = "LITCON" ++ show v modify $ \s -> s { litConstCounter = v + 1 } return $ S.Symbol sname
187
nextLitConstSym :: M S.Symbol nextLitConstSym = do v <- litConstCounter <$> get let sname = "LITCON" ++ show v modify $ \s -> s { litConstCounter = v + 1 } return $ S.Symbol sname
187
nextLitConstSym = do v <- litConstCounter <$> get let sname = "LITCON" ++ show v modify $ \s -> s { litConstCounter = v + 1 } return $ S.Symbol sname
157
false
true
0
11
42
79
38
41
null
null
kmels/hledger
hledger-lib/Hledger/Query.hs
gpl-3.0
matchesPosting q@(Amt _ _) Posting{pamount=amt} = q `matchesMixedAmount` amt
76
matchesPosting q@(Amt _ _) Posting{pamount=amt} = q `matchesMixedAmount` amt
76
matchesPosting q@(Amt _ _) Posting{pamount=amt} = q `matchesMixedAmount` amt
76
false
false
1
8
8
47
21
26
null
null
robeverest/accelerate
Data/Array/Accelerate/Analysis/Match.hs
bsd-3-clause
matchPrimFun (PrimFromIntegral _ s) (PrimFromIntegral _ t) = matchNumType s t
77
matchPrimFun (PrimFromIntegral _ s) (PrimFromIntegral _ t) = matchNumType s t
77
matchPrimFun (PrimFromIntegral _ s) (PrimFromIntegral _ t) = matchNumType s t
77
false
false
0
7
10
35
16
19
null
null
forste/haReFork
tools/property/parse2/Parser/PropPlogic.hs
bsd-3-clause
pred' [] p = (,) [] # pred p
28
pred' [] p = (,) [] # pred p
28
pred' [] p = (,) [] # pred p
28
false
false
3
5
8
34
13
21
null
null
yamadapc/open-browser
lib/Web/Browser/Linux.hs
bsd-3-clause
openBrowserLinux :: String -> IO Bool openBrowserLinux url = exitCodeToBool `fmap` rawSystem executable argv where (executable, argv) = ("sh", ["-c", "xdg-open \"$0\" 2>&1 > /dev/null", url]) exitCodeToBool ExitSuccess = True exitCodeToBool (ExitFailure _) = False
292
openBrowserLinux :: String -> IO Bool openBrowserLinux url = exitCodeToBool `fmap` rawSystem executable argv where (executable, argv) = ("sh", ["-c", "xdg-open \"$0\" 2>&1 > /dev/null", url]) exitCodeToBool ExitSuccess = True exitCodeToBool (ExitFailure _) = False
292
openBrowserLinux url = exitCodeToBool `fmap` rawSystem executable argv where (executable, argv) = ("sh", ["-c", "xdg-open \"$0\" 2>&1 > /dev/null", url]) exitCodeToBool ExitSuccess = True exitCodeToBool (ExitFailure _) = False
254
false
true
2
7
62
84
45
39
null
null
erantapaa/happstack-server
src/Happstack/Server/Internal/Cookie.hs
bsd-3-clause
-- | not a supported api. A parser for RFC 2109 cookies cookiesParser :: GenParser Char st [Cookie] cookiesParser = cookies where -- Parsers based on RFC 2109 cookies = do ws ver<-option "" $ try (cookie_version >>= (\x -> cookieSep >> return x)) cookieList<-(cookie_va...
2,090
cookiesParser :: GenParser Char st [Cookie] cookiesParser = cookies where -- Parsers based on RFC 2109 cookies = do ws ver<-option "" $ try (cookie_version >>= (\x -> cookieSep >> return x)) cookieList<-(cookie_value ver) `sepBy1` try cookieSep ws ...
2,033
cookiesParser = cookies where -- Parsers based on RFC 2109 cookies = do ws ver<-option "" $ try (cookie_version >>= (\x -> cookieSep >> return x)) cookieList<-(cookie_value ver) `sepBy1` try cookieSep ws eof return cookieList ...
1,989
true
true
19
27
800
534
257
277
null
null
girving/duck
duck/Ptrie.hs
bsd-3-clause
singleton (x:k) = Node (error "Ptrie.singleton") . Map.singleton x . singleton k
80
singleton (x:k) = Node (error "Ptrie.singleton") . Map.singleton x . singleton k
80
singleton (x:k) = Node (error "Ptrie.singleton") . Map.singleton x . singleton k
80
false
false
0
9
11
42
19
23
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT31.hs
gpl-3.0
half (S Z) = Z
14
half (S Z) = Z
14
half (S Z) = Z
14
false
false
0
7
4
15
7
8
null
null