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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kaoskorobase/mescaline | lib/mescaline-database/Mescaline/Analysis.hs | gpl-3.0 | logNotice :: String -> String -> IO ()
logNotice = logError | 59 | logNotice :: String -> String -> IO ()
logNotice = logError | 59 | logNotice = logError | 20 | false | true | 0 | 8 | 10 | 24 | 12 | 12 | null | null |
zymbolic-creations/learningHaskell | poker/Poker.hs | gpl-3.0 | splitAtMany :: [Int] -> [a] -> [[a]]
splitAtMany counts elems = List.unfoldr splitNext (counts, elems)
where
splitNext ([], _) = Nothing
splitNext (c:cs, []) = Just ([], (cs, []))
splitNext (c:cs, xs) = Just (fst split', (cs, snd split'))
where
split' = List.splitAt c xs | 299 | splitAtMany :: [Int] -> [a] -> [[a]]
splitAtMany counts elems = List.unfoldr splitNext (counts, elems)
where
splitNext ([], _) = Nothing
splitNext (c:cs, []) = Just ([], (cs, []))
splitNext (c:cs, xs) = Just (fst split', (cs, snd split'))
where
split' = List.splitAt c xs | 299 | splitAtMany counts elems = List.unfoldr splitNext (counts, elems)
where
splitNext ([], _) = Nothing
splitNext (c:cs, []) = Just ([], (cs, []))
splitNext (c:cs, xs) = Just (fst split', (cs, snd split'))
where
split' = List.splitAt c xs | 262 | false | true | 2 | 8 | 72 | 158 | 87 | 71 | null | null |
GaloisInc/sk-dev-platform | libs/SCD/src/SCD/Lobster/Symbolic/Lobster.hs | bsd-3-clause | run :: String -> M a -> SIO LobsterAST IO a
run p (M m) = fst `fmap` runStateT (runReaderT m E{ prefix = p }) S{ fresh = 0 } | 124 | run :: String -> M a -> SIO LobsterAST IO a
run p (M m) = fst `fmap` runStateT (runReaderT m E{ prefix = p }) S{ fresh = 0 } | 124 | run p (M m) = fst `fmap` runStateT (runReaderT m E{ prefix = p }) S{ fresh = 0 } | 80 | false | true | 0 | 10 | 30 | 82 | 41 | 41 | null | null |
marangisto/karakul | app/Main.hs | bsd-3-clause | main :: IO ()
main = ShakeMCU.main | 34 | main :: IO ()
main = ShakeMCU.main | 34 | main = ShakeMCU.main | 20 | false | true | 0 | 6 | 6 | 18 | 9 | 9 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 2391 = 2390 | 11 | 2391 = 2390 | 11 | 2391 = 2390 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Compiler.hs | bsd-3-clause | compileExpr (QuotW32 e1 e2) = compileDiv e1 e2 | 46 | compileExpr (QuotW32 e1 e2) = compileDiv e1 e2 | 46 | compileExpr (QuotW32 e1 e2) = compileDiv e1 e2 | 46 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
brendanhay/gogol | gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs | mpl-2.0 | -- | The index of the field type in \`Type.oneofs\`, for message or
-- enumeration types. The first type has index 1; zero means the type is
-- not in the list.
fOneofIndex :: Lens' Field (Maybe Int32)
fOneofIndex
= lens _fOneofIndex (\ s a -> s{_fOneofIndex = a}) .
mapping _Coerce | 290 | fOneofIndex :: Lens' Field (Maybe Int32)
fOneofIndex
= lens _fOneofIndex (\ s a -> s{_fOneofIndex = a}) .
mapping _Coerce | 129 | fOneofIndex
= lens _fOneofIndex (\ s a -> s{_fOneofIndex = a}) .
mapping _Coerce | 88 | true | true | 0 | 10 | 59 | 57 | 30 | 27 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2007-Programming_in_Haskell-1st_Edition-Graham_Hutton/ch_08_10.hs | unlicense | space :: Parser ()
space = do many (sat isSpace)
return () | 69 | space :: Parser ()
space = do many (sat isSpace)
return () | 69 | space = do many (sat isSpace)
return () | 50 | false | true | 1 | 10 | 22 | 40 | 16 | 24 | null | null |
brodyberg/LearnHaskell | CaesarCypher.hsproj/TautologyChecker.hs | mit | p1 :: Prop
p1 = And (Var 'A') (Not (Var 'A')) | 45 | p1 :: Prop
p1 = And (Var 'A') (Not (Var 'A')) | 45 | p1 = And (Var 'A') (Not (Var 'A')) | 34 | false | true | 0 | 9 | 10 | 40 | 18 | 22 | null | null |
OpenXT/manager | xenmgr/XenMgr/Errors.hs | gpl-2.0 | failTaasTerms :: (MonadError XmError m) => m a
failTaasTerms = throwError $ XError 246 "User has not agreed to the latest version of the legal terms" | 152 | failTaasTerms :: (MonadError XmError m) => m a
failTaasTerms = throwError $ XError 246 "User has not agreed to the latest version of the legal terms" | 152 | failTaasTerms = throwError $ XError 246 "User has not agreed to the latest version of the legal terms" | 105 | false | true | 2 | 7 | 28 | 41 | 18 | 23 | null | null |
snoyberg/hebrew-time | src/Data/Time/Calendar/Hebrew/Internal.hs | mit | monthLength :: YearLeap -> YearType -> Month -> Days
monthLength _ _ Tishrei = 30 | 81 | monthLength :: YearLeap -> YearType -> Month -> Days
monthLength _ _ Tishrei = 30 | 81 | monthLength _ _ Tishrei = 30 | 28 | false | true | 0 | 9 | 14 | 36 | 16 | 20 | null | null |
JohanPauli/Hunger | src/IO/Render/Grid/Simple.hs | gpl-3.0 | -- | Render the information contained in a `SBus`.
renderBus :: Renderer SBus
renderBus
SBus
{ sbusID=bID
, sbusName=name
, sbusPower=bPow
, sbusAdmittance=bAdm
, sbusVoltage=bV
, sbusVoltageBase=bVb
} =
renderString name
<> sep
<> toBS bID
<> sep
<> renderComplex bPow
<> sep
<> renderC... | 385 | renderBus :: Renderer SBus
renderBus
SBus
{ sbusID=bID
, sbusName=name
, sbusPower=bPow
, sbusAdmittance=bAdm
, sbusVoltage=bV
, sbusVoltageBase=bVb
} =
renderString name
<> sep
<> toBS bID
<> sep
<> renderComplex bPow
<> sep
<> renderComplex bAdm
<> sep
<> renderComplex bV
<> sep... | 334 | renderBus
SBus
{ sbusID=bID
, sbusName=name
, sbusPower=bPow
, sbusAdmittance=bAdm
, sbusVoltage=bV
, sbusVoltageBase=bVb
} =
renderString name
<> sep
<> toBS bID
<> sep
<> renderComplex bPow
<> sep
<> renderComplex bAdm
<> sep
<> renderComplex bV
<> sep
<> toBS bVb | 307 | true | true | 21 | 6 | 96 | 130 | 61 | 69 | null | null |
TomMD/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | lvectInstDecl (L _ (HsVectInstOut _)) = True | 44 | lvectInstDecl (L _ (HsVectInstOut _)) = True | 44 | lvectInstDecl (L _ (HsVectInstOut _)) = True | 44 | false | false | 0 | 8 | 6 | 24 | 11 | 13 | null | null |
pparkkin/eta | compiler/ETA/Specialise/Rules.hs | bsd-3-clause | match_co renv subst (Refl r1 ty1) co
= case co of
Refl r2 ty2
| r1 == r2 -> match_ty renv subst ty1 ty2
_ -> Nothing | 152 | match_co renv subst (Refl r1 ty1) co
= case co of
Refl r2 ty2
| r1 == r2 -> match_ty renv subst ty1 ty2
_ -> Nothing | 152 | match_co renv subst (Refl r1 ty1) co
= case co of
Refl r2 ty2
| r1 == r2 -> match_ty renv subst ty1 ty2
_ -> Nothing | 152 | false | false | 0 | 11 | 62 | 63 | 29 | 34 | null | null |
ekohl/ganeti | htools/Ganeti/HTools/Loader.hs | gpl-2.0 | -- | Remove non-selected tags from the exclusion list
filterExTags :: [String] -> Instance.Instance -> Instance.Instance
filterExTags tl inst =
let old_tags = Instance.tags inst
new_tags = filter (\tag -> any (`isPrefixOf` tag) tl)
old_tags
in inst { Instance.tags = new_tags } | 312 | filterExTags :: [String] -> Instance.Instance -> Instance.Instance
filterExTags tl inst =
let old_tags = Instance.tags inst
new_tags = filter (\tag -> any (`isPrefixOf` tag) tl)
old_tags
in inst { Instance.tags = new_tags } | 258 | filterExTags tl inst =
let old_tags = Instance.tags inst
new_tags = filter (\tag -> any (`isPrefixOf` tag) tl)
old_tags
in inst { Instance.tags = new_tags } | 191 | true | true | 0 | 13 | 76 | 87 | 47 | 40 | null | null |
momomimachli/Hedsql | src/Database/Hedsql/Drivers/MariaDB/CodeGenerator.hs | gpl-3.0 | -- | Create the MariaDB code generator.
mariaDBCodeGenerator :: CodeGenerator MariaDB
mariaDBCodeGenerator = getCodeGenerator mariaDBCodeGenerator {
_codeGenDataType = mariaDBDataTypeFunc
, _codeGenExpr = mariaDBExprFunc
} | 240 | mariaDBCodeGenerator :: CodeGenerator MariaDB
mariaDBCodeGenerator = getCodeGenerator mariaDBCodeGenerator {
_codeGenDataType = mariaDBDataTypeFunc
, _codeGenExpr = mariaDBExprFunc
} | 200 | mariaDBCodeGenerator = getCodeGenerator mariaDBCodeGenerator {
_codeGenDataType = mariaDBDataTypeFunc
, _codeGenExpr = mariaDBExprFunc
} | 154 | true | true | 0 | 7 | 41 | 32 | 18 | 14 | null | null |
phaul/chess | Data/BitBoard/TH.hs | bsd-3-clause | toVecLookup2
:: (Enum a, Bounded a, Enum b, Bounded b)
=> String -- ^ Name of the function
-> Integer -- ^ TODO : remove this somehow - the maxBound + 1 of the 2nd enum
-> (a -> b -> BitBoard) -- ^ the tranformed function
-> Q [ Dec ] -- ^ resulting new splice
toVecLo... | 1,685 | toVecLookup2
:: (Enum a, Bounded a, Enum b, Bounded b)
=> String -- ^ Name of the function
-> Integer -- ^ TODO : remove this somehow - the maxBound + 1 of the 2nd enum
-> (a -> b -> BitBoard) -- ^ the tranformed function
-> Q [ Dec ]
toVecLookup2 n mx f = do
vara <- newName "... | 1,647 | toVecLookup2 n mx f = do
vara <- newName "a"
varb <- newName "b"
let vars = [ vara, varb ]
return [ mkSignature name vars
, FunD name [ Clause [VarP var | var <- [ vara, varb ] ] (NormalB $ body vara varb) [] ]
-- , PragmaD $ InlineP name Inline FunLike AllPhases
]
where name = mkN... | 1,372 | true | true | 2 | 17 | 910 | 407 | 200 | 207 | null | null |
PisoMojado/HackerRankFunctionalProgramming | src/Exercises/ElevenUpdateList.hs | bsd-3-clause | f (a:as)
| a > 0 = a:f as
| otherwise = (-1 * a):f as | 57 | f (a:as)
| a > 0 = a:f as
| otherwise = (-1 * a):f as | 57 | f (a:as)
| a > 0 = a:f as
| otherwise = (-1 * a):f as | 57 | false | false | 1 | 8 | 19 | 57 | 27 | 30 | null | null |
jcaesar/Iptables_Semantics | haskell_tool/lib/Data_Bits.hs | bsd-2-clause | setBitBounded :: Data.Bits.Bits a => a -> Integer -> Bool -> a;
setBitBounded x n True = Data.Bits.setBit x (fromInteger n) | 123 | setBitBounded :: Data.Bits.Bits a => a -> Integer -> Bool -> a
setBitBounded x n True = Data.Bits.setBit x (fromInteger n) | 122 | setBitBounded x n True = Data.Bits.setBit x (fromInteger n) | 59 | false | true | 0 | 8 | 20 | 55 | 28 | 27 | null | null |
snoyberg/hackage-server | Distribution/Server/Features/EditCabalFiles.hs | bsd-3-clause | checkGenericPackageDescription :: Check GenericPackageDescription
checkGenericPackageDescription
(GenericPackageDescription descrA flagsA libsA exesA testsA benchsA)
(GenericPackageDescription descrB flagsB libsB exesB testsB benchsB) = do
checkPackageDescriptions descrA descrB
checkSame "Sorry, canno... | 810 | checkGenericPackageDescription :: Check GenericPackageDescription
checkGenericPackageDescription
(GenericPackageDescription descrA flagsA libsA exesA testsA benchsA)
(GenericPackageDescription descrB flagsB libsB exesB testsB benchsB) = do
checkPackageDescriptions descrA descrB
checkSame "Sorry, canno... | 810 | checkGenericPackageDescription
(GenericPackageDescription descrA flagsA libsA exesA testsA benchsA)
(GenericPackageDescription descrB flagsB libsB exesB testsB benchsB) = do
checkPackageDescriptions descrA descrB
checkSame "Sorry, cannot edit the package flags"
flagsA flagsB
checkMaybe "Can... | 744 | false | true | 0 | 9 | 144 | 143 | 64 | 79 | null | null |
mankyKitty/leesp | src/LeespTypes.hs | mit | showVal (DottedList head tail) = "(" ++ unWordsList head ++ " . " ++ showVal tail ++ ")" | 88 | showVal (DottedList head tail) = "(" ++ unWordsList head ++ " . " ++ showVal tail ++ ")" | 88 | showVal (DottedList head tail) = "(" ++ unWordsList head ++ " . " ++ showVal tail ++ ")" | 88 | false | false | 0 | 9 | 17 | 40 | 18 | 22 | null | null |
vektordev/GP | src/GRPDictionaryGenerator.hs | gpl-2.0 | parseFunction :: String -> Definition
parseFunction str =
let
[name, val] = splitOn "::" str
[constraint, conversion] = if "=>" `isInfixOf` val then splitOn "=>" val else ["", val]
(from,to) = splitOnArrow [] [] conversion
in
Function name (parseConstraint constraint) (parseTypeVariable from) $ pars... | 336 | parseFunction :: String -> Definition
parseFunction str =
let
[name, val] = splitOn "::" str
[constraint, conversion] = if "=>" `isInfixOf` val then splitOn "=>" val else ["", val]
(from,to) = splitOnArrow [] [] conversion
in
Function name (parseConstraint constraint) (parseTypeVariable from) $ pars... | 336 | parseFunction str =
let
[name, val] = splitOn "::" str
[constraint, conversion] = if "=>" `isInfixOf` val then splitOn "=>" val else ["", val]
(from,to) = splitOnArrow [] [] conversion
in
Function name (parseConstraint constraint) (parseTypeVariable from) $ parseTypeVariable to | 298 | false | true | 0 | 10 | 64 | 134 | 67 | 67 | null | null |
li-zhirui/EoplLangs | src/ProcLang/Parser.hs | bsd-3-clause | unaryOpsMap :: [(String, UnaryOp)]
unaryOpsMap =
[ ("minus", Minus), ("zero?", IsZero) ] | 90 | unaryOpsMap :: [(String, UnaryOp)]
unaryOpsMap =
[ ("minus", Minus), ("zero?", IsZero) ] | 90 | unaryOpsMap =
[ ("minus", Minus), ("zero?", IsZero) ] | 55 | false | true | 0 | 8 | 13 | 45 | 25 | 20 | null | null |
rimmington/eclogues | eclogues/src/Eclogues/Job.hs | bsd-3-clause | _Waiting _ o = pure o | 31 | _Waiting _ o = pure o | 31 | _Waiting _ o = pure o | 31 | false | false | 1 | 5 | 15 | 14 | 6 | 8 | null | null |
joshcough/L5-Haskell | src/L/L1/L1L2AST.hs | mit | rightShift = RightShift | 23 | rightShift = RightShift | 23 | rightShift = RightShift | 23 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ifesdjeen/deflisp | src/DefLisp/Core/Parser.hs | bsd-3-clause | parseVector :: Parser LispExpression
parseVector = liftM LispVector $ sepBy parseLispExpression whiteSpace | 106 | parseVector :: Parser LispExpression
parseVector = liftM LispVector $ sepBy parseLispExpression whiteSpace | 106 | parseVector = liftM LispVector $ sepBy parseLispExpression whiteSpace | 69 | false | true | 0 | 6 | 11 | 26 | 12 | 14 | null | null |
markbastian/clojure-club | src/main/hs/rkennedy_106_optimized.hs | epl-1.0 | -- Fold
directAnswer :: (Int -> IntSet) -> Int -> Int -> Int
directAnswer f seed desire = go 1 (PathFold (Set.singleton seed) (Set.singleton seed))
where go !n pf | desire `Set.member` current pf = n
| otherwise = go (n + 1) (pathsFold f pf) | 264 | directAnswer :: (Int -> IntSet) -> Int -> Int -> Int
directAnswer f seed desire = go 1 (PathFold (Set.singleton seed) (Set.singleton seed))
where go !n pf | desire `Set.member` current pf = n
| otherwise = go (n + 1) (pathsFold f pf) | 256 | directAnswer f seed desire = go 1 (PathFold (Set.singleton seed) (Set.singleton seed))
where go !n pf | desire `Set.member` current pf = n
| otherwise = go (n + 1) (pathsFold f pf) | 203 | true | true | 1 | 9 | 68 | 136 | 64 | 72 | null | null |
rahulmutt/ghcvm | compiler/Eta/TypeCheck/TcTypeNats.hs | bsd-3-clause | (.^.) :: Type -> Type -> Type
s .^. t = mkTyConApp typeNatExpTyCon [s,t] | 72 | (.^.) :: Type -> Type -> Type
s .^. t = mkTyConApp typeNatExpTyCon [s,t] | 72 | s .^. t = mkTyConApp typeNatExpTyCon [s,t] | 42 | false | true | 0 | 9 | 13 | 43 | 21 | 22 | null | null |
AlexanderPankiv/ghc | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | varP :: Name -> PatQ
varP v = return (VarP v) | 45 | varP :: Name -> PatQ
varP v = return (VarP v) | 45 | varP v = return (VarP v) | 24 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
dmp1ce/haskell-libsodium | src-test/HighLevelTests.hs | unlicense | test_sodiumIsZero :: Assertion
test_sodiumIsZero = do
let num1 = 1001 :: Int
res <- sodiumIsZero num1
res @?= Right False
res2 <- sodiumIsZero (0 :: Int)
res2 @?= Right True | 184 | test_sodiumIsZero :: Assertion
test_sodiumIsZero = do
let num1 = 1001 :: Int
res <- sodiumIsZero num1
res @?= Right False
res2 <- sodiumIsZero (0 :: Int)
res2 @?= Right True | 184 | test_sodiumIsZero = do
let num1 = 1001 :: Int
res <- sodiumIsZero num1
res @?= Right False
res2 <- sodiumIsZero (0 :: Int)
res2 @?= Right True | 153 | false | true | 0 | 9 | 40 | 69 | 32 | 37 | null | null |
aelve/bob | lib/Bob.hs | bsd-3-clause | generatorP :: WarnParser Generator
generatorP = lexeme $ do
let singleGenerator = choice [
Literal <$> literalP,
Variable <$ try (string "()"),
AnyOf <$> parens (some generatorP),
Permutation <$> braces (some generatorP),
Reference <$> backticks literalP ]
gens <- some single... | 397 | generatorP :: WarnParser Generator
generatorP = lexeme $ do
let singleGenerator = choice [
Literal <$> literalP,
Variable <$ try (string "()"),
AnyOf <$> parens (some generatorP),
Permutation <$> braces (some generatorP),
Reference <$> backticks literalP ]
gens <- some single... | 397 | generatorP = lexeme $ do
let singleGenerator = choice [
Literal <$> literalP,
Variable <$ try (string "()"),
AnyOf <$> parens (some generatorP),
Permutation <$> braces (some generatorP),
Reference <$> backticks literalP ]
gens <- some singleGenerator
return $ case gens of
... | 362 | false | true | 0 | 16 | 110 | 134 | 65 | 69 | null | null |
lally/libmet | test/Ppt/LayoutSpec.hs | bsd-3-clause | prop_hasDiscriminator3 :: (Frame, Frame, Frame) -> Bool
prop_hasDiscriminator3 (a, b, c) = hasDiscriminators [a,b, c] | 117 | prop_hasDiscriminator3 :: (Frame, Frame, Frame) -> Bool
prop_hasDiscriminator3 (a, b, c) = hasDiscriminators [a,b, c] | 117 | prop_hasDiscriminator3 (a, b, c) = hasDiscriminators [a,b, c] | 61 | false | true | 0 | 6 | 14 | 48 | 28 | 20 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F19.hs | bsd-3-clause | ptr_glNormal3s :: FunPtr (GLshort -> GLshort -> GLshort -> IO ())
ptr_glNormal3s = unsafePerformIO $ getCommand "glNormal3s" | 124 | ptr_glNormal3s :: FunPtr (GLshort -> GLshort -> GLshort -> IO ())
ptr_glNormal3s = unsafePerformIO $ getCommand "glNormal3s" | 124 | ptr_glNormal3s = unsafePerformIO $ getCommand "glNormal3s" | 58 | false | true | 0 | 12 | 16 | 46 | 21 | 25 | null | null |
sdiehl/ghc | compiler/typecheck/TcOrigin.hs | bsd-3-clause | pprCtOrigin AssocFamPatOrigin
= text "when matching a family LHS with its class instance head" | 96 | pprCtOrigin AssocFamPatOrigin
= text "when matching a family LHS with its class instance head" | 96 | pprCtOrigin AssocFamPatOrigin
= text "when matching a family LHS with its class instance head" | 96 | false | false | 0 | 5 | 15 | 12 | 5 | 7 | null | null |
eklavya/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectErr (UnknownImplicit n f) = raw_apply (Var $ reflErrName "UnknownImplicit") [reflectName n, reflectName f] | 113 | reflectErr (UnknownImplicit n f) = raw_apply (Var $ reflErrName "UnknownImplicit") [reflectName n, reflectName f] | 113 | reflectErr (UnknownImplicit n f) = raw_apply (Var $ reflErrName "UnknownImplicit") [reflectName n, reflectName f] | 113 | false | false | 0 | 8 | 13 | 44 | 21 | 23 | null | null |
awagner83/IdMe | src/Idme/Config.hs | gpl-3.0 | -- |Default server configuration values
defaultConfig :: Config
defaultConfig = Config { portNum = 8888
, dataFile = "idme.db"
, nodeId = Nothing
, nodeIdDelim = '.' } | 248 | defaultConfig :: Config
defaultConfig = Config { portNum = 8888
, dataFile = "idme.db"
, nodeId = Nothing
, nodeIdDelim = '.' } | 208 | defaultConfig = Config { portNum = 8888
, dataFile = "idme.db"
, nodeId = Nothing
, nodeIdDelim = '.' } | 184 | true | true | 0 | 6 | 108 | 38 | 24 | 14 | null | null |
brendanhay/gogol | gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ReviewsReplyResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rrrResult'
reviewsReplyResponse
:: ReviewsReplyResponse
reviewsReplyResponse = ReviewsReplyResponse' {_rrrResult = Nothing} | 308 | reviewsReplyResponse
:: ReviewsReplyResponse
reviewsReplyResponse = ReviewsReplyResponse' {_rrrResult = Nothing} | 116 | reviewsReplyResponse = ReviewsReplyResponse' {_rrrResult = Nothing} | 67 | true | true | 1 | 7 | 46 | 28 | 16 | 12 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | boxityConKey = mkPreludeTyConUnique 71 | 65 | boxityConKey = mkPreludeTyConUnique 71 | 65 | boxityConKey = mkPreludeTyConUnique 71 | 65 | false | false | 0 | 5 | 30 | 9 | 4 | 5 | null | null |
mdsteele/pylos | src/Pylos/Event.hs | gpl-3.0 | fromSDLKey SDL.SDLK_f = KeyF | 28 | fromSDLKey SDL.SDLK_f = KeyF | 28 | fromSDLKey SDL.SDLK_f = KeyF | 28 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
antonpetkoff/learning | haskell/fmi-fp/rado.hs | gpl-3.0 | treeFind elem (Node value left right)
| value == elem = True
| otherwise = (treeFind elem left) || (treeFind elem right) | 132 | treeFind elem (Node value left right)
| value == elem = True
| otherwise = (treeFind elem left) || (treeFind elem right) | 132 | treeFind elem (Node value left right)
| value == elem = True
| otherwise = (treeFind elem left) || (treeFind elem right) | 132 | false | false | 1 | 8 | 33 | 59 | 28 | 31 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Syntax/Def.hs | bsd-3-clause | nonIndexedToIndexedDataConstr tName tyVars (DataConstrNonIndexed sp dName params)
-- Don't push the parameters into the type scheme yet
= DataConstrIndexed sp dName (Forall sp [] [] ty)
where
ty = foldr FunTy (returnTy (TyCon tName) tyVars) params
returnTy t [] = t
returnTy t (v:vs) = returnTy (Ty... | 347 | nonIndexedToIndexedDataConstr tName tyVars (DataConstrNonIndexed sp dName params)
-- Don't push the parameters into the type scheme yet
= DataConstrIndexed sp dName (Forall sp [] [] ty)
where
ty = foldr FunTy (returnTy (TyCon tName) tyVars) params
returnTy t [] = t
returnTy t (v:vs) = returnTy (Ty... | 347 | nonIndexedToIndexedDataConstr tName tyVars (DataConstrNonIndexed sp dName params)
-- Don't push the parameters into the type scheme yet
= DataConstrIndexed sp dName (Forall sp [] [] ty)
where
ty = foldr FunTy (returnTy (TyCon tName) tyVars) params
returnTy t [] = t
returnTy t (v:vs) = returnTy (Ty... | 347 | false | false | 2 | 11 | 74 | 130 | 65 | 65 | null | null |
rvion/stack | src/Stack/Types/PackageName.hs | bsd-3-clause | parsePackageName :: MonadThrow m => ByteString -> m PackageName
parsePackageName x = go x
where go =
either (const (throwM (PackageNameParseFail x))) return .
parseOnly (packageNameParser <* endOfInput)
-- | Migration function. | 250 | parsePackageName :: MonadThrow m => ByteString -> m PackageName
parsePackageName x = go x
where go =
either (const (throwM (PackageNameParseFail x))) return .
parseOnly (packageNameParser <* endOfInput)
-- | Migration function. | 250 | parsePackageName x = go x
where go =
either (const (throwM (PackageNameParseFail x))) return .
parseOnly (packageNameParser <* endOfInput)
-- | Migration function. | 186 | false | true | 0 | 12 | 54 | 77 | 37 | 40 | null | null |
spl/emgm | src/Generics/EMGM/Functions/Meta.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Generic instance declaration
--------------------------------------------------------------------------------
rsumConstructor :: Con a -> Con b -> a :+: b -> Maybe ConDescr
rsumConstructor ra _ (L a) = selConstructor ra a | 307 | rsumConstructor :: Con a -> Con b -> a :+: b -> Maybe ConDescr
rsumConstructor ra _ (L a) = selConstructor ra a | 112 | rsumConstructor ra _ (L a) = selConstructor ra a | 49 | true | true | 0 | 11 | 30 | 61 | 29 | 32 | null | null |
ml9951/ghc | compiler/codeGen/StgCmmUtils.hs | bsd-3-clause | -- Make a call to an RTS C procedure
emitRtsCallGen
:: [(LocalReg,ForeignHint)]
-> CLabel
-> [(CmmExpr,ForeignHint)]
-> Bool -- True <=> CmmSafe call
-> FCode ()
emitRtsCallGen res lbl args safe
= do { dflags <- getDynFlags
; updfr_off <- getUpdFrameOff
; let (caller_save, caller_load) = ... | 2,274 | emitRtsCallGen
:: [(LocalReg,ForeignHint)]
-> CLabel
-> [(CmmExpr,ForeignHint)]
-> Bool -- True <=> CmmSafe call
-> FCode ()
emitRtsCallGen res lbl args safe
= do { dflags <- getDynFlags
; updfr_off <- getUpdFrameOff
; let (caller_save, caller_load) = callerSaveVolatileRegs dflags
... | 2,237 | emitRtsCallGen res lbl args safe
= do { dflags <- getDynFlags
; updfr_off <- getUpdFrameOff
; let (caller_save, caller_load) = callerSaveVolatileRegs dflags
; emit caller_save
; call updfr_off
; emit caller_load }
where
call updfr_off =
if safe then
emit =<< mkCm... | 2,097 | true | true | 1 | 11 | 451 | 264 | 145 | 119 | null | null |
spockwangs/scheme.in.haskell | list10.hs | unlicense | symbolToString [Atom s] = return $ String s | 43 | symbolToString [Atom s] = return $ String s | 43 | symbolToString [Atom s] = return $ String s | 43 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
sebug/tpg_sandbox | TPG/Structured.hs | bsd-3-clause | isChangeStop :: String -> Stop -> Bool
isChangeStop currentLineCode =
(Prelude.any (not . ((==) currentLineCode) . lineCode)) . connections | 141 | isChangeStop :: String -> Stop -> Bool
isChangeStop currentLineCode =
(Prelude.any (not . ((==) currentLineCode) . lineCode)) . connections | 141 | isChangeStop currentLineCode =
(Prelude.any (not . ((==) currentLineCode) . lineCode)) . connections | 102 | false | true | 0 | 12 | 20 | 53 | 28 | 25 | null | null |
janschulz/pandoc | src/Text/Pandoc/Writers/Shared.hs | gpl-2.0 | -- | Retrieve a field value from a JSON object.
getField :: FromJSON a
=> String
-> Value
-> Maybe a
getField field (Object hashmap) = do
result <- H.lookup (T.pack field) hashmap
case fromJSON result of
Success x -> return x
_ -> fail "Could not convert from JSON" | 318 | getField :: FromJSON a
=> String
-> Value
-> Maybe a
getField field (Object hashmap) = do
result <- H.lookup (T.pack field) hashmap
case fromJSON result of
Success x -> return x
_ -> fail "Could not convert from JSON" | 270 | getField field (Object hashmap) = do
result <- H.lookup (T.pack field) hashmap
case fromJSON result of
Success x -> return x
_ -> fail "Could not convert from JSON" | 190 | true | true | 0 | 11 | 102 | 94 | 43 | 51 | null | null |
adamse/mat-chalmers | src/View.hs | mit | renderMenu :: Menu -> Html ()
renderMenu (Menu lunch spec) = li_
(do
h3_ (toHtml lunch)
toHtml spec
) | 113 | renderMenu :: Menu -> Html ()
renderMenu (Menu lunch spec) = li_
(do
h3_ (toHtml lunch)
toHtml spec
) | 113 | renderMenu (Menu lunch spec) = li_
(do
h3_ (toHtml lunch)
toHtml spec
) | 83 | false | true | 0 | 10 | 30 | 55 | 25 | 30 | null | null |
mgsloan/ghcjs-jquery | JavaScript/JQuery.hs | mit | addElement :: IsElement e => e -> JQuery -> IO JQuery
addElement e jq = jq_add (coerce . unElement $ toElement e) jq | 116 | addElement :: IsElement e => e -> JQuery -> IO JQuery
addElement e jq = jq_add (coerce . unElement $ toElement e) jq | 116 | addElement e jq = jq_add (coerce . unElement $ toElement e) jq | 62 | false | true | 0 | 8 | 22 | 53 | 25 | 28 | null | null |
UCSD-PL/RefScript | tests/bench.hs | bsd-3-clause | mkTest :: TestCmd -> ExitCode -> FilePath -> FilePath -> TestTree
---------------------------------------------------------------------------
mkTest testCmd code dir file
= testCase file $
if test `elem` knownToFail
then do
printf "%s is known to fail: SKIPPING" test
assertEqual "" True Tr... | 820 | mkTest :: TestCmd -> ExitCode -> FilePath -> FilePath -> TestTree
mkTest testCmd code dir file
= testCase file $
if test `elem` knownToFail
then do
printf "%s is known to fail: SKIPPING" test
assertEqual "" True True
else do
createDirectoryIfMissing True $ takeDirectory log
... | 744 | mkTest testCmd code dir file
= testCase file $
if test `elem` knownToFail
then do
printf "%s is known to fail: SKIPPING" test
assertEqual "" True True
else do
createDirectoryIfMissing True $ takeDirectory log
bin <- binPath testBinary
withFile log WriteMode $ ... | 678 | true | true | 6 | 16 | 234 | 269 | 125 | 144 | null | null |
fossilet/yaht | datatypes.hs | mit | pairSnd (Pair x y) = y | 22 | pairSnd (Pair x y) = y | 22 | pairSnd (Pair x y) = y | 22 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
alexandersjosten/AI-shrdlite | haskell/AmbigRes.hs | gpl-3.0 | --Precond
resolveAmbig [x] = Right x | 39 | resolveAmbig [x] = Right x | 29 | resolveAmbig [x] = Right x | 29 | true | false | 0 | 5 | 8 | 17 | 8 | 9 | null | null |
fpinsight/hocilib | src/Database/Ocilib/Statement.hs | bsd-2-clause | -- | Return the Oracle SQL code the command held by the statement handle.
ociGetSQLCommand :: Ptr OCI_Statement -> IO CUInt
ociGetSQLCommand st = [C.exp| unsigned int { OCI_GetSQLCommand($(OCI_Statement *st)) } |] | 213 | ociGetSQLCommand :: Ptr OCI_Statement -> IO CUInt
ociGetSQLCommand st = [C.exp| unsigned int { OCI_GetSQLCommand($(OCI_Statement *st)) } |] | 139 | ociGetSQLCommand st = [C.exp| unsigned int { OCI_GetSQLCommand($(OCI_Statement *st)) } |] | 89 | true | true | 0 | 7 | 31 | 36 | 18 | 18 | null | null |
zalora/sproxy | src/Sproxy/Server/DB.hs | mit | refreshGroupPrivileges ::
SQLite.Connection -> (SQLite.Statement -> IO ()) -> IO ()
refreshGroupPrivileges c a = do
SQLite.execute_ c "DROP TABLE IF EXISTS group_privilege"
createGroupPrivilege c
SQLite.withStatement
c
[q|INSERT INTO group_privilege("group", domain, privilege) VALUES (?, ?, ?)|]
... | 321 | refreshGroupPrivileges ::
SQLite.Connection -> (SQLite.Statement -> IO ()) -> IO ()
refreshGroupPrivileges c a = do
SQLite.execute_ c "DROP TABLE IF EXISTS group_privilege"
createGroupPrivilege c
SQLite.withStatement
c
[q|INSERT INTO group_privilege("group", domain, privilege) VALUES (?, ?, ?)|]
... | 321 | refreshGroupPrivileges c a = do
SQLite.execute_ c "DROP TABLE IF EXISTS group_privilege"
createGroupPrivilege c
SQLite.withStatement
c
[q|INSERT INTO group_privilege("group", domain, privilege) VALUES (?, ?, ?)|]
a | 232 | false | true | 0 | 10 | 59 | 77 | 37 | 40 | null | null |
shimmercat/second-transfer | hs-src/SecondTransfer/Http1/Parse.hs | bsd-3-clause | leftoversFromParserCompletion :: Http1ParserCompletion -> B.ByteString
leftoversFromParserCompletion (OnlyHeaders_H1PC _ l) = l | 127 | leftoversFromParserCompletion :: Http1ParserCompletion -> B.ByteString
leftoversFromParserCompletion (OnlyHeaders_H1PC _ l) = l | 127 | leftoversFromParserCompletion (OnlyHeaders_H1PC _ l) = l | 56 | false | true | 0 | 7 | 10 | 28 | 14 | 14 | null | null |
alanz/Blobs | lib/DData/IntSet.hs | lgpl-2.1 | {--------------------------------------------------------------------
Helpers
--------------------------------------------------------------------}
{--------------------------------------------------------------------
Join
--------------------------------------------------------------------}
join :: Prefix -> IntSe... | 682 | join :: Prefix -> IntSet -> Prefix -> IntSet -> IntSet
join p1 t1 p2 t2
| zero p1 m = Bin p m t1 t2
| otherwise = Bin p m t2 t1
where
m = branchMask p1 p2
p = mask p1 m
{--------------------------------------------------------------------
@bin@ assures that we never have empty trees within a tree.
----... | 385 | join p1 t1 p2 t2
| zero p1 m = Bin p m t1 t2
| otherwise = Bin p m t2 t1
where
m = branchMask p1 p2
p = mask p1 m
{--------------------------------------------------------------------
@bin@ assures that we never have empty trees within a tree.
-----------------------------------------------------------... | 330 | true | true | 2 | 8 | 84 | 104 | 49 | 55 | null | null |
alphaHeavy/cabal | cabal-install/Distribution/Client/Fetch.hs | bsd-3-clause | checkTarget :: UserTarget -> IO ()
checkTarget target = case target of
UserTargetRemoteTarball _uri
-> die $ "The 'fetch' command does not yet support remote tarballs. "
++ "In the meantime you can use the 'unpack' commands."
_ -> return () | 266 | checkTarget :: UserTarget -> IO ()
checkTarget target = case target of
UserTargetRemoteTarball _uri
-> die $ "The 'fetch' command does not yet support remote tarballs. "
++ "In the meantime you can use the 'unpack' commands."
_ -> return () | 266 | checkTarget target = case target of
UserTargetRemoteTarball _uri
-> die $ "The 'fetch' command does not yet support remote tarballs. "
++ "In the meantime you can use the 'unpack' commands."
_ -> return () | 231 | false | true | 3 | 7 | 66 | 47 | 25 | 22 | null | null |
quytelda/babel | src/CFG.hs | gpl-3.0 | {-| rule parses a single CFG rule, which maps a variable to it possible
derivations when it is produced. -}
rule :: Parser (Symbol, [[Symbol]])
rule = do
var <- symbol
_ <- lexeme $ string "->"
alt <- alternates
return (var, alt)
{-| cfgParse parses a string representing a context free grammar in the format
of... | 419 | rule :: Parser (Symbol, [[Symbol]])
rule = do
var <- symbol
_ <- lexeme $ string "->"
alt <- alternates
return (var, alt)
{-| cfgParse parses a string representing a context free grammar in the format
of line by line rules mapping variables to productions. It returns a dictionary
of these mappings. -} | 311 | rule = do
var <- symbol
_ <- lexeme $ string "->"
alt <- alternates
return (var, alt)
{-| cfgParse parses a string representing a context free grammar in the format
of line by line rules mapping variables to productions. It returns a dictionary
of these mappings. -} | 275 | true | true | 0 | 9 | 81 | 68 | 35 | 33 | null | null |
rueshyna/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | [Output-only] A URL that can be used to access this resource again.
jSelfLink :: Lens' Job (Maybe Text)
jSelfLink
= lens _jSelfLink (\ s a -> s{_jSelfLink = a}) | 167 | jSelfLink :: Lens' Job (Maybe Text)
jSelfLink
= lens _jSelfLink (\ s a -> s{_jSelfLink = a}) | 94 | jSelfLink
= lens _jSelfLink (\ s a -> s{_jSelfLink = a}) | 58 | true | true | 0 | 9 | 32 | 48 | 25 | 23 | null | null |
CementTheBlock/.vim | vim/bundle/ghcmod-vim/test/data/without-cabal/Main.hs | mit | main = return () | 16 | main = return () | 16 | main = return () | 16 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | 'PriceSchedule' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'psActive' @::@ 'Maybe' 'Bool'
--
-- * 'psCurrencyCode' @::@ 'Maybe' 'CurrencyCodeValues'
--
-- * 'psPrice' @::@ 'Maybe' 'Double'
--
-- * 'psTerm' @::@ 'Maybe' 'Integer'
--
priceSchedule :: PriceSchedule
priceSchedul... | 471 | priceSchedule :: PriceSchedule
priceSchedule = PriceSchedule
{ _psTerm = Nothing
, _psPrice = Nothing
, _psCurrencyCode = Nothing
, _psActive = Nothing
} | 194 | priceSchedule = PriceSchedule
{ _psTerm = Nothing
, _psPrice = Nothing
, _psCurrencyCode = Nothing
, _psActive = Nothing
} | 163 | true | true | 0 | 7 | 105 | 59 | 37 | 22 | null | null |
davmre/matrizer | src/Matrizer/RewriteRules.hs | gpl-2.0 | traceRules :: Rules
traceRules = [("dissolveTrace", dissolveTrace)
, ("commuteTrace", commuteTrace)
, ("transposeTrace", transposeTrace)
, ("autoTransposeTrace", autoTransposeTrace)
, ("linearTrace", linearTrace)
, ("identityOps", identityOps)
... | 525 | traceRules :: Rules
traceRules = [("dissolveTrace", dissolveTrace)
, ("commuteTrace", commuteTrace)
, ("transposeTrace", transposeTrace)
, ("autoTransposeTrace", autoTransposeTrace)
, ("linearTrace", linearTrace)
, ("identityOps", identityOps)
... | 525 | traceRules = [("dissolveTrace", dissolveTrace)
, ("commuteTrace", commuteTrace)
, ("transposeTrace", transposeTrace)
, ("autoTransposeTrace", autoTransposeTrace)
, ("linearTrace", linearTrace)
, ("identityOps", identityOps)
, ("tracePro... | 505 | false | true | 0 | 6 | 174 | 101 | 66 | 35 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F24.hs | bsd-3-clause | ptr_glSharpenTexFuncSGIS :: FunPtr (GLenum -> GLsizei -> Ptr GLfloat -> IO ())
ptr_glSharpenTexFuncSGIS = unsafePerformIO $ getCommand "glSharpenTexFuncSGIS" | 157 | ptr_glSharpenTexFuncSGIS :: FunPtr (GLenum -> GLsizei -> Ptr GLfloat -> IO ())
ptr_glSharpenTexFuncSGIS = unsafePerformIO $ getCommand "glSharpenTexFuncSGIS" | 157 | ptr_glSharpenTexFuncSGIS = unsafePerformIO $ getCommand "glSharpenTexFuncSGIS" | 78 | false | true | 0 | 11 | 17 | 44 | 21 | 23 | null | null |
rscprof/kalium | src/Kalium/Nucleus/Scalar/Atomize.hs | bsd-3-clause | atomizeStatement :: Atomize Statement
atomizeStatement = \case
Execute (Exec mname op tyArgs exprs) -> atomizeStatementW
$ Exec mname op tyArgs <$> traverse atomizeExpression exprs
ForStatement (ForCycle name range body) -> atomizeStatementW
$ ForCycle name <$> atomizeExpression range <*> atomi... | 745 | atomizeStatement :: Atomize Statement
atomizeStatement = \case
Execute (Exec mname op tyArgs exprs) -> atomizeStatementW
$ Exec mname op tyArgs <$> traverse atomizeExpression exprs
ForStatement (ForCycle name range body) -> atomizeStatementW
$ ForCycle name <$> atomizeExpression range <*> atomi... | 745 | atomizeStatement = \case
Execute (Exec mname op tyArgs exprs) -> atomizeStatementW
$ Exec mname op tyArgs <$> traverse atomizeExpression exprs
ForStatement (ForCycle name range body) -> atomizeStatementW
$ ForCycle name <$> atomizeExpression range <*> atomizeStatement body
IfStatement (If ... | 707 | false | true | 0 | 12 | 201 | 199 | 89 | 110 | null | null |
fredcy/elm-format | parser/src/Parse/Helpers.hs | bsd-3-clause | surround'' :: Char -> Char -> IParser a -> IParser (Either Comments [Commented a])
surround'' leftDelim rightDelim inner =
let
whitespace' = (\(_,w) -> w) <$> whitespace
sep''' =
do
v <- Commented <$> whitespace' <*> inner <*> whitespace'
option [v] ((\x -> v : x) <$> (char ',' >> sep'''... | 747 | surround'' :: Char -> Char -> IParser a -> IParser (Either Comments [Commented a])
surround'' leftDelim rightDelim inner =
let
whitespace' = (\(_,w) -> w) <$> whitespace
sep''' =
do
v <- Commented <$> whitespace' <*> inner <*> whitespace'
option [v] ((\x -> v : x) <$> (char ',' >> sep'''... | 747 | surround'' leftDelim rightDelim inner =
let
whitespace' = (\(_,w) -> w) <$> whitespace
sep''' =
do
v <- Commented <$> whitespace' <*> inner <*> whitespace'
option [v] ((\x -> v : x) <$> (char ',' >> sep'''))
sep'' =
do
pre <- whitespace'
v <- optionMaybe (Co... | 664 | false | true | 0 | 20 | 274 | 275 | 135 | 140 | null | null |
JohnLato/iteratee | bench/BenchBase.hs | bsd-3-clause | break4 = idN "break never chunked" (I.break (<0)) | 49 | break4 = idN "break never chunked" (I.break (<0)) | 49 | break4 = idN "break never chunked" (I.break (<0)) | 49 | false | false | 1 | 8 | 7 | 28 | 12 | 16 | null | null |
hyPiRion/swearjure | src/Swearjure/Primitives.hs | gpl-3.0 | threadSnd (x : Fix (EList ys) : r)
= let (yfst, ysnd) = splitAt 1 ys in
threadSnd $ iList (yfst ++ [x] ++ ysnd) : r | 122 | threadSnd (x : Fix (EList ys) : r)
= let (yfst, ysnd) = splitAt 1 ys in
threadSnd $ iList (yfst ++ [x] ++ ysnd) : r | 122 | threadSnd (x : Fix (EList ys) : r)
= let (yfst, ysnd) = splitAt 1 ys in
threadSnd $ iList (yfst ++ [x] ++ ysnd) : r | 122 | false | false | 0 | 13 | 33 | 77 | 38 | 39 | null | null |
HalfWayMan/meadowstalk | src/Meadowstalk/Handlers/Public.hs | bsd-3-clause | getSearchR :: Handler Html
getSearchR = do
defaultLayout $ do
setTitle "Search"
$(whamletFile "templates/pages/search.hamlet") | 136 | getSearchR :: Handler Html
getSearchR = do
defaultLayout $ do
setTitle "Search"
$(whamletFile "templates/pages/search.hamlet") | 136 | getSearchR = do
defaultLayout $ do
setTitle "Search"
$(whamletFile "templates/pages/search.hamlet") | 109 | false | true | 0 | 12 | 23 | 37 | 16 | 21 | null | null |
spechub/Hets | CASL/Morphism.hs | gpl-2.0 | isSortInjective :: Morphism f e m -> Bool
isSortInjective m =
let ss = sortSet $ msource m
in Set.size ss == Set.size (Set.map (mapSort $ sort_map m) ss) | 161 | isSortInjective :: Morphism f e m -> Bool
isSortInjective m =
let ss = sortSet $ msource m
in Set.size ss == Set.size (Set.map (mapSort $ sort_map m) ss) | 161 | isSortInjective m =
let ss = sortSet $ msource m
in Set.size ss == Set.size (Set.map (mapSort $ sort_map m) ss) | 119 | false | true | 0 | 13 | 36 | 77 | 36 | 41 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvstsParameters :: FrozenSet String
hvstsParameters =
ConstantUtils.mkSet [hvstCpuNode,
hvstCpuTotal,
hvstMemoryHv,
hvstMemoryNode,
hvstMemoryTotal] | 242 | hvstsParameters :: FrozenSet String
hvstsParameters =
ConstantUtils.mkSet [hvstCpuNode,
hvstCpuTotal,
hvstMemoryHv,
hvstMemoryNode,
hvstMemoryTotal] | 242 | hvstsParameters =
ConstantUtils.mkSet [hvstCpuNode,
hvstCpuTotal,
hvstMemoryHv,
hvstMemoryNode,
hvstMemoryTotal] | 206 | false | true | 0 | 6 | 105 | 34 | 19 | 15 | null | null |
cpettitt/tamien | Tamien/Core/Parser.hs | mit | pExpr :: Parser CoreExpr
pExpr = choice [ pApp
, pLet
, pLetRec
, pCase
, pLam
, pAExpr
] | 179 | pExpr :: Parser CoreExpr
pExpr = choice [ pApp
, pLet
, pLetRec
, pCase
, pLam
, pAExpr
] | 179 | pExpr = choice [ pApp
, pLet
, pLetRec
, pCase
, pLam
, pAExpr
] | 154 | false | true | 0 | 6 | 109 | 40 | 21 | 19 | null | null |
cstrahan/nikki | src/Utils.hs | lgpl-3.0 | -- | returns every combination of given elements once.
completeEdges :: [a] -> [(a, a)]
completeEdges (a : r) = map (tuple a) r ++ completeEdges r | 146 | completeEdges :: [a] -> [(a, a)]
completeEdges (a : r) = map (tuple a) r ++ completeEdges r | 91 | completeEdges (a : r) = map (tuple a) r ++ completeEdges r | 58 | true | true | 2 | 9 | 26 | 63 | 31 | 32 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_CAML_COMMENT2 :: Int
wxSTC_CAML_COMMENT2 = 14 | 51 | wxSTC_CAML_COMMENT2 :: Int
wxSTC_CAML_COMMENT2 = 14 | 51 | wxSTC_CAML_COMMENT2 = 14 | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | osApiFile :: String
osApiFile = "ganeti_api_version" | 52 | osApiFile :: String
osApiFile = "ganeti_api_version" | 52 | osApiFile = "ganeti_api_version" | 32 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
rrnewton/accelerate | Data/Array/Accelerate/Debug/Stats.hs | bsd-3-clause | pprTickGroup group =
hang (int groupTotal <+> text groupName)
2 (vcat [ int n <+> pprTickCtx t | (t,n) <- sortBy (flip (comparing snd)) group ])
where
groupName = tickToStr (fst (head group))
groupTotal = sum [n | (_,n) <- group] | 247 | pprTickGroup group =
hang (int groupTotal <+> text groupName)
2 (vcat [ int n <+> pprTickCtx t | (t,n) <- sortBy (flip (comparing snd)) group ])
where
groupName = tickToStr (fst (head group))
groupTotal = sum [n | (_,n) <- group] | 247 | pprTickGroup group =
hang (int groupTotal <+> text groupName)
2 (vcat [ int n <+> pprTickCtx t | (t,n) <- sortBy (flip (comparing snd)) group ])
where
groupName = tickToStr (fst (head group))
groupTotal = sum [n | (_,n) <- group] | 247 | false | false | 0 | 15 | 58 | 129 | 63 | 66 | null | null |
GaloisInc/gidl | src/Gidl/Schema.hs | bsd-3-clause | producerMessages :: (MethodName,Method) -> [Message]
producerMessages (streamname, (StreamMethod _ tr)) =
[ Message streamname tr ] | 133 | producerMessages :: (MethodName,Method) -> [Message]
producerMessages (streamname, (StreamMethod _ tr)) =
[ Message streamname tr ] | 133 | producerMessages (streamname, (StreamMethod _ tr)) =
[ Message streamname tr ] | 80 | false | true | 0 | 8 | 17 | 49 | 27 | 22 | null | null |
Teaspot-Studio/arhelk-lexer | app/Main.hs | bsd-3-clause | performLexing :: LexOptions -> IO ()
performLexing LexOptions{..} = case lookup language bultinLanguages of
Nothing -> do
T.putStrLn $ "Error: Don't know language '" <> language <> "', list builtin languages with `arhelk-lexer languages` command."
exitFailure
Just (SomeLexerLanguage lang) -> do
input <-... | 636 | performLexing :: LexOptions -> IO ()
performLexing LexOptions{..} = case lookup language bultinLanguages of
Nothing -> do
T.putStrLn $ "Error: Don't know language '" <> language <> "', list builtin languages with `arhelk-lexer languages` command."
exitFailure
Just (SomeLexerLanguage lang) -> do
input <-... | 636 | performLexing LexOptions{..} = case lookup language bultinLanguages of
Nothing -> do
T.putStrLn $ "Error: Don't know language '" <> language <> "', list builtin languages with `arhelk-lexer languages` command."
exitFailure
Just (SomeLexerLanguage lang) -> do
input <- maybe T.getContents T.readFile input... | 599 | false | true | 0 | 18 | 151 | 194 | 88 | 106 | null | null |
buckie/juno | tests/WireFormatSpec.hs | bsd-3-clause | -- these are signed (received) provenance versions
cmdRPC1', cmdRPC2' :: Command
cmdRPC1' = (\(Right v) -> v) $ fromWire Nothing keySet cmdSignedRPC1 | 149 | cmdRPC1', cmdRPC2' :: Command
cmdRPC1' = (\(Right v) -> v) $ fromWire Nothing keySet cmdSignedRPC1 | 98 | cmdRPC1' = (\(Right v) -> v) $ fromWire Nothing keySet cmdSignedRPC1 | 68 | true | true | 2 | 9 | 21 | 49 | 23 | 26 | null | null |
urbanslug/ghc | compiler/types/Type.hs | bsd-3-clause | mkCoerciblePred :: Type -> Type -> PredType
mkCoerciblePred ty1 ty2
= WARN( not (k `eqKind` typeKind ty2), ppr ty1 $$ ppr ty2 $$ ppr k $$ ppr (typeKind ty2) )
TyConApp coercibleTyCon [k, ty1, ty2]
where
k = typeKind ty1 | 231 | mkCoerciblePred :: Type -> Type -> PredType
mkCoerciblePred ty1 ty2
= WARN( not (k `eqKind` typeKind ty2), ppr ty1 $$ ppr ty2 $$ ppr k $$ ppr (typeKind ty2) )
TyConApp coercibleTyCon [k, ty1, ty2]
where
k = typeKind ty1 | 231 | mkCoerciblePred ty1 ty2
= WARN( not (k `eqKind` typeKind ty2), ppr ty1 $$ ppr ty2 $$ ppr k $$ ppr (typeKind ty2) )
TyConApp coercibleTyCon [k, ty1, ty2]
where
k = typeKind ty1 | 187 | false | true | 0 | 9 | 51 | 111 | 53 | 58 | null | null |
erochest/cabal-brew | CabalBrew/Options.hs | apache-2.0 | mtextArg :: Mod ArgumentFields (Maybe Text) -> Parser (Maybe Text)
mtextArg = argument (reader (Just . T.pack)) | 111 | mtextArg :: Mod ArgumentFields (Maybe Text) -> Parser (Maybe Text)
mtextArg = argument (reader (Just . T.pack)) | 111 | mtextArg = argument (reader (Just . T.pack)) | 44 | false | true | 0 | 10 | 16 | 53 | 26 | 27 | null | null |
Heather/Idris-dev | src/IRTS/JavaScript/Codegen.hs | bsd-3-clause | getNewCGNames :: Int -> State CGBodyState [Text]
getNewCGNames n =
mapM (\_ -> getNewCGName) [1..n] | 101 | getNewCGNames :: Int -> State CGBodyState [Text]
getNewCGNames n =
mapM (\_ -> getNewCGName) [1..n] | 101 | getNewCGNames n =
mapM (\_ -> getNewCGName) [1..n] | 52 | false | true | 0 | 8 | 16 | 49 | 24 | 25 | null | null |
hephaestus-pl/hephaestus | willian/hephaestus-integrated/feature-modeling/src/FeatureModel/Parsers/FMGrammar/Grammar2FeatureModel.hs | mit | child2FeatureTree :: [Production] -> Child -> FeatureTree
child2FeatureTree ps c =
let
(t, n) = case c of
(MandatoryChild i) -> (Mandatory, key i)
(OptionalChild i) -> (Optional, key i)
prods = findProduction (ps) (key c)
f = Feature { fId = n, fName = n, fType = t, groupType... | 768 | child2FeatureTree :: [Production] -> Child -> FeatureTree
child2FeatureTree ps c =
let
(t, n) = case c of
(MandatoryChild i) -> (Mandatory, key i)
(OptionalChild i) -> (Optional, key i)
prods = findProduction (ps) (key c)
f = Feature { fId = n, fName = n, fType = t, groupType... | 768 | child2FeatureTree ps c =
let
(t, n) = case c of
(MandatoryChild i) -> (Mandatory, key i)
(OptionalChild i) -> (Optional, key i)
prods = findProduction (ps) (key c)
f = Feature { fId = n, fName = n, fType = t, groupType = BasicFeature, properties = []}
in case prods of
... | 710 | false | true | 0 | 16 | 202 | 316 | 169 | 147 | null | null |
zoomhub/zoomhub | src/ZoomHub/Storage/PostgreSQL/Internal.hs | mit | unsafeInsertContent :: Manipulation_ Schemas ContentRow ContentRow
unsafeInsertContent =
insertInto
#content
( Values_
( Default `as` #id
:* Set (param @1) `as` #hash_id
:* Set (param @2) `as` #type_id
:* Set (param @3) `as` #url
:* Set (param @4) `as` #... | 2,159 | unsafeInsertContent :: Manipulation_ Schemas ContentRow ContentRow
unsafeInsertContent =
insertInto
#content
( Values_
( Default `as` #id
:* Set (param @1) `as` #hash_id
:* Set (param @2) `as` #type_id
:* Set (param @3) `as` #url
:* Set (param @4) `as` #... | 2,159 | unsafeInsertContent =
insertInto
#content
( Values_
( Default `as` #id
:* Set (param @1) `as` #hash_id
:* Set (param @2) `as` #type_id
:* Set (param @3) `as` #url
:* Set (param @4) `as` #state
:* Set (param @5) `as` #initialized_at
... | 2,092 | false | true | 0 | 53 | 782 | 701 | 382 | 319 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | probably = id | 13 | probably = id | 13 | probably = id | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
pranjaltale16/codeworld | funblocks-client/src/Blocks/Types.hs | apache-2.0 | numRound = standardFunction "numRound" "rounded" Nothing [typeNumber, typeNumber]
["NUM"] colorNumber "The rounded value of a number" | 145 | numRound = standardFunction "numRound" "rounded" Nothing [typeNumber, typeNumber]
["NUM"] colorNumber "The rounded value of a number" | 145 | numRound = standardFunction "numRound" "rounded" Nothing [typeNumber, typeNumber]
["NUM"] colorNumber "The rounded value of a number" | 145 | false | false | 0 | 6 | 27 | 30 | 16 | 14 | null | null |
jgjverheij/clash-cosim | CoSimTest.hs | bsd-2-clause | testInput :: Signal (Signed 16)
testInput = stimuliGenerator (2:>3:>(-2):>8:>Nil) | 81 | testInput :: Signal (Signed 16)
testInput = stimuliGenerator (2:>3:>(-2):>8:>Nil) | 81 | testInput = stimuliGenerator (2:>3:>(-2):>8:>Nil) | 49 | false | true | 0 | 11 | 8 | 47 | 24 | 23 | null | null |
danchoi/HaskellNet | src/Network/HaskellNet/SMTP.hs | bsd-3-clause | {-
I must be being stupid here
I can't seem to be able to catch the exception arising from the
connection already being closed this would be the correct way to do it
but instead we're being naughty above by just closes the connection
without first sending QUIT
closeSMTP c@(SMTPC conn _) =
do sendCommand c QUIT
... | 1,210 | sendMail :: BSStream s =>
String -- ^ sender mail
-> [String] -- ^ receivers
-> ByteString -- ^ data
-> SMTPConnection s
-> IO ()
sendMail sender receivers dat conn =
catcher `handle` mainProc
where mainProc =
do (250, _) <- sendCommand conn (M... | 708 | sendMail sender receivers dat conn =
catcher `handle` mainProc
where mainProc =
do (250, _) <- sendCommand conn (MAIL sender)
vals <- mapM (sendCommand conn . RCPT) receivers
unless (all ((==250) . fst) vals) $ fail "sendMail error"
(250, _) <- se... | 524 | true | true | 1 | 14 | 356 | 207 | 105 | 102 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/05/05.08.06-given-type-write-a-function.hs | mit | -- 6
co :: (b -> c) -> (a -> b) -> a -> c
co bToC aToB a = (bToC (aToB a)) | 74 | co :: (b -> c) -> (a -> b) -> a -> c
co bToC aToB a = (bToC (aToB a)) | 69 | co bToC aToB a = (bToC (aToB a)) | 32 | true | true | 0 | 8 | 22 | 57 | 30 | 27 | null | null |
nevrenato/HyLoRes_Source | src/HyLoRes/Clause/FullClause.hs | gpl-2.0 | prop_selIsSelectable :: FullClause (At Opaque) -> Bool
prop_selIsSelectable cl = fromMaybe True (isSelectable <$> selectedFormula cl) | 133 | prop_selIsSelectable :: FullClause (At Opaque) -> Bool
prop_selIsSelectable cl = fromMaybe True (isSelectable <$> selectedFormula cl) | 133 | prop_selIsSelectable cl = fromMaybe True (isSelectable <$> selectedFormula cl) | 78 | false | true | 0 | 9 | 15 | 47 | 21 | 26 | null | null |
tnrangwi/CompareProgrammingUsingHolidayManager | haskell/HolidayServer.hs | mit | _addHol (h'@(Holiday s' l'):[]) h@(Holiday s l)
| s <= s' = if _checkOverlap h h'
then
error "Overlapping holidays"
else
[h, h']
| otherwise = if _checkOverlap h' h
then
error "Overlapping holidays"
... | 371 | _addHol (h'@(Holiday s' l'):[]) h@(Holiday s l)
| s <= s' = if _checkOverlap h h'
then
error "Overlapping holidays"
else
[h, h']
| otherwise = if _checkOverlap h' h
then
error "Overlapping holidays"
... | 371 | _addHol (h'@(Holiday s' l'):[]) h@(Holiday s l)
| s <= s' = if _checkOverlap h h'
then
error "Overlapping holidays"
else
[h, h']
| otherwise = if _checkOverlap h' h
then
error "Overlapping holidays"
... | 371 | false | false | 1 | 10 | 196 | 104 | 54 | 50 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Protocol.hs | bsd-3-clause | parseQueryResult (NewRemoteRefIE _) (NewReply r) = Just $ RemoteRefI $ fromIntegral r | 85 | parseQueryResult (NewRemoteRefIE _) (NewReply r) = Just $ RemoteRefI $ fromIntegral r | 85 | parseQueryResult (NewRemoteRefIE _) (NewReply r) = Just $ RemoteRefI $ fromIntegral r | 85 | false | false | 0 | 7 | 11 | 34 | 16 | 18 | null | null |
Solonarv/pipes-reimpl | Pipes/Core.hs | mit | _bind (Monadic mp) f = Monadic (mp >>= \p -> return (_bind p f)) | 73 | _bind (Monadic mp) f = Monadic (mp >>= \p -> return (_bind p f)) | 73 | _bind (Monadic mp) f = Monadic (mp >>= \p -> return (_bind p f)) | 73 | false | false | 1 | 11 | 22 | 45 | 21 | 24 | null | null |
clarissalittler/tis-ish | Hardware.hs | mit | interpStep (MovInt i (Just d)) n = (writePort d i n) >> (return $ nextInst n) | 77 | interpStep (MovInt i (Just d)) n = (writePort d i n) >> (return $ nextInst n) | 77 | interpStep (MovInt i (Just d)) n = (writePort d i n) >> (return $ nextInst n) | 77 | false | false | 1 | 10 | 15 | 53 | 24 | 29 | null | null |
yiannist/lambda-lifting | LLifter/Internal.hs | gpl-3.0 | isEarth = (==) earth | 25 | isEarth = (==) earth | 25 | isEarth = (==) earth | 25 | false | false | 0 | 5 | 8 | 11 | 6 | 5 | null | null |
ppelleti/hs-hourglass | System/Hourglass.hs | bsd-3-clause | -- | Get the current global date
--
-- This is equivalent to:
--
-- > timeGetDateTimeOfDay `fmap` timeCurrentP
dateCurrent :: IO DateTime
dateCurrent = timeGetDateTimeOfDay <$> timeCurrentP | 189 | dateCurrent :: IO DateTime
dateCurrent = timeGetDateTimeOfDay <$> timeCurrentP | 78 | dateCurrent = timeGetDateTimeOfDay <$> timeCurrentP | 51 | true | true | 0 | 6 | 27 | 29 | 15 | 14 | null | null |
MauriceIsAG/HaskellScratch | .stack-work/intero/intero1846heo.hs | bsd-3-clause | myButtLast (_:xs) = myButtLast xs | 33 | myButtLast (_:xs) = myButtLast xs | 33 | myButtLast (_:xs) = myButtLast xs | 33 | false | false | 0 | 7 | 4 | 19 | 9 | 10 | null | null |
dmwit/pi-eta-epsilon | src/Language/PiEtaEpsilon/Examples.hs | bsd-3-clause | collect_garbage = undefined | 27 | collect_garbage = undefined | 27 | collect_garbage = undefined | 27 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
Cipherwraith/Rokka | Errors.hs | gpl-2.0 | {-- -- Alternative error messages
inputError = BL.pack "404 Not Found - Please check input and try again"
authenticationError = BL.pack "401 Unauthorized - Authentication Error"
urlError = BL.pack "400 Bad Request - Check URL and try again"
timeLimitError = BL.pack "401 Unauthorized - Request Limit Reached, please wait... | 443 | inputError :: (BL.ByteString, Int, String)
inputError = (BL.pack "Error 8008135", 404, "") | 90 | inputError = (BL.pack "Error 8008135", 404, "") | 47 | true | true | 0 | 8 | 68 | 45 | 24 | 21 | null | null |
Mathnerd314/lamdu | src/Lamdu/Data/Expression/Utils.hs | gpl-3.0 | pureSet :: Expression def ()
pureSet = ExprLens.pureExpr . ExprLens.bodySet # () | 80 | pureSet :: Expression def ()
pureSet = ExprLens.pureExpr . ExprLens.bodySet # () | 80 | pureSet = ExprLens.pureExpr . ExprLens.bodySet # () | 51 | false | true | 0 | 7 | 11 | 32 | 16 | 16 | null | null |
adamschoenemann/natural-deduction | test/NaturalDeduction/ProofSpec.hs | gpl-3.0 | lnot :: WFF -> WFF
lnot w = w --> false | 39 | lnot :: WFF -> WFF
lnot w = w --> false | 39 | lnot w = w --> false | 20 | false | true | 0 | 7 | 10 | 28 | 12 | 16 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.