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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mightymoose/liquidhaskell | benchmarks/hmatrix-0.15.0.1/lib/Numeric/LinearAlgebra/Algorithms.hs | bsd-3-clause | rcond :: Field t => Matrix t -> Double
rcond m = last s / head s
where s = toList (singularValues m)
-- | Number of linearly independent rows or columns. | 158 | rcond :: Field t => Matrix t -> Double
rcond m = last s / head s
where s = toList (singularValues m)
-- | Number of linearly independent rows or columns. | 158 | rcond m = last s / head s
where s = toList (singularValues m)
-- | Number of linearly independent rows or columns. | 119 | false | true | 2 | 8 | 36 | 61 | 27 | 34 | null | null |
erochest/c18sgml | src/C18/Balance.hs | apache-2.0 | denestTag _ stack t@(TagPosition{}) = (stack, [t]) | 50 | denestTag _ stack t@(TagPosition{}) = (stack, [t]) | 50 | denestTag _ stack t@(TagPosition{}) = (stack, [t]) | 50 | false | false | 0 | 8 | 6 | 32 | 18 | 14 | null | null |
cdparks/mini-core | src/MiniCore/Transforms/Lambdas.hs | mit | -- Take a list of old names and return a list of new names and a mapping
-- from the old names to the new names
newNames :: Map.Map Name Name -> [Name] -> Lift ([Name], Map.Map Name Name)
newNames env [] = return ([], env) | 226 | newNames :: Map.Map Name Name -> [Name] -> Lift ([Name], Map.Map Name Name)
newNames env [] = return ([], env) | 114 | newNames env [] = return ([], env) | 38 | true | true | 0 | 10 | 49 | 68 | 36 | 32 | null | null |
mydaum/cabal | cabal-install/Distribution/Client/ProjectConfig/Legacy.hs | bsd-3-clause | programOptionsSectionDescr :: SectionDescr LegacyPackageConfig
programOptionsSectionDescr =
SectionDescr {
sectionName = "program-options",
sectionFields = programOptionsFieldDescrs
configProgramArgs
(\args conf -> conf { configProgramArgs = args }),
sectionSubsections = [],
sectionGet = (\x->[("", x)])
. legacyConfigureFlags,
sectionSet =
\lineno unused confflags pkgconf -> do
unless (null unused) $
syntaxError lineno "the section 'program-options' takes no arguments"
return pkgconf {
legacyConfigureFlags = legacyConfigureFlags pkgconf <> confflags
},
sectionEmpty = mempty
} | 805 | programOptionsSectionDescr :: SectionDescr LegacyPackageConfig
programOptionsSectionDescr =
SectionDescr {
sectionName = "program-options",
sectionFields = programOptionsFieldDescrs
configProgramArgs
(\args conf -> conf { configProgramArgs = args }),
sectionSubsections = [],
sectionGet = (\x->[("", x)])
. legacyConfigureFlags,
sectionSet =
\lineno unused confflags pkgconf -> do
unless (null unused) $
syntaxError lineno "the section 'program-options' takes no arguments"
return pkgconf {
legacyConfigureFlags = legacyConfigureFlags pkgconf <> confflags
},
sectionEmpty = mempty
} | 805 | programOptionsSectionDescr =
SectionDescr {
sectionName = "program-options",
sectionFields = programOptionsFieldDescrs
configProgramArgs
(\args conf -> conf { configProgramArgs = args }),
sectionSubsections = [],
sectionGet = (\x->[("", x)])
. legacyConfigureFlags,
sectionSet =
\lineno unused confflags pkgconf -> do
unless (null unused) $
syntaxError lineno "the section 'program-options' takes no arguments"
return pkgconf {
legacyConfigureFlags = legacyConfigureFlags pkgconf <> confflags
},
sectionEmpty = mempty
} | 742 | false | true | 0 | 14 | 289 | 151 | 84 | 67 | null | null |
RaphaelJ/friday-bench | src/Benchmark.hs | lgpl-3.0 | scw' :: Grey -> Grey
scw' !img = I.scw (ix2 5 5) (ix2 15 15) (5 :: Double)
(I.BinaryThreshold 255 0) img | 130 | scw' :: Grey -> Grey
scw' !img = I.scw (ix2 5 5) (ix2 15 15) (5 :: Double)
(I.BinaryThreshold 255 0) img | 126 | scw' !img = I.scw (ix2 5 5) (ix2 15 15) (5 :: Double)
(I.BinaryThreshold 255 0) img | 105 | false | true | 0 | 8 | 47 | 64 | 32 | 32 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- | Default fill target measured in sectors
defaultFillTarget :: Int
defaultFillTarget = 0 | 91 | defaultFillTarget :: Int
defaultFillTarget = 0 | 46 | defaultFillTarget = 0 | 21 | true | true | 0 | 4 | 13 | 12 | 7 | 5 | null | null |
brendanhay/gogol | gogol-digitalassetlinks/gen/Network/Google/Resource/DigitalAssetLinks/Assetlinks/Check.hs | mpl-2.0 | -- | JSONP
acCallback :: Lens' AssetlinksCheck (Maybe Text)
acCallback
= lens _acCallback (\ s a -> s{_acCallback = a}) | 121 | acCallback :: Lens' AssetlinksCheck (Maybe Text)
acCallback
= lens _acCallback (\ s a -> s{_acCallback = a}) | 110 | acCallback
= lens _acCallback (\ s a -> s{_acCallback = a}) | 61 | true | true | 2 | 9 | 21 | 55 | 25 | 30 | null | null |
bartoszw/haslo | Haslo/Parameters.hs | bsd-3-clause | absParamYearlyTrunc = IPP Yearly Truncated | 42 | absParamYearlyTrunc = IPP Yearly Truncated | 42 | absParamYearlyTrunc = IPP Yearly Truncated | 42 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
bgwines/zora | Zora/List.hs | bsd-3-clause | powerpartition l@(x:xs) =
if length l == 1
then [[[x]]]
else concatMap (get_next_partitions x) . powerpartition $ xs
where
get_next_partitions :: a -> [[a]] -> [[[a]]]
get_next_partitions e l = ([e] : l) : (map f indices)
where
f i = (a i) ++ (b i) ++ (c i)
a i = ((take' i) l)
b i = [e : (l !! (fromInteger i))]
c i = (drop' (i+1) l)
indices = [0..((length' l) - 1)]
-- ---------------------------------------------------------------------
-- List transformations
-- | /O(n log(n))/ Removes duplicate elements. Like `Data.List.nub`, but for `Ord` types, so it can be faster. | 767 | powerpartition l@(x:xs) =
if length l == 1
then [[[x]]]
else concatMap (get_next_partitions x) . powerpartition $ xs
where
get_next_partitions :: a -> [[a]] -> [[[a]]]
get_next_partitions e l = ([e] : l) : (map f indices)
where
f i = (a i) ++ (b i) ++ (c i)
a i = ((take' i) l)
b i = [e : (l !! (fromInteger i))]
c i = (drop' (i+1) l)
indices = [0..((length' l) - 1)]
-- ---------------------------------------------------------------------
-- List transformations
-- | /O(n log(n))/ Removes duplicate elements. Like `Data.List.nub`, but for `Ord` types, so it can be faster. | 767 | powerpartition l@(x:xs) =
if length l == 1
then [[[x]]]
else concatMap (get_next_partitions x) . powerpartition $ xs
where
get_next_partitions :: a -> [[a]] -> [[[a]]]
get_next_partitions e l = ([e] : l) : (map f indices)
where
f i = (a i) ++ (b i) ++ (c i)
a i = ((take' i) l)
b i = [e : (l !! (fromInteger i))]
c i = (drop' (i+1) l)
indices = [0..((length' l) - 1)]
-- ---------------------------------------------------------------------
-- List transformations
-- | /O(n log(n))/ Removes duplicate elements. Like `Data.List.nub`, but for `Ord` types, so it can be faster. | 767 | false | false | 0 | 14 | 290 | 255 | 138 | 117 | null | null |
FPBrno/dht-dks | src/Data/DHT/DKS/Type/Params.hs | bsd-3-clause | -- | Use provided logging backend, by default there is no logging.
logging :: SomeLoggingBackend -> E DksParams
logging lb params = params{_logging = lb} | 153 | logging :: SomeLoggingBackend -> E DksParams
logging lb params = params{_logging = lb} | 86 | logging lb params = params{_logging = lb} | 41 | true | true | 0 | 7 | 24 | 41 | 19 | 22 | null | null |
jystic/ntpmon | src/Network/NTP.hs | bsd-3-clause | -- | Gets the time at the given index.
clockTime :: Clock -> ClockIndex -> Time
clockTime Clock{..} index = clockTime0 `add` fromSeconds off
where
off = diff / freq
-- TODO: Unsigned subtract breaks when index is earlier than clockIndex0.
-- This is the case for servers which have not responded for a while
-- as we continually move clockIndex0 forward using adjustOrigin.
diff = fromIntegral (index - clockIndex0)
freq = clockFrequency
-- | Gets the index at the given time. | 516 | clockTime :: Clock -> ClockIndex -> Time
clockTime Clock{..} index = clockTime0 `add` fromSeconds off
where
off = diff / freq
-- TODO: Unsigned subtract breaks when index is earlier than clockIndex0.
-- This is the case for servers which have not responded for a while
-- as we continually move clockIndex0 forward using adjustOrigin.
diff = fromIntegral (index - clockIndex0)
freq = clockFrequency
-- | Gets the index at the given time. | 477 | clockTime Clock{..} index = clockTime0 `add` fromSeconds off
where
off = diff / freq
-- TODO: Unsigned subtract breaks when index is earlier than clockIndex0.
-- This is the case for servers which have not responded for a while
-- as we continually move clockIndex0 forward using adjustOrigin.
diff = fromIntegral (index - clockIndex0)
freq = clockFrequency
-- | Gets the index at the given time. | 436 | true | true | 7 | 7 | 121 | 93 | 44 | 49 | null | null |
adarqui/DevUtils-Parser | src/System/DevUtils/Parser.hs | gpl-3.0 | parseUrlRedisOptionsDb :: St Cmd
parseUrlRedisOptionsDb = do
_ <- string "db="
(UrlRedis s) <- getState
num <- many1 digit
return $ UrlRedis s { R._db = (read num :: Integer) } | 180 | parseUrlRedisOptionsDb :: St Cmd
parseUrlRedisOptionsDb = do
_ <- string "db="
(UrlRedis s) <- getState
num <- many1 digit
return $ UrlRedis s { R._db = (read num :: Integer) } | 180 | parseUrlRedisOptionsDb = do
_ <- string "db="
(UrlRedis s) <- getState
num <- many1 digit
return $ UrlRedis s { R._db = (read num :: Integer) } | 147 | false | true | 0 | 12 | 34 | 76 | 36 | 40 | null | null |
bobismijnnaam/hywar | CodeGen.hs | mit | generateWorkerSizeDiscoveryCode :: Expr -> String
generateWorkerSizeDiscoveryCode (Let exprs body) = case primitive of
"filter" ->
"int n = " ++ arg ++ ".size();"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"reduce" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check (arg ++ ".size()")
where
FuncCall _ [_, TIdf arg _] = body
"map" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"plow" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"zipWith" ->
"int n = std::min(" ++ l ++ ".size(), " ++ r ++ ".size());\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf l _, TIdf r _] = body
where
FuncCall primitive _ = body
mod64Check count = format temp [count]
where
temp = [r|
if (({0}) % workGroupSize != 0) {
throw std::invalid_argument("Job size should be multiple of" + std::to_string(workGroupSize));
}
|]
-- Name, Flags (read/write), size (integers) | 1,319 | generateWorkerSizeDiscoveryCode :: Expr -> String
generateWorkerSizeDiscoveryCode (Let exprs body) = case primitive of
"filter" ->
"int n = " ++ arg ++ ".size();"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"reduce" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check (arg ++ ".size()")
where
FuncCall _ [_, TIdf arg _] = body
"map" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"plow" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"zipWith" ->
"int n = std::min(" ++ l ++ ".size(), " ++ r ++ ".size());\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf l _, TIdf r _] = body
where
FuncCall primitive _ = body
mod64Check count = format temp [count]
where
temp = [r|
if (({0}) % workGroupSize != 0) {
throw std::invalid_argument("Job size should be multiple of" + std::to_string(workGroupSize));
}
|]
-- Name, Flags (read/write), size (integers) | 1,315 | generateWorkerSizeDiscoveryCode (Let exprs body) = case primitive of
"filter" ->
"int n = " ++ arg ++ ".size();"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"reduce" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check (arg ++ ".size()")
where
FuncCall _ [_, TIdf arg _] = body
"map" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"plow" ->
"int n = " ++ arg ++ ".size();\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf arg _] = body
"zipWith" ->
"int n = std::min(" ++ l ++ ".size(), " ++ r ++ ".size());\n"
++ mod64Check "n"
where
FuncCall _ [_, TIdf l _, TIdf r _] = body
where
FuncCall primitive _ = body
mod64Check count = format temp [count]
where
temp = [r|
if (({0}) % workGroupSize != 0) {
throw std::invalid_argument("Job size should be multiple of" + std::to_string(workGroupSize));
}
|]
-- Name, Flags (read/write), size (integers) | 1,265 | false | true | 2 | 12 | 539 | 335 | 161 | 174 | null | null |
spechub/Hets | QVTR/StatAna.hs | gpl-2.0 | getVarFromTemplate :: PropertyTemplate -> [RelVar] -> Maybe RelVar
getVarFromTemplate (PropertyTemplate _ ocl _) relV =
case ocl of
Nothing -> Nothing
Just (StringExp (VarExp v)) -> findVarFromName v relV
_ -> Nothing | 231 | getVarFromTemplate :: PropertyTemplate -> [RelVar] -> Maybe RelVar
getVarFromTemplate (PropertyTemplate _ ocl _) relV =
case ocl of
Nothing -> Nothing
Just (StringExp (VarExp v)) -> findVarFromName v relV
_ -> Nothing | 231 | getVarFromTemplate (PropertyTemplate _ ocl _) relV =
case ocl of
Nothing -> Nothing
Just (StringExp (VarExp v)) -> findVarFromName v relV
_ -> Nothing | 164 | false | true | 4 | 8 | 45 | 81 | 40 | 41 | null | null |
v0lkan/learning-haskell | session-archive/005-fold-examples.hs | mit | filter' :: (a -> Bool) -> [a] -> [a]
filter' p = foldr (\x acc -> if p x then x : acc else acc) [] | 99 | filter' :: (a -> Bool) -> [a] -> [a]
filter' p = foldr (\x acc -> if p x then x : acc else acc) [] | 98 | filter' p = foldr (\x acc -> if p x then x : acc else acc) [] | 61 | false | true | 0 | 9 | 26 | 67 | 36 | 31 | null | null |
mikusp/accelerate-cuda | Data/Array/Accelerate/CUDA/CodeGen.hs | bsd-3-clause | codegenPrim1 PrimLNot a = [cexp| ! $exp:a|] | 61 | codegenPrim1 PrimLNot a = [cexp| ! $exp:a|] | 61 | codegenPrim1 PrimLNot a = [cexp| ! $exp:a|] | 61 | false | false | 0 | 5 | 24 | 15 | 9 | 6 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'MemoryInfo' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'miTotalInternalStorage'
--
-- * 'miTotalRam'
memoryInfo
:: MemoryInfo
memoryInfo =
MemoryInfo' {_miTotalInternalStorage = Nothing, _miTotalRam = Nothing} | 330 | memoryInfo
:: MemoryInfo
memoryInfo =
MemoryInfo' {_miTotalInternalStorage = Nothing, _miTotalRam = Nothing} | 114 | memoryInfo =
MemoryInfo' {_miTotalInternalStorage = Nothing, _miTotalRam = Nothing} | 85 | true | true | 0 | 7 | 55 | 42 | 24 | 18 | null | null |
msullivan/advent-of-code | 2018/A21b.hs | mit | rse [y, z, w] = (y, z, w)
| 27 | parse [y, z, w] = (y, z, w) | 27 | parse [y, z, w] = (y, z, w) | 27 | false | false | 0 | 5 | 9 | 28 | 16 | 12 | null | null |
ekmett/ghc | compiler/main/HscMain.hs | bsd-3-clause | wipeTrust :: TcGblEnv -> WarningMessages -> Hsc TcGblEnv
wipeTrust tcg_env whyUnsafe = do
dflags <- getDynFlags
when (wopt Opt_WarnUnsafe dflags)
(logWarnings $ unitBag $
mkPlainWarnMsg dflags (warnUnsafeOnLoc dflags) (whyUnsafe' dflags))
liftIO $ writeIORef (tcg_safeInfer tcg_env) False
return $ tcg_env { tcg_imports = wiped_trust }
where
wiped_trust = (tcg_imports tcg_env) { imp_trust_pkgs = [] }
pprMod = ppr $ moduleName $ tcg_mod tcg_env
whyUnsafe' df = vcat [ quotes pprMod <+> text "has been inferred as unsafe!"
, text "Reason:"
, nest 4 $ (vcat $ badFlags df) $+$
(vcat $ pprErrMsgBagWithLoc whyUnsafe)
]
badFlags df = concat $ map (badFlag df) unsafeFlags
badFlag df (str,loc,on,_)
| on df = [mkLocMessage SevOutput (loc df) $
text str <+> text "is not allowed in Safe Haskell"]
| otherwise = []
-- | Figure out the final correct safe haskell mode | 1,094 | wipeTrust :: TcGblEnv -> WarningMessages -> Hsc TcGblEnv
wipeTrust tcg_env whyUnsafe = do
dflags <- getDynFlags
when (wopt Opt_WarnUnsafe dflags)
(logWarnings $ unitBag $
mkPlainWarnMsg dflags (warnUnsafeOnLoc dflags) (whyUnsafe' dflags))
liftIO $ writeIORef (tcg_safeInfer tcg_env) False
return $ tcg_env { tcg_imports = wiped_trust }
where
wiped_trust = (tcg_imports tcg_env) { imp_trust_pkgs = [] }
pprMod = ppr $ moduleName $ tcg_mod tcg_env
whyUnsafe' df = vcat [ quotes pprMod <+> text "has been inferred as unsafe!"
, text "Reason:"
, nest 4 $ (vcat $ badFlags df) $+$
(vcat $ pprErrMsgBagWithLoc whyUnsafe)
]
badFlags df = concat $ map (badFlag df) unsafeFlags
badFlag df (str,loc,on,_)
| on df = [mkLocMessage SevOutput (loc df) $
text str <+> text "is not allowed in Safe Haskell"]
| otherwise = []
-- | Figure out the final correct safe haskell mode | 1,094 | wipeTrust tcg_env whyUnsafe = do
dflags <- getDynFlags
when (wopt Opt_WarnUnsafe dflags)
(logWarnings $ unitBag $
mkPlainWarnMsg dflags (warnUnsafeOnLoc dflags) (whyUnsafe' dflags))
liftIO $ writeIORef (tcg_safeInfer tcg_env) False
return $ tcg_env { tcg_imports = wiped_trust }
where
wiped_trust = (tcg_imports tcg_env) { imp_trust_pkgs = [] }
pprMod = ppr $ moduleName $ tcg_mod tcg_env
whyUnsafe' df = vcat [ quotes pprMod <+> text "has been inferred as unsafe!"
, text "Reason:"
, nest 4 $ (vcat $ badFlags df) $+$
(vcat $ pprErrMsgBagWithLoc whyUnsafe)
]
badFlags df = concat $ map (badFlag df) unsafeFlags
badFlag df (str,loc,on,_)
| on df = [mkLocMessage SevOutput (loc df) $
text str <+> text "is not allowed in Safe Haskell"]
| otherwise = []
-- | Figure out the final correct safe haskell mode | 1,037 | false | true | 0 | 12 | 371 | 312 | 152 | 160 | null | null |
vikraman/ghc | compiler/main/DynFlags.hs | bsd-3-clause | dynamicGhc :: Bool
dynamicGhc = unsafeDupablePerformIO rtsIsDynamicIO /= 0 | 74 | dynamicGhc :: Bool
dynamicGhc = unsafeDupablePerformIO rtsIsDynamicIO /= 0 | 74 | dynamicGhc = unsafeDupablePerformIO rtsIsDynamicIO /= 0 | 55 | false | true | 0 | 6 | 8 | 25 | 10 | 15 | null | null |
neutronest/eulerproject-douby | e30/e30.hs | mit | digits :: Integer -> [Integer]
digits = map (read . (:[])) . show | 65 | digits :: Integer -> [Integer]
digits = map (read . (:[])) . show | 65 | digits = map (read . (:[])) . show | 34 | false | true | 0 | 9 | 12 | 45 | 22 | 23 | null | null |
kishoredbn/barrelfish | tools/flounder/BackendCommon.hs | mit | start_send :: String -> String -> String -> [MessageArgument] -> [C.Stmt]
start_send drvn ifn mn msgargs
= [C.Ex $ C.Call "FL_DEBUG" [C.StringConstant $
drvn ++ " TX " ++ ifn ++ "." ++ mn ++ "\n"]] | 234 | start_send :: String -> String -> String -> [MessageArgument] -> [C.Stmt]
start_send drvn ifn mn msgargs
= [C.Ex $ C.Call "FL_DEBUG" [C.StringConstant $
drvn ++ " TX " ++ ifn ++ "." ++ mn ++ "\n"]] | 234 | start_send drvn ifn mn msgargs
= [C.Ex $ C.Call "FL_DEBUG" [C.StringConstant $
drvn ++ " TX " ++ ifn ++ "." ++ mn ++ "\n"]] | 160 | false | true | 0 | 16 | 72 | 95 | 47 | 48 | null | null |
23Skidoo/snap-server | test/Snap/Internal/Http/Server/Socket/Tests.hs | bsd-3-clause | mkdtemp = Posix.mkdtemp | 23 | mkdtemp = Posix.mkdtemp | 23 | mkdtemp = Posix.mkdtemp | 23 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
mariefarrell/Hets | Temporal/Mu.hs | gpl-2.0 | nnfS (Diamond phi ) = Diamond (nnfS phi) | 40 | nnfS (Diamond phi ) = Diamond (nnfS phi) | 40 | nnfS (Diamond phi ) = Diamond (nnfS phi) | 40 | false | false | 0 | 7 | 7 | 24 | 11 | 13 | null | null |
frerich/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | inlineToLaTeX (Emph lst) =
inlineListToLaTeX lst >>= return . inCmd "emph" | 76 | inlineToLaTeX (Emph lst) =
inlineListToLaTeX lst >>= return . inCmd "emph" | 76 | inlineToLaTeX (Emph lst) =
inlineListToLaTeX lst >>= return . inCmd "emph" | 76 | false | false | 0 | 7 | 12 | 29 | 13 | 16 | null | null |
ewestern/geos | src/Data/Geometry/Geos/Raw/Geometry.hs | mit | contains :: Geometry a => a -> a -> Geos Bool
contains = binaryPredicate_ I.geos_Contains "contains" | 100 | contains :: Geometry a => a -> a -> Geos Bool
contains = binaryPredicate_ I.geos_Contains "contains" | 100 | contains = binaryPredicate_ I.geos_Contains "contains" | 54 | false | true | 0 | 8 | 15 | 36 | 17 | 19 | null | null |
quchen/prettyprinter | prettyprinter/test/Testsuite/StripTrailingSpace.hs | bsd-2-clause | unlines' :: [Text] -> Text
unlines' = T.intercalate (T.singleton '\n') | 70 | unlines' :: [Text] -> Text
unlines' = T.intercalate (T.singleton '\n') | 70 | unlines' = T.intercalate (T.singleton '\n') | 43 | false | true | 0 | 8 | 9 | 31 | 16 | 15 | null | null |
zaxtax/hakaru | haskell/Tests/Lazy.hs | bsd-3-clause | cobbObs n = simplify (d `app` unit `app` n)
where d:_ = runDisintegrate cobb | 80 | cobbObs n = simplify (d `app` unit `app` n)
where d:_ = runDisintegrate cobb | 80 | cobbObs n = simplify (d `app` unit `app` n)
where d:_ = runDisintegrate cobb | 80 | false | false | 0 | 8 | 17 | 42 | 22 | 20 | null | null |
kmate/raw-feldspar | src/Feldspar/Frontend.hs | bsd-3-clause | -- | Create an uninitialized named array
--
-- The provided base name may be appended with a unique identifier to avoid name
-- collisions.
newNamedArr :: (Type (Internal a), MonadComp m)
=> String -- ^ Base name
-> Data Length
-> m (Arr a)
newNamedArr base l = liftComp $ fmap (Arr 0 l) $
mapStructA (const (Comp $ Imp.newNamedArr base l)) typeRep | 365 | newNamedArr :: (Type (Internal a), MonadComp m)
=> String -- ^ Base name
-> Data Length
-> m (Arr a)
newNamedArr base l = liftComp $ fmap (Arr 0 l) $
mapStructA (const (Comp $ Imp.newNamedArr base l)) typeRep | 225 | newNamedArr base l = liftComp $ fmap (Arr 0 l) $
mapStructA (const (Comp $ Imp.newNamedArr base l)) typeRep | 111 | true | true | 0 | 12 | 80 | 107 | 54 | 53 | null | null |
joehillen/aura | src/Aura/Pkgbuild/Base.hs | gpl-3.0 | toFilename :: String -> FilePath
toFilename = (++ ".pb") | 56 | toFilename :: String -> FilePath
toFilename = (++ ".pb") | 56 | toFilename = (++ ".pb") | 23 | false | true | 0 | 5 | 8 | 19 | 11 | 8 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_INVARIANT_DATATYPE_EXT :: GLenum
gl_INVARIANT_DATATYPE_EXT = 0x87EB | 70 | gl_INVARIANT_DATATYPE_EXT :: GLenum
gl_INVARIANT_DATATYPE_EXT = 0x87EB | 70 | gl_INVARIANT_DATATYPE_EXT = 0x87EB | 34 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
bch29/streaming-png | src/Codec/Picture/Png/Streaming/Core.hs | lgpl-3.0 | checkSig :: MonadThrow m => ByteString m r -> ByteString m r
checkSig input = Q.mwrap $ do
(header :> remainder) <- Q.toStrict $ Q.splitAt 8 input
if header == pngSignature
then return remainder
else throwM IncorrectSignature | 237 | checkSig :: MonadThrow m => ByteString m r -> ByteString m r
checkSig input = Q.mwrap $ do
(header :> remainder) <- Q.toStrict $ Q.splitAt 8 input
if header == pngSignature
then return remainder
else throwM IncorrectSignature | 237 | checkSig input = Q.mwrap $ do
(header :> remainder) <- Q.toStrict $ Q.splitAt 8 input
if header == pngSignature
then return remainder
else throwM IncorrectSignature | 176 | false | true | 0 | 11 | 48 | 89 | 42 | 47 | null | null |
brendanhay/gogol | gogol-chat/gen/Network/Google/Chat/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'Membership' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mState'
--
-- * 'mName'
--
-- * 'mMember'
--
-- * 'mCreateTime'
membership
:: Membership
membership =
Membership'
{ _mState = Nothing
, _mName = Nothing
, _mMember = Nothing
, _mCreateTime = Nothing
} | 397 | membership
:: Membership
membership =
Membership'
{ _mState = Nothing
, _mName = Nothing
, _mMember = Nothing
, _mCreateTime = Nothing
} | 162 | membership =
Membership'
{ _mState = Nothing
, _mName = Nothing
, _mMember = Nothing
, _mCreateTime = Nothing
} | 133 | true | true | 0 | 7 | 94 | 58 | 36 | 22 | null | null |
ptitfred/ftv-vods | test/PlaylistManagerTest.hs | bsd-3-clause | day = choose (1, 28) | 22 | day = choose (1, 28) | 22 | day = choose (1, 28) | 22 | false | false | 1 | 5 | 6 | 18 | 8 | 10 | null | null |
wavewave/lhc-analysis-collection | exe/2013-07-20-XUDD.hs | gpl-3.0 | p_sqsg_9j2x :: DCross
p_sqsg_9j2x = x (t proton, t proton, [p_gluino, p_squark]) | 81 | p_sqsg_9j2x :: DCross
p_sqsg_9j2x = x (t proton, t proton, [p_gluino, p_squark]) | 80 | p_sqsg_9j2x = x (t proton, t proton, [p_gluino, p_squark]) | 58 | false | true | 0 | 7 | 12 | 41 | 20 | 21 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M03/D05/Solution.hs | mit | {--
>>> d
Left Expr y ^ 2 = Expr z ^ 2
--}
e = Left (Equation (Expr (Fun [VARIABLE (Var 'x'), CONSTANT add, CONSTANT (Int 2)]))
(Singlet LT)
(Expr (Fun [VARIABLE (Var 'y'), CONSTANT add, CONSTANT (Int 3)]))) | 246 | e = Left (Equation (Expr (Fun [VARIABLE (Var 'x'), CONSTANT add, CONSTANT (Int 2)]))
(Singlet LT)
(Expr (Fun [VARIABLE (Var 'y'), CONSTANT add, CONSTANT (Int 3)]))) | 202 | e = Left (Equation (Expr (Fun [VARIABLE (Var 'x'), CONSTANT add, CONSTANT (Int 2)]))
(Singlet LT)
(Expr (Fun [VARIABLE (Var 'y'), CONSTANT add, CONSTANT (Int 3)]))) | 202 | true | false | 1 | 15 | 78 | 113 | 55 | 58 | null | null |
icyfork/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkPS11a= verify checkPS1Assignments "export PS1='\\033[1;35m\\$ '" | 74 | prop_checkPS11a= verify checkPS1Assignments "export PS1='\\033[1;35m\\$ '" | 74 | prop_checkPS11a= verify checkPS1Assignments "export PS1='\\033[1;35m\\$ '" | 74 | false | false | 1 | 5 | 5 | 16 | 5 | 11 | null | null |
alevy/cs240h-lab1 | hist.hs | gpl-3.0 | addOccurance m word = Map.insert word (count + 1) m where
count | Map.member word m = m Map.! word
| otherwise = 0 | 128 | addOccurance m word = Map.insert word (count + 1) m where
count | Map.member word m = m Map.! word
| otherwise = 0 | 128 | addOccurance m word = Map.insert word (count + 1) m where
count | Map.member word m = m Map.! word
| otherwise = 0 | 128 | false | false | 0 | 9 | 37 | 61 | 29 | 32 | null | null |
vikraman/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | isQuietHsCmd _ = False | 22 | isQuietHsCmd _ = False | 22 | isQuietHsCmd _ = False | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mlite/hLLVM | src/Llvm/Pass/RewriteUse.hs | bsd-3-clause | rwCinst :: MaybeChange Value -> MaybeChange (Node e x)
rwCinst f (Cinst c) = rwComputingInstWithDbg f c >>= return . Cinst | 122 | rwCinst :: MaybeChange Value -> MaybeChange (Node e x)
rwCinst f (Cinst c) = rwComputingInstWithDbg f c >>= return . Cinst | 122 | rwCinst f (Cinst c) = rwComputingInstWithDbg f c >>= return . Cinst | 67 | false | true | 0 | 8 | 20 | 58 | 26 | 32 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter_6_my_note.hs | mit | changePosition :: Image -> Position -> Image
changePosition (pic, _) _pos = (pic, _pos) | 91 | changePosition :: Image -> Position -> Image
changePosition (pic, _) _pos = (pic, _pos) | 91 | changePosition (pic, _) _pos = (pic, _pos) | 46 | false | true | 0 | 6 | 17 | 36 | 20 | 16 | null | null |
urbit/urbit | pkg/hs/urbit-noun-core/lib/Urbit/Noun/Jam.hs | mit | getS :: Put S
getS = Put $ \tbl s -> pure (PutResult s s) | 57 | getS :: Put S
getS = Put $ \tbl s -> pure (PutResult s s) | 57 | getS = Put $ \tbl s -> pure (PutResult s s) | 43 | false | true | 2 | 6 | 14 | 42 | 19 | 23 | null | null |
hsyl20/HViperVM | lib/ViperVM/Backends/OpenCL/CommandQueue.hs | lgpl-3.0 | -- | Return the context specified when the command-queue is created.
--
-- This function execute OpenCL clGetCommandQueueInfo with 'CL_QUEUE_CONTEXT'.
clGetCommandQueueContext :: OpenCLLibrary -> CLCommandQueue -> IO CLContext
clGetCommandQueueContext lib cq =
wrapGetInfo (\(dat :: Ptr CLContext) ->
rawClGetCommandQueueInfo lib cq infoid size (castPtr dat)) id
where
infoid = getCLValue CL_QUEUE_CONTEXT
size = fromIntegral $ sizeOf (nullPtr::CLContext)
-- | Return the device specified when the command-queue is created.
--
-- This function execute OpenCL clGetCommandQueueInfo with 'CL_QUEUE_DEVICE'. | 634 | clGetCommandQueueContext :: OpenCLLibrary -> CLCommandQueue -> IO CLContext
clGetCommandQueueContext lib cq =
wrapGetInfo (\(dat :: Ptr CLContext) ->
rawClGetCommandQueueInfo lib cq infoid size (castPtr dat)) id
where
infoid = getCLValue CL_QUEUE_CONTEXT
size = fromIntegral $ sizeOf (nullPtr::CLContext)
-- | Return the device specified when the command-queue is created.
--
-- This function execute OpenCL clGetCommandQueueInfo with 'CL_QUEUE_DEVICE'. | 483 | clGetCommandQueueContext lib cq =
wrapGetInfo (\(dat :: Ptr CLContext) ->
rawClGetCommandQueueInfo lib cq infoid size (castPtr dat)) id
where
infoid = getCLValue CL_QUEUE_CONTEXT
size = fromIntegral $ sizeOf (nullPtr::CLContext)
-- | Return the device specified when the command-queue is created.
--
-- This function execute OpenCL clGetCommandQueueInfo with 'CL_QUEUE_DEVICE'. | 407 | true | true | 0 | 10 | 106 | 101 | 54 | 47 | null | null |
ytakano/tsukuyomi | tests/json/json_haskell.hs | bsd-3-clause | parse_sp_value = parse_ws >> Parsec.char ',' >> parse_ws >> parse_value | 71 | parse_sp_value = parse_ws >> Parsec.char ',' >> parse_ws >> parse_value | 71 | parse_sp_value = parse_ws >> Parsec.char ',' >> parse_ws >> parse_value | 71 | false | false | 0 | 9 | 9 | 23 | 11 | 12 | null | null |
RobinKrom/BtcExchanges | src/Data/Icbit.hs | bsd-3-clause | filterDepthMsg :: Monad m => Pipe IcbitMessage OrderBook m r
filterDepthMsg = P.filter isDepthMsg >-> P.map extractDepth | 120 | filterDepthMsg :: Monad m => Pipe IcbitMessage OrderBook m r
filterDepthMsg = P.filter isDepthMsg >-> P.map extractDepth | 120 | filterDepthMsg = P.filter isDepthMsg >-> P.map extractDepth | 59 | false | true | 0 | 7 | 16 | 46 | 20 | 26 | null | null |
IreneKnapp/Faction | libfaction/Distribution/Package.hs | bsd-3-clause | thisPackageVersion :: PackageIdentifier -> Dependency
thisPackageVersion (PackageIdentifier n v) =
Dependency n (thisVersion v) | 129 | thisPackageVersion :: PackageIdentifier -> Dependency
thisPackageVersion (PackageIdentifier n v) =
Dependency n (thisVersion v) | 129 | thisPackageVersion (PackageIdentifier n v) =
Dependency n (thisVersion v) | 75 | false | true | 0 | 7 | 15 | 43 | 19 | 24 | null | null |
ben-schulz/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | pimp n t mach = PImp 1 mach [] n t | 34 | pimp n t mach = PImp 1 mach [] n t | 34 | pimp n t mach = PImp 1 mach [] n t | 34 | false | false | 1 | 6 | 10 | 31 | 12 | 19 | null | null |
norm2782/uuagc | src/SequentialTypes.hs | bsd-3-clause | getAttr :: CRule -> Identifier
getAttr (CRule name _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = name | 92 | getAttr :: CRule -> Identifier
getAttr (CRule name _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = name | 92 | getAttr (CRule name _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = name | 61 | false | true | 0 | 7 | 28 | 58 | 28 | 30 | null | null |
nadirs/99problems | Problems.hs | bsd-3-clause | myIsPalindrome (x:xs) = (myIsPalindrome (init xs)) && (x == (last xs)) | 70 | myIsPalindrome (x:xs) = (myIsPalindrome (init xs)) && (x == (last xs)) | 70 | myIsPalindrome (x:xs) = (myIsPalindrome (init xs)) && (x == (last xs)) | 70 | false | false | 0 | 9 | 10 | 46 | 23 | 23 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/xhtml/Text/XHtml/Strict/Elements.hs | bsd-3-clause | quote = tag "q" | 30 | quote = tag "q" | 30 | quote = tag "q" | 30 | false | false | 0 | 5 | 18 | 9 | 4 | 5 | null | null |
tpsinnem/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectTTQuote unq (V n)
= reflCall "V" [RConstant (I n)] | 59 | reflectTTQuote unq (V n)
= reflCall "V" [RConstant (I n)] | 59 | reflectTTQuote unq (V n)
= reflCall "V" [RConstant (I n)] | 59 | false | false | 0 | 9 | 11 | 34 | 16 | 18 | null | null |
notae/haskell-exercise | cp/CFPFD1.hs | bsd-3-clause | test1 :: FD s [Int]
test1 = do
x <- newVar "X" [1..3]
y <- newVar "Y" [4..5]
labelling [x, y]
{-|
>>> evalFD test2
[[1,3],[2,2],[3,1]]
-} | 144 | test1 :: FD s [Int]
test1 = do
x <- newVar "X" [1..3]
y <- newVar "Y" [4..5]
labelling [x, y]
{-|
>>> evalFD test2
[[1,3],[2,2],[3,1]]
-} | 144 | test1 = do
x <- newVar "X" [1..3]
y <- newVar "Y" [4..5]
labelling [x, y]
{-|
>>> evalFD test2
[[1,3],[2,2],[3,1]]
-} | 124 | false | true | 0 | 9 | 33 | 66 | 33 | 33 | null | null |
beni55/ghcjs | src/Gen2/ClosureInfo.hs | mit | allocData :: Array Int JExpr
allocData = listArray (1, 1024) (map f [(1::Int)..1024])
where
f n = toJExpr . TxtI . T.pack $ "h$d" ++ show n | 145 | allocData :: Array Int JExpr
allocData = listArray (1, 1024) (map f [(1::Int)..1024])
where
f n = toJExpr . TxtI . T.pack $ "h$d" ++ show n | 145 | allocData = listArray (1, 1024) (map f [(1::Int)..1024])
where
f n = toJExpr . TxtI . T.pack $ "h$d" ++ show n | 116 | false | true | 2 | 9 | 32 | 84 | 40 | 44 | null | null |
ku-fpg/kansas-amber | legacy/Parts/LCD.hs | bsd-3-clause | transmit :: Bool -> LCD -> LCDController -> Word8 -> Arduino ()
transmit mode lcd c val = do
case c of
Hitachi44780{} -> transmitDig mode c val
I2CHitachi44780{} -> transmitI2C mode lcd c val
-- | Transmit data down to the LCD digital writes | 255 | transmit :: Bool -> LCD -> LCDController -> Word8 -> Arduino ()
transmit mode lcd c val = do
case c of
Hitachi44780{} -> transmitDig mode c val
I2CHitachi44780{} -> transmitI2C mode lcd c val
-- | Transmit data down to the LCD digital writes | 255 | transmit mode lcd c val = do
case c of
Hitachi44780{} -> transmitDig mode c val
I2CHitachi44780{} -> transmitI2C mode lcd c val
-- | Transmit data down to the LCD digital writes | 191 | false | true | 0 | 11 | 58 | 91 | 42 | 49 | null | null |
kelnage/tamarin-prover | src/Web/Dispatch.hs | gpl-3.0 | -- | Favicon handler function (favicon.ico).
getFaviconR :: Handler ()
getFaviconR = redirect (StaticR faviconRoute) | 116 | getFaviconR :: Handler ()
getFaviconR = redirect (StaticR faviconRoute) | 71 | getFaviconR = redirect (StaticR faviconRoute) | 45 | true | true | 0 | 7 | 14 | 31 | 14 | 17 | null | null |
ghc-android/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | sumTyConKey = mkPreludeTyConUnique 141 | 40 | sumTyConKey = mkPreludeTyConUnique 141 | 40 | sumTyConKey = mkPreludeTyConUnique 141 | 40 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
samscott89/tamarin-prover | lib/theory/src/Theory.hs | gpl-3.0 | -- | All protocol rules modulo E.
getProtoRuleEsDiff :: Side -> ClosedDiffTheory -> [ProtoRuleE]
getProtoRuleEsDiff s = map openProtoRule . (diffTheorySideRules s) | 163 | getProtoRuleEsDiff :: Side -> ClosedDiffTheory -> [ProtoRuleE]
getProtoRuleEsDiff s = map openProtoRule . (diffTheorySideRules s) | 129 | getProtoRuleEsDiff s = map openProtoRule . (diffTheorySideRules s) | 66 | true | true | 0 | 7 | 21 | 39 | 20 | 19 | null | null |
phillipm/mlish-to-llvm | src/Lexer.hs | bsd-3-clause | integer :: Parser Integer
integer = Tok.integer lexer | 53 | integer :: Parser Integer
integer = Tok.integer lexer | 53 | integer = Tok.integer lexer | 27 | false | true | 0 | 6 | 7 | 24 | 10 | 14 | null | null |
xmonad/xmonad-contrib | XMonad/Hooks/RefocusLast.hs | bsd-3-clause | refocusWhen :: Query Bool -> WorkspaceId -> X (WindowSet -> WindowSet)
refocusWhen p tag = withRecentsIn tag id $ \lw cw -> do
b <- runQuery p cw
return (if b then tryFocusIn tag [cw, lw] else id)
-- | Sends the focused window to the specified workspace, refocusing the last
-- focused window if the predicate holds on the current window. Note that the
-- native version of this, @windows . W.shift@, has a nice property that this
-- does not: shifting a window to another workspace then shifting it back
-- preserves its place in the stack. Can be used in a keybinding like e.g.
--
-- > windows =<< shiftRLWhen refocusingIsActive "3"
--
-- or
--
-- > (windows <=< shiftRLWhen refocusingIsActive) "3"
--
-- where '<=<' is imported from "Control.Monad". | 769 | refocusWhen :: Query Bool -> WorkspaceId -> X (WindowSet -> WindowSet)
refocusWhen p tag = withRecentsIn tag id $ \lw cw -> do
b <- runQuery p cw
return (if b then tryFocusIn tag [cw, lw] else id)
-- | Sends the focused window to the specified workspace, refocusing the last
-- focused window if the predicate holds on the current window. Note that the
-- native version of this, @windows . W.shift@, has a nice property that this
-- does not: shifting a window to another workspace then shifting it back
-- preserves its place in the stack. Can be used in a keybinding like e.g.
--
-- > windows =<< shiftRLWhen refocusingIsActive "3"
--
-- or
--
-- > (windows <=< shiftRLWhen refocusingIsActive) "3"
--
-- where '<=<' is imported from "Control.Monad". | 769 | refocusWhen p tag = withRecentsIn tag id $ \lw cw -> do
b <- runQuery p cw
return (if b then tryFocusIn tag [cw, lw] else id)
-- | Sends the focused window to the specified workspace, refocusing the last
-- focused window if the predicate holds on the current window. Note that the
-- native version of this, @windows . W.shift@, has a nice property that this
-- does not: shifting a window to another workspace then shifting it back
-- preserves its place in the stack. Can be used in a keybinding like e.g.
--
-- > windows =<< shiftRLWhen refocusingIsActive "3"
--
-- or
--
-- > (windows <=< shiftRLWhen refocusingIsActive) "3"
--
-- where '<=<' is imported from "Control.Monad". | 698 | false | true | 0 | 13 | 150 | 106 | 59 | 47 | null | null |
unisonweb/platform | unison-core/src/Unison/Var.hs | mit | rawName :: Type -> Text
rawName typ = case typ of
User n -> n
Inference Ability -> "𝕖"
Inference Input -> "𝕒"
Inference Output -> "𝕣"
Inference Other -> "𝕩"
Inference PatternPureE -> "𝕞"
Inference PatternPureV -> "𝕧"
Inference PatternBindE -> "𝕞"
Inference PatternBindV -> "𝕧"
Inference TypeConstructor -> "𝕗"
Inference TypeConstructorArg -> "𝕦"
MissingResult -> "_"
Blank -> "_"
Eta -> "_eta"
ANFBlank -> "_anf"
Float -> "_float"
Pattern -> "_pattern"
Irrelevant -> "_irrelevant"
UnnamedWatch k guid -> fromString k <> "." <> guid | 569 | rawName :: Type -> Text
rawName typ = case typ of
User n -> n
Inference Ability -> "𝕖"
Inference Input -> "𝕒"
Inference Output -> "𝕣"
Inference Other -> "𝕩"
Inference PatternPureE -> "𝕞"
Inference PatternPureV -> "𝕧"
Inference PatternBindE -> "𝕞"
Inference PatternBindV -> "𝕧"
Inference TypeConstructor -> "𝕗"
Inference TypeConstructorArg -> "𝕦"
MissingResult -> "_"
Blank -> "_"
Eta -> "_eta"
ANFBlank -> "_anf"
Float -> "_float"
Pattern -> "_pattern"
Irrelevant -> "_irrelevant"
UnnamedWatch k guid -> fromString k <> "." <> guid | 569 | rawName typ = case typ of
User n -> n
Inference Ability -> "𝕖"
Inference Input -> "𝕒"
Inference Output -> "𝕣"
Inference Other -> "𝕩"
Inference PatternPureE -> "𝕞"
Inference PatternPureV -> "𝕧"
Inference PatternBindE -> "𝕞"
Inference PatternBindV -> "𝕧"
Inference TypeConstructor -> "𝕗"
Inference TypeConstructorArg -> "𝕦"
MissingResult -> "_"
Blank -> "_"
Eta -> "_eta"
ANFBlank -> "_anf"
Float -> "_float"
Pattern -> "_pattern"
Irrelevant -> "_irrelevant"
UnnamedWatch k guid -> fromString k <> "." <> guid | 545 | false | true | 0 | 10 | 123 | 191 | 87 | 104 | null | null |
omefire/lens | tests/templates.hs | bsd-3-clause | -- class HasNucleosis t where
-- nucleosis :: Simple Lens t Nucleosis
-- instance HasNucleosis Nucleosis
checkNucleosis :: HasNucleosis t => Lens' t Nucleosis
checkNucleosis = nucleosis | 188 | checkNucleosis :: HasNucleosis t => Lens' t Nucleosis
checkNucleosis = nucleosis | 80 | checkNucleosis = nucleosis | 26 | true | true | 0 | 6 | 29 | 26 | 14 | 12 | null | null |
ezyang/ghc | testsuite/tests/rename/should_fail/T13847.hs | bsd-3-clause | main = print $ A.foo $ A.A { foo = () } | 39 | main = print $ A.foo $ A.A { foo = () } | 39 | main = print $ A.foo $ A.A { foo = () } | 39 | false | false | 0 | 8 | 11 | 28 | 15 | 13 | null | null |
DanielRS/marquee | src/Text/Marquee/Parser/Common.hs | mit | isPrintable :: Char -> Bool
isPrintable = not . isSpace | 55 | isPrintable :: Char -> Bool
isPrintable = not . isSpace | 55 | isPrintable = not . isSpace | 27 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
jbracker/supermonad-plugin | src/Control/Super/Plugin/Collection/Map.hs | bsd-3-clause | -- | Remove the entry with the given key, if it exists.
delete :: Uniquable k => k -> Map k a -> Map k a
delete k m = Map $ U.delFromUFM (unMap m) k | 148 | delete :: Uniquable k => k -> Map k a -> Map k a
delete k m = Map $ U.delFromUFM (unMap m) k | 92 | delete k m = Map $ U.delFromUFM (unMap m) k | 43 | true | true | 2 | 9 | 35 | 65 | 29 | 36 | null | null |
liyang/thyme | src/Data/Thyme/LocalTime.hs | bsd-3-clause | zonedTime :: Iso' (TimeZone, UTCTime) ZonedTime
zonedTime = iso toZoned fromZoned where
{-# INLINE toZoned #-}
toZoned :: (TimeZone, UTCTime) -> ZonedTime
toZoned (tz, time) = ZonedTime (time ^. utcLocalTime tz) tz
{-# INLINE fromZoned #-}
fromZoned :: ZonedTime -> (TimeZone, UTCTime)
fromZoned (ZonedTime lt tz) = (tz, utcLocalTime tz # lt)
#if SHOW_INTERNAL | 387 | zonedTime :: Iso' (TimeZone, UTCTime) ZonedTime
zonedTime = iso toZoned fromZoned where
{-# INLINE toZoned #-}
toZoned :: (TimeZone, UTCTime) -> ZonedTime
toZoned (tz, time) = ZonedTime (time ^. utcLocalTime tz) tz
{-# INLINE fromZoned #-}
fromZoned :: ZonedTime -> (TimeZone, UTCTime)
fromZoned (ZonedTime lt tz) = (tz, utcLocalTime tz # lt)
#if SHOW_INTERNAL | 387 | zonedTime = iso toZoned fromZoned where
{-# INLINE toZoned #-}
toZoned :: (TimeZone, UTCTime) -> ZonedTime
toZoned (tz, time) = ZonedTime (time ^. utcLocalTime tz) tz
{-# INLINE fromZoned #-}
fromZoned :: ZonedTime -> (TimeZone, UTCTime)
fromZoned (ZonedTime lt tz) = (tz, utcLocalTime tz # lt)
#if SHOW_INTERNAL | 339 | false | true | 0 | 8 | 80 | 136 | 69 | 67 | null | null |
lukexi/ghc | compiler/main/DynFlags.hs | bsd-3-clause | unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
unSetGeneralFlag' f dflags = gopt_unset dflags f | 105 | unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
unSetGeneralFlag' f dflags = gopt_unset dflags f | 105 | unSetGeneralFlag' f dflags = gopt_unset dflags f | 48 | false | true | 0 | 6 | 13 | 33 | 15 | 18 | null | null |
melted/idris-chez | src/Chez/Operators.hs | isc | compileOp (LXOr ITChar) xs = charOp "bitwise-xor" xs | 52 | compileOp (LXOr ITChar) xs = charOp "bitwise-xor" xs | 52 | compileOp (LXOr ITChar) xs = charOp "bitwise-xor" xs | 52 | false | false | 1 | 7 | 7 | 24 | 10 | 14 | null | null |
themoritz/cabal | Cabal/Distribution/PackageDescription/PrettyPrint.hs | bsd-3-clause | ppPackageDescription :: PackageDescription -> Doc
ppPackageDescription pd = ppFields pkgDescrFieldDescrs pd
$+$ ppCustomFields (customFieldsPD pd)
$+$ ppSourceRepos (sourceRepos pd) | 299 | ppPackageDescription :: PackageDescription -> Doc
ppPackageDescription pd = ppFields pkgDescrFieldDescrs pd
$+$ ppCustomFields (customFieldsPD pd)
$+$ ppSourceRepos (sourceRepos pd) | 299 | ppPackageDescription pd = ppFields pkgDescrFieldDescrs pd
$+$ ppCustomFields (customFieldsPD pd)
$+$ ppSourceRepos (sourceRepos pd) | 249 | false | true | 0 | 9 | 136 | 49 | 23 | 26 | null | null |
termite2/tsl | Frontend/Grammar.hs | bsd-3-clause | sassign = SAssign nopos Nothing <$ isassign <*> detexpr <* reservedOp "=" <*> expr
where isassign = try $ lookAhead $ expr *> symbol "=" | 142 | sassign = SAssign nopos Nothing <$ isassign <*> detexpr <* reservedOp "=" <*> expr
where isassign = try $ lookAhead $ expr *> symbol "=" | 142 | sassign = SAssign nopos Nothing <$ isassign <*> detexpr <* reservedOp "=" <*> expr
where isassign = try $ lookAhead $ expr *> symbol "=" | 142 | false | false | 0 | 9 | 30 | 53 | 25 | 28 | null | null |
takenobu-hs/processor-creative-kit | Language/Pck/Cpu/Execution.hs | bsd-3-clause | movpc :: GReg -> EvalCpu ResultStat
movpc reg = do pc <- readPc
updateGReg reg pc
incPc
-- load and store | 136 | movpc :: GReg -> EvalCpu ResultStat
movpc reg = do pc <- readPc
updateGReg reg pc
incPc
-- load and store | 136 | movpc reg = do pc <- readPc
updateGReg reg pc
incPc
-- load and store | 100 | false | true | 0 | 7 | 51 | 45 | 19 | 26 | null | null |
ibizaman/t411-hs | src/Types/Torrent.hs | bsd-3-clause | queryFromIntermediate :: IntermediateQueryResult -> QueryResult
queryFromIntermediate intermediate =
let makeTorrent i =
Torrent (read $ id_ i)
(name_ i)
(read $ category_ i)
(read $ seeders_ i)
(read $ leechers_ i)
(read $ comments_ i)
(if isVerified_ i == "0" then False else True)
(read $ added_ i)
(read $ size_ i)
(read $ times_completed_ i)
(read $ owner_ i)
(categoryName_ i)
(categoryImage_ i)
(username_ i)
(privacy_ i)
in QueryResult (query_ intermediate)
(read $ total_ intermediate)
(read $ offset_ intermediate)
(read $ limit_ intermediate)
(map makeTorrent $ torrents_ intermediate) | 972 | queryFromIntermediate :: IntermediateQueryResult -> QueryResult
queryFromIntermediate intermediate =
let makeTorrent i =
Torrent (read $ id_ i)
(name_ i)
(read $ category_ i)
(read $ seeders_ i)
(read $ leechers_ i)
(read $ comments_ i)
(if isVerified_ i == "0" then False else True)
(read $ added_ i)
(read $ size_ i)
(read $ times_completed_ i)
(read $ owner_ i)
(categoryName_ i)
(categoryImage_ i)
(username_ i)
(privacy_ i)
in QueryResult (query_ intermediate)
(read $ total_ intermediate)
(read $ offset_ intermediate)
(read $ limit_ intermediate)
(map makeTorrent $ torrents_ intermediate) | 972 | queryFromIntermediate intermediate =
let makeTorrent i =
Torrent (read $ id_ i)
(name_ i)
(read $ category_ i)
(read $ seeders_ i)
(read $ leechers_ i)
(read $ comments_ i)
(if isVerified_ i == "0" then False else True)
(read $ added_ i)
(read $ size_ i)
(read $ times_completed_ i)
(read $ owner_ i)
(categoryName_ i)
(categoryImage_ i)
(username_ i)
(privacy_ i)
in QueryResult (query_ intermediate)
(read $ total_ intermediate)
(read $ offset_ intermediate)
(read $ limit_ intermediate)
(map makeTorrent $ torrents_ intermediate) | 908 | false | true | 0 | 13 | 464 | 261 | 129 | 132 | null | null |
ipuustin/propositional-planning | AI/Planning/SatPlan.hs | bsd-3-clause | findSuccessors :: [Action] -> [Expr] -> Int -> Maybe Expr
findSuccessors as fs t = let
axioms = foldl getFluentAxiom [] fs
getFluentAxiom acc f = createSuccessorStateAxiom f (doers f) (undoers f) t :acc
doers f = filter (hasInEffects f) as
undoers f = filter (hasInEffects $ cnfReplace $ Negation f) as
hasInEffects f a = f `elem` effects a -- FIXME: do a tautology check? benchmark?
-- hasInEffects f a = any isTautology $ map (\x -> Biconditional x f) $ effects a
in
gatherConjunction axioms | 567 | findSuccessors :: [Action] -> [Expr] -> Int -> Maybe Expr
findSuccessors as fs t = let
axioms = foldl getFluentAxiom [] fs
getFluentAxiom acc f = createSuccessorStateAxiom f (doers f) (undoers f) t :acc
doers f = filter (hasInEffects f) as
undoers f = filter (hasInEffects $ cnfReplace $ Negation f) as
hasInEffects f a = f `elem` effects a -- FIXME: do a tautology check? benchmark?
-- hasInEffects f a = any isTautology $ map (\x -> Biconditional x f) $ effects a
in
gatherConjunction axioms | 567 | findSuccessors as fs t = let
axioms = foldl getFluentAxiom [] fs
getFluentAxiom acc f = createSuccessorStateAxiom f (doers f) (undoers f) t :acc
doers f = filter (hasInEffects f) as
undoers f = filter (hasInEffects $ cnfReplace $ Negation f) as
hasInEffects f a = f `elem` effects a -- FIXME: do a tautology check? benchmark?
-- hasInEffects f a = any isTautology $ map (\x -> Biconditional x f) $ effects a
in
gatherConjunction axioms | 509 | false | true | 0 | 12 | 160 | 168 | 82 | 86 | null | null |
flyrry/phonypony | src/Vindinium/Runner/Tileset.hs | mit | loadTexture :: SDL.Renderer -> FilePath -> IO SDL.Texture
loadTexture renderer path = do
filePath <- getDataFileName path
Image.imgLoadTexture renderer filePath >>= catchRisky | 183 | loadTexture :: SDL.Renderer -> FilePath -> IO SDL.Texture
loadTexture renderer path = do
filePath <- getDataFileName path
Image.imgLoadTexture renderer filePath >>= catchRisky | 183 | loadTexture renderer path = do
filePath <- getDataFileName path
Image.imgLoadTexture renderer filePath >>= catchRisky | 125 | false | true | 0 | 9 | 29 | 60 | 26 | 34 | null | null |
olorin/amazonka | amazonka-s3/gen/Network/AWS/S3/Types/Product.hs | mpl-2.0 | -- | The class of storage used to store the object.
ovStorageClass :: Lens' ObjectVersion (Maybe ObjectVersionStorageClass)
ovStorageClass = lens _ovStorageClass (\ s a -> s{_ovStorageClass = a}) | 195 | ovStorageClass :: Lens' ObjectVersion (Maybe ObjectVersionStorageClass)
ovStorageClass = lens _ovStorageClass (\ s a -> s{_ovStorageClass = a}) | 143 | ovStorageClass = lens _ovStorageClass (\ s a -> s{_ovStorageClass = a}) | 71 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
thalerjonathan/phd | coding/libraries/chimera/examples/ABS/SIRExamples/SIR/Main.hs | gpl-3.0 | -- TODO: repair
runSIRStepsAndWriteToFile :: IO ()
runSIRStepsAndWriteToFile = do
params <- initSimulation updateStrat Nothing Nothing shuffleAgents (Just rngSeed)
(initAdefs, initEnv) <- createSIRNumInfected agentCount numInfected
let dynamics = simulateAggregateTime initAdefs initEnv params dt t aggregate
let fileName = "sirDynamics_"
++ show agentCount ++ "agents_"
++ show t ++ "time_"
++ show dt ++ "dt_"
++ show updateStrat ++ ".m"
writeSirDynamicsFile fileName dt 0 dynamics
-------------------------------------------------------------------------------
-- UTILS
------------------------------------------------------------------------------- | 740 | runSIRStepsAndWriteToFile :: IO ()
runSIRStepsAndWriteToFile = do
params <- initSimulation updateStrat Nothing Nothing shuffleAgents (Just rngSeed)
(initAdefs, initEnv) <- createSIRNumInfected agentCount numInfected
let dynamics = simulateAggregateTime initAdefs initEnv params dt t aggregate
let fileName = "sirDynamics_"
++ show agentCount ++ "agents_"
++ show t ++ "time_"
++ show dt ++ "dt_"
++ show updateStrat ++ ".m"
writeSirDynamicsFile fileName dt 0 dynamics
-------------------------------------------------------------------------------
-- UTILS
------------------------------------------------------------------------------- | 723 | runSIRStepsAndWriteToFile = do
params <- initSimulation updateStrat Nothing Nothing shuffleAgents (Just rngSeed)
(initAdefs, initEnv) <- createSIRNumInfected agentCount numInfected
let dynamics = simulateAggregateTime initAdefs initEnv params dt t aggregate
let fileName = "sirDynamics_"
++ show agentCount ++ "agents_"
++ show t ++ "time_"
++ show dt ++ "dt_"
++ show updateStrat ++ ".m"
writeSirDynamicsFile fileName dt 0 dynamics
-------------------------------------------------------------------------------
-- UTILS
------------------------------------------------------------------------------- | 688 | true | true | 0 | 19 | 155 | 155 | 72 | 83 | null | null |
mettekou/ghc | compiler/types/Coercion.hs | bsd-3-clause | liftCoSubstVarBndr :: LiftingContext -> TyVar
-> (LiftingContext, TyVar, Coercion)
liftCoSubstVarBndr lc tv
= let (lc', tv', h, _) = liftCoSubstVarBndrCallback callback lc tv in
(lc', tv', h)
where
callback lc' ty' = (ty_co_subst lc' Nominal ty', ())
-- the callback must produce a nominal coercion | 330 | liftCoSubstVarBndr :: LiftingContext -> TyVar
-> (LiftingContext, TyVar, Coercion)
liftCoSubstVarBndr lc tv
= let (lc', tv', h, _) = liftCoSubstVarBndrCallback callback lc tv in
(lc', tv', h)
where
callback lc' ty' = (ty_co_subst lc' Nominal ty', ())
-- the callback must produce a nominal coercion | 330 | liftCoSubstVarBndr lc tv
= let (lc', tv', h, _) = liftCoSubstVarBndrCallback callback lc tv in
(lc', tv', h)
where
callback lc' ty' = (ty_co_subst lc' Nominal ty', ())
-- the callback must produce a nominal coercion | 228 | false | true | 0 | 9 | 76 | 101 | 55 | 46 | null | null |
NicolasT/kontiki | bin/udp.hs | bsd-3-clause | newPlumbingState :: Map NodeId (RollingQueue (Message Value)) -> IO PlumbingState
newPlumbingState channels = do
et <- Timer.newIO
ht <- Timer.newIO
q <- RollingQueue.newIO queueSize
return $ PS { psElectionTimer = et
, psHeartbeatTimer = ht
, psMessages = q
, psChannels = channels
, psLog = MemLog.empty
, psCommitIndex = index0
} | 445 | newPlumbingState :: Map NodeId (RollingQueue (Message Value)) -> IO PlumbingState
newPlumbingState channels = do
et <- Timer.newIO
ht <- Timer.newIO
q <- RollingQueue.newIO queueSize
return $ PS { psElectionTimer = et
, psHeartbeatTimer = ht
, psMessages = q
, psChannels = channels
, psLog = MemLog.empty
, psCommitIndex = index0
} | 445 | newPlumbingState channels = do
et <- Timer.newIO
ht <- Timer.newIO
q <- RollingQueue.newIO queueSize
return $ PS { psElectionTimer = et
, psHeartbeatTimer = ht
, psMessages = q
, psChannels = channels
, psLog = MemLog.empty
, psCommitIndex = index0
} | 363 | false | true | 0 | 10 | 164 | 115 | 60 | 55 | null | null |
snoyberg/yesodwiki | config/Settings.hs | bsd-2-clause | toCassiusFile x = "cassius/" ++ x ++ ".cassius" | 47 | toCassiusFile x = "cassius/" ++ x ++ ".cassius" | 47 | toCassiusFile x = "cassius/" ++ x ++ ".cassius" | 47 | false | false | 0 | 6 | 7 | 17 | 8 | 9 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/base/Data/ByteString.hs | bsd-3-clause | -- | /O(n)/, where /n/ is the length of the result. The 'unfoldr'
-- function is analogous to the List \'unfoldr\'. 'unfoldr' builds a
-- ByteString from a seed value. The function takes the element and
-- returns 'Nothing' if it is done producing the ByteString or returns
-- 'Just' @(a,b)@, in which case, @a@ is the next byte in the string,
-- and @b@ is the seed value for further production.
--
-- Examples:
--
-- > unfoldr (\x -> if x <= 5 then Just (x, x + 1) else Nothing) 0
-- > == pack [0, 1, 2, 3, 4, 5]
--
unfoldr :: (a -> Maybe (Word8, a)) -> a -> ByteString
unfoldr f = concat . unfoldChunk 32 64
where unfoldChunk n n' x =
case unfoldrN n f x of
(s, Nothing) -> s : []
(s, Just x') -> s : unfoldChunk n' (n+n') x'
-- | /O(n)/ Like 'unfoldr', 'unfoldrN' builds a ByteString from a seed
-- value. However, the length of the result is limited by the first
-- argument to 'unfoldrN'. This function is more efficient than 'unfoldr'
-- when the maximum length of the result is known.
--
-- The following equation relates 'unfoldrN' and 'unfoldr':
--
-- > unfoldrN n f s == take n (unfoldr f s)
-- | 1,155 | unfoldr :: (a -> Maybe (Word8, a)) -> a -> ByteString
unfoldr f = concat . unfoldChunk 32 64
where unfoldChunk n n' x =
case unfoldrN n f x of
(s, Nothing) -> s : []
(s, Just x') -> s : unfoldChunk n' (n+n') x'
-- | /O(n)/ Like 'unfoldr', 'unfoldrN' builds a ByteString from a seed
-- value. However, the length of the result is limited by the first
-- argument to 'unfoldrN'. This function is more efficient than 'unfoldr'
-- when the maximum length of the result is known.
--
-- The following equation relates 'unfoldrN' and 'unfoldr':
--
-- > unfoldrN n f s == take n (unfoldr f s)
-- | 626 | unfoldr f = concat . unfoldChunk 32 64
where unfoldChunk n n' x =
case unfoldrN n f x of
(s, Nothing) -> s : []
(s, Just x') -> s : unfoldChunk n' (n+n') x'
-- | /O(n)/ Like 'unfoldr', 'unfoldrN' builds a ByteString from a seed
-- value. However, the length of the result is limited by the first
-- argument to 'unfoldrN'. This function is more efficient than 'unfoldr'
-- when the maximum length of the result is known.
--
-- The following equation relates 'unfoldrN' and 'unfoldr':
--
-- > unfoldrN n f s == take n (unfoldr f s)
-- | 572 | true | true | 0 | 11 | 270 | 144 | 84 | 60 | null | null |
MichielDerhaeg/stack | src/Data/Aeson/Extended.hs | bsd-3-clause | -- | 'WarningParser' version of @.:?@.
(..:?)
:: FromJSON a
=> Object -> Text -> WarningParser (Maybe a)
o ..:? k = tellJSONField k >> lift (o .:? k) | 157 | (..:?)
:: FromJSON a
=> Object -> Text -> WarningParser (Maybe a)
o ..:? k = tellJSONField k >> lift (o .:? k) | 118 | o ..:? k = tellJSONField k >> lift (o .:? k) | 44 | true | true | 0 | 12 | 36 | 64 | 31 | 33 | null | null |
phischu/fragnix | builtins/base/GHC.Conc.Windows.hs | bsd-3-clause | win32ConsoleHandler :: MVar (ConsoleEvent -> IO ())
win32ConsoleHandler = unsafePerformIO (newMVar (errorWithoutStackTrace "win32ConsoleHandler")) | 146 | win32ConsoleHandler :: MVar (ConsoleEvent -> IO ())
win32ConsoleHandler = unsafePerformIO (newMVar (errorWithoutStackTrace "win32ConsoleHandler")) | 146 | win32ConsoleHandler = unsafePerformIO (newMVar (errorWithoutStackTrace "win32ConsoleHandler")) | 94 | false | true | 0 | 9 | 12 | 41 | 20 | 21 | null | null |
alexander-at-github/eta | compiler/ETA/Main/HscMain.hs | bsd-3-clause | clearWarnings :: Hsc ()
clearWarnings = Hsc $ \_ _ -> return ((), emptyBag) | 75 | clearWarnings :: Hsc ()
clearWarnings = Hsc $ \_ _ -> return ((), emptyBag) | 75 | clearWarnings = Hsc $ \_ _ -> return ((), emptyBag) | 51 | false | true | 2 | 8 | 13 | 44 | 21 | 23 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/type-level/2018-06-csongor-kiss-higher-order-type-level/HOTL.hs | unlicense | safeHead :: Vector ('Succ n) a -> a
safeHead (VCons x _xs) = x | 62 | safeHead :: Vector ('Succ n) a -> a
safeHead (VCons x _xs) = x | 62 | safeHead (VCons x _xs) = x | 26 | false | true | 0 | 9 | 13 | 39 | 19 | 20 | null | null |
seliopou/typo | Language/Typo/Compiler/Definition.hs | bsd-3-clause | mkClassInst ctxts name args result =
InstanceD ctxts (foldl AppT (ConT (mkCName name)) (args ++ [result])) [] | 111 | mkClassInst ctxts name args result =
InstanceD ctxts (foldl AppT (ConT (mkCName name)) (args ++ [result])) [] | 111 | mkClassInst ctxts name args result =
InstanceD ctxts (foldl AppT (ConT (mkCName name)) (args ++ [result])) [] | 111 | false | false | 0 | 11 | 18 | 56 | 28 | 28 | null | null |
cblp/crdt | crdt-test/test/Cv/RGA.hs | bsd-3-clause | prop_fromString_pack s pid = expectRight $ do
v <- runLamportClockSim . runProcessSim pid $ fromString s
pure $ case pack v of
[(LamportTime _ pid', atoms)] -> atoms === s .&&. pid' === pid
[] -> s === ""
p -> fail $ "cannot pack " ++ show p | 328 | prop_fromString_pack s pid = expectRight $ do
v <- runLamportClockSim . runProcessSim pid $ fromString s
pure $ case pack v of
[(LamportTime _ pid', atoms)] -> atoms === s .&&. pid' === pid
[] -> s === ""
p -> fail $ "cannot pack " ++ show p | 328 | prop_fromString_pack s pid = expectRight $ do
v <- runLamportClockSim . runProcessSim pid $ fromString s
pure $ case pack v of
[(LamportTime _ pid', atoms)] -> atoms === s .&&. pid' === pid
[] -> s === ""
p -> fail $ "cannot pack " ++ show p | 328 | false | false | 0 | 14 | 135 | 111 | 53 | 58 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeInstanceStatus.hs | mpl-2.0 | -- | The maximum number of results to return for the request in a single page. The
-- remaining results of the initial request can be seen by sending another
-- request with the returned 'NextToken' value. This value can be between 5 and
-- 1000; if 'MaxResults' is given a value larger than 1000, only 1000 results are
-- returned. You cannot specify this parameter and the instance IDs parameter in
-- the same request.
disMaxResults :: Lens' DescribeInstanceStatus (Maybe Int)
disMaxResults = lens _disMaxResults (\s a -> s { _disMaxResults = a }) | 550 | disMaxResults :: Lens' DescribeInstanceStatus (Maybe Int)
disMaxResults = lens _disMaxResults (\s a -> s { _disMaxResults = a }) | 128 | disMaxResults = lens _disMaxResults (\s a -> s { _disMaxResults = a }) | 70 | true | true | 0 | 9 | 94 | 51 | 30 | 21 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/utils/Outputable.hs | bsd-3-clause | alwaysQualifyPackages :: QueryQualifyPackage
alwaysQualifyPackages _ = True | 75 | alwaysQualifyPackages :: QueryQualifyPackage
alwaysQualifyPackages _ = True | 75 | alwaysQualifyPackages _ = True | 30 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
leshchevds/ganeti | src/Ganeti/Luxi.hs | bsd-2-clause | -- | Prepare resulting output as parsers expect it.
extractArray :: (Monad m) => JSValue -> m [[(JSValue, JSValue)]]
extractArray v =
getData v >>= parseQueryResult | 166 | extractArray :: (Monad m) => JSValue -> m [[(JSValue, JSValue)]]
extractArray v =
getData v >>= parseQueryResult | 114 | extractArray v =
getData v >>= parseQueryResult | 49 | true | true | 0 | 10 | 27 | 50 | 27 | 23 | null | null |
mcschroeder/ghc | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | pragInlD :: Name -> Inline -> RuleMatch -> Phases -> DecQ
pragInlD name inline rm phases
= return $ PragmaD $ InlineP name inline rm phases | 141 | pragInlD :: Name -> Inline -> RuleMatch -> Phases -> DecQ
pragInlD name inline rm phases
= return $ PragmaD $ InlineP name inline rm phases | 141 | pragInlD name inline rm phases
= return $ PragmaD $ InlineP name inline rm phases | 83 | false | true | 4 | 10 | 27 | 60 | 27 | 33 | null | null |
trskop/cabal | Cabal/Distribution/Simple/PreProcess.hs | bsd-3-clause | ppCpphs :: [String] -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppCpphs extraArgs _bi lbi =
PreProcessor {
platformIndependent = False,
runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do
(cpphsProg, cpphsVersion, _) <- requireProgramVersion verbosity
cpphsProgram anyVersion (withPrograms lbi)
rawSystemProgram verbosity cpphsProg $
("-O" ++ outFile) : inFile
: "--noline" : "--strip"
: (if cpphsVersion >= Version [1,6] []
then ["--include="++ (autogenModulesDir lbi </> cppHeaderName)]
else [])
++ extraArgs
} | 660 | ppCpphs :: [String] -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppCpphs extraArgs _bi lbi =
PreProcessor {
platformIndependent = False,
runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do
(cpphsProg, cpphsVersion, _) <- requireProgramVersion verbosity
cpphsProgram anyVersion (withPrograms lbi)
rawSystemProgram verbosity cpphsProg $
("-O" ++ outFile) : inFile
: "--noline" : "--strip"
: (if cpphsVersion >= Version [1,6] []
then ["--include="++ (autogenModulesDir lbi </> cppHeaderName)]
else [])
++ extraArgs
} | 660 | ppCpphs extraArgs _bi lbi =
PreProcessor {
platformIndependent = False,
runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do
(cpphsProg, cpphsVersion, _) <- requireProgramVersion verbosity
cpphsProgram anyVersion (withPrograms lbi)
rawSystemProgram verbosity cpphsProg $
("-O" ++ outFile) : inFile
: "--noline" : "--strip"
: (if cpphsVersion >= Version [1,6] []
then ["--include="++ (autogenModulesDir lbi </> cppHeaderName)]
else [])
++ extraArgs
} | 593 | false | true | 0 | 19 | 192 | 177 | 94 | 83 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The resourceId object contains information that identifies the resource
-- associated with the comment.
acdcResourceId :: Lens' ActivityContentDetailsComment (Maybe ResourceId)
acdcResourceId
= lens _acdcResourceId
(\ s a -> s{_acdcResourceId = a}) | 261 | acdcResourceId :: Lens' ActivityContentDetailsComment (Maybe ResourceId)
acdcResourceId
= lens _acdcResourceId
(\ s a -> s{_acdcResourceId = a}) | 152 | acdcResourceId
= lens _acdcResourceId
(\ s a -> s{_acdcResourceId = a}) | 79 | true | true | 0 | 9 | 40 | 49 | 26 | 23 | null | null |
emmanueltouzery/cigale-timesheet | tests/HgSpec.hs | mit | testUsualCommit :: Spec
testUsualCommit = it "parses usual commits" $ do
let source = [strCrT|
2012-12-17 17:24 +0100
auth filtering
--->>>
_poc/helloplay/app/controllers/Global.scala _poc/helloplay/app/controllers/NeedSecured.scala _poc/helloplay/app/views/login.scala.html _poc/helloplay/conf/routes
--->>>
|]
let expected = Commit
{
commitDate = LocalTime (fromGregorian 2012 12 17) (TimeOfDay 17 24 0),
commitDesc = "auth filtering\n",
commitFiles = ["_poc/helloplay/app/controllers/Global.scala", "_poc/helloplay/app/controllers/NeedSecured.scala", "_poc/helloplay/app/views/login.scala.html", "_poc/helloplay/conf/routes"]
}
testParsecExpectVal source parseCommit expected | 901 | testUsualCommit :: Spec
testUsualCommit = it "parses usual commits" $ do
let source = [strCrT|
2012-12-17 17:24 +0100
auth filtering
--->>>
_poc/helloplay/app/controllers/Global.scala _poc/helloplay/app/controllers/NeedSecured.scala _poc/helloplay/app/views/login.scala.html _poc/helloplay/conf/routes
--->>>
|]
let expected = Commit
{
commitDate = LocalTime (fromGregorian 2012 12 17) (TimeOfDay 17 24 0),
commitDesc = "auth filtering\n",
commitFiles = ["_poc/helloplay/app/controllers/Global.scala", "_poc/helloplay/app/controllers/NeedSecured.scala", "_poc/helloplay/app/views/login.scala.html", "_poc/helloplay/conf/routes"]
}
testParsecExpectVal source parseCommit expected | 901 | testUsualCommit = it "parses usual commits" $ do
let source = [strCrT|
2012-12-17 17:24 +0100
auth filtering
--->>>
_poc/helloplay/app/controllers/Global.scala _poc/helloplay/app/controllers/NeedSecured.scala _poc/helloplay/app/views/login.scala.html _poc/helloplay/conf/routes
--->>>
|]
let expected = Commit
{
commitDate = LocalTime (fromGregorian 2012 12 17) (TimeOfDay 17 24 0),
commitDesc = "auth filtering\n",
commitFiles = ["_poc/helloplay/app/controllers/Global.scala", "_poc/helloplay/app/controllers/NeedSecured.scala", "_poc/helloplay/app/views/login.scala.html", "_poc/helloplay/conf/routes"]
}
testParsecExpectVal source parseCommit expected | 877 | false | true | 0 | 15 | 280 | 107 | 58 | 49 | null | null |
TheLastBanana/Churro | Churro/Interpreter.hs | mit | {-
Print a data error
-}
dataError :: Integer -> ChurroState ChurroReturn
dataError location =
do{ liftIO $ putStrLn ("Data error: memory location "
++ (show location)
++ " is out of bounds")
; return Abort
} | 282 | dataError :: Integer -> ChurroState ChurroReturn
dataError location =
do{ liftIO $ putStrLn ("Data error: memory location "
++ (show location)
++ " is out of bounds")
; return Abort
} | 253 | dataError location =
do{ liftIO $ putStrLn ("Data error: memory location "
++ (show location)
++ " is out of bounds")
; return Abort
} | 204 | true | true | 0 | 14 | 110 | 63 | 30 | 33 | null | null |
sorpaas/munje | src/Munje/Parser.hs | mit | definitionLine :: IParser [Exposed]
definitionLine = do
string "define"
spaces
b <- aSelbri `sepBy` (do
char ','
spaces)
spaces
return b | 200 | definitionLine :: IParser [Exposed]
definitionLine = do
string "define"
spaces
b <- aSelbri `sepBy` (do
char ','
spaces)
spaces
return b | 200 | definitionLine = do
string "define"
spaces
b <- aSelbri `sepBy` (do
char ','
spaces)
spaces
return b | 164 | false | true | 0 | 12 | 84 | 61 | 27 | 34 | null | null |
jlamothe/passman | test/Spec/JSON.hs | lgpl-3.0 | baz :: PWData
(baz, _) = newPWData g'' | 38 | baz :: PWData
(baz, _) = newPWData g'' | 38 | (baz, _) = newPWData g'' | 24 | false | true | 1 | 5 | 7 | 24 | 11 | 13 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.Prim.hs | bsd-3-clause | writeWordArray# :: MutableByteArray# s -> Int# -> Word# -> State# s -> State# s
writeWordArray# = writeWordArray# | 113 | writeWordArray# :: MutableByteArray# s -> Int# -> Word# -> State# s -> State# s
writeWordArray# = writeWordArray# | 113 | writeWordArray# = writeWordArray# | 33 | false | true | 0 | 9 | 16 | 36 | 17 | 19 | null | null |
energyflowanalysis/efa-2.1 | attic/src/EFA2/Topology/Topology2.hs | bsd-3-clause | mwhen False _ = mempty | 22 | mwhen False _ = mempty | 22 | mwhen False _ = mempty | 22 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
AlexanderPankiv/ghc | compiler/codeGen/StgCmmUtils.hs | bsd-3-clause | newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
-- Choose suitable local regs to use for the components
-- of an unboxed tuple that we are about to return to
-- the Sequel. If the Sequel is a join point, using the
-- regs it wants will save later assignments.
newUnboxedTupleRegs res_ty
= ASSERT( isUnboxedTupleType res_ty )
do { dflags <- getDynFlags
; sequel <- getSequel
; regs <- choose_regs dflags sequel
; ASSERT( regs `equalLength` reps )
return (regs, map primRepForeignHint reps) }
where
UbxTupleRep ty_args = repType res_ty
reps = [ rep
| ty <- ty_args
, let rep = typePrimRep ty
, not (isVoidRep rep) ]
choose_regs _ (AssignTo regs _) = return regs
choose_regs dflags _ = mapM (newTemp . primRepCmmType dflags) reps
-------------------------------------------------------------------------
-- emitMultiAssign
------------------------------------------------------------------------- | 1,022 | newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
newUnboxedTupleRegs res_ty
= ASSERT( isUnboxedTupleType res_ty )
do { dflags <- getDynFlags
; sequel <- getSequel
; regs <- choose_regs dflags sequel
; ASSERT( regs `equalLength` reps )
return (regs, map primRepForeignHint reps) }
where
UbxTupleRep ty_args = repType res_ty
reps = [ rep
| ty <- ty_args
, let rep = typePrimRep ty
, not (isVoidRep rep) ]
choose_regs _ (AssignTo regs _) = return regs
choose_regs dflags _ = mapM (newTemp . primRepCmmType dflags) reps
-------------------------------------------------------------------------
-- emitMultiAssign
------------------------------------------------------------------------- | 809 | newUnboxedTupleRegs res_ty
= ASSERT( isUnboxedTupleType res_ty )
do { dflags <- getDynFlags
; sequel <- getSequel
; regs <- choose_regs dflags sequel
; ASSERT( regs `equalLength` reps )
return (regs, map primRepForeignHint reps) }
where
UbxTupleRep ty_args = repType res_ty
reps = [ rep
| ty <- ty_args
, let rep = typePrimRep ty
, not (isVoidRep rep) ]
choose_regs _ (AssignTo regs _) = return regs
choose_regs dflags _ = mapM (newTemp . primRepCmmType dflags) reps
-------------------------------------------------------------------------
-- emitMultiAssign
------------------------------------------------------------------------- | 744 | true | true | 1 | 10 | 241 | 219 | 111 | 108 | null | null |
ctford/Idris-Elba-dev | src/IRTS/CodegenLLVM.hs | bsd-3-clause | cgConst' (TT.B32 i) = C.Int 32 (fromIntegral i) | 47 | cgConst' (TT.B32 i) = C.Int 32 (fromIntegral i) | 47 | cgConst' (TT.B32 i) = C.Int 32 (fromIntegral i) | 47 | false | false | 0 | 8 | 7 | 30 | 14 | 16 | null | null |
vrthra/v | src/VPrim.hs | gpl-2.0 | vI full@(VContext_ s e)
= case s of
((VQuote_ v):xs) -> walkerV v (VContext_ xs e)
-- 1 2 dup => 1 2 2 | 114 | vI full@(VContext_ s e)
= case s of
((VQuote_ v):xs) -> walkerV v (VContext_ xs e)
-- 1 2 dup => 1 2 2 | 114 | vI full@(VContext_ s e)
= case s of
((VQuote_ v):xs) -> walkerV v (VContext_ xs e)
-- 1 2 dup => 1 2 2 | 114 | false | false | 1 | 11 | 35 | 62 | 29 | 33 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.