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
tittoassini/flat
benchmarks/Main.hs
bsd-3-clause
-- lser :: (Serialize c1 a1) => (a -> c1 a1) -> a -> Double lser k = fromIntegral . Prelude.length . ser . k
108
lser k = fromIntegral . Prelude.length . ser . k
48
lser k = fromIntegral . Prelude.length . ser . k
48
true
false
2
7
24
29
12
17
null
null
conal/hermit
src/HERMIT/PrettyPrinter/AST.hs
bsd-2-clause
--------------------------------------------------------------------------- coText :: String -> DocH coText = coercionColor . text
131
coText :: String -> DocH coText = coercionColor . text
54
coText = coercionColor . text
29
true
true
0
5
11
20
11
9
null
null
julmue/UntypedLambda
src/Language/Lambda/Semantics/Nameless/BigStep.hs
bsd-3-clause
callByValue val@Lam{} = val
27
callByValue val@Lam{} = val
27
callByValue val@Lam{} = val
27
false
false
1
6
3
21
8
13
null
null
DanielWaterworth/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintErr' i (CantResolveAlts as) = text "Can't disambiguate name:" <+> align (cat (punctuate (comma <> space) (map text as)))
162
pprintErr' i (CantResolveAlts as) = text "Can't disambiguate name:" <+> align (cat (punctuate (comma <> space) (map text as)))
162
pprintErr' i (CantResolveAlts as) = text "Can't disambiguate name:" <+> align (cat (punctuate (comma <> space) (map text as)))
162
false
false
0
12
54
56
27
29
null
null
llscm0202/BIGDATA2017
ATIVIDADE1/exerciciosListas/ex8.hs
gpl-3.0
main :: IO() main = do print (maximum [collatzLen x | x<-[1..1000000]])
74
main :: IO() main = do print (maximum [collatzLen x | x<-[1..1000000]])
74
main = do print (maximum [collatzLen x | x<-[1..1000000]])
61
false
true
0
13
14
47
23
24
null
null
dysinger/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/Scan.hs
mpl-2.0
-- | The maximum number of items to evaluate (not necessarily the number of -- matching items). If DynamoDB processes the number of items up to the limit -- while processing the results, it stops the operation and returns the matching -- values up to that point, and a key in /LastEvaluatedKey/ to apply in a -- subsequent operation, so that you can pick up where you left off. Also, if -- the processed data set size exceeds 1 MB before DynamoDB reaches this limit, -- it stops the operation and returns the matching values up to the limit, and a -- key in /LastEvaluatedKey/ to apply in a subsequent operation to continue the -- operation. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan> in the /Amazon DynamoDBDeveloper Guide/. sLimit :: Lens' Scan (Maybe Natural) sLimit = lens _sLimit (\s a -> s { _sLimit = a }) . mapping _Nat
909
sLimit :: Lens' Scan (Maybe Natural) sLimit = lens _sLimit (\s a -> s { _sLimit = a }) . mapping _Nat
101
sLimit = lens _sLimit (\s a -> s { _sLimit = a }) . mapping _Nat
64
true
true
0
10
150
61
36
25
null
null
davidzhulijun/TAM
FiniteStateMachine/Programs/FSM6.hs
bsd-3-clause
trans A1 S2 = S5
17
trans A1 S2 = S5
17
trans A1 S2 = S5
17
false
false
0
5
5
11
5
6
null
null
utsav2601/cmpe295A
hake/HakeTypes.hs
mit
isFileRef (ContStr _ _ _) = False
33
isFileRef (ContStr _ _ _) = False
33
isFileRef (ContStr _ _ _) = False
33
false
false
0
7
6
19
9
10
null
null
pbl64k/HackerRank-Contests
2014-10-10-FP/Infer/i.accepted.hs
bsd-2-clause
disp c m (Pair t1 t2) = ("pair[" ++ str1 ++ ", " ++ str2 ++ "]", c'', m'') where (str1, c', m') = disp c m t1 (str2, c'', m'') = disp c' m' t2
162
disp c m (Pair t1 t2) = ("pair[" ++ str1 ++ ", " ++ str2 ++ "]", c'', m'') where (str1, c', m') = disp c m t1 (str2, c'', m'') = disp c' m' t2
162
disp c m (Pair t1 t2) = ("pair[" ++ str1 ++ ", " ++ str2 ++ "]", c'', m'') where (str1, c', m') = disp c m t1 (str2, c'', m'') = disp c' m' t2
162
false
false
0
9
55
92
49
43
null
null
mzero/barley
src/Barley/Utils.hs
apache-2.0
-- | Sanitize a file path for serving. -- If the path contains any illegal path components, then Nothing is returned. -- Otherwise a new FilePath, built from the dissected components is returned. -- -- Illegal path components are any that start with a period, including "." and -- "..", as well as those that contain any of '/', '\', or ':', or are empty. legalPath :: FilePath -> Maybe FilePath legalPath p = if any illegalComponent components then Nothing else Just $ joinPath components where components = splitDirectories p illegalComponent "" = True illegalComponent ('.':_) = True illegalComponent s = any (`elem` "/\\:") s -- -- These should be in Snap -- -- | Immediately exit with what ever response was set in the Snap monad.
777
legalPath :: FilePath -> Maybe FilePath legalPath p = if any illegalComponent components then Nothing else Just $ joinPath components where components = splitDirectories p illegalComponent "" = True illegalComponent ('.':_) = True illegalComponent s = any (`elem` "/\\:") s -- -- These should be in Snap -- -- | Immediately exit with what ever response was set in the Snap monad.
421
legalPath p = if any illegalComponent components then Nothing else Just $ joinPath components where components = splitDirectories p illegalComponent "" = True illegalComponent ('.':_) = True illegalComponent s = any (`elem` "/\\:") s -- -- These should be in Snap -- -- | Immediately exit with what ever response was set in the Snap monad.
381
true
true
0
7
168
104
58
46
null
null
anniecherk/pyschocnf
notes/Frontend_scratch.hs
bsd-3-clause
ilToll :: ILAST -> State (Count, CNF) LLAST ilToll ilast = do llblocks <- mapM ilBlockToLLBlocks ilast return $ concat llblocks
145
ilToll :: ILAST -> State (Count, CNF) LLAST ilToll ilast = do llblocks <- mapM ilBlockToLLBlocks ilast return $ concat llblocks
145
ilToll ilast = do llblocks <- mapM ilBlockToLLBlocks ilast return $ concat llblocks
101
false
true
0
8
38
51
24
27
null
null
idris-hackers/idris-java
src/IRTS/Java/JTypes.hs
bsd-3-clause
constType (Str _) = stringType
31
constType (Str _) = stringType
31
constType (Str _) = stringType
31
false
false
0
6
5
16
7
9
null
null
lennart/Tidal-Trigger
Sound/Tidal/Trigger.hs
gpl-3.0
handleKeys'' ccroot shape (x:xs) = (handleKeys'' ccroot shape [x]) ++ (handleKeys'' ccroot shape xs)
100
handleKeys'' ccroot shape (x:xs) = (handleKeys'' ccroot shape [x]) ++ (handleKeys'' ccroot shape xs)
100
handleKeys'' ccroot shape (x:xs) = (handleKeys'' ccroot shape [x]) ++ (handleKeys'' ccroot shape xs)
100
false
false
0
8
13
47
24
23
null
null
ChShersh/rogue-lang
src/Rogue/Verify/Verifier.hs
bsd-3-clause
verifyExpr (LowerEq l r) = liftA2 LowerEq (verifyExpr l) (verifyExpr r)
75
verifyExpr (LowerEq l r) = liftA2 LowerEq (verifyExpr l) (verifyExpr r)
75
verifyExpr (LowerEq l r) = liftA2 LowerEq (verifyExpr l) (verifyExpr r)
75
false
false
0
7
14
37
17
20
null
null
DougBurke/swish
tests/N3ParserTest.hs
lgpl-2.1
tx1409 = arc b2 p1 o2
21
tx1409 = arc b2 p1 o2
21
tx1409 = arc b2 p1 o2
21
false
false
1
5
5
19
6
13
null
null
ozgurakgun/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
showDeclImp _ (PSyntax _ syn) = text "syntax" <+> text (show syn)
65
showDeclImp _ (PSyntax _ syn) = text "syntax" <+> text (show syn)
65
showDeclImp _ (PSyntax _ syn) = text "syntax" <+> text (show syn)
65
false
false
1
8
11
37
16
21
null
null
zakharvoit/lambda-util
src/Math/LambdaUtil/Generator.hs
gpl-3.0
generateVar :: RandomGen g => [Name] -> Rand g Expr generateVar names = Var <$> (randomChoice names)
130
generateVar :: RandomGen g => [Name] -> Rand g Expr generateVar names = Var <$> (randomChoice names)
130
generateVar names = Var <$> (randomChoice names)
48
false
true
0
7
46
43
21
22
null
null
amccausl/Swish
Swish/HaskellRDF/VarBinding.hs
lgpl-2.1
-- |Extract variable binding name from OpenVarBindingModify value -- -- (Because only the name is required, the application to an undefined -- list of variable labels should never be evaluated, as long as the -- name is not dependent on the variable names in any way.) -- -- NOT QUITE... some of the functions that create OpenVarBindingModify -- instances also pattern-match the number of labels provided, forcing -- evaluation of the labels parameter, even though it's not used. -- openVbmName :: OpenVarBindingModify lb vn -> ScopedName openVbmName ovbm = vbmName (ovbm (error "Undefined labels in variable binding"))
636
openVbmName :: OpenVarBindingModify lb vn -> ScopedName openVbmName ovbm = vbmName (ovbm (error "Undefined labels in variable binding"))
136
openVbmName ovbm = vbmName (ovbm (error "Undefined labels in variable binding"))
80
true
true
0
9
113
48
28
20
null
null
armoredsoftware/protocol
tpm/mainline/src/TPM/Const.hs
bsd-3-clause
tpm_et_aes_reserved_handle = (0x0640 :: Word16)
47
tpm_et_aes_reserved_handle = (0x0640 :: Word16)
47
tpm_et_aes_reserved_handle = (0x0640 :: Word16)
47
false
false
0
5
4
12
7
5
null
null
flowbox-public/imagemagick
Graphics/ImageMagick/MagickWand/WandImage.hs
apache-2.0
extentImage :: (MonadResource m) => PMagickWand -> Int -> Int -> Int -> Int -> m () extentImage w width height offsetX offsetY = withException_ w $! F.magickExtentImage w (fromIntegral width) (fromIntegral height) (fromIntegral offsetX) (fromIntegral offsetY)
261
extentImage :: (MonadResource m) => PMagickWand -> Int -> Int -> Int -> Int -> m () extentImage w width height offsetX offsetY = withException_ w $! F.magickExtentImage w (fromIntegral width) (fromIntegral height) (fromIntegral offsetX) (fromIntegral offsetY)
261
extentImage w width height offsetX offsetY = withException_ w $! F.magickExtentImage w (fromIntegral width) (fromIntegral height) (fromIntegral offsetX) (fromIntegral offsetY)
177
false
true
0
12
38
100
49
51
null
null
emmanueltouzery/imprint
src/Main.hs
mit
openFolder :: FilePath -> IO () openFolder folderPath = if pathSeparator == '/' then void (rawSystem "xdg-open" [folderPath]) -- linux else void (runCommand $ "start \"\" \"" ++ folderPath ++ "\"")
221
openFolder :: FilePath -> IO () openFolder folderPath = if pathSeparator == '/' then void (rawSystem "xdg-open" [folderPath]) -- linux else void (runCommand $ "start \"\" \"" ++ folderPath ++ "\"")
221
openFolder folderPath = if pathSeparator == '/' then void (rawSystem "xdg-open" [folderPath]) -- linux else void (runCommand $ "start \"\" \"" ++ folderPath ++ "\"")
189
false
true
0
10
54
68
35
33
null
null
8l/NetASM-haskell
Apps/Hub/Run.hs
gpl-3.0
---------- -- Hub --- ---------- -- Test header (a.k.a packet) stream h0 = genHdr([("inport", 1), ("outport", 0)])
115
h0 = genHdr([("inport", 1), ("outport", 0)])
44
h0 = genHdr([("inport", 1), ("outport", 0)])
44
true
false
1
7
17
37
22
15
null
null
icyfork/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readSingleQuoted5 = isWarning readSimpleCommand "foo='bar\ncow 'arg"
73
prop_readSingleQuoted5 = isWarning readSimpleCommand "foo='bar\ncow 'arg"
73
prop_readSingleQuoted5 = isWarning readSimpleCommand "foo='bar\ncow 'arg"
73
false
false
1
5
5
14
5
9
null
null
JISNEGRO/Agda-PR
Main.hs
mit
getUsefulInfo :: UsefulInfo -> String getUsefulInfo (NoUsefulInfo) = "No useful info"
86
getUsefulInfo :: UsefulInfo -> String getUsefulInfo (NoUsefulInfo) = "No useful info"
86
getUsefulInfo (NoUsefulInfo) = "No useful info"
47
false
true
0
6
11
21
11
10
null
null
gbaz/cabal
cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/QuickCheck.hs
bsd-3-clause
arbitraryComponentDeps :: TestDb -> Gen (ComponentDeps [ExampleDependency]) arbitraryComponentDeps (TestDb []) = return $ CD.fromList []
136
arbitraryComponentDeps :: TestDb -> Gen (ComponentDeps [ExampleDependency]) arbitraryComponentDeps (TestDb []) = return $ CD.fromList []
136
arbitraryComponentDeps (TestDb []) = return $ CD.fromList []
60
false
true
0
9
14
49
24
25
null
null
spechub/Hets
OWL2/ParseMS.hs
gpl-2.0
- base OWLClass excluded atomic :: GA.PrefixMap -> CharParser st ClassExpression atomic pm = (parensP $ description pm) <|> ObjectOneOf <$> (bracesP $ sepByComma $ individual pm)
181
atomic :: GA.PrefixMap -> CharParser st ClassExpression atomic pm = (parensP $ description pm) <|> ObjectOneOf <$> (bracesP $ sepByComma $ individual pm)
155
atomic pm = (parensP $ description pm) <|> ObjectOneOf <$> (bracesP $ sepByComma $ individual pm)
99
true
true
4
8
29
69
34
35
null
null
cchalmers/random
src/System/Random/PCG/Internal.hs
bsd-2-clause
-- | Fixed seed. seed :: PCG64 seed = PCG64 9600629759793949339 15726070495360670683
84
seed :: PCG64 seed = PCG64 9600629759793949339 15726070495360670683
67
seed = PCG64 9600629759793949339 15726070495360670683
53
true
true
0
6
11
23
10
13
null
null
Chouffe/skelme
src/Data.hs
bsd-3-clause
makeNormalFunc :: Env -> [String] -> [LispVal] -> IOThrowsError LispVal makeNormalFunc = makeFunc Nothing
105
makeNormalFunc :: Env -> [String] -> [LispVal] -> IOThrowsError LispVal makeNormalFunc = makeFunc Nothing
105
makeNormalFunc = makeFunc Nothing
33
false
true
0
8
13
35
18
17
null
null
cirquit/Personal-Repository
Haskell/Playground/UTFTConverter/dist/build/autogen/Paths_UTFTConverter.hs
mit
getDataDir = catchIO (getEnv "UTFTConverter_datadir") (\_ -> return datadir)
76
getDataDir = catchIO (getEnv "UTFTConverter_datadir") (\_ -> return datadir)
76
getDataDir = catchIO (getEnv "UTFTConverter_datadir") (\_ -> return datadir)
76
false
false
0
8
8
28
14
14
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
shellForExecutable "sh" = return Sh
35
shellForExecutable "sh" = return Sh
35
shellForExecutable "sh" = return Sh
35
false
false
0
5
4
12
5
7
null
null
modeswitch/barrelfish
tools/flounder/BackendCommon.hs
mit
msg_sig_type ifn m RX = idscope ifn (msg_name m) "rx_method_fn"
64
msg_sig_type ifn m RX = idscope ifn (msg_name m) "rx_method_fn"
64
msg_sig_type ifn m RX = idscope ifn (msg_name m) "rx_method_fn"
64
false
false
0
7
10
26
12
14
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_REBOL_PAIR :: Int wxSTC_REBOL_PAIR = 9
44
wxSTC_REBOL_PAIR :: Int wxSTC_REBOL_PAIR = 9
44
wxSTC_REBOL_PAIR = 9
20
false
true
0
4
5
11
6
5
null
null
zachsully/hakaru
haskell/Language/Hakaru/Pretty/Concrete.hs
bsd-3-clause
ppPrimOp p Atanh (e1 :* End) = ppApply1 p "atanh" e1
65
ppPrimOp p Atanh (e1 :* End) = ppApply1 p "atanh" e1
65
ppPrimOp p Atanh (e1 :* End) = ppApply1 p "atanh" e1
65
false
false
0
7
23
30
13
17
null
null
bhurt/Data.GenericTree
Data/GenericTree.hs
mit
rotateLeft a m b = branch a m b
31
rotateLeft a m b = branch a m b
31
rotateLeft a m b = branch a m b
31
false
false
0
5
8
22
9
13
null
null
hdbc/hdbc
testsrc/TestSqlValue.hs
bsd-3-clause
testZonedTimeStr = "1989-08-01 15:33:01 -0500"
46
testZonedTimeStr = "1989-08-01 15:33:01 -0500"
46
testZonedTimeStr = "1989-08-01 15:33:01 -0500"
46
false
false
0
4
4
6
3
3
null
null
christiaanb/clash-compiler
clash-ghc/src-ghc/CLaSH/GHC/NetlistTypes.hs
bsd-2-clause
ghcTypeToHWType :: HashMap TyConName TyCon -> Type -> Maybe (Either String HWType) ghcTypeToHWType m ty@(tyView -> TyConApp tc args) = runErrorT $ case name2String tc of "Int" -> return Integer "GHC.Integer.Type.Integer" -> return Integer "GHC.Prim.Int#" -> return Integer "GHC.Types.Int" -> return Integer "GHC.Prim.ByteArray#" -> fail $ "Can't translate type: " ++ showDoc ty "GHC.Types.Bool" -> return Bool "GHC.Prim.~#" -> fail $ "Can't translate type: " ++ showDoc ty "CLaSH.Signal.Internal.Signal'" -> ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m (args !! 1) "CLaSH.Sized.Internal.BitVector.BitVector" -> BitVector <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Index.Index" -> Index <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Signed.Signed" -> Signed <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Unsigned.Unsigned" -> Unsigned <$> tyNatSize m (head args) "CLaSH.Sized.Vector.Vec" -> do let [szTy,elTy] = args sz <- tyNatSize m szTy elHWTy <- ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m elTy return $ Vector sz elHWTy _ -> case m ! tc of -- TODO: Remove this conversion -- The current problem is that type-functions are not reduced by the GHC -> Core -- transformation process, and so end up here. Once a fix has been found for -- this problem remove this dirty hack. FunTyCon {tyConSubst = tcSubst} -> case findFunSubst tcSubst args of Just ty' -> ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m ty' _ -> ErrorT Nothing _ -> ErrorT Nothing
1,850
ghcTypeToHWType :: HashMap TyConName TyCon -> Type -> Maybe (Either String HWType) ghcTypeToHWType m ty@(tyView -> TyConApp tc args) = runErrorT $ case name2String tc of "Int" -> return Integer "GHC.Integer.Type.Integer" -> return Integer "GHC.Prim.Int#" -> return Integer "GHC.Types.Int" -> return Integer "GHC.Prim.ByteArray#" -> fail $ "Can't translate type: " ++ showDoc ty "GHC.Types.Bool" -> return Bool "GHC.Prim.~#" -> fail $ "Can't translate type: " ++ showDoc ty "CLaSH.Signal.Internal.Signal'" -> ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m (args !! 1) "CLaSH.Sized.Internal.BitVector.BitVector" -> BitVector <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Index.Index" -> Index <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Signed.Signed" -> Signed <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Unsigned.Unsigned" -> Unsigned <$> tyNatSize m (head args) "CLaSH.Sized.Vector.Vec" -> do let [szTy,elTy] = args sz <- tyNatSize m szTy elHWTy <- ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m elTy return $ Vector sz elHWTy _ -> case m ! tc of -- TODO: Remove this conversion -- The current problem is that type-functions are not reduced by the GHC -> Core -- transformation process, and so end up here. Once a fix has been found for -- this problem remove this dirty hack. FunTyCon {tyConSubst = tcSubst} -> case findFunSubst tcSubst args of Just ty' -> ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m ty' _ -> ErrorT Nothing _ -> ErrorT Nothing
1,850
ghcTypeToHWType m ty@(tyView -> TyConApp tc args) = runErrorT $ case name2String tc of "Int" -> return Integer "GHC.Integer.Type.Integer" -> return Integer "GHC.Prim.Int#" -> return Integer "GHC.Types.Int" -> return Integer "GHC.Prim.ByteArray#" -> fail $ "Can't translate type: " ++ showDoc ty "GHC.Types.Bool" -> return Bool "GHC.Prim.~#" -> fail $ "Can't translate type: " ++ showDoc ty "CLaSH.Signal.Internal.Signal'" -> ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m (args !! 1) "CLaSH.Sized.Internal.BitVector.BitVector" -> BitVector <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Index.Index" -> Index <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Signed.Signed" -> Signed <$> tyNatSize m (head args) "CLaSH.Sized.Internal.Unsigned.Unsigned" -> Unsigned <$> tyNatSize m (head args) "CLaSH.Sized.Vector.Vec" -> do let [szTy,elTy] = args sz <- tyNatSize m szTy elHWTy <- ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m elTy return $ Vector sz elHWTy _ -> case m ! tc of -- TODO: Remove this conversion -- The current problem is that type-functions are not reduced by the GHC -> Core -- transformation process, and so end up here. Once a fix has been found for -- this problem remove this dirty hack. FunTyCon {tyConSubst = tcSubst} -> case findFunSubst tcSubst args of Just ty' -> ErrorT $ return $ coreTypeToHWType ghcTypeToHWType m ty' _ -> ErrorT Nothing _ -> ErrorT Nothing
1,735
false
true
54
8
583
342
181
161
null
null
walkie/CC-TaglessFinal
src/Language/TTF/CC/Share.hs
bsd-3-clause
set s = "{" ++ (commas . sort . toList) s ++ "}"
48
set s = "{" ++ (commas . sort . toList) s ++ "}"
48
set s = "{" ++ (commas . sort . toList) s ++ "}"
48
false
false
0
10
12
31
15
16
null
null
urbanslug/ghc
testsuite/tests/typecheck/should_compile/T5655.hs
bsd-3-clause
bar :: IO () bar = ap print (f foo)
35
bar :: IO () bar = ap print (f foo)
35
bar = ap print (f foo)
22
false
true
0
7
9
34
14
20
null
null
rueshyna/gogol
gogol-firebase-rules/gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Get.hs
mpl-2.0
-- | Pretty-print response. pPp :: Lens' ProjectsReleasesGet Bool pPp = lens _pPp (\ s a -> s{_pPp = a})
104
pPp :: Lens' ProjectsReleasesGet Bool pPp = lens _pPp (\ s a -> s{_pPp = a})
76
pPp = lens _pPp (\ s a -> s{_pPp = a})
38
true
true
0
9
19
40
22
18
null
null
bgamari/icalendar
Data/ICalendar/RRule.hs
bsd-3-clause
findDay "FR" = Friday
21
findDay "FR" = Friday
21
findDay "FR" = Friday
21
false
false
1
5
3
13
4
9
null
null
sumitsahrawat/calculator
src/Math/REPL/Prim/Expr.hs
gpl-2.0
joinMessage _ m@(Message _) = m
41
joinMessage _ m@(Message _) = m
41
joinMessage _ m@(Message _) = m
41
false
false
0
8
15
20
10
10
null
null
brendanhay/gogol
gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs
mpl-2.0
-- | GCP project number of the requesting delegated app. Currently only -- intended for Firebase V1 migration. irpgairDelegatedProjectNumber :: Lens' IdentitytoolkitRelyingPartyGetAccountInfoRequest (Maybe Int64) irpgairDelegatedProjectNumber = lens _irpgairDelegatedProjectNumber (\ s a -> s{_irpgairDelegatedProjectNumber = a}) . mapping _Coerce
361
irpgairDelegatedProjectNumber :: Lens' IdentitytoolkitRelyingPartyGetAccountInfoRequest (Maybe Int64) irpgairDelegatedProjectNumber = lens _irpgairDelegatedProjectNumber (\ s a -> s{_irpgairDelegatedProjectNumber = a}) . mapping _Coerce
250
irpgairDelegatedProjectNumber = lens _irpgairDelegatedProjectNumber (\ s a -> s{_irpgairDelegatedProjectNumber = a}) . mapping _Coerce
148
true
true
0
10
51
56
29
27
null
null
yav/language-lua
src/Text/PrettyPrint/Leijen.hs
bsd-3-clause
isEmpty _ = False
21
isEmpty _ = False
21
isEmpty _ = False
21
false
false
0
5
7
9
4
5
null
null
JPMoresmau/leksah
src/IDE/Find.hs
gpl-2.0
hideToolbar :: IDEAction hideToolbar = do (_,mbtb) <- readIDE toolbar case mbtb of Nothing -> return () Just tb -> do modifyIDE_ (\ide -> ide{toolbar = (False,snd (toolbar ide))}) widgetHide tb
241
hideToolbar :: IDEAction hideToolbar = do (_,mbtb) <- readIDE toolbar case mbtb of Nothing -> return () Just tb -> do modifyIDE_ (\ide -> ide{toolbar = (False,snd (toolbar ide))}) widgetHide tb
241
hideToolbar = do (_,mbtb) <- readIDE toolbar case mbtb of Nothing -> return () Just tb -> do modifyIDE_ (\ide -> ide{toolbar = (False,snd (toolbar ide))}) widgetHide tb
216
false
true
0
22
78
105
49
56
null
null
brodyberg/Notes
hangman/src/Main.hs
mit
runGame :: Puzzle -> IO () runGame puzzle = forever $ do gameOver puzzle gameWin puzzle putStrLn $ "Current puzzle is: " ++ show puzzle putStr "Guess a letter: " guess <- getLine case guess of [c] -> handleGuess puzzle c >>= runGame _ -> putStrLn "Your guess must be\ \ a single letter."
330
runGame :: Puzzle -> IO () runGame puzzle = forever $ do gameOver puzzle gameWin puzzle putStrLn $ "Current puzzle is: " ++ show puzzle putStr "Guess a letter: " guess <- getLine case guess of [c] -> handleGuess puzzle c >>= runGame _ -> putStrLn "Your guess must be\ \ a single letter."
330
runGame puzzle = forever $ do gameOver puzzle gameWin puzzle putStrLn $ "Current puzzle is: " ++ show puzzle putStr "Guess a letter: " guess <- getLine case guess of [c] -> handleGuess puzzle c >>= runGame _ -> putStrLn "Your guess must be\ \ a single letter."
303
false
true
2
12
96
106
45
61
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcObject.hs
lgpl-2.1
objectFromPtr :: Ptr a -> Object a objectFromPtr p = Object p
63
objectFromPtr :: Ptr a -> Object a objectFromPtr p = Object p
63
objectFromPtr p = Object p
28
false
true
0
7
13
32
13
19
null
null
phischu/fragnix
builtins/ghc-prim/GHC.Prim.hs
bsd-3-clause
-- | Add two vectors element-wise. plusInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# plusInt64X8# = plusInt64X8#
113
plusInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# plusInt64X8# = plusInt64X8#
76
plusInt64X8# = plusInt64X8#
27
true
true
0
8
17
27
12
15
null
null
rpeszek/crud-ex-backend-yesod
src/FrontendSupport/Thing/FrontendRoutes.hs
mit
toHashUrlFragment (ViewThingR tId) = "thingsview/" ++ (pack . show . fromSqlKey $ tId)
86
toHashUrlFragment (ViewThingR tId) = "thingsview/" ++ (pack . show . fromSqlKey $ tId)
86
toHashUrlFragment (ViewThingR tId) = "thingsview/" ++ (pack . show . fromSqlKey $ tId)
86
false
false
0
9
12
34
17
17
null
null
twittner/redis-io
src/Database/Redis/IO/Connection.hs
mpl-2.0
errorCheck r = return r
29
errorCheck r = return r
29
errorCheck r = return r
29
false
false
0
5
10
12
5
7
null
null
willsam100/bankStatement
src/BankStatement.hs
bsd-3-clause
toText :: Transaction -> T.Text toText = E.decodeUtf8 . BL.toStrict . description
81
toText :: Transaction -> T.Text toText = E.decodeUtf8 . BL.toStrict . description
81
toText = E.decodeUtf8 . BL.toStrict . description
49
false
true
1
8
11
37
16
21
null
null
nevrenato/Hets_Fork
Isabelle/ATC_Isabelle.hs
gpl-2.0
_tcIsaProofTc :: TyCon _tcIsaProofTc = mkTyCon "Isabelle.IsaSign.IsaProof"
74
_tcIsaProofTc :: TyCon _tcIsaProofTc = mkTyCon "Isabelle.IsaSign.IsaProof"
74
_tcIsaProofTc = mkTyCon "Isabelle.IsaSign.IsaProof"
51
false
true
0
6
6
21
8
13
null
null
chpatrick/hmidi
System/MIDI/Base.hs
bsd-3-clause
ranslate' msg k v = case msg of #ifdef HMIDI_NO_NOTEOFF 8 -> NoteOn k 0 9 -> NoteOn k v #else 8 -> NoteOff k v 9 -> if v>0 then NoteOn k v else NoteOff k 64 #endif 10 -> PolyAftertouch k v 11 -> CC k v 12 -> ProgramChange k 13 -> Aftertouch k 14 -> PitchWheel (k + shiftL v 7 - 8192)
315
translate' msg k v = case msg of #ifdef HMIDI_NO_NOTEOFF 8 -> NoteOn k 0 9 -> NoteOn k v #else 8 -> NoteOff k v 9 -> if v>0 then NoteOn k v else NoteOff k 64 #endif 10 -> PolyAftertouch k v 11 -> CC k v 12 -> ProgramChange k 13 -> Aftertouch k 14 -> PitchWheel (k + shiftL v 7 - 8192)
315
translate' msg k v = case msg of #ifdef HMIDI_NO_NOTEOFF 8 -> NoteOn k 0 9 -> NoteOn k v #else 8 -> NoteOff k v 9 -> if v>0 then NoteOn k v else NoteOff k 64 #endif 10 -> PolyAftertouch k v 11 -> CC k v 12 -> ProgramChange k 13 -> Aftertouch k 14 -> PitchWheel (k + shiftL v 7 - 8192)
315
false
false
0
12
98
107
51
56
null
null
kmate/imperative-edsl
src/Language/Embedded/Imperative/Frontend.hs
bsd-3-clause
-- | Create a named null pointer -- -- The provided base name may be appended with a unique identifier to avoid name -- collisions. newNamedPtr :: (pred a, C_CMD :<: instr) => String -- ^ Base name -> ProgramT instr (Param2 exp pred) m (Ptr a) newNamedPtr = singleInj . NewPtr
285
newNamedPtr :: (pred a, C_CMD :<: instr) => String -- ^ Base name -> ProgramT instr (Param2 exp pred) m (Ptr a) newNamedPtr = singleInj . NewPtr
153
newNamedPtr = singleInj . NewPtr
32
true
true
1
10
60
71
36
35
null
null
mpickering/HaRe
src/Language/Haskell/Refact/Refactoring/Renaming.hs
bsd-3-clause
causeAmbiguityInExports :: GHC.Name -> GHC.Name -> RefactGhc Bool causeAmbiguityInExports old newName {- inscps -} = do (GHC.L _ (GHC.HsModule _ exps _imps _decls _ _)) <- getRefactParsed isInScopeUnqual <- isInScopeAndUnqualifiedGhc (nameToString old) Nothing let usedUnqual = usedWithoutQualR newName exps logm $ "causeAmbiguityInExports:(isInScopeUnqual,usedUnqual)" ++ (show (isInScopeUnqual,usedUnqual)) return (isInScopeUnqual && usedUnqual)
468
causeAmbiguityInExports :: GHC.Name -> GHC.Name -> RefactGhc Bool causeAmbiguityInExports old newName {- inscps -} = do (GHC.L _ (GHC.HsModule _ exps _imps _decls _ _)) <- getRefactParsed isInScopeUnqual <- isInScopeAndUnqualifiedGhc (nameToString old) Nothing let usedUnqual = usedWithoutQualR newName exps logm $ "causeAmbiguityInExports:(isInScopeUnqual,usedUnqual)" ++ (show (isInScopeUnqual,usedUnqual)) return (isInScopeUnqual && usedUnqual)
468
causeAmbiguityInExports old newName {- inscps -} = do (GHC.L _ (GHC.HsModule _ exps _imps _decls _ _)) <- getRefactParsed isInScopeUnqual <- isInScopeAndUnqualifiedGhc (nameToString old) Nothing let usedUnqual = usedWithoutQualR newName exps logm $ "causeAmbiguityInExports:(isInScopeUnqual,usedUnqual)" ++ (show (isInScopeUnqual,usedUnqual)) return (isInScopeUnqual && usedUnqual)
402
false
true
0
12
69
135
65
70
null
null
vincenthz/hs-foundation
programs/CSV.hs
bsd-3-clause
groupByBench :: [BenchResult] -> [(String, Range, [BenchResult])] groupByBench bs = fmap (\b -> (prettyHeader $ benchName $ head $ nonEmpty_ b, minimum $ nonEmpty_ $ fmap (getRange . mean) b, b)) . Data.List.groupBy ((==) `on` (sel . benchName)) $ bs where sel b = [benchCategory b, benchType b, benchFct b]
404
groupByBench :: [BenchResult] -> [(String, Range, [BenchResult])] groupByBench bs = fmap (\b -> (prettyHeader $ benchName $ head $ nonEmpty_ b, minimum $ nonEmpty_ $ fmap (getRange . mean) b, b)) . Data.List.groupBy ((==) `on` (sel . benchName)) $ bs where sel b = [benchCategory b, benchType b, benchFct b]
404
groupByBench bs = fmap (\b -> (prettyHeader $ benchName $ head $ nonEmpty_ b, minimum $ nonEmpty_ $ fmap (getRange . mean) b, b)) . Data.List.groupBy ((==) `on` (sel . benchName)) $ bs where sel b = [benchCategory b, benchType b, benchFct b]
338
false
true
0
14
146
151
83
68
null
null
np/hlatex
Language/LaTeX/Builder/Math.hs
bsd-3-clause
aleph :: MathItem aleph = mathCmd "aleph"
41
aleph :: MathItem aleph = mathCmd "aleph"
41
aleph = mathCmd "aleph"
23
false
true
0
5
6
14
7
7
null
null
jshholland/savannah-wit
src/MoveGen.hs
bsd-3-clause
genRookMoves :: Position -> [Move] genRookMoves pos = pieceToMove pos Rook >>= genHorizontalMoves pos
101
genRookMoves :: Position -> [Move] genRookMoves pos = pieceToMove pos Rook >>= genHorizontalMoves pos
101
genRookMoves pos = pieceToMove pos Rook >>= genHorizontalMoves pos
66
false
true
0
8
13
38
17
21
null
null
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Gen2/Compactor.hs
mit
identsV :: Traversal' JVal Ident identsV f (JVar i) = JVar <$> f i
73
identsV :: Traversal' JVal Ident identsV f (JVar i) = JVar <$> f i
73
identsV f (JVar i) = JVar <$> f i
40
false
true
0
7
20
34
16
18
null
null
christiaanb/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
gen_primop_vector_tycons :: Info -> String gen_primop_vector_tycons (Info _ entries) = unlines $ map mkVecTypes specs where specs = concatMap desugarVectorSpec (filter is_vector (filter is_primtype entries)) mkVecTypes :: Entry -> String mkVecTypes i = " , " ++ tycon_id where tycon_id = prefix i ++ "PrimTyCon"
359
gen_primop_vector_tycons :: Info -> String gen_primop_vector_tycons (Info _ entries) = unlines $ map mkVecTypes specs where specs = concatMap desugarVectorSpec (filter is_vector (filter is_primtype entries)) mkVecTypes :: Entry -> String mkVecTypes i = " , " ++ tycon_id where tycon_id = prefix i ++ "PrimTyCon"
359
gen_primop_vector_tycons (Info _ entries) = unlines $ map mkVecTypes specs where specs = concatMap desugarVectorSpec (filter is_vector (filter is_primtype entries)) mkVecTypes :: Entry -> String mkVecTypes i = " , " ++ tycon_id where tycon_id = prefix i ++ "PrimTyCon"
316
false
true
0
9
92
100
49
51
null
null
Qinka/blaze-shields
lib/Text/Blaze/Svg/Shields.hs
bsd-3-clause
flatStyle ::(Show a,ToMarkup a,Show b,Floating b)=> (a,b) --left -> (a,b) --right -> Maybe String --colorA -> Maybe String --colorB -> Svg -- rt flatStyle (l,lp) (r,rp) cA cB = svg ! xmlns "http://www.w3.org/2000/svg" ! width (show $ lp+rp+20) ! height "20" $ do lineargradient ! id_ "smooth" ! x2 "0" ! y2 "100%" $ do stop ! offset "0" ! stopOpacity ".1" ! stopColor "#bbb" stop ! offset "1" ! stopOpacity ".1" S11.mask ! id_ "round" $ rect ! width (show $ lp+rp+20) ! height "20" ! rx "3" ! fill "#fff" g ! S11A.mask "url(#round)" $ do rect ! width (show $lp+10) ! height "20" ! fill colorA rect ! width (show $rp+10) ! x (show $lp+10) ! height "20" ! fill colorB rect ! width (show $ lp+rp+20) ! height "20" ! fill "url(#smooth)" g ! fill "#fff" ! textAnchor "middle" ! fontFamily "DejaVu Sans,Verdana,Geneva,sans-serif" ! fontSize "11" $ do text_ ! x (show $ lp/2+6) ! y "15" ! fill "#010101" ! fillOpacity ".3" $ toHtml l text_ ! x (show $ lp/2+6) ! y "14" $ toHtml l text_ ! x (show $ lp +rp/2+13) ! y "14" ! fill "#010101" ! fillOpacity ".3" $ toHtml r text_ ! x (show $ lp +rp/2+13) ! y "14" $ toHtml r where colorA = stringValue $ ('#':) $ fromMaybe "555" cA colorB = stringValue $ ('#':) $ fromMaybe "#4c1" cB
1,643
flatStyle ::(Show a,ToMarkup a,Show b,Floating b)=> (a,b) --left -> (a,b) --right -> Maybe String --colorA -> Maybe String --colorB -> Svg flatStyle (l,lp) (r,rp) cA cB = svg ! xmlns "http://www.w3.org/2000/svg" ! width (show $ lp+rp+20) ! height "20" $ do lineargradient ! id_ "smooth" ! x2 "0" ! y2 "100%" $ do stop ! offset "0" ! stopOpacity ".1" ! stopColor "#bbb" stop ! offset "1" ! stopOpacity ".1" S11.mask ! id_ "round" $ rect ! width (show $ lp+rp+20) ! height "20" ! rx "3" ! fill "#fff" g ! S11A.mask "url(#round)" $ do rect ! width (show $lp+10) ! height "20" ! fill colorA rect ! width (show $rp+10) ! x (show $lp+10) ! height "20" ! fill colorB rect ! width (show $ lp+rp+20) ! height "20" ! fill "url(#smooth)" g ! fill "#fff" ! textAnchor "middle" ! fontFamily "DejaVu Sans,Verdana,Geneva,sans-serif" ! fontSize "11" $ do text_ ! x (show $ lp/2+6) ! y "15" ! fill "#010101" ! fillOpacity ".3" $ toHtml l text_ ! x (show $ lp/2+6) ! y "14" $ toHtml l text_ ! x (show $ lp +rp/2+13) ! y "14" ! fill "#010101" ! fillOpacity ".3" $ toHtml r text_ ! x (show $ lp +rp/2+13) ! y "14" $ toHtml r where colorA = stringValue $ ('#':) $ fromMaybe "555" cA colorB = stringValue $ ('#':) $ fromMaybe "#4c1" cB
1,622
flatStyle (l,lp) (r,rp) cA cB = svg ! xmlns "http://www.w3.org/2000/svg" ! width (show $ lp+rp+20) ! height "20" $ do lineargradient ! id_ "smooth" ! x2 "0" ! y2 "100%" $ do stop ! offset "0" ! stopOpacity ".1" ! stopColor "#bbb" stop ! offset "1" ! stopOpacity ".1" S11.mask ! id_ "round" $ rect ! width (show $ lp+rp+20) ! height "20" ! rx "3" ! fill "#fff" g ! S11A.mask "url(#round)" $ do rect ! width (show $lp+10) ! height "20" ! fill colorA rect ! width (show $rp+10) ! x (show $lp+10) ! height "20" ! fill colorB rect ! width (show $ lp+rp+20) ! height "20" ! fill "url(#smooth)" g ! fill "#fff" ! textAnchor "middle" ! fontFamily "DejaVu Sans,Verdana,Geneva,sans-serif" ! fontSize "11" $ do text_ ! x (show $ lp/2+6) ! y "15" ! fill "#010101" ! fillOpacity ".3" $ toHtml l text_ ! x (show $ lp/2+6) ! y "14" $ toHtml l text_ ! x (show $ lp +rp/2+13) ! y "14" ! fill "#010101" ! fillOpacity ".3" $ toHtml r text_ ! x (show $ lp +rp/2+13) ! y "14" $ toHtml r where colorA = stringValue $ ('#':) $ fromMaybe "555" cA colorB = stringValue $ ('#':) $ fromMaybe "#4c1" cB
1,265
true
true
0
21
656
684
321
363
null
null
Happstack/happstack-server
src/Happstack/Server/Internal/Multipart.hs
bsd-3-clause
bodyPartToInput :: InputWorker -> BodyPart -> IO InputIter -- (Either String (String,Input)) bodyPartToInput inputWorker (BodyPart rawHS b) = do r <- inputWorker (HeaderWork rawHS) case r of (Failed i e) -> return $ Failed i e (HeaderResult hs cont) -> let ctype = fromMaybe defaultInputType (getContentType hs) in case getContentDisposition hs of Just (ContentDisposition "form-data" ps) -> do let eb' = case getContentTransferEncoding hs of Nothing -> Right b Just (ContentTransferEncoding "7bit") -> -- We don't bother checking that the data -- really is 7bit-only Right b Just (ContentTransferEncoding "8bit") -> Right b Just (ContentTransferEncoding "binary") -> Right b Just (ContentTransferEncoding "base64") -> Right $ decodeLenient b -- TODO: Support quoted-printable Just cte -> Left ("Bad content-transfer-encoding: " ++ show cte) case eb' of Right b' -> cont (BodyWork ctype ps b') Left err -> return $ Failed Nothing err cd -> return $ Failed Nothing ("Expected content-disposition: form-data but got " ++ show cd) (BodyResult {}) -> return $ Failed Nothing "bodyPartToInput: Got unexpected BodyResult."
1,754
bodyPartToInput :: InputWorker -> BodyPart -> IO InputIter bodyPartToInput inputWorker (BodyPart rawHS b) = do r <- inputWorker (HeaderWork rawHS) case r of (Failed i e) -> return $ Failed i e (HeaderResult hs cont) -> let ctype = fromMaybe defaultInputType (getContentType hs) in case getContentDisposition hs of Just (ContentDisposition "form-data" ps) -> do let eb' = case getContentTransferEncoding hs of Nothing -> Right b Just (ContentTransferEncoding "7bit") -> -- We don't bother checking that the data -- really is 7bit-only Right b Just (ContentTransferEncoding "8bit") -> Right b Just (ContentTransferEncoding "binary") -> Right b Just (ContentTransferEncoding "base64") -> Right $ decodeLenient b -- TODO: Support quoted-printable Just cte -> Left ("Bad content-transfer-encoding: " ++ show cte) case eb' of Right b' -> cont (BodyWork ctype ps b') Left err -> return $ Failed Nothing err cd -> return $ Failed Nothing ("Expected content-disposition: form-data but got " ++ show cd) (BodyResult {}) -> return $ Failed Nothing "bodyPartToInput: Got unexpected BodyResult."
1,720
bodyPartToInput inputWorker (BodyPart rawHS b) = do r <- inputWorker (HeaderWork rawHS) case r of (Failed i e) -> return $ Failed i e (HeaderResult hs cont) -> let ctype = fromMaybe defaultInputType (getContentType hs) in case getContentDisposition hs of Just (ContentDisposition "form-data" ps) -> do let eb' = case getContentTransferEncoding hs of Nothing -> Right b Just (ContentTransferEncoding "7bit") -> -- We don't bother checking that the data -- really is 7bit-only Right b Just (ContentTransferEncoding "8bit") -> Right b Just (ContentTransferEncoding "binary") -> Right b Just (ContentTransferEncoding "base64") -> Right $ decodeLenient b -- TODO: Support quoted-printable Just cte -> Left ("Bad content-transfer-encoding: " ++ show cte) case eb' of Right b' -> cont (BodyWork ctype ps b') Left err -> return $ Failed Nothing err cd -> return $ Failed Nothing ("Expected content-disposition: form-data but got " ++ show cd) (BodyResult {}) -> return $ Failed Nothing "bodyPartToInput: Got unexpected BodyResult."
1,661
true
true
0
27
803
367
170
197
null
null
pepeiborra/narradar
src/Narradar/Types/TRS.hs
bsd-3-clause
mapNarradarTRS' :: (Ord (Term t v), Ord (Term t' v), Foldable t', HasId t') => (Term t v -> Term t' v) -> (Rule t v -> Rule t' v) -> NarradarTRS t v -> NarradarTRS t' v mapNarradarTRS' _ fr (TRS rr sig) = let rr' = Set.map fr rr in TRS rr' (getSignature rr')
277
mapNarradarTRS' :: (Ord (Term t v), Ord (Term t' v), Foldable t', HasId t') => (Term t v -> Term t' v) -> (Rule t v -> Rule t' v) -> NarradarTRS t v -> NarradarTRS t' v mapNarradarTRS' _ fr (TRS rr sig) = let rr' = Set.map fr rr in TRS rr' (getSignature rr')
277
mapNarradarTRS' _ fr (TRS rr sig) = let rr' = Set.map fr rr in TRS rr' (getSignature rr')
89
false
true
0
10
74
154
74
80
null
null
lukemaurer/sequent-core
src/Language/SequentCore/OccurAnal.hs
bsd-3-clause
-- Both branches are at least One -- (Argument is never IAmDead) -- (orOccInfo orig new) is used -- when combining occurrence info from branches of a case orOccInfo (OneOcc in_lam1 _ int_cxt1) (OneOcc in_lam2 _ int_cxt2) = OneOcc (in_lam1 || in_lam2) False -- False, because it occurs in both branches (int_cxt1 && int_cxt2)
399
orOccInfo (OneOcc in_lam1 _ int_cxt1) (OneOcc in_lam2 _ int_cxt2) = OneOcc (in_lam1 || in_lam2) False -- False, because it occurs in both branches (int_cxt1 && int_cxt2)
210
orOccInfo (OneOcc in_lam1 _ int_cxt1) (OneOcc in_lam2 _ int_cxt2) = OneOcc (in_lam1 || in_lam2) False -- False, because it occurs in both branches (int_cxt1 && int_cxt2)
210
true
false
0
7
128
57
31
26
null
null
jpvillaisaza/mailchimp-haskell
src/Web/Mailchimp.hs
mit
listClient :: ListRoutes (AsClientT ClientM) listClient = fromServant (list mainClient)
87
listClient :: ListRoutes (AsClientT ClientM) listClient = fromServant (list mainClient)
87
listClient = fromServant (list mainClient)
42
false
true
0
7
9
29
14
15
null
null
RefactoringTools/HaRe
test/testdata/TypeUtils/VisiblePNs.hs
bsd-3-clause
parsedFileGhc = undefined
25
parsedFileGhc = undefined
25
parsedFileGhc = undefined
25
false
false
0
4
2
6
3
3
null
null
haskell-works/sqs-resurrector
test/Spec.hs
mit
shouldParse res a = expectationFailure $ "Expected: " ++ (show a) ++ "\nFound: " ++ (show res)
94
shouldParse res a = expectationFailure $ "Expected: " ++ (show a) ++ "\nFound: " ++ (show res)
94
shouldParse res a = expectationFailure $ "Expected: " ++ (show a) ++ "\nFound: " ++ (show res)
94
false
false
1
9
16
44
19
25
null
null
andir/ganeti
src/Ganeti/HTools/Program/Hail.hs
bsd-2-clause
main :: Options -> [String] -> IO () main opts args = do let shownodes = optShowNodes opts verbose = optVerbose opts savecluster = optSaveCluster opts request <- wrapReadRequest opts args let Request rq cdata = request when (verbose > 1) . hPutStrLn stderr $ "Received request: " ++ show rq when (verbose > 2) . hPutStrLn stderr $ "Received cluster data: " ++ show cdata let dedicatedAlloc = maybe False (Dedicated.isDedicated cdata) $ isAllocationRequest rq when (verbose > 1 && dedicatedAlloc) $ hPutStrLn stderr "Allocation on a dedicated cluster;\ \ using lost-allocations metrics." maybePrintNodes shownodes "Initial cluster" (Cluster.printNodes (cdNodes cdata)) maybeSaveData savecluster "pre-ialloc" "before iallocator run" cdata let runAlloc = if dedicatedAlloc then Dedicated.runDedicatedAllocation else runIAllocator (maybe_ni, resp) = runAlloc (Alg.fromCLIOptions opts) request (fin_nl, fin_il) = fromMaybe (cdNodes cdata, cdInstances cdata) maybe_ni putStrLn resp maybePrintNodes shownodes "Final cluster" (Cluster.printNodes fin_nl) maybeSaveData savecluster "post-ialloc" "after iallocator run" (cdata { cdNodes = fin_nl, cdInstances = fin_il})
1,337
main :: Options -> [String] -> IO () main opts args = do let shownodes = optShowNodes opts verbose = optVerbose opts savecluster = optSaveCluster opts request <- wrapReadRequest opts args let Request rq cdata = request when (verbose > 1) . hPutStrLn stderr $ "Received request: " ++ show rq when (verbose > 2) . hPutStrLn stderr $ "Received cluster data: " ++ show cdata let dedicatedAlloc = maybe False (Dedicated.isDedicated cdata) $ isAllocationRequest rq when (verbose > 1 && dedicatedAlloc) $ hPutStrLn stderr "Allocation on a dedicated cluster;\ \ using lost-allocations metrics." maybePrintNodes shownodes "Initial cluster" (Cluster.printNodes (cdNodes cdata)) maybeSaveData savecluster "pre-ialloc" "before iallocator run" cdata let runAlloc = if dedicatedAlloc then Dedicated.runDedicatedAllocation else runIAllocator (maybe_ni, resp) = runAlloc (Alg.fromCLIOptions opts) request (fin_nl, fin_il) = fromMaybe (cdNodes cdata, cdInstances cdata) maybe_ni putStrLn resp maybePrintNodes shownodes "Final cluster" (Cluster.printNodes fin_nl) maybeSaveData savecluster "post-ialloc" "after iallocator run" (cdata { cdNodes = fin_nl, cdInstances = fin_il})
1,337
main opts args = do let shownodes = optShowNodes opts verbose = optVerbose opts savecluster = optSaveCluster opts request <- wrapReadRequest opts args let Request rq cdata = request when (verbose > 1) . hPutStrLn stderr $ "Received request: " ++ show rq when (verbose > 2) . hPutStrLn stderr $ "Received cluster data: " ++ show cdata let dedicatedAlloc = maybe False (Dedicated.isDedicated cdata) $ isAllocationRequest rq when (verbose > 1 && dedicatedAlloc) $ hPutStrLn stderr "Allocation on a dedicated cluster;\ \ using lost-allocations metrics." maybePrintNodes shownodes "Initial cluster" (Cluster.printNodes (cdNodes cdata)) maybeSaveData savecluster "pre-ialloc" "before iallocator run" cdata let runAlloc = if dedicatedAlloc then Dedicated.runDedicatedAllocation else runIAllocator (maybe_ni, resp) = runAlloc (Alg.fromCLIOptions opts) request (fin_nl, fin_il) = fromMaybe (cdNodes cdata, cdInstances cdata) maybe_ni putStrLn resp maybePrintNodes shownodes "Final cluster" (Cluster.printNodes fin_nl) maybeSaveData savecluster "post-ialloc" "after iallocator run" (cdata { cdNodes = fin_nl, cdInstances = fin_il})
1,300
false
true
0
15
333
371
174
197
null
null
julmue/UntypedLambda
test/Language/Lambda/Semantics/Named/BigStep/Tests.hs
bsd-3-clause
and_Tests = testGroup "and_Tests" [ testCase "and_ 1" $ tru_ @=? normalOrder (and_ # tru_ # tru_) , testCase "and_ 2" $ fls_ @=? normalOrder (and_ # tru_ # fls_) , testCase "and_ 3" $ fls_ @=? normalOrder (and_ # fls_ # tru_) , testCase "and_4 " $ fls_ @=? normalOrder (and_ # fls_ # fls_) ]
343
and_Tests = testGroup "and_Tests" [ testCase "and_ 1" $ tru_ @=? normalOrder (and_ # tru_ # tru_) , testCase "and_ 2" $ fls_ @=? normalOrder (and_ # tru_ # fls_) , testCase "and_ 3" $ fls_ @=? normalOrder (and_ # fls_ # tru_) , testCase "and_4 " $ fls_ @=? normalOrder (and_ # fls_ # fls_) ]
343
and_Tests = testGroup "and_Tests" [ testCase "and_ 1" $ tru_ @=? normalOrder (and_ # tru_ # tru_) , testCase "and_ 2" $ fls_ @=? normalOrder (and_ # tru_ # fls_) , testCase "and_ 3" $ fls_ @=? normalOrder (and_ # fls_ # tru_) , testCase "and_4 " $ fls_ @=? normalOrder (and_ # fls_ # fls_) ]
343
false
false
0
10
108
124
61
63
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_HBA_DEFAULT :: Int wxSTC_HBA_DEFAULT = 81
47
wxSTC_HBA_DEFAULT :: Int wxSTC_HBA_DEFAULT = 81
47
wxSTC_HBA_DEFAULT = 81
22
false
true
0
4
5
11
6
5
null
null
marcelosousa/poet
src/Exploration/SUNF/API.hs
gpl-2.0
unlocks_of_addr :: TId -> Integer -> EventsID -> UnfolderOp EventsID unlocks_of_addr tid addr stak = do lift $ putStrLn $ "unlocks_of_addr: " ++ show (addr,tid) ++ " " ++ show stak res <- foldM (unlock_of_addr addr) [] stak let rres = reverse res lift $ putStrLn $ "unlocks_of_addr: result " ++ show rres return $ rres
328
unlocks_of_addr :: TId -> Integer -> EventsID -> UnfolderOp EventsID unlocks_of_addr tid addr stak = do lift $ putStrLn $ "unlocks_of_addr: " ++ show (addr,tid) ++ " " ++ show stak res <- foldM (unlock_of_addr addr) [] stak let rres = reverse res lift $ putStrLn $ "unlocks_of_addr: result " ++ show rres return $ rres
328
unlocks_of_addr tid addr stak = do lift $ putStrLn $ "unlocks_of_addr: " ++ show (addr,tid) ++ " " ++ show stak res <- foldM (unlock_of_addr addr) [] stak let rres = reverse res lift $ putStrLn $ "unlocks_of_addr: result " ++ show rres return $ rres
259
false
true
0
11
65
127
59
68
null
null
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.Recv.hs
bsd-3-clause
receive :: Socket -> BufferPool -> Recv receive sock pool = withBufferPool pool $ \ (ptr, size) -> do let sock' = fdSocket sock size' = fromIntegral size fromIntegral <$> receiveloop sock' ptr size'
214
receive :: Socket -> BufferPool -> Recv receive sock pool = withBufferPool pool $ \ (ptr, size) -> do let sock' = fdSocket sock size' = fromIntegral size fromIntegral <$> receiveloop sock' ptr size'
214
receive sock pool = withBufferPool pool $ \ (ptr, size) -> do let sock' = fdSocket sock size' = fromIntegral size fromIntegral <$> receiveloop sock' ptr size'
174
false
true
0
12
49
76
37
39
null
null
jeannekamikaze/Spear
demos/pong/Pong.hs
mit
collide go1 go2 = let (AABB2 (Vector2 xmin1 ymin1) (Vector2 xmax1 ymax1)) = aabb go1 `aabbAdd` pos go1 (AABB2 (Vector2 xmin2 ymin2) (Vector2 xmax2 ymax2)) = aabb go2 `aabbAdd` pos go2 in not $ xmax1 < xmin2 || xmin1 > xmax2 || ymax1 < ymin2 || ymin1 > ymax2
339
collide go1 go2 = let (AABB2 (Vector2 xmin1 ymin1) (Vector2 xmax1 ymax1)) = aabb go1 `aabbAdd` pos go1 (AABB2 (Vector2 xmin2 ymin2) (Vector2 xmax2 ymax2)) = aabb go2 `aabbAdd` pos go2 in not $ xmax1 < xmin2 || xmin1 > xmax2 || ymax1 < ymin2 || ymin1 > ymax2
339
collide go1 go2 = let (AABB2 (Vector2 xmin1 ymin1) (Vector2 xmax1 ymax1)) = aabb go1 `aabbAdd` pos go1 (AABB2 (Vector2 xmin2 ymin2) (Vector2 xmax2 ymax2)) = aabb go2 `aabbAdd` pos go2 in not $ xmax1 < xmin2 || xmin1 > xmax2 || ymax1 < ymin2 || ymin1 > ymax2
339
false
false
8
12
130
143
66
77
null
null
AubreyEAnderson/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkBraceExpansionVars _ _ = return ()
39
checkBraceExpansionVars _ _ = return ()
39
checkBraceExpansionVars _ _ = return ()
39
false
false
0
6
5
16
7
9
null
null
ndmitchell/profiterole
src/Config.hs
bsd-3-clause
emptyConfig :: String -> Maybe Config emptyConfig _ = Nothing
61
emptyConfig :: String -> Maybe Config emptyConfig _ = Nothing
61
emptyConfig _ = Nothing
23
false
true
0
6
9
25
11
14
null
null
ntc2/haskell-call-trace
experiments/instantiating-castMemoize.hs
mpl-2.0
-- For 'MonadIO'. cacheRef :: IORef (Map.Map String (Maybe (H Typeable))) cacheRef = undefined
94
cacheRef :: IORef (Map.Map String (Maybe (H Typeable))) cacheRef = undefined
76
cacheRef = undefined
20
true
true
2
10
13
44
19
25
null
null
ian-mi/hTorrent
BEncode.hs
gpl-3.0
parseList :: Parser [BEncode] parseList = char 'l' *> many parseBEncode <* char 'e'
83
parseList :: Parser [BEncode] parseList = char 'l' *> many parseBEncode <* char 'e'
83
parseList = char 'l' *> many parseBEncode <* char 'e'
53
false
true
0
7
13
34
16
18
null
null
jyp/gasp
Algebra/Morphism/Ratio.hs
gpl-3.0
divZeroError :: a divZeroError = error "division by zero"
57
divZeroError :: a divZeroError = error "division by zero"
57
divZeroError = error "division by zero"
39
false
true
0
5
8
14
7
7
null
null
meditans/documentator
src/Documentator/TypeAnalysis.hs
gpl-3.0
isBoring (TyCon () (UnQual () (Ident () a))) = a `elem` primitiveTypes
70
isBoring (TyCon () (UnQual () (Ident () a))) = a `elem` primitiveTypes
70
isBoring (TyCon () (UnQual () (Ident () a))) = a `elem` primitiveTypes
70
false
false
0
12
11
45
23
22
null
null
brendanhay/gogol
gogol-servicecontrol/gen/Network/Google/Resource/ServiceControl/Services/Check.hs
mpl-2.0
-- | The service name as specified in its service configuration. For example, -- \`\"pubsub.googleapis.com\"\`. See -- [google.api.Service](https:\/\/cloud.google.com\/service-management\/reference\/rpc\/google.api#google.api.Service) -- for the definition of a service name. scServiceName :: Lens' ServicesCheck Text scServiceName = lens _scServiceName (\ s a -> s{_scServiceName = a})
394
scServiceName :: Lens' ServicesCheck Text scServiceName = lens _scServiceName (\ s a -> s{_scServiceName = a})
118
scServiceName = lens _scServiceName (\ s a -> s{_scServiceName = a})
76
true
true
1
9
49
49
25
24
null
null
Tuplanolla/ties341-parsing
Parsenator.hs
gpl-3.0
entryT p = label "entry" $ do i <- natural _ <- char ':' is <- get if i `elem` is then return $ RefT i else do x <- p put $ i : is return $ EntryT i x
205
entryT p = label "entry" $ do i <- natural _ <- char ':' is <- get if i `elem` is then return $ RefT i else do x <- p put $ i : is return $ EntryT i x
205
entryT p = label "entry" $ do i <- natural _ <- char ':' is <- get if i `elem` is then return $ RefT i else do x <- p put $ i : is return $ EntryT i x
205
false
false
3
12
95
99
43
56
null
null
AdityaKumarRavikanti/Boxes
src/API.hs
mit
runAPI :: API a -> IO (Either String a) runAPI api = do manager <- newManager tlsManagerSettings (result, logs) <- api `useAPIWith` manager mapM_ putStrLn logs return result
196
runAPI :: API a -> IO (Either String a) runAPI api = do manager <- newManager tlsManagerSettings (result, logs) <- api `useAPIWith` manager mapM_ putStrLn logs return result
196
runAPI api = do manager <- newManager tlsManagerSettings (result, logs) <- api `useAPIWith` manager mapM_ putStrLn logs return result
156
false
true
0
8
50
75
35
40
null
null
pascal-knodel/haskell-craft
_/links/E'4'35.hs
mit
testAllDifferent2 = TestCase ( assertEqual "for: allDifferent 1 1 1" False (allDifferent 1 1 1) )
98
testAllDifferent2 = TestCase ( assertEqual "for: allDifferent 1 1 1" False (allDifferent 1 1 1) )
98
testAllDifferent2 = TestCase ( assertEqual "for: allDifferent 1 1 1" False (allDifferent 1 1 1) )
98
false
false
0
9
16
29
14
15
null
null
sdiehl/ghc
testsuite/tests/primops/should_run/ArithWord16.hs
bsd-3-clause
apply3 :: (Word16# -> Word16# -> (# Word16#, Word16# #)) -> Word -> Word -> (Word, Word) apply3 opToTest (W# a) (W# b) = let (# sa, sb #) = (# narrowWord16# a, narrowWord16# b #) (# ra, rb #) = opToTest sa sb in (W# (extendWord16# ra), W# (extendWord16# rb))
276
apply3 :: (Word16# -> Word16# -> (# Word16#, Word16# #)) -> Word -> Word -> (Word, Word) apply3 opToTest (W# a) (W# b) = let (# sa, sb #) = (# narrowWord16# a, narrowWord16# b #) (# ra, rb #) = opToTest sa sb in (W# (extendWord16# ra), W# (extendWord16# rb))
276
apply3 opToTest (W# a) (W# b) = let (# sa, sb #) = (# narrowWord16# a, narrowWord16# b #) (# ra, rb #) = opToTest sa sb in (W# (extendWord16# ra), W# (extendWord16# rb))
185
false
true
0
10
68
138
68
70
null
null
julienschmaltz/madl
app/Parser/parser-main.hs
mit
exeOptions :: [OptDescr (CommandLineOptions -> CommandLineOptions)] exeOptions = [ Option "f" ["network"] (ReqArg (\f opts -> opts {argNetwork = f}) "MaDLFILE") "MaDL file name (mandatory).\n" , Option "t" ["typecheck"] (NoArg (\opts -> opts {typeCheck = True})) "Typecheck the parsed file (default)." , Option "" ["no-typecheck"] (NoArg (\opts -> opts {typeCheck = False})) "Don't typecheck the parsed file." , Option "c" ["check"] (NoArg (\opts -> opts {checkValid = True})) "Check whether the parsed network is a valid Madl Network.\n" , Option "p" ["show-parse"] (NoArg (\opts -> opts {showParseResult = True})) "Print the parse tree (AST)." , Option "s" ["show-network-specification"] (NoArg (\opts -> opts {showNetworkSpecification = True})) "Print the network specification." , Option "n" ["show-network"] (NoArg (\opts -> opts {showResultingNetwork = True})) "Print the network datastructure." , Option "v" ["verbose"] (NoArg (\opts -> opts {showParseResult = True, showNetworkSpecification = True, showResultingNetwork = True})) "Print the parse tree, the network specification, and the network datastructure.\n" ]
1,287
exeOptions :: [OptDescr (CommandLineOptions -> CommandLineOptions)] exeOptions = [ Option "f" ["network"] (ReqArg (\f opts -> opts {argNetwork = f}) "MaDLFILE") "MaDL file name (mandatory).\n" , Option "t" ["typecheck"] (NoArg (\opts -> opts {typeCheck = True})) "Typecheck the parsed file (default)." , Option "" ["no-typecheck"] (NoArg (\opts -> opts {typeCheck = False})) "Don't typecheck the parsed file." , Option "c" ["check"] (NoArg (\opts -> opts {checkValid = True})) "Check whether the parsed network is a valid Madl Network.\n" , Option "p" ["show-parse"] (NoArg (\opts -> opts {showParseResult = True})) "Print the parse tree (AST)." , Option "s" ["show-network-specification"] (NoArg (\opts -> opts {showNetworkSpecification = True})) "Print the network specification." , Option "n" ["show-network"] (NoArg (\opts -> opts {showResultingNetwork = True})) "Print the network datastructure." , Option "v" ["verbose"] (NoArg (\opts -> opts {showParseResult = True, showNetworkSpecification = True, showResultingNetwork = True})) "Print the parse tree, the network specification, and the network datastructure.\n" ]
1,287
exeOptions = [ Option "f" ["network"] (ReqArg (\f opts -> opts {argNetwork = f}) "MaDLFILE") "MaDL file name (mandatory).\n" , Option "t" ["typecheck"] (NoArg (\opts -> opts {typeCheck = True})) "Typecheck the parsed file (default)." , Option "" ["no-typecheck"] (NoArg (\opts -> opts {typeCheck = False})) "Don't typecheck the parsed file." , Option "c" ["check"] (NoArg (\opts -> opts {checkValid = True})) "Check whether the parsed network is a valid Madl Network.\n" , Option "p" ["show-parse"] (NoArg (\opts -> opts {showParseResult = True})) "Print the parse tree (AST)." , Option "s" ["show-network-specification"] (NoArg (\opts -> opts {showNetworkSpecification = True})) "Print the network specification." , Option "n" ["show-network"] (NoArg (\opts -> opts {showResultingNetwork = True})) "Print the network datastructure." , Option "v" ["verbose"] (NoArg (\opts -> opts {showParseResult = True, showNetworkSpecification = True, showResultingNetwork = True})) "Print the parse tree, the network specification, and the network datastructure.\n" ]
1,219
false
true
0
12
316
336
191
145
null
null
urbanslug/ghc
testsuite/tests/rename/prog005/View.hs
bsd-3-clause
createView :: VersionGraphClient -> IO View createView graphClient = do return (View { graphClient1 = graphClient })
143
createView :: VersionGraphClient -> IO View createView graphClient = do return (View { graphClient1 = graphClient })
143
createView graphClient = do return (View { graphClient1 = graphClient })
99
false
true
0
10
43
38
19
19
null
null
AlexanderPankiv/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
mkCmmCodeLabel pkg str = CmmLabel pkg str CmmCode
58
mkCmmCodeLabel pkg str = CmmLabel pkg str CmmCode
58
mkCmmCodeLabel pkg str = CmmLabel pkg str CmmCode
58
false
false
0
5
16
19
8
11
null
null
snapframework/snap-core
src/Snap/Internal/Http/Types.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | Looks up the value(s) for the given named parameter in the POST parameters -- mapping. -- -- Example: -- -- @ -- ghci> :set -XOverloadedStrings -- ghci> import qualified "Snap.Test" as T -- ghci> import qualified "Data.Map" as M -- ghci> :{ -- ghci| rq <- T.buildRequest $ do -- ghci| T.postUrlEncoded "\/foo\/bar" $ M.fromList [("baz", ["qux"])] -- ghci| T.setQueryStringRaw "baz=quux" -- ghci| :} -- ghci> 'rqPostParam' "baz" rq -- Just ["qux"] -- @ rqPostParam :: ByteString -- ^ parameter name to look up -> Request -- ^ HTTP request -> Maybe [ByteString] rqPostParam k rq = Map.lookup k $ rqPostParams rq
756
rqPostParam :: ByteString -- ^ parameter name to look up -> Request -- ^ HTTP request -> Maybe [ByteString] rqPostParam k rq = Map.lookup k $ rqPostParams rq
204
rqPostParam k rq = Map.lookup k $ rqPostParams rq
49
true
true
0
8
167
62
40
22
null
null
CIFASIS/wavy
src/Info.hs
bsd-3-clause
displayIfPresent :: (Show a) => Maybe a -> (a -> IO ()) -> IO () displayIfPresent Nothing _ = return ()
103
displayIfPresent :: (Show a) => Maybe a -> (a -> IO ()) -> IO () displayIfPresent Nothing _ = return ()
103
displayIfPresent Nothing _ = return ()
38
false
true
0
11
20
63
29
34
null
null
Raphexion/SimplifiedEnigmaMachine
EnigmaTest.hs
mit
wheel_II = wheelFromList [ (A,C), (C,A), (B,D), (D,B) ]
55
wheel_II = wheelFromList [ (A,C), (C,A), (B,D), (D,B) ]
55
wheel_II = wheelFromList [ (A,C), (C,A), (B,D), (D,B) ]
55
false
false
0
7
8
45
28
17
null
null
cl04/rest1
hask-rest1/app/Client.hs
bsd-3-clause
clientApp uid gid = do mgr <- newManager defaultManagerSettings runClientM (queries uid gid) (ClientEnv mgr url)
116
clientApp uid gid = do mgr <- newManager defaultManagerSettings runClientM (queries uid gid) (ClientEnv mgr url)
116
clientApp uid gid = do mgr <- newManager defaultManagerSettings runClientM (queries uid gid) (ClientEnv mgr url)
116
false
false
1
10
19
50
20
30
null
null
seereason/cabal
cabal-install/Distribution/Client/Config.hs
bsd-3-clause
liftGlobalInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate)) -> FieldDescr SavedConfig liftGlobalInstallDirs = liftField savedGlobalInstallDirs (\flags conf -> conf { savedGlobalInstallDirs = flags })
233
liftGlobalInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate)) -> FieldDescr SavedConfig liftGlobalInstallDirs = liftField savedGlobalInstallDirs (\flags conf -> conf { savedGlobalInstallDirs = flags })
233
liftGlobalInstallDirs = liftField savedGlobalInstallDirs (\flags conf -> conf { savedGlobalInstallDirs = flags })
115
false
true
0
10
45
57
29
28
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/LHC.hs
bsd-3-clause
ghcOptions :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo -> FilePath -> [String] ghcOptions lbi bi clbi odir = ["-hide-all-packages"] ++ ghcPackageDbOptions lbi ++ (if splitObjs lbi then ["-split-objs"] else []) ++ ["-i"] ++ ["-i" ++ odir] ++ ["-i" ++ l | l <- nub (hsSourceDirs bi)] ++ ["-i" ++ autogenModulesDir lbi] ++ ["-I" ++ autogenModulesDir lbi] ++ ["-I" ++ odir] ++ ["-I" ++ dir | dir <- PD.includeDirs bi] ++ ["-optP" ++ opt | opt <- cppOptions bi] ++ [ "-optP-include", "-optP"++ (autogenModulesDir lbi </> cppHeaderName) ] ++ [ "-#include \"" ++ inc ++ "\"" | inc <- PD.includes bi ] ++ [ "-odir", odir, "-hidir", odir ] ++ (if compilerVersion c >= Version [6,8] [] then ["-stubdir", odir] else []) ++ ghcPackageFlags lbi clbi ++ (case withOptimization lbi of NoOptimisation -> [] NormalOptimisation -> ["-O"] MaximumOptimisation -> ["-O2"]) ++ hcOptions GHC bi ++ languageToFlags c (defaultLanguage bi) ++ extensionsToFlags c (usedExtensions bi) where c = compiler lbi
1,160
ghcOptions :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo -> FilePath -> [String] ghcOptions lbi bi clbi odir = ["-hide-all-packages"] ++ ghcPackageDbOptions lbi ++ (if splitObjs lbi then ["-split-objs"] else []) ++ ["-i"] ++ ["-i" ++ odir] ++ ["-i" ++ l | l <- nub (hsSourceDirs bi)] ++ ["-i" ++ autogenModulesDir lbi] ++ ["-I" ++ autogenModulesDir lbi] ++ ["-I" ++ odir] ++ ["-I" ++ dir | dir <- PD.includeDirs bi] ++ ["-optP" ++ opt | opt <- cppOptions bi] ++ [ "-optP-include", "-optP"++ (autogenModulesDir lbi </> cppHeaderName) ] ++ [ "-#include \"" ++ inc ++ "\"" | inc <- PD.includes bi ] ++ [ "-odir", odir, "-hidir", odir ] ++ (if compilerVersion c >= Version [6,8] [] then ["-stubdir", odir] else []) ++ ghcPackageFlags lbi clbi ++ (case withOptimization lbi of NoOptimisation -> [] NormalOptimisation -> ["-O"] MaximumOptimisation -> ["-O2"]) ++ hcOptions GHC bi ++ languageToFlags c (defaultLanguage bi) ++ extensionsToFlags c (usedExtensions bi) where c = compiler lbi
1,160
ghcOptions lbi bi clbi odir = ["-hide-all-packages"] ++ ghcPackageDbOptions lbi ++ (if splitObjs lbi then ["-split-objs"] else []) ++ ["-i"] ++ ["-i" ++ odir] ++ ["-i" ++ l | l <- nub (hsSourceDirs bi)] ++ ["-i" ++ autogenModulesDir lbi] ++ ["-I" ++ autogenModulesDir lbi] ++ ["-I" ++ odir] ++ ["-I" ++ dir | dir <- PD.includeDirs bi] ++ ["-optP" ++ opt | opt <- cppOptions bi] ++ [ "-optP-include", "-optP"++ (autogenModulesDir lbi </> cppHeaderName) ] ++ [ "-#include \"" ++ inc ++ "\"" | inc <- PD.includes bi ] ++ [ "-odir", odir, "-hidir", odir ] ++ (if compilerVersion c >= Version [6,8] [] then ["-stubdir", odir] else []) ++ ghcPackageFlags lbi clbi ++ (case withOptimization lbi of NoOptimisation -> [] NormalOptimisation -> ["-O"] MaximumOptimisation -> ["-O2"]) ++ hcOptions GHC bi ++ languageToFlags c (defaultLanguage bi) ++ extensionsToFlags c (usedExtensions bi) where c = compiler lbi
1,056
false
true
0
25
323
413
214
199
null
null
siddhanathan/ghc
compiler/prelude/THNames.hs
bsd-3-clause
patQTyConName = libTc (fsLit "PatQ") patQTyConKey
69
patQTyConName = libTc (fsLit "PatQ") patQTyConKey
69
patQTyConName = libTc (fsLit "PatQ") patQTyConKey
69
false
false
0
7
25
17
8
9
null
null
thielema/wxhaskell
wxdirect/src/CompileClasses.hs
lgpl-2.1
haskellRetType decl typedecl = case declRet decl of EventId -> "{-# NOINLINE " ++ haskellDeclName (declName decl) ++ " #-}\n" ++ typedecl ++ " EventId" Id -> "{-# NOINLINE " ++ haskellDeclName (declName decl) ++ " #-}\n" ++ typedecl ++ " Int" tp | isPrefixOf "Null_" (declName decl) -> typedecl ++ haskellType 0 tp | otherwise -> typedecl ++ " IO " ++ haskellTypePar 0 tp -- type def. for clarity
481
haskellRetType decl typedecl = case declRet decl of EventId -> "{-# NOINLINE " ++ haskellDeclName (declName decl) ++ " #-}\n" ++ typedecl ++ " EventId" Id -> "{-# NOINLINE " ++ haskellDeclName (declName decl) ++ " #-}\n" ++ typedecl ++ " Int" tp | isPrefixOf "Null_" (declName decl) -> typedecl ++ haskellType 0 tp | otherwise -> typedecl ++ " IO " ++ haskellTypePar 0 tp -- type def. for clarity
481
haskellRetType decl typedecl = case declRet decl of EventId -> "{-# NOINLINE " ++ haskellDeclName (declName decl) ++ " #-}\n" ++ typedecl ++ " EventId" Id -> "{-# NOINLINE " ++ haskellDeclName (declName decl) ++ " #-}\n" ++ typedecl ++ " Int" tp | isPrefixOf "Null_" (declName decl) -> typedecl ++ haskellType 0 tp | otherwise -> typedecl ++ " IO " ++ haskellTypePar 0 tp -- type def. for clarity
481
false
false
1
14
155
139
63
76
null
null
sashabu/libcspm
src/CSPM/Evaluator/ValueSet.hs
bsd-3-clause
unDotProduct (AllSequences vs) = return [AllSequences vs]
57
unDotProduct (AllSequences vs) = return [AllSequences vs]
57
unDotProduct (AllSequences vs) = return [AllSequences vs]
57
false
false
0
7
6
24
11
13
null
null
wfleming/advent-of-code-2016
2016/src/D9Lib.hs
bsd-3-clause
number :: Parser Int number = read <$> many1 digit
50
number :: Parser Int number = read <$> many1 digit
50
number = read <$> many1 digit
29
false
true
0
6
9
21
10
11
null
null
DaMSL/K3
src/Language/K3/Analysis/Provenance/Inference.hs
apache-2.0
pierrtle :: PIEnv -> Maybe (K3 Expression) pierrtle = ptoplevelExpr . perrctxt
78
pierrtle :: PIEnv -> Maybe (K3 Expression) pierrtle = ptoplevelExpr . perrctxt
78
pierrtle = ptoplevelExpr . perrctxt
35
false
true
0
8
11
28
14
14
null
null
ekmett/prelude-extras
src/Prelude/Extras.hs
bsd-3-clause
min2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> f a b min2 x y | x <## y = x | otherwise = y
102
min2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> f a b min2 x y | x <## y = x | otherwise = y
102
min2 x y | x <## y = x | otherwise = y
44
false
true
0
9
38
86
39
47
null
null
d0kt0r0/Tidal
src/Sound/Tidal/Stream.hs
gpl-3.0
startStream :: Config -> [(Target, [OSC])] -> IO Stream startStream config oscmap = do cxs <- mapM (\(target, os) -> do u <- O.openUDP (oAddress target) (oPort target) return $ Cx {cxUDP = u, cxTarget = target, cxOSCs = os} ) oscmap sMapMV <- newMVar Map.empty pMapMV <- newMVar Map.empty globalFMV <- newMVar id listenTid <- ctrlListen sMapMV config tempoMV <- newEmptyMVar let stream = Stream {sConfig = config, sInput = sMapMV, sListenTid = listenTid, sPMapMV = pMapMV, sTempoMV = tempoMV, sGlobalFMV = globalFMV, sCxs = cxs } _ <- T.clocked config tempoMV $ onTick stream return stream
903
startStream :: Config -> [(Target, [OSC])] -> IO Stream startStream config oscmap = do cxs <- mapM (\(target, os) -> do u <- O.openUDP (oAddress target) (oPort target) return $ Cx {cxUDP = u, cxTarget = target, cxOSCs = os} ) oscmap sMapMV <- newMVar Map.empty pMapMV <- newMVar Map.empty globalFMV <- newMVar id listenTid <- ctrlListen sMapMV config tempoMV <- newEmptyMVar let stream = Stream {sConfig = config, sInput = sMapMV, sListenTid = listenTid, sPMapMV = pMapMV, sTempoMV = tempoMV, sGlobalFMV = globalFMV, sCxs = cxs } _ <- T.clocked config tempoMV $ onTick stream return stream
903
startStream config oscmap = do cxs <- mapM (\(target, os) -> do u <- O.openUDP (oAddress target) (oPort target) return $ Cx {cxUDP = u, cxTarget = target, cxOSCs = os} ) oscmap sMapMV <- newMVar Map.empty pMapMV <- newMVar Map.empty globalFMV <- newMVar id listenTid <- ctrlListen sMapMV config tempoMV <- newEmptyMVar let stream = Stream {sConfig = config, sInput = sMapMV, sListenTid = listenTid, sPMapMV = pMapMV, sTempoMV = tempoMV, sGlobalFMV = globalFMV, sCxs = cxs } _ <- T.clocked config tempoMV $ onTick stream return stream
847
false
true
0
17
411
256
130
126
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkArithmeticDeref11= verifyNot checkArithmeticDeref "a[$foo]=wee"
73
prop_checkArithmeticDeref11= verifyNot checkArithmeticDeref "a[$foo]=wee"
73
prop_checkArithmeticDeref11= verifyNot checkArithmeticDeref "a[$foo]=wee"
73
false
false
1
5
3
15
5
10
null
null