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
charlydagos/bonlang
src/Bonlang/Lang/Numeric.hs
mit
modulo = binNumericOp mod
38
modulo = binNumericOp mod
38
modulo = binNumericOp mod
38
false
false
1
5
16
13
4
9
null
null
javgh/mtgoxapi
TestSuite.hs
bsd-3-clause
mtgoxAPITests :: [MtGoxAPIHandles -> Test] mtgoxAPITests = [ test1, test2, test3, test4, test5 , test6, test7, test8, test9, test10]
149
mtgoxAPITests :: [MtGoxAPIHandles -> Test] mtgoxAPITests = [ test1, test2, test3, test4, test5 , test6, test7, test8, test9, test10]
149
mtgoxAPITests = [ test1, test2, test3, test4, test5 , test6, test7, test8, test9, test10]
105
false
true
0
6
35
48
30
18
null
null
fugyk/cabal
cabal-install/Distribution/Client/Get.hs
bsd-3-clause
-- | Entry point for the 'cabal get' command. get :: Verbosity -> [Repo] -> GlobalFlags -> GetFlags -> [UserTarget] -> IO () get verbosity _ _ _ [] = notice verbosity "No packages requested. Nothing to do."
230
get :: Verbosity -> [Repo] -> GlobalFlags -> GetFlags -> [UserTarget] -> IO () get verbosity _ _ _ [] = notice verbosity "No packages requested. Nothing to do."
184
get verbosity _ _ _ [] = notice verbosity "No packages requested. Nothing to do."
85
true
true
0
12
61
67
32
35
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/Module.hs
bsd-3-clause
delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a delModuleEnv (ModuleEnv e) m = ModuleEnv (Map.delete (NDModule m) e)
121
delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a delModuleEnv (ModuleEnv e) m = ModuleEnv (Map.delete (NDModule m) e)
121
delModuleEnv (ModuleEnv e) m = ModuleEnv (Map.delete (NDModule m) e)
68
false
true
0
9
18
55
26
29
null
null
shlevy/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
primRepForeignHint Word64Rep = NoHint
40
primRepForeignHint Word64Rep = NoHint
40
primRepForeignHint Word64Rep = NoHint
40
false
false
0
5
6
9
4
5
null
null
kim/amazonka
core/test/Test/AWS/Data/Time.hs
mpl-2.0
tests :: TestTree tests = testGroup "time" [ testGroup "deserialise xml" [ testCase "RFC822" $ assertXML "<T>Fri, 07 Nov 2014 04:42:13 GMT</T>" (ref :: RFC822) , testCase "ISO8601" $ assertXML "<T>2014-11-07T04:42:13.000Z</T>" (ref :: ISO8601) , testCase "AWS" $ assertXML "<T>20141107T044213Z</T>" (ref :: AWSTime) , testCase "POSIX integer" $ assertXML "<T>1415335333</T>" (ref :: POSIX) , testCase "POSIX scientific" $ assertXML "<T>1.415335333E9</T>" (ref :: POSIX) ] , testGroup "deserialise json" [ testCase "RFC822" $ assertJSON "{\"time_rfc\":\"Fri, 07 Nov 2014 04:42:13 GMT\"}" (defaultTimeItem {timeRFC = Just ref}) , testCase "ISO8601" $ assertJSON "{\"time_iso\":\"2014-11-07T04:42:13.000Z\"}" (defaultTimeItem {timeISO = Just ref}) , testCase "AWS" $ assertJSON "{\"time_aws\":\"20141107T044213Z\"}" (defaultTimeItem {timeAWS = Just ref}) , testCase "POSIX integer" $ assertJSON "{\"time_posix\":1415335333}" (defaultTimeItem {timePOSIX = Just ref}) , testCase "POSIX scientific" $ assertJSON "{\"time_posix\":1.415335333E9}" (defaultTimeItem {timePOSIX = Just ref}) ] , testGroup "serialise json" [ testCase "POSIX integer" $ (@?=) (encode $ defaultTimeItem {timePOSIX = Just ref}) "{\"time_aws\":null,\"time_iso\":null,\ \\"time_posix\":1415335333,\"time_rfc\":null}" ] ]
1,697
tests :: TestTree tests = testGroup "time" [ testGroup "deserialise xml" [ testCase "RFC822" $ assertXML "<T>Fri, 07 Nov 2014 04:42:13 GMT</T>" (ref :: RFC822) , testCase "ISO8601" $ assertXML "<T>2014-11-07T04:42:13.000Z</T>" (ref :: ISO8601) , testCase "AWS" $ assertXML "<T>20141107T044213Z</T>" (ref :: AWSTime) , testCase "POSIX integer" $ assertXML "<T>1415335333</T>" (ref :: POSIX) , testCase "POSIX scientific" $ assertXML "<T>1.415335333E9</T>" (ref :: POSIX) ] , testGroup "deserialise json" [ testCase "RFC822" $ assertJSON "{\"time_rfc\":\"Fri, 07 Nov 2014 04:42:13 GMT\"}" (defaultTimeItem {timeRFC = Just ref}) , testCase "ISO8601" $ assertJSON "{\"time_iso\":\"2014-11-07T04:42:13.000Z\"}" (defaultTimeItem {timeISO = Just ref}) , testCase "AWS" $ assertJSON "{\"time_aws\":\"20141107T044213Z\"}" (defaultTimeItem {timeAWS = Just ref}) , testCase "POSIX integer" $ assertJSON "{\"time_posix\":1415335333}" (defaultTimeItem {timePOSIX = Just ref}) , testCase "POSIX scientific" $ assertJSON "{\"time_posix\":1.415335333E9}" (defaultTimeItem {timePOSIX = Just ref}) ] , testGroup "serialise json" [ testCase "POSIX integer" $ (@?=) (encode $ defaultTimeItem {timePOSIX = Just ref}) "{\"time_aws\":null,\"time_iso\":null,\ \\"time_posix\":1415335333,\"time_rfc\":null}" ] ]
1,697
tests = testGroup "time" [ testGroup "deserialise xml" [ testCase "RFC822" $ assertXML "<T>Fri, 07 Nov 2014 04:42:13 GMT</T>" (ref :: RFC822) , testCase "ISO8601" $ assertXML "<T>2014-11-07T04:42:13.000Z</T>" (ref :: ISO8601) , testCase "AWS" $ assertXML "<T>20141107T044213Z</T>" (ref :: AWSTime) , testCase "POSIX integer" $ assertXML "<T>1415335333</T>" (ref :: POSIX) , testCase "POSIX scientific" $ assertXML "<T>1.415335333E9</T>" (ref :: POSIX) ] , testGroup "deserialise json" [ testCase "RFC822" $ assertJSON "{\"time_rfc\":\"Fri, 07 Nov 2014 04:42:13 GMT\"}" (defaultTimeItem {timeRFC = Just ref}) , testCase "ISO8601" $ assertJSON "{\"time_iso\":\"2014-11-07T04:42:13.000Z\"}" (defaultTimeItem {timeISO = Just ref}) , testCase "AWS" $ assertJSON "{\"time_aws\":\"20141107T044213Z\"}" (defaultTimeItem {timeAWS = Just ref}) , testCase "POSIX integer" $ assertJSON "{\"time_posix\":1415335333}" (defaultTimeItem {timePOSIX = Just ref}) , testCase "POSIX scientific" $ assertJSON "{\"time_posix\":1.415335333E9}" (defaultTimeItem {timePOSIX = Just ref}) ] , testGroup "serialise json" [ testCase "POSIX integer" $ (@?=) (encode $ defaultTimeItem {timePOSIX = Just ref}) "{\"time_aws\":null,\"time_iso\":null,\ \\"time_posix\":1415335333,\"time_rfc\":null}" ] ]
1,679
false
true
0
15
562
333
170
163
null
null
nshepperd/funn
network.hs
mit
openNetwork :: forall m n a b. KnownNat n => Network m a b -> Maybe (Diff m (Blob n, a) b, RVar (Blob n)) openNetwork (Network p diff initial) = case sameNat p (Proxy @ n) of Just Refl -> Just (diff, initial) Nothing -> Nothing
237
openNetwork :: forall m n a b. KnownNat n => Network m a b -> Maybe (Diff m (Blob n, a) b, RVar (Blob n)) openNetwork (Network p diff initial) = case sameNat p (Proxy @ n) of Just Refl -> Just (diff, initial) Nothing -> Nothing
237
openNetwork (Network p diff initial) = case sameNat p (Proxy @ n) of Just Refl -> Just (diff, initial) Nothing -> Nothing
131
false
true
0
12
56
130
64
66
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Graphics/DecalSet.hs
mit
decalSetSetOptimizeBufferSize :: (Parent DecalSet a, Pointer p a, MonadIO m) => p -- ^ DecalSet pointer or child -> Bool -> m () decalSetSetOptimizeBufferSize p v = liftIO $ do let ptr = parentPointer p v' = fromBool v [C.exp| void {$(DecalSet* ptr)->SetOptimizeBufferSize($(int v') != 0)} |] -- | Default value for 'decalSetAddDecal' sub geometry argument
373
decalSetSetOptimizeBufferSize :: (Parent DecalSet a, Pointer p a, MonadIO m) => p -- ^ DecalSet pointer or child -> Bool -> m () decalSetSetOptimizeBufferSize p v = liftIO $ do let ptr = parentPointer p v' = fromBool v [C.exp| void {$(DecalSet* ptr)->SetOptimizeBufferSize($(int v') != 0)} |] -- | Default value for 'decalSetAddDecal' sub geometry argument
373
decalSetSetOptimizeBufferSize p v = liftIO $ do let ptr = parentPointer p v' = fromBool v [C.exp| void {$(DecalSet* ptr)->SetOptimizeBufferSize($(int v') != 0)} |] -- | Default value for 'decalSetAddDecal' sub geometry argument
238
false
true
0
11
72
90
46
44
null
null
TheBizzle/GallyScraper-Haskell
src/Scraper.hs
bsd-3-clause
badsFile :: FilePath badsFile = "bads.json"
43
badsFile :: FilePath badsFile = "bads.json"
43
badsFile = "bads.json"
22
false
true
0
4
5
11
6
5
null
null
kojiromike/Idris-dev
src/Idris/WhoCalls.hs
bsd-3-clause
callsWho :: Name -> Idris [(Name, [Name])] callsWho n = do ctxt <- getContext let defs = lookupNameDef n ctxt return $ map (\ (n, def) -> (n, nub $ namesDef def)) defs
199
callsWho :: Name -> Idris [(Name, [Name])] callsWho n = do ctxt <- getContext let defs = lookupNameDef n ctxt return $ map (\ (n, def) -> (n, nub $ namesDef def)) defs
199
callsWho n = do ctxt <- getContext let defs = lookupNameDef n ctxt return $ map (\ (n, def) -> (n, nub $ namesDef def)) defs
156
false
true
0
13
64
93
48
45
null
null
green-haskell/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
returnIOIdKey = mkPreludeMiscIdUnique 35
56
returnIOIdKey = mkPreludeMiscIdUnique 35
56
returnIOIdKey = mkPreludeMiscIdUnique 35
56
false
false
0
5
19
9
4
5
null
null
kindl/Hypatia
src/Parser.hs
mit
decl = typeSignature <|> fixityDeclaration <|> operatorDeclaration <|> functionDeclaration <|> expressionDeclaration
124
decl = typeSignature <|> fixityDeclaration <|> operatorDeclaration <|> functionDeclaration <|> expressionDeclaration
124
decl = typeSignature <|> fixityDeclaration <|> operatorDeclaration <|> functionDeclaration <|> expressionDeclaration
124
false
false
0
8
18
22
11
11
null
null
copumpkin/vector-static
Data/Vector/Unboxed/Static.hs
bsd-3-clause
findIndex p (Vec vs) = G.findIndex p vs
39
findIndex p (Vec vs) = G.findIndex p vs
39
findIndex p (Vec vs) = G.findIndex p vs
39
false
false
0
7
7
24
11
13
null
null
uduki/hsQt
Qtc/Gui/QGraphicsView.hs
bsd-2-clause
updateSceneRect :: QGraphicsView a -> ((RectF)) -> IO () updateSceneRect x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> withCRectF x1 $ \crectf_x1_x crectf_x1_y crectf_x1_w crectf_x1_h -> qtc_QGraphicsView_updateSceneRect_qth cobj_x0 crectf_x1_x crectf_x1_y crectf_x1_w crectf_x1_h
287
updateSceneRect :: QGraphicsView a -> ((RectF)) -> IO () updateSceneRect x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> withCRectF x1 $ \crectf_x1_x crectf_x1_y crectf_x1_w crectf_x1_h -> qtc_QGraphicsView_updateSceneRect_qth cobj_x0 crectf_x1_x crectf_x1_y crectf_x1_w crectf_x1_h
287
updateSceneRect x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> withCRectF x1 $ \crectf_x1_x crectf_x1_y crectf_x1_w crectf_x1_h -> qtc_QGraphicsView_updateSceneRect_qth cobj_x0 crectf_x1_x crectf_x1_y crectf_x1_w crectf_x1_h
230
false
true
0
9
43
82
41
41
null
null
AndrasKovacs/trie-vector
Data/TrieVector.hs
mit
nFields :: Addr# -> Int# -> [Int] nFields addr n = go 0# where go i = case i ==# n of 1# -> [] _ -> (I# (indexIntOffAddr# addr i)) : go (i +# 1#)
157
nFields :: Addr# -> Int# -> [Int] nFields addr n = go 0# where go i = case i ==# n of 1# -> [] _ -> (I# (indexIntOffAddr# addr i)) : go (i +# 1#)
157
nFields addr n = go 0# where go i = case i ==# n of 1# -> [] _ -> (I# (indexIntOffAddr# addr i)) : go (i +# 1#)
123
false
true
0
14
47
90
45
45
null
null
fmthoma/ghc
compiler/main/DynFlags.hs
bsd-3-clause
setOutputFile, setDynOutputFile, setOutputHi, setDumpPrefixForce :: Maybe String -> DynFlags -> DynFlags setObjectDir f d = d{ objectDir = Just f}
152
setOutputFile, setDynOutputFile, setOutputHi, setDumpPrefixForce :: Maybe String -> DynFlags -> DynFlags setObjectDir f d = d{ objectDir = Just f}
151
setObjectDir f d = d{ objectDir = Just f}
43
false
true
0
7
25
44
25
19
null
null
SamirTalwar/advent-of-code
2015/AOC_09_2.hs
mit
sortedPairs (a : xs@(b : _)) = sortTuple (a, b) : sortedPairs xs
64
sortedPairs (a : xs@(b : _)) = sortTuple (a, b) : sortedPairs xs
64
sortedPairs (a : xs@(b : _)) = sortTuple (a, b) : sortedPairs xs
64
false
false
0
10
12
42
22
20
null
null
onlyshk/json-hs
Main.hs
mit
parseCommandArgs _ = putStrLn "try ./json-hs --usage"
53
parseCommandArgs _ = putStrLn "try ./json-hs --usage"
53
parseCommandArgs _ = putStrLn "try ./json-hs --usage"
53
false
false
0
5
6
12
5
7
null
null
sboosali/commands
commands-core/sources/Commands/RHS/Derived.hs
mit
__inlineRHS__ :: RHS n t f a -> RHS n t f a __inlineRHS__ = \case NonTerminal _ r -> r r -> r -- a Traversal?
112
__inlineRHS__ :: RHS n t f a -> RHS n t f a __inlineRHS__ = \case NonTerminal _ r -> r r -> r -- a Traversal?
112
__inlineRHS__ = \case NonTerminal _ r -> r r -> r -- a Traversal?
68
false
true
0
8
29
53
26
27
null
null
ddssff/lens
src/Control/Lens/Internal/FieldTH.hs
bsd-3-clause
buildScaffold :: LensRules -> Type {- ^ outer type -} -> [(Name, [([DefName], Type)])] {- ^ normalized constructors -} -> DefName {- ^ target definition -} -> Q (OpticType, OpticStab, [(Name, Int, [Int])]) {- ^ optic type, definition type, field count, target fields -} buildScaffold rules s cons defName = do (s',t,a,b) <- buildStab s (concatMap snd consForDef) let defType | Just (_,cx,a') <- preview _ForallT a = let optic | lensCase = getterTypeName | otherwise = foldTypeName in OpticSa cx optic s' a' -- Getter and Fold are always simple | not (_allowUpdates rules) = let optic | lensCase = getterTypeName | otherwise = foldTypeName in OpticSa [] optic s' a -- Generate simple Lens and Traversal where possible | _simpleLenses rules || s' == t && a == b = let optic | isoCase && _allowIsos rules = iso'TypeName | lensCase = lens'TypeName | otherwise = traversal'TypeName in OpticSa [] optic s' a -- Generate type-changing Lens and Traversal otherwise | otherwise = let optic | isoCase && _allowIsos rules = isoTypeName | lensCase = lensTypeName | otherwise = traversalTypeName in OpticStab optic s' t a b opticType | has _ForallT a = GetterType | not (_allowUpdates rules) = GetterType | isoCase = IsoType | otherwise = LensType return (opticType, defType, scaffolds) where consForDef :: [(Name, [Either Type Type])] consForDef = over (mapped . _2 . mapped) categorize cons scaffolds :: [(Name, Int, [Int])] scaffolds = [ (n, length ts, rightIndices ts) | (n,ts) <- consForDef ] rightIndices :: [Either Type Type] -> [Int] rightIndices = findIndices (has _Right) -- Right: types for this definition -- Left : other types categorize :: ([DefName], Type) -> Either Type Type categorize (defNames, t) | defName `elem` defNames = Right t | otherwise = Left t lensCase :: Bool lensCase = all (\x -> lengthOf (_2 . folded . _Right) x == 1) consForDef isoCase :: Bool isoCase = case scaffolds of [(_,1,[0])] -> True _ -> False
2,768
buildScaffold :: LensRules -> Type {- ^ outer type -} -> [(Name, [([DefName], Type)])] {- ^ normalized constructors -} -> DefName {- ^ target definition -} -> Q (OpticType, OpticStab, [(Name, Int, [Int])]) buildScaffold rules s cons defName = do (s',t,a,b) <- buildStab s (concatMap snd consForDef) let defType | Just (_,cx,a') <- preview _ForallT a = let optic | lensCase = getterTypeName | otherwise = foldTypeName in OpticSa cx optic s' a' -- Getter and Fold are always simple | not (_allowUpdates rules) = let optic | lensCase = getterTypeName | otherwise = foldTypeName in OpticSa [] optic s' a -- Generate simple Lens and Traversal where possible | _simpleLenses rules || s' == t && a == b = let optic | isoCase && _allowIsos rules = iso'TypeName | lensCase = lens'TypeName | otherwise = traversal'TypeName in OpticSa [] optic s' a -- Generate type-changing Lens and Traversal otherwise | otherwise = let optic | isoCase && _allowIsos rules = isoTypeName | lensCase = lensTypeName | otherwise = traversalTypeName in OpticStab optic s' t a b opticType | has _ForallT a = GetterType | not (_allowUpdates rules) = GetterType | isoCase = IsoType | otherwise = LensType return (opticType, defType, scaffolds) where consForDef :: [(Name, [Either Type Type])] consForDef = over (mapped . _2 . mapped) categorize cons scaffolds :: [(Name, Int, [Int])] scaffolds = [ (n, length ts, rightIndices ts) | (n,ts) <- consForDef ] rightIndices :: [Either Type Type] -> [Int] rightIndices = findIndices (has _Right) -- Right: types for this definition -- Left : other types categorize :: ([DefName], Type) -> Either Type Type categorize (defNames, t) | defName `elem` defNames = Right t | otherwise = Left t lensCase :: Bool lensCase = all (\x -> lengthOf (_2 . folded . _Right) x == 1) consForDef isoCase :: Bool isoCase = case scaffolds of [(_,1,[0])] -> True _ -> False
2,690
buildScaffold rules s cons defName = do (s',t,a,b) <- buildStab s (concatMap snd consForDef) let defType | Just (_,cx,a') <- preview _ForallT a = let optic | lensCase = getterTypeName | otherwise = foldTypeName in OpticSa cx optic s' a' -- Getter and Fold are always simple | not (_allowUpdates rules) = let optic | lensCase = getterTypeName | otherwise = foldTypeName in OpticSa [] optic s' a -- Generate simple Lens and Traversal where possible | _simpleLenses rules || s' == t && a == b = let optic | isoCase && _allowIsos rules = iso'TypeName | lensCase = lens'TypeName | otherwise = traversal'TypeName in OpticSa [] optic s' a -- Generate type-changing Lens and Traversal otherwise | otherwise = let optic | isoCase && _allowIsos rules = isoTypeName | lensCase = lensTypeName | otherwise = traversalTypeName in OpticStab optic s' t a b opticType | has _ForallT a = GetterType | not (_allowUpdates rules) = GetterType | isoCase = IsoType | otherwise = LensType return (opticType, defType, scaffolds) where consForDef :: [(Name, [Either Type Type])] consForDef = over (mapped . _2 . mapped) categorize cons scaffolds :: [(Name, Int, [Int])] scaffolds = [ (n, length ts, rightIndices ts) | (n,ts) <- consForDef ] rightIndices :: [Either Type Type] -> [Int] rightIndices = findIndices (has _Right) -- Right: types for this definition -- Left : other types categorize :: ([DefName], Type) -> Either Type Type categorize (defNames, t) | defName `elem` defNames = Right t | otherwise = Left t lensCase :: Bool lensCase = all (\x -> lengthOf (_2 . folded . _Right) x == 1) consForDef isoCase :: Bool isoCase = case scaffolds of [(_,1,[0])] -> True _ -> False
2,304
true
true
0
19
1,169
747
383
364
null
null
atulag/CS653-Projects
dist/build/autogen/Paths_HSVG.hs
bsd-3-clause
getBinDir, getLibDir, getDataDir, getLibexecDir :: IO FilePath getBinDir = catch (getEnv "HSVG_bindir") (\_ -> return bindir)
125
getBinDir, getLibDir, getDataDir, getLibexecDir :: IO FilePath getBinDir = catch (getEnv "HSVG_bindir") (\_ -> return bindir)
125
getBinDir = catch (getEnv "HSVG_bindir") (\_ -> return bindir)
62
false
true
0
8
15
42
24
18
null
null
brenov/set
interpreter/Types.hs
mit
-- - Set array item -- Token Array -- Token Position -- Token New value -- Return Updated array setArrayItem :: Token -> Token -> Token -> Token setArrayItem (Array (t, s, value) p) (Nat i _) nv = (Array (t, s, (replaceNth i nv value) ) p)
242
setArrayItem :: Token -> Token -> Token -> Token setArrayItem (Array (t, s, value) p) (Nat i _) nv = (Array (t, s, (replaceNth i nv value) ) p)
143
setArrayItem (Array (t, s, value) p) (Nat i _) nv = (Array (t, s, (replaceNth i nv value) ) p)
94
true
true
0
9
50
87
49
38
null
null
brendanhay/ede
src/Text/EDE/Internal/Eval.hs
mpl-2.0
-- FIXME: Add delta information to the thrown error document. throwError :: Delta -> AnsiDoc -> Context a throwError d doc = lift . Failure $ prettyDelta d <+> red "error:" <+> doc
180
throwError :: Delta -> AnsiDoc -> Context a throwError d doc = lift . Failure $ prettyDelta d <+> red "error:" <+> doc
118
throwError d doc = lift . Failure $ prettyDelta d <+> red "error:" <+> doc
74
true
true
0
8
32
50
24
26
null
null
crockeo/tic-taskell
src/Minimax.hs
mit
-- | Finding the distance between two numbers. distance :: Num a => a -> a -> a distance a b = abs $ a - b
106
distance :: Num a => a -> a -> a distance a b = abs $ a - b
59
distance a b = abs $ a - b
26
true
true
0
7
26
40
20
20
null
null
mightybyte/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
updateSandboxConfigFileFlag :: GlobalFlags -> IO GlobalFlags updateSandboxConfigFileFlag globalFlags = case globalSandboxConfigFile globalFlags of Flag _ -> return globalFlags NoFlag -> do fp <- lookupEnv "CABAL_SANDBOX_CONFIG" forM_ fp $ \fp' -> do -- Check for existence if environment variable set exists <- doesFileExist fp' unless exists $ die $ "Cabal sandbox file in $CABAL_SANDBOX_CONFIG does not exist: " ++ fp' let f' = maybe NoFlag Flag fp return globalFlags { globalSandboxConfigFile = f' } -- | Return the path to the sandbox config file - either the default or the one -- specified with @--sandbox-config-file@.
681
updateSandboxConfigFileFlag :: GlobalFlags -> IO GlobalFlags updateSandboxConfigFileFlag globalFlags = case globalSandboxConfigFile globalFlags of Flag _ -> return globalFlags NoFlag -> do fp <- lookupEnv "CABAL_SANDBOX_CONFIG" forM_ fp $ \fp' -> do -- Check for existence if environment variable set exists <- doesFileExist fp' unless exists $ die $ "Cabal sandbox file in $CABAL_SANDBOX_CONFIG does not exist: " ++ fp' let f' = maybe NoFlag Flag fp return globalFlags { globalSandboxConfigFile = f' } -- | Return the path to the sandbox config file - either the default or the one -- specified with @--sandbox-config-file@.
681
updateSandboxConfigFileFlag globalFlags = case globalSandboxConfigFile globalFlags of Flag _ -> return globalFlags NoFlag -> do fp <- lookupEnv "CABAL_SANDBOX_CONFIG" forM_ fp $ \fp' -> do -- Check for existence if environment variable set exists <- doesFileExist fp' unless exists $ die $ "Cabal sandbox file in $CABAL_SANDBOX_CONFIG does not exist: " ++ fp' let f' = maybe NoFlag Flag fp return globalFlags { globalSandboxConfigFile = f' } -- | Return the path to the sandbox config file - either the default or the one -- specified with @--sandbox-config-file@.
620
false
true
0
17
149
133
61
72
null
null
cacay/language-sill
Language/Krill/TypeChecker/FreeVariables.hs
mit
freeChannelsSet (ESend _ c e1 e2 ) = Set.insert c (freeChannelsSet e1 `Set.union` freeChannelsSet e2)
103
freeChannelsSet (ESend _ c e1 e2 ) = Set.insert c (freeChannelsSet e1 `Set.union` freeChannelsSet e2)
103
freeChannelsSet (ESend _ c e1 e2 ) = Set.insert c (freeChannelsSet e1 `Set.union` freeChannelsSet e2)
103
false
false
0
7
16
47
22
25
null
null
lordxist/uroboro
src/Uroboro/Token.hs
mit
-- | Parser @dot@ accepts the character @\'.\'@. dot :: Parser String dot = symbol "."
100
dot :: Parser String dot = symbol "."
51
dot = symbol "."
23
true
true
0
5
29
18
9
9
null
null
guoguo12/haskell-ptable
ptable.hs
apache-2.0
pnum "Te" = 5
13
pnum "Te" = 5
13
pnum "Te" = 5
13
false
false
0
4
3
10
4
6
null
null
amccausl/Swish
Swish/HaskellRDF/RDFProofContext.hs
lgpl-2.1
rdfscp32 = makeN3ClosureRule scopeRDFS "cp1" "?c ?p ?y . " "?c rdfs:range rdfs:Resource ." (makeVarFilterModify $ isMemberPropV "?c")
173
rdfscp32 = makeN3ClosureRule scopeRDFS "cp1" "?c ?p ?y . " "?c rdfs:range rdfs:Resource ." (makeVarFilterModify $ isMemberPropV "?c")
173
rdfscp32 = makeN3ClosureRule scopeRDFS "cp1" "?c ?p ?y . " "?c rdfs:range rdfs:Resource ." (makeVarFilterModify $ isMemberPropV "?c")
173
false
false
0
8
57
27
13
14
null
null
dgvncsz0f/iyql
src/main/haskell/Yql/Core/Types.hs
gpl-3.0
-- | Test if the statement is a insert statement insert :: Expression -> Bool insert (INSERT _ _ _) = True
106
insert :: Expression -> Bool insert (INSERT _ _ _) = True
57
insert (INSERT _ _ _) = True
28
true
true
0
7
21
29
15
14
null
null
mreluzeon/block-monad
src/Chain.hs
lgpl-3.0
makeChain :: STM Chain makeChain = do newTVar []
50
makeChain :: STM Chain makeChain = do newTVar []
50
makeChain = do newTVar []
27
false
true
0
8
10
22
10
12
null
null
mfpi/boom
src/Gameplay.hs
mit
moveDirection :: Event (MoveEvent Move) -> Reactive (Behavior (Float, Float)) moveDirection eMove = hold (0, 0) $ fmap speed eMove where speed :: MoveEvent Move -> (Float, Float) speed (MoveEvent (x, y)) = (x, y) speed (StopMoveEvent) = (0, 0)
278
moveDirection :: Event (MoveEvent Move) -> Reactive (Behavior (Float, Float)) moveDirection eMove = hold (0, 0) $ fmap speed eMove where speed :: MoveEvent Move -> (Float, Float) speed (MoveEvent (x, y)) = (x, y) speed (StopMoveEvent) = (0, 0)
275
moveDirection eMove = hold (0, 0) $ fmap speed eMove where speed :: MoveEvent Move -> (Float, Float) speed (MoveEvent (x, y)) = (x, y) speed (StopMoveEvent) = (0, 0)
197
false
true
4
7
74
120
65
55
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Conversion functions fromIntegralIdKey, realToFracIdKey, toIntegerClassOpKey, toRationalClassOpKey :: Unique fromIntegralIdKey = mkPreludeMiscIdUnique 190
160
fromIntegralIdKey, realToFracIdKey, toIntegerClassOpKey, toRationalClassOpKey :: Unique fromIntegralIdKey = mkPreludeMiscIdUnique 190
136
fromIntegralIdKey = mkPreludeMiscIdUnique 190
48
true
true
0
5
15
21
14
7
null
null
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
gpl-3.0
notPrelude "Real" = "AReal"
30
notPrelude "Real" = "AReal"
30
notPrelude "Real" = "AReal"
30
false
false
0
5
6
9
4
5
null
null
beni55/ghcjs
src/Gen2/Optimizer.hs
mit
subStats f (LabelStat l s) = LabelStat l <$> f s
48
subStats f (LabelStat l s) = LabelStat l <$> f s
48
subStats f (LabelStat l s) = LabelStat l <$> f s
48
false
false
0
7
10
29
13
16
null
null
Blaisorblade/stack
src/main/Main.hs
bsd-3-clause
-- | Fix up extra-deps for a project solverCmd :: Bool -- ^ modify stack.yaml automatically? -> GlobalOpts -> IO () solverCmd fixStackYaml go = withBuildConfigAndLock go (\_ -> solveExtraDeps fixStackYaml)
229
solverCmd :: Bool -- ^ modify stack.yaml automatically? -> GlobalOpts -> IO () solverCmd fixStackYaml go = withBuildConfigAndLock go (\_ -> solveExtraDeps fixStackYaml)
192
solverCmd fixStackYaml go = withBuildConfigAndLock go (\_ -> solveExtraDeps fixStackYaml)
93
true
true
0
8
54
47
24
23
null
null
mightymoose/liquidhaskell
benchmarks/base-4.5.1.0/System/IO/Error.hs
bsd-3-clause
ioeGetFileName ioe = ioe_filename ioe
37
ioeGetFileName ioe = ioe_filename ioe
37
ioeGetFileName ioe = ioe_filename ioe
37
false
false
0
5
4
12
5
7
null
null
DavidAlphaFox/darcs
src/Darcs/Patch/OldDate.hs
gpl-2.0
-- | Read/interpret a date string, assuming UTC if timezone -- is not specified in the string readUTCDate :: String -> CalendarTime readUTCDate = readDate 0
158
readUTCDate :: String -> CalendarTime readUTCDate = readDate 0
62
readUTCDate = readDate 0
24
true
true
0
5
27
20
11
9
null
null
mightymoose/liquidhaskell
benchmarks/xmonad-0.11/XMonad/StackSet.hs
bsd-3-clause
-- | Get a list of all workspaces in the 'StackSet'. {-@ workspaces :: StackSet i l a s sd -> [Workspace i l a] @-} workspaces :: StackSet i l a s sd -> [Workspace i l a] workspaces s = workspace (current s) : map workspace (visible s) ++ hidden s where [] ++ ys = ys -- LIQUID (x:xs) ++ ys = x: (xs ++ ys) -- LIQUID -- | Get a list of all windows in the 'StackSet' in no particular order
419
workspaces :: StackSet i l a s sd -> [Workspace i l a] workspaces s = workspace (current s) : map workspace (visible s) ++ hidden s where [] ++ ys = ys -- LIQUID (x:xs) ++ ys = x: (xs ++ ys) -- LIQUID -- | Get a list of all windows in the 'StackSet' in no particular order
303
workspaces s = workspace (current s) : map workspace (visible s) ++ hidden s where [] ++ ys = ys -- LIQUID (x:xs) ++ ys = x: (xs ++ ys) -- LIQUID -- | Get a list of all windows in the 'StackSet' in no particular order
248
true
true
0
9
116
120
60
60
null
null
purcell/adventofcodeteam
app/Nineteen.hs
bsd-3-clause
mutations :: String -> (String, String) -> [String] mutations string (sub, rep) = concatMap (mutate string (sub, rep)) [0..((length string) - (length sub))]
156
mutations :: String -> (String, String) -> [String] mutations string (sub, rep) = concatMap (mutate string (sub, rep)) [0..((length string) - (length sub))]
156
mutations string (sub, rep) = concatMap (mutate string (sub, rep)) [0..((length string) - (length sub))]
104
false
true
0
10
22
82
45
37
null
null
legoscia/hsxmpp
Stanzas.hs
bsd-3-clause
iqXmlns _ _ = False
19
iqXmlns _ _ = False
19
iqXmlns _ _ = False
19
false
false
0
5
4
11
5
6
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
-- Class Monad monadClassName, thenMName, bindMName, returnMName, failMName :: Name monadClassName = clsQual gHC_BASE (fsLit "Monad") monadClassKey
152
monadClassName, thenMName, bindMName, returnMName, failMName :: Name monadClassName = clsQual gHC_BASE (fsLit "Monad") monadClassKey
137
monadClassName = clsQual gHC_BASE (fsLit "Monad") monadClassKey
68
true
true
5
7
21
44
21
23
null
null
markus1189/SmartCheck
src/Test/SmartCheck/DataToTree.hs
bsd-3-clause
getLevel :: Forest a -> Int -> [a] getLevel fs 0 = map rootLabel fs
67
getLevel :: Forest a -> Int -> [a] getLevel fs 0 = map rootLabel fs
67
getLevel fs 0 = map rootLabel fs
32
false
true
0
9
14
42
18
24
null
null
da-x/lamdu
Lamdu/GUI/VersionControl.hs
gpl-3.0
branchTextEditId :: Branch t -> Widget.Id branchTextEditId = (`Widget.joinId` ["textedit"]) . branchDelegatorId
111
branchTextEditId :: Branch t -> Widget.Id branchTextEditId = (`Widget.joinId` ["textedit"]) . branchDelegatorId
111
branchTextEditId = (`Widget.joinId` ["textedit"]) . branchDelegatorId
69
false
true
0
7
11
35
20
15
null
null
unisonweb/platform
unison-core/src/Unison/Util/Relation.hs
mit
map :: (Ord a, Ord b, Ord c, Ord d) => ((a, b) -> (c, d)) -> Relation a b -> Relation c d map f = fromList . fmap f . toList
128
map :: (Ord a, Ord b, Ord c, Ord d) => ((a, b) -> (c, d)) -> Relation a b -> Relation c d map f = fromList . fmap f . toList
128
map f = fromList . fmap f . toList
34
false
true
0
9
36
89
46
43
null
null
fmapfmapfmap/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/CreateAutoScalingGroup.hs
mpl-2.0
-- | A comma-separated list of subnet identifiers for your virtual private -- cloud (VPC). -- -- If you specify subnets and Availability Zones with this call, ensure -- that the subnets\' Availability Zones match the Availability Zones -- specified. -- -- For more information, see -- <http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html Auto Scaling and Amazon Virtual Private Cloud> -- in the /Auto Scaling Developer Guide/. casgVPCZoneIdentifier :: Lens' CreateAutoScalingGroup (Maybe Text) casgVPCZoneIdentifier = lens _casgVPCZoneIdentifier (\ s a -> s{_casgVPCZoneIdentifier = a})
619
casgVPCZoneIdentifier :: Lens' CreateAutoScalingGroup (Maybe Text) casgVPCZoneIdentifier = lens _casgVPCZoneIdentifier (\ s a -> s{_casgVPCZoneIdentifier = a})
159
casgVPCZoneIdentifier = lens _casgVPCZoneIdentifier (\ s a -> s{_casgVPCZoneIdentifier = a})
92
true
true
0
9
78
55
34
21
null
null
maxigit/sql-fragment
src/Database/SQLFragment/SQLFragment.hs
bsd-3-clause
openLeftT INNER = LEFT
22
openLeftT INNER = LEFT
22
openLeftT INNER = LEFT
22
false
false
0
5
3
9
4
5
null
null
ublubu/shapes
shapes/src/Physics/Linear.hs
mit
{- TRANSFORMS -} rotate22_ :: Double# -> Double# -> M2x2 rotate22_ cosv sinv = M2x2 cosv (negateDouble# sinv) sinv cosv
120
rotate22_ :: Double# -> Double# -> M2x2 rotate22_ cosv sinv = M2x2 cosv (negateDouble# sinv) sinv cosv
102
rotate22_ cosv sinv = M2x2 cosv (negateDouble# sinv) sinv cosv
62
true
true
0
7
20
40
20
20
null
null
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
mit
-- | Get the value of a field. getField :: (f ∈ WidgetFields w) => IPythonWidget w -> SField f -> IO (FieldType f) getField widget sfield = unwrap . _value <$> getAttr widget sfield
181
getField :: (f ∈ WidgetFields w) => IPythonWidget w -> SField f -> IO (FieldType f) getField widget sfield = unwrap . _value <$> getAttr widget sfield
150
getField widget sfield = unwrap . _value <$> getAttr widget sfield
66
true
true
1
11
34
72
33
39
null
null
joeschmo/joebot2
src/Joebot/Plugins/Dice/Roll.hs
mit
-- This command is invoked when somebody invokes -- "!roll" on the channel. -- The arguments to Command are the command name, the arity, -- the function to run, and the help message. roll = Command "!roll" 1 rollDie "!roll <num_dice>d<die_type>"
245
roll = Command "!roll" 1 rollDie "!roll <num_dice>d<die_type>"
62
roll = Command "!roll" 1 rollDie "!roll <num_dice>d<die_type>"
62
true
false
1
5
40
22
11
11
null
null
shlevy/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
tyCoFVsOfCo (AppCo co arg) fv_cand in_scope acc = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCo arg) fv_cand in_scope acc
115
tyCoFVsOfCo (AppCo co arg) fv_cand in_scope acc = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCo arg) fv_cand in_scope acc
115
tyCoFVsOfCo (AppCo co arg) fv_cand in_scope acc = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCo arg) fv_cand in_scope acc
115
false
false
0
8
17
47
22
25
null
null
limaner2002/EPC-tools
USACScripts/src/Scripts/FCCForm471.hs
bsd-3-clause
selectFirst :: Applicative f => (GridFieldIdent -> f GridFieldIdent) -> GridField a0 -> f (GridField a0) selectFirst = gfIdentifiers . traverse . taking 1 traverse
168
selectFirst :: Applicative f => (GridFieldIdent -> f GridFieldIdent) -> GridField a0 -> f (GridField a0) selectFirst = gfIdentifiers . traverse . taking 1 traverse
168
selectFirst = gfIdentifiers . traverse . taking 1 traverse
58
false
true
0
11
29
66
30
36
null
null
haroldcarr/juno
z-no-longer-used/src/Hop/Schwifty/Swift/M105/Parser.hs
bsd-3-clause
parseRest (Code "23B") t = restHelper bankOperationCode "timeIndication" t msCode23B
84
parseRest (Code "23B") t = restHelper bankOperationCode "timeIndication" t msCode23B
84
parseRest (Code "23B") t = restHelper bankOperationCode "timeIndication" t msCode23B
84
false
false
0
7
9
26
12
14
null
null
timjb/lens
src/Language/Haskell/TH/Lens.hs
bsd-3-clause
_SpecialiseInstP :: Prism' Pragma Type _SpecialiseInstP = prism' reviewer remitter where reviewer = SpecialiseInstP remitter (SpecialiseInstP x) = Just x remitter _ = Nothing
196
_SpecialiseInstP :: Prism' Pragma Type _SpecialiseInstP = prism' reviewer remitter where reviewer = SpecialiseInstP remitter (SpecialiseInstP x) = Just x remitter _ = Nothing
196
_SpecialiseInstP = prism' reviewer remitter where reviewer = SpecialiseInstP remitter (SpecialiseInstP x) = Just x remitter _ = Nothing
157
false
true
2
7
45
56
26
30
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
circuitously = id
17
circuitously = id
17
circuitously = id
17
false
false
0
4
2
6
3
3
null
null
chemist/highlighter
src/Text/Highlighter/Lexers/Ada.hs
bsd-3-clause
package' :: TokenMatcher package' = [ tok "body" (Arbitrary "Keyword" :. Arbitrary "Declaration") , tok "is\\s+new|renames" (Arbitrary "Keyword" :. Arbitrary "Reserved") , tokNext "is" (Arbitrary "Keyword" :. Arbitrary "Reserved") Pop , tokNext ";" (Arbitrary "Punctuation") Pop , tokNext "\\(" (Arbitrary "Punctuation") (GoTo package_instantiation') , tok "([a-zA-Z0-9_.]+)" (Arbitrary "Name" :. Arbitrary "Class") , anyOf root' ]
463
package' :: TokenMatcher package' = [ tok "body" (Arbitrary "Keyword" :. Arbitrary "Declaration") , tok "is\\s+new|renames" (Arbitrary "Keyword" :. Arbitrary "Reserved") , tokNext "is" (Arbitrary "Keyword" :. Arbitrary "Reserved") Pop , tokNext ";" (Arbitrary "Punctuation") Pop , tokNext "\\(" (Arbitrary "Punctuation") (GoTo package_instantiation') , tok "([a-zA-Z0-9_.]+)" (Arbitrary "Name" :. Arbitrary "Class") , anyOf root' ]
463
package' = [ tok "body" (Arbitrary "Keyword" :. Arbitrary "Declaration") , tok "is\\s+new|renames" (Arbitrary "Keyword" :. Arbitrary "Reserved") , tokNext "is" (Arbitrary "Keyword" :. Arbitrary "Reserved") Pop , tokNext ";" (Arbitrary "Punctuation") Pop , tokNext "\\(" (Arbitrary "Punctuation") (GoTo package_instantiation') , tok "([a-zA-Z0-9_.]+)" (Arbitrary "Name" :. Arbitrary "Class") , anyOf root' ]
438
false
true
0
9
86
141
69
72
null
null
Rizary/hackage-matrix-builder
src-lib/PkgIdxTsSet.hs
gpl-3.0
-- | Lookup the index of an element, which is its zero-based index in -- the sorted sequence of elements. The index is a number from 0 up -- to, but not including, the size of the set. lookupIndex :: PkgIdxTs -> PkgIdxTsSet -> Maybe Int lookupIndex x s = case lookupIndexNearL x s of Nothing -> Nothing Just (i,x') | x' == x -> Just i | otherwise -> Nothing -- | Find largest element smaller or equal to the given one.
509
lookupIndex :: PkgIdxTs -> PkgIdxTsSet -> Maybe Int lookupIndex x s = case lookupIndexNearL x s of Nothing -> Nothing Just (i,x') | x' == x -> Just i | otherwise -> Nothing -- | Find largest element smaller or equal to the given one.
324
lookupIndex x s = case lookupIndexNearL x s of Nothing -> Nothing Just (i,x') | x' == x -> Just i | otherwise -> Nothing -- | Find largest element smaller or equal to the given one.
272
true
true
0
11
173
83
41
42
null
null
agsh/hs2s-lab
laba2kuznetsov/laba2.hs
mit
-- и думал как склеить все что тут есть в список, оказалось это очень просто, но по-моему такой вариант годится только для печати -- т.е он не создает собственно говоря списка кортежей, т.к насколько я понимаю на каждой итерации свой список из одного кортежа. -- интересно узнать как сделать списком :) ---------------------------MAIN------------------------- main = do cursor <- cursorFor url let getList = cursor $// findNodes &| extractDataHref cList = cursor $// findNodes >=> child &| extractData filterNodes = map (T.unpack ) . take 40 filteName = map (T.unpack ) . take 40 kort = zip (filterNodes cList) (filterNodes getList) mapM_ goTolink kort
765
main = do cursor <- cursorFor url let getList = cursor $// findNodes &| extractDataHref cList = cursor $// findNodes >=> child &| extractData filterNodes = map (T.unpack ) . take 40 filteName = map (T.unpack ) . take 40 kort = zip (filterNodes cList) (filterNodes getList) mapM_ goTolink kort
322
main = do cursor <- cursorFor url let getList = cursor $// findNodes &| extractDataHref cList = cursor $// findNodes >=> child &| extractData filterNodes = map (T.unpack ) . take 40 filteName = map (T.unpack ) . take 40 kort = zip (filterNodes cList) (filterNodes getList) mapM_ goTolink kort
322
true
false
0
13
214
124
62
62
null
null
technogeeky/d-A
include/containers-0.5.0.0/Data/Set/Base.hs
gpl-3.0
insertMin x t = case t of Tip -> singleton x Bin _ y l r -> balanceL y (insertMin x l) r {-------------------------------------------------------------------- [merge l r]: merges two trees. --------------------------------------------------------------------}
286
insertMin x t = case t of Tip -> singleton x Bin _ y l r -> balanceL y (insertMin x l) r {-------------------------------------------------------------------- [merge l r]: merges two trees. --------------------------------------------------------------------}
286
insertMin x t = case t of Tip -> singleton x Bin _ y l r -> balanceL y (insertMin x l) r {-------------------------------------------------------------------- [merge l r]: merges two trees. --------------------------------------------------------------------}
286
false
false
0
10
57
55
26
29
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Generic.hs
bsd-3-clause
foldr' f z = Bundle.foldl' (flip f) z . streamR
47
foldr' f z = Bundle.foldl' (flip f) z . streamR
47
foldr' f z = Bundle.foldl' (flip f) z . streamR
47
false
false
0
8
9
29
13
16
null
null
snowleopard/alga
src/Algebra/Graph/Labelled.hs
mit
-- | Construct the /empty graph/. An alias for the constructor 'Empty'. -- -- @ -- 'isEmpty' empty == True -- 'hasVertex' x empty == False -- 'Algebra.Graph.ToGraph.vertexCount' empty == 0 -- 'Algebra.Graph.ToGraph.edgeCount' empty == 0 -- @ empty :: Graph e a empty = Empty
280
empty :: Graph e a empty = Empty
32
empty = Empty
13
true
true
0
6
51
30
17
13
null
null
philipcraig/hutton
src/Exercises/ChapterThirteen.hs
bsd-3-clause
digit :: Parser Char digit = sat isDigit
40
digit :: Parser Char digit = sat isDigit
40
digit = sat isDigit
19
false
true
1
5
7
20
8
12
null
null
leohaskell/parseVRS
src/Parser/GeomStaticMesh.hs
bsd-3-clause
-- The following parsers parse the corresponding -- fields in the GeomStaticMesh plugin vertices :: Parser Vertices vertices = string "vertices=" *> arrayVector
161
vertices :: Parser Vertices vertices = string "vertices=" *> arrayVector
72
vertices = string "vertices=" *> arrayVector
44
true
true
0
6
23
23
12
11
null
null
HuwCampbell/machines
src/Data/Machine/Tee.hs
bsd-3-clause
-- | Tie off one input of a tee by connecting it to a known source. capR :: Monad m => SourceT m b -> TeeT m a b c -> ProcessT m a c capR s t = fit cappedT $ addR s t
166
capR :: Monad m => SourceT m b -> TeeT m a b c -> ProcessT m a c capR s t = fit cappedT $ addR s t
98
capR s t = fit cappedT $ addR s t
33
true
true
0
8
44
65
30
35
null
null
narrative/stack
src/Stack/Package.hs
bsd-3-clause
printCabalFileWarning :: (MonadLogger m) => Path Abs File -> PWarning -> m () printCabalFileWarning cabalfp = \case (PWarning x) -> $logWarn ("Cabal file warning in " <> T.pack (toFilePath cabalfp) <> ": " <> T.pack x) (UTFWarning line msg) -> $logWarn ("Cabal file warning in " <> T.pack (toFilePath cabalfp) <> ":" <> T.pack (show line) <> ": " <> T.pack msg) -- | Check if the given name in the @Package@ matches the name of the .cabal file
613
printCabalFileWarning :: (MonadLogger m) => Path Abs File -> PWarning -> m () printCabalFileWarning cabalfp = \case (PWarning x) -> $logWarn ("Cabal file warning in " <> T.pack (toFilePath cabalfp) <> ": " <> T.pack x) (UTFWarning line msg) -> $logWarn ("Cabal file warning in " <> T.pack (toFilePath cabalfp) <> ":" <> T.pack (show line) <> ": " <> T.pack msg) -- | Check if the given name in the @Package@ matches the name of the .cabal file
613
printCabalFileWarning cabalfp = \case (PWarning x) -> $logWarn ("Cabal file warning in " <> T.pack (toFilePath cabalfp) <> ": " <> T.pack x) (UTFWarning line msg) -> $logWarn ("Cabal file warning in " <> T.pack (toFilePath cabalfp) <> ":" <> T.pack (show line) <> ": " <> T.pack msg) -- | Check if the given name in the @Package@ matches the name of the .cabal file
527
false
true
0
18
248
163
77
86
null
null
NickAger/LearningHaskell
CIS194/hw02.hs
mit
-- Exercise 1 ----------------------------------------- -- Get the number of exact matches between the actual code and the guess exactMatches :: Code -> Code -> Int exactMatches xs ys = length $ filter id $ zipWith (==) xs ys
226
exactMatches :: Code -> Code -> Int exactMatches xs ys = length $ filter id $ zipWith (==) xs ys
96
exactMatches xs ys = length $ filter id $ zipWith (==) xs ys
60
true
true
0
7
38
46
24
22
null
null
sboosali/commands-core
sources/Commands/Extra.hs
mit
cross :: [[a]] -> [[a]] cross = sequence
40
cross :: [[a]] -> [[a]] cross = sequence
40
cross = sequence
16
false
true
0
7
7
27
16
11
null
null
opentower/carnap
Carnap/src/Carnap/Core/Unification/ACUI.hs
gpl-3.0
trivialSol (Sat True) = [[]]
30
trivialSol (Sat True) = [[]]
30
trivialSol (Sat True) = [[]]
30
false
false
0
7
6
20
10
10
null
null
d0kt0r0/Tidal
src/Sound/Tidal/UI.hs
gpl-3.0
_range :: (Functor f, Num b) => b -> b -> f b -> f b _range from to p = (+ from) . (* (to-from)) <$> p
102
_range :: (Functor f, Num b) => b -> b -> f b -> f b _range from to p = (+ from) . (* (to-from)) <$> p
102
_range from to p = (+ from) . (* (to-from)) <$> p
49
false
true
0
9
27
74
39
35
null
null
chreekat/snowdrift
Model/Language.hs
agpl-3.0
renderLanguage _ = renderLanguage LangEn
40
renderLanguage _ = renderLanguage LangEn
40
renderLanguage _ = renderLanguage LangEn
40
false
false
0
5
4
12
5
7
null
null
ndmitchell/nsis
src/Development/NSIS/Plugins/WinMessages.hs
bsd-3-clause
wm_SETREDRAW = 0x000B
40
wm_SETREDRAW = 0x000B
40
wm_SETREDRAW = 0x000B
40
false
false
0
4
21
6
3
3
null
null
sshine/xsimonad
src/Xmonad.hs
bsd-3-clause
layout :: Handle -> PP layout handle = def { ppLayout = const "" , ppOutput = hPutStrLn handle }
116
layout :: Handle -> PP layout handle = def { ppLayout = const "" , ppOutput = hPutStrLn handle }
116
layout handle = def { ppLayout = const "" , ppOutput = hPutStrLn handle }
93
false
true
0
8
39
47
22
25
null
null
kaol/snaplet-customauth
Snap/Snaplet/CustomAuth/OAuth2/Splices.hs
bsd-3-clause
addOAuth2Splices :: Snaplet (Heist b) -> SnapletLens b (AuthManager u e b) -> Initializer b v () addOAuth2Splices h auth = addConfig h sc where sc = mempty & scCompiledSplices .~ cs cs = do "ifHaveOAuth2Token" ## spliceOAuth2Token True auth "ifNoOAuth2Token" ## spliceOAuth2Token False auth
318
addOAuth2Splices :: Snaplet (Heist b) -> SnapletLens b (AuthManager u e b) -> Initializer b v () addOAuth2Splices h auth = addConfig h sc where sc = mempty & scCompiledSplices .~ cs cs = do "ifHaveOAuth2Token" ## spliceOAuth2Token True auth "ifNoOAuth2Token" ## spliceOAuth2Token False auth
318
addOAuth2Splices h auth = addConfig h sc where sc = mempty & scCompiledSplices .~ cs cs = do "ifHaveOAuth2Token" ## spliceOAuth2Token True auth "ifNoOAuth2Token" ## spliceOAuth2Token False auth
215
false
true
0
10
72
112
51
61
null
null
tyehle/euler-haskell
src/P018.hs
bsd-3-clause
small :: [[Integer]] small = [ [3] , [7, 4] , [2, 4, 6] , [8, 5, 9, 3]]
95
small :: [[Integer]] small = [ [3] , [7, 4] , [2, 4, 6] , [8, 5, 9, 3]]
95
small = [ [3] , [7, 4] , [2, 4, 6] , [8, 5, 9, 3]]
74
false
true
0
6
42
59
38
21
null
null
elginer/shpider
Network/Shpider/Curl/Easy.hs
mit
-- | Initialise a curl instance initialize :: IO Curl initialize = do h <- easy_initialize mkCurl h -- | Initialize a curl instance -- | No automatic garbage colelction
174
initialize :: IO Curl initialize = do h <- easy_initialize mkCurl h -- | Initialize a curl instance -- | No automatic garbage colelction
142
initialize = do h <- easy_initialize mkCurl h -- | Initialize a curl instance -- | No automatic garbage colelction
120
true
true
0
7
35
30
15
15
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp _ DoubleNegOp = Just (MO_F_Neg W64)
55
translateOp _ DoubleNegOp = Just (MO_F_Neg W64)
55
translateOp _ DoubleNegOp = Just (MO_F_Neg W64)
55
false
false
0
7
14
20
9
11
null
null
bitc/omegagb
src/Cpu.hs
gpl-2.0
mcti 0x81 _ = (ADD C, 4, 0)
62
mcti 0x81 _ = (ADD C, 4, 0)
62
mcti 0x81 _ = (ADD C, 4, 0)
62
false
false
0
6
42
25
12
13
null
null
sinjar666/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/Includes_Types.hs
apache-2.0
default_Included :: Included default_Included = Included{ included_MyIntField = 0}
84
default_Included :: Included default_Included = Included{ included_MyIntField = 0}
84
default_Included = Included{ included_MyIntField = 0}
55
false
true
0
6
10
19
11
8
null
null
foreverbell/project-euler-solutions
src/67.hs
bsd-3-clause
solve :: String -> Int solve input = maximum (dp (n - 1) (fromString triangle)) where triangle = reverse (map words (lines input)) n = length triangle
164
solve :: String -> Int solve input = maximum (dp (n - 1) (fromString triangle)) where triangle = reverse (map words (lines input)) n = length triangle
164
solve input = maximum (dp (n - 1) (fromString triangle)) where triangle = reverse (map words (lines input)) n = length triangle
141
false
true
1
9
40
75
37
38
null
null
tphyahoo/haskoin
haskoin-wallet/Network/Haskoin/Wallet/Client/Commands.hs
unlicense
cmdImport :: String -> String -> Handler () cmdImport name txStr = case txM of Just tx -> do k <- R.asks configKeyRing let action = ImportTx tx sendZmq (PostTxsR k (pack name) action) $ \(JsonWithAccount _ _ t) -> putStr $ printTx t _ -> error "Could not parse transaction" where txM = decodeToMaybe =<< decodeHex (cs txStr)
374
cmdImport :: String -> String -> Handler () cmdImport name txStr = case txM of Just tx -> do k <- R.asks configKeyRing let action = ImportTx tx sendZmq (PostTxsR k (pack name) action) $ \(JsonWithAccount _ _ t) -> putStr $ printTx t _ -> error "Could not parse transaction" where txM = decodeToMaybe =<< decodeHex (cs txStr)
374
cmdImport name txStr = case txM of Just tx -> do k <- R.asks configKeyRing let action = ImportTx tx sendZmq (PostTxsR k (pack name) action) $ \(JsonWithAccount _ _ t) -> putStr $ printTx t _ -> error "Could not parse transaction" where txM = decodeToMaybe =<< decodeHex (cs txStr)
330
false
true
2
12
108
145
67
78
null
null
jeremyong/Yaiba
Yaiba/Map.hs
bsd-3-clause
hedgeDiff cmplo cmphi (Bin _ kx x l r) Tip = join kx x (filterGt cmplo l) (filterLt cmphi r)
95
hedgeDiff cmplo cmphi (Bin _ kx x l r) Tip = join kx x (filterGt cmplo l) (filterLt cmphi r)
95
hedgeDiff cmplo cmphi (Bin _ kx x l r) Tip = join kx x (filterGt cmplo l) (filterLt cmphi r)
95
false
false
0
7
22
59
26
33
null
null
shlevy/ghc
compiler/nativeGen/SPARC/Regs.hs
bsd-3-clause
-- g0 is always zero, and writes to it vanish. g0 = RegReal (RealRegSingle (gReg 0))
85
g0 = RegReal (RealRegSingle (gReg 0))
38
g0 = RegReal (RealRegSingle (gReg 0))
38
true
false
1
9
16
25
11
14
null
null
thiagoarrais/gtk2hs
gtk/Graphics/UI/Gtk/ModelView/TreeStoreStatic.hs
lgpl-2.1
bitsNeeded :: Word -> Int bitsNeeded n = bitsNeeded' 0 n where bitsNeeded' b 0 = b bitsNeeded' b n = bitsNeeded' (b+1) (n `shiftR` 1)
143
bitsNeeded :: Word -> Int bitsNeeded n = bitsNeeded' 0 n where bitsNeeded' b 0 = b bitsNeeded' b n = bitsNeeded' (b+1) (n `shiftR` 1)
143
bitsNeeded n = bitsNeeded' 0 n where bitsNeeded' b 0 = b bitsNeeded' b n = bitsNeeded' (b+1) (n `shiftR` 1)
117
false
true
2
7
35
81
35
46
null
null
vikraman/ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
fdList :: forall m a b. TrieMap m => (a -> b -> b) -> ListMap m a -> b -> b fdList k m = foldMaybe k (lm_nil m) . foldTM (fdList k) (lm_cons m)
173
fdList :: forall m a b. TrieMap m => (a -> b -> b) -> ListMap m a -> b -> b fdList k m = foldMaybe k (lm_nil m) . foldTM (fdList k) (lm_cons m)
173
fdList k m = foldMaybe k (lm_nil m) . foldTM (fdList k) (lm_cons m)
90
false
true
0
10
65
90
45
45
null
null
romanb/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types.hs
mpl-2.0
-- | Contains a list of 'EC2SecurityGroup' elements. dbsgEC2SecurityGroups :: Lens' DBSecurityGroup [EC2SecurityGroup] dbsgEC2SecurityGroups = lens _dbsgEC2SecurityGroups (\s a -> s { _dbsgEC2SecurityGroups = a }) . _List
233
dbsgEC2SecurityGroups :: Lens' DBSecurityGroup [EC2SecurityGroup] dbsgEC2SecurityGroups = lens _dbsgEC2SecurityGroups (\s a -> s { _dbsgEC2SecurityGroups = a }) . _List
180
dbsgEC2SecurityGroups = lens _dbsgEC2SecurityGroups (\s a -> s { _dbsgEC2SecurityGroups = a }) . _List
114
true
true
0
10
39
47
26
21
null
null
rahulmutt/ghcvm
compiler/Eta/BasicTypes/RdrName.hs
bsd-3-clause
findLocalDupsRdrEnv :: GlobalRdrEnv -> [Name] -> [[GlobalRdrElt]] -- ^ For each 'OccName', see if there are multiple local definitions -- for it; return a list of all such -- and return a list of the duplicate bindings findLocalDupsRdrEnv rdr_env occs = go rdr_env [] occs where go _ dups [] = dups go rdr_env dups (name:names) = case filter (pick name) gres of [] -> go rdr_env dups names [_] -> go rdr_env dups names -- The common case dup_gres -> go rdr_env' (dup_gres : dups) names where occ = nameOccName name gres = lookupOccEnv rdr_env occ `orElse` [] rdr_env' = delFromOccEnv rdr_env occ -- The delFromOccEnv avoids repeating the same -- complaint twice, when names itself has a duplicate -- which is a common case -- See Note [Template Haskell binders in the GlobalRdrEnv] pick name (GRE { gre_name = n, gre_prov = LocalDef }) | isInternalName name = isInternalName n | otherwise = True pick _ _ = False
1,117
findLocalDupsRdrEnv :: GlobalRdrEnv -> [Name] -> [[GlobalRdrElt]] findLocalDupsRdrEnv rdr_env occs = go rdr_env [] occs where go _ dups [] = dups go rdr_env dups (name:names) = case filter (pick name) gres of [] -> go rdr_env dups names [_] -> go rdr_env dups names -- The common case dup_gres -> go rdr_env' (dup_gres : dups) names where occ = nameOccName name gres = lookupOccEnv rdr_env occ `orElse` [] rdr_env' = delFromOccEnv rdr_env occ -- The delFromOccEnv avoids repeating the same -- complaint twice, when names itself has a duplicate -- which is a common case -- See Note [Template Haskell binders in the GlobalRdrEnv] pick name (GRE { gre_name = n, gre_prov = LocalDef }) | isInternalName name = isInternalName n | otherwise = True pick _ _ = False
964
findLocalDupsRdrEnv rdr_env occs = go rdr_env [] occs where go _ dups [] = dups go rdr_env dups (name:names) = case filter (pick name) gres of [] -> go rdr_env dups names [_] -> go rdr_env dups names -- The common case dup_gres -> go rdr_env' (dup_gres : dups) names where occ = nameOccName name gres = lookupOccEnv rdr_env occ `orElse` [] rdr_env' = delFromOccEnv rdr_env occ -- The delFromOccEnv avoids repeating the same -- complaint twice, when names itself has a duplicate -- which is a common case -- See Note [Template Haskell binders in the GlobalRdrEnv] pick name (GRE { gre_name = n, gre_prov = LocalDef }) | isInternalName name = isInternalName n | otherwise = True pick _ _ = False
898
true
true
6
10
365
284
132
152
null
null
fugyk/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
readRepo :: String -> Maybe RemoteRepo readRepo = readPToMaybe parseRepo
72
readRepo :: String -> Maybe RemoteRepo readRepo = readPToMaybe parseRepo
72
readRepo = readPToMaybe parseRepo
33
false
true
0
6
9
21
10
11
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/pred_4.hs
mit
subtractMyInt :: MyInt -> MyInt -> MyInt subtractMyInt = flip msMyInt
73
subtractMyInt :: MyInt -> MyInt -> MyInt subtractMyInt = flip msMyInt
73
subtractMyInt = flip msMyInt
28
false
true
0
8
14
29
12
17
null
null
siddhanathan/ghc
compiler/ghci/ByteCodeLink.hs
bsd-3-clause
linkFail :: String -> String -> IO a linkFail who what = throwGhcExceptionIO (ProgramError $ unlines [ "",who , "During interactive linking, GHCi couldn't find the following symbol:" , ' ' : ' ' : what , "This may be due to you not asking GHCi to load extra object files," , "archives or DLLs needed by your current session. Restart GHCi, specifying" , "the missing library using the -L/path/to/object/dir and -lmissinglibname" , "flags, or simply by naming the relevant files on the GHCi command line." , "Alternatively, this link failure might indicate a bug in GHCi." , "If you suspect the latter, please send a bug report to:" , " glasgow-haskell-bugs@haskell.org" ])
844
linkFail :: String -> String -> IO a linkFail who what = throwGhcExceptionIO (ProgramError $ unlines [ "",who , "During interactive linking, GHCi couldn't find the following symbol:" , ' ' : ' ' : what , "This may be due to you not asking GHCi to load extra object files," , "archives or DLLs needed by your current session. Restart GHCi, specifying" , "the missing library using the -L/path/to/object/dir and -lmissinglibname" , "flags, or simply by naming the relevant files on the GHCi command line." , "Alternatively, this link failure might indicate a bug in GHCi." , "If you suspect the latter, please send a bug report to:" , " glasgow-haskell-bugs@haskell.org" ])
844
linkFail who what = throwGhcExceptionIO (ProgramError $ unlines [ "",who , "During interactive linking, GHCi couldn't find the following symbol:" , ' ' : ' ' : what , "This may be due to you not asking GHCi to load extra object files," , "archives or DLLs needed by your current session. Restart GHCi, specifying" , "the missing library using the -L/path/to/object/dir and -lmissinglibname" , "flags, or simply by naming the relevant files on the GHCi command line." , "Alternatively, this link failure might indicate a bug in GHCi." , "If you suspect the latter, please send a bug report to:" , " glasgow-haskell-bugs@haskell.org" ])
807
false
true
0
11
285
85
46
39
null
null
snoyberg/ghc
compiler/basicTypes/Unique.hs
bsd-3-clause
getKey (MkUnique x) = x
23
getKey (MkUnique x) = x
23
getKey (MkUnique x) = x
23
false
false
0
6
4
16
7
9
null
null
beni55/hdbc-postgresql
Database/HDBC/PostgreSQL/ErrorCodes.hs
bsd-3-clause
-- |Is set to @\"01P01\"@. warningDeprecatedFeature :: String warningDeprecatedFeature = "01P01"
96
warningDeprecatedFeature :: String warningDeprecatedFeature = "01P01"
69
warningDeprecatedFeature = "01P01"
34
true
true
0
4
10
12
7
5
null
null
lenary/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
mapPTermFC f g (PGoal fc t1 n t2) = PGoal (f fc) (mapPTermFC f g t1) n (mapPTermFC f g t2)
90
mapPTermFC f g (PGoal fc t1 n t2) = PGoal (f fc) (mapPTermFC f g t1) n (mapPTermFC f g t2)
90
mapPTermFC f g (PGoal fc t1 n t2) = PGoal (f fc) (mapPTermFC f g t1) n (mapPTermFC f g t2)
90
false
false
0
7
20
63
29
34
null
null
mydaum/cabal
Cabal/Distribution/Simple/BuildTarget.hs
bsd-3-clause
resolveBuildTargets :: PackageDescription -> [(UserBuildTarget, Bool)] -> ([BuildTargetProblem], [BuildTarget]) resolveBuildTargets pkg = partitionEithers . map (uncurry (resolveBuildTarget pkg))
259
resolveBuildTargets :: PackageDescription -> [(UserBuildTarget, Bool)] -> ([BuildTargetProblem], [BuildTarget]) resolveBuildTargets pkg = partitionEithers . map (uncurry (resolveBuildTarget pkg))
259
resolveBuildTargets pkg = partitionEithers . map (uncurry (resolveBuildTarget pkg))
107
false
true
0
10
81
62
34
28
null
null
Heather/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCImplementation int res n ins) f = return f { ibc_implementations = (int, res, n, ins) : ibc_implementations f }
140
ibc i (IBCImplementation int res n ins) f = return f { ibc_implementations = (int, res, n, ins) : ibc_implementations f }
140
ibc i (IBCImplementation int res n ins) f = return f { ibc_implementations = (int, res, n, ins) : ibc_implementations f }
140
false
false
1
9
40
60
29
31
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/Shaders/ProgramObjects.hs
bsd-3-clause
attachedShaders :: Program -> StateVar [Shader] attachedShaders program = makeStateVar (getAttachedShaders program) (setAttachedShaders program)
147
attachedShaders :: Program -> StateVar [Shader] attachedShaders program = makeStateVar (getAttachedShaders program) (setAttachedShaders program)
147
attachedShaders program = makeStateVar (getAttachedShaders program) (setAttachedShaders program)
99
false
true
0
7
16
41
20
21
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/negate_2.hs
mit
primNegInt :: MyInt -> MyInt; primNegInt (Pos x) = Neg x
58
primNegInt :: MyInt -> MyInt primNegInt (Pos x) = Neg x
57
primNegInt (Pos x) = Neg x
26
false
true
0
7
12
28
14
14
null
null
beastaugh/hdbc-mysql
testsrc/TestSbasics.hs
lgpl-2.1
dropTable = dbTestCase (\dbh -> do sRun dbh "DROP TABLE hdbctest1" [] commit dbh )
116
dropTable = dbTestCase (\dbh -> do sRun dbh "DROP TABLE hdbctest1" [] commit dbh )
116
dropTable = dbTestCase (\dbh -> do sRun dbh "DROP TABLE hdbctest1" [] commit dbh )
116
false
false
0
11
48
35
16
19
null
null
PaulGustafson/stringnet
Algebra.hs
mit
-- Source: https://www.blaenkdenum.com/posts/naive-convolution-in-haskell/ convolve :: (Num a) => [a] -> [a] -> [a] convolve hs xs = let pad = replicate ((length hs) - 1) 0 ts = pad ++ xs in map (sum . zipWith (*) (reverse hs)) (init $ L.tails ts)
258
convolve :: (Num a) => [a] -> [a] -> [a] convolve hs xs = let pad = replicate ((length hs) - 1) 0 ts = pad ++ xs in map (sum . zipWith (*) (reverse hs)) (init $ L.tails ts)
183
convolve hs xs = let pad = replicate ((length hs) - 1) 0 ts = pad ++ xs in map (sum . zipWith (*) (reverse hs)) (init $ L.tails ts)
142
true
true
0
13
53
118
62
56
null
null
bitemyapp/roshask
src/executable/FieldImports.hs
bsd-3-clause
genImports :: ByteString -> [ByteString] -> [MsgType] -> ByteString genImports pkgPath pkgMsgs fieldTypes = B.concat $ concatMap (\i -> ["import ", i, "\n"]) (S.toList (allImports fieldTypes)) where getDeps = typeDependency pkgPath pkgMsgs allImports = foldl' ((. getDeps) . flip S.union) S.empty
340
genImports :: ByteString -> [ByteString] -> [MsgType] -> ByteString genImports pkgPath pkgMsgs fieldTypes = B.concat $ concatMap (\i -> ["import ", i, "\n"]) (S.toList (allImports fieldTypes)) where getDeps = typeDependency pkgPath pkgMsgs allImports = foldl' ((. getDeps) . flip S.union) S.empty
340
genImports pkgPath pkgMsgs fieldTypes = B.concat $ concatMap (\i -> ["import ", i, "\n"]) (S.toList (allImports fieldTypes)) where getDeps = typeDependency pkgPath pkgMsgs allImports = foldl' ((. getDeps) . flip S.union) S.empty
272
false
true
0
11
84
118
63
55
null
null
leepike/copilot-core
src/Copilot/Core/Type/Show.hs
bsd-3-clause
-------------------------------------------------------------------------------- showWithType :: ShowType -> Type a -> a -> String showWithType showT t x = case showT of C -> case t of Bool -> if x then "1" else "0" _ -> sw Haskell -> case t of Bool -> if x then "true" else "false" _ -> sw where sw = case showWit t of ShowWit -> show x --------------------------------------------------------------------------------
554
showWithType :: ShowType -> Type a -> a -> String showWithType showT t x = case showT of C -> case t of Bool -> if x then "1" else "0" _ -> sw Haskell -> case t of Bool -> if x then "true" else "false" _ -> sw where sw = case showWit t of ShowWit -> show x --------------------------------------------------------------------------------
472
showWithType showT t x = case showT of C -> case t of Bool -> if x then "1" else "0" _ -> sw Haskell -> case t of Bool -> if x then "true" else "false" _ -> sw where sw = case showWit t of ShowWit -> show x --------------------------------------------------------------------------------
422
true
true
2
9
198
126
63
63
null
null