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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cheme/nanomsg-hs | test/C.hs | mit | cintsize = sizeOf (undefined :: CInt) | 37 | cintsize = sizeOf (undefined :: CInt) | 37 | cintsize = sizeOf (undefined :: CInt) | 37 | false | false | 0 | 6 | 5 | 15 | 8 | 7 | null | null |
urbanslug/ghc | libraries/base/GHC/Conc/Sync.hs | bsd-3-clause | {- |
Returns the number of Haskell threads that can run truly
simultaneously (on separate physical processors) at any given time. To change
this value, use 'setNumCapabilities'.
@since 4.4.0.0
-}
getNumCapabilities :: IO Int
getNumCapabilities = do
n <- peek enabled_capabilities
return (fromIntegral n)
{- |
Se... | 914 | getNumCapabilities :: IO Int
getNumCapabilities = do
n <- peek enabled_capabilities
return (fromIntegral n)
{- |
Set the number of Haskell threads that can run truly simultaneously
(on separate physical processors) at any given time. The number
passed to `forkOn` is interpreted modulo this value. The initial
v... | 716 | getNumCapabilities = do
n <- peek enabled_capabilities
return (fromIntegral n)
{- |
Set the number of Haskell threads that can run truly simultaneously
(on separate physical processors) at any given time. The number
passed to `forkOn` is interpreted modulo this value. The initial
value is given by the @+RTS -N... | 687 | true | true | 0 | 9 | 158 | 38 | 18 | 20 | null | null |
DaMSL/K3 | src/Language/K3/Codegen/KTrace/KTraceDB.hs | apache-2.0 | fieldPadLength :: Int
fieldPadLength = 18 | 41 | fieldPadLength :: Int
fieldPadLength = 18 | 41 | fieldPadLength = 18 | 19 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
jbracker/supermonad-plugin | examples/monad/hmtc/original/PPTAMCode.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- Pretty printing of TAM code (sequence of TAM instructions)
------------------------------------------------------------------------------
-- | Converts TAM code to a nicely laid-out textual representation for
-- display purposes.
ppTAMC... | 413 | ppTAMCode :: [TAMInst] -> String
ppTAMCode is = (foldr (.) id (map (\i -> ppTAMInst i . nl) is)) "" | 99 | ppTAMCode is = (foldr (.) id (map (\i -> ppTAMInst i . nl) is)) "" | 66 | true | true | 0 | 13 | 48 | 64 | 36 | 28 | null | null |
dec9ue/jhc_copygc | src/Name/Name.hs | gpl-2.0 | isTypeNamespace _ = False | 25 | isTypeNamespace _ = False | 25 | isTypeNamespace _ = False | 25 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
kowey/pandoc-old | src/Text/Pandoc/Writers/ConTeXt.hs | gpl-2.0 | inlineToConTeXt (SmallCaps lst) = do
contents <- inlineListToConTeXt lst
return $ text "{\\sc " <> contents <> char '}' | 123 | inlineToConTeXt (SmallCaps lst) = do
contents <- inlineListToConTeXt lst
return $ text "{\\sc " <> contents <> char '}' | 123 | inlineToConTeXt (SmallCaps lst) = do
contents <- inlineListToConTeXt lst
return $ text "{\\sc " <> contents <> char '}' | 123 | false | false | 0 | 10 | 22 | 46 | 20 | 26 | null | null |
antalsz/hs-to-coq | src/lib/HsToCoq/Util/Foldable.hs | mit | asumFmap :: (Alternative f, Foldable t) => (a -> b) -> t (f a) -> f b
asumFmap f = getAlt . foldMap (Alt . fmap f) | 114 | asumFmap :: (Alternative f, Foldable t) => (a -> b) -> t (f a) -> f b
asumFmap f = getAlt . foldMap (Alt . fmap f) | 114 | asumFmap f = getAlt . foldMap (Alt . fmap f) | 44 | false | true | 0 | 10 | 26 | 73 | 36 | 37 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Plugin/Driver.hs | bsd-3-clause | primImports :: [Module]
primImports = [gHC_PRIM, gHC_TYPES] | 59 | primImports :: [Module]
primImports = [gHC_PRIM, gHC_TYPES] | 59 | primImports = [gHC_PRIM, gHC_TYPES] | 35 | false | true | 0 | 5 | 6 | 20 | 12 | 8 | null | null |
travitch/shellDSL | tests/Main.hs | bsd-3-clause | path :: String -> String
path = map replaceSeparator where
replaceSeparator '/' = FP.pathSeparator
replaceSeparator x = x
-- if hawk has been compiled by a sandboxing tool,
-- its binary has been placed in a special folder.
--
-- return something like (Just "/.../cabal-dev") | 285 | path :: String -> String
path = map replaceSeparator where
replaceSeparator '/' = FP.pathSeparator
replaceSeparator x = x
-- if hawk has been compiled by a sandboxing tool,
-- its binary has been placed in a special folder.
--
-- return something like (Just "/.../cabal-dev") | 285 | path = map replaceSeparator where
replaceSeparator '/' = FP.pathSeparator
replaceSeparator x = x
-- if hawk has been compiled by a sandboxing tool,
-- its binary has been placed in a special folder.
--
-- return something like (Just "/.../cabal-dev") | 260 | false | true | 2 | 7 | 54 | 56 | 24 | 32 | null | null |
wochinge/CacheSimulator | app/Main.hs | bsd-3-clause | printAverageReadsPerFile :: (String, CacheSize, WriteStrategy) -> IO()
printAverageReadsPerFile (logPath, _, _) = do
putStrLn "Calculate reads per file statistic"
(average, minReads, maxReads, median) <- getAverageReadsPerFile logPath
putStrLn $ "Average accesses per file: " ++ show average
putStrLn $ ... | 416 | printAverageReadsPerFile :: (String, CacheSize, WriteStrategy) -> IO()
printAverageReadsPerFile (logPath, _, _) = do
putStrLn "Calculate reads per file statistic"
(average, minReads, maxReads, median) <- getAverageReadsPerFile logPath
putStrLn $ "Average accesses per file: " ++ show average
putStrLn $ ... | 416 | printAverageReadsPerFile (logPath, _, _) = do
putStrLn "Calculate reads per file statistic"
(average, minReads, maxReads, median) <- getAverageReadsPerFile logPath
putStrLn $ "Average accesses per file: " ++ show average
putStrLn $ "Min reads: " ++ show minReads ++ ", MaxReads: " ++ show maxReads ++ ", ... | 344 | false | true | 0 | 12 | 74 | 119 | 59 | 60 | null | null |
juhp/network-uri | tests/uri001.hs | bsd-3-clause | isRelRfT _ = False | 22 | isRelRfT _ = False | 22 | isRelRfT _ = False | 22 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
joshbohde/pushbullet | src/Pushbullet/Models/PushRequest.hs | bsd-3-clause | targetPairs :: Target -> [A.Pair]
targetPairs All = [] | 54 | targetPairs :: Target -> [A.Pair]
targetPairs All = [] | 54 | targetPairs All = [] | 20 | false | true | 0 | 9 | 8 | 31 | 14 | 17 | null | null |
glguy/irc-core | src/Client/Commands/Toggles.hs | isc | cmdToggleLayout :: ClientCommand ()
cmdToggleLayout st _ = commandSuccess (set clientScroll 0 (over clientLayout aux st))
where
aux OneColumn = TwoColumn
aux TwoColumn = OneColumn | 189 | cmdToggleLayout :: ClientCommand ()
cmdToggleLayout st _ = commandSuccess (set clientScroll 0 (over clientLayout aux st))
where
aux OneColumn = TwoColumn
aux TwoColumn = OneColumn | 189 | cmdToggleLayout st _ = commandSuccess (set clientScroll 0 (over clientLayout aux st))
where
aux OneColumn = TwoColumn
aux TwoColumn = OneColumn | 153 | false | true | 0 | 9 | 34 | 65 | 30 | 35 | null | null |
bruno-cadorette/Baeta-Compiler | src/Parser.hs | gpl-3.0 | spt [] = [] | 11 | spt [] = [] | 11 | spt [] = [] | 11 | false | false | 0 | 5 | 3 | 14 | 6 | 8 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/PgCatalog/PgAttribute.hs | mit | {- |
The @atttypmod@ column of the @pg_catalog.pg_attribute@ table
-}
attributeTypeModifierField :: Orville.FieldDefinition Orville.NotNull Int32
attributeTypeModifierField =
Orville.integerField "atttypmod" | 211 | attributeTypeModifierField :: Orville.FieldDefinition Orville.NotNull Int32
attributeTypeModifierField =
Orville.integerField "atttypmod" | 139 | attributeTypeModifierField =
Orville.integerField "atttypmod" | 63 | true | true | 1 | 6 | 22 | 30 | 13 | 17 | null | null |
urbanslug/ghc | testsuite/tests/typecheck/should_fail/tcfail107.hs | bsd-3-clause | test :: Thing (Const Int) -> Thing (Const Int)
test = test | 58 | test :: Thing (Const Int) -> Thing (Const Int)
test = test | 58 | test = test | 11 | false | true | 0 | 8 | 11 | 33 | 16 | 17 | null | null |
facebookincubator/duckling | Duckling/Time/RO/Rules.hs | bsd-3-clause | rulePeDate :: Rule
rulePeDate = Rule
{ name = "pe <date>"
, pattern =
[ regex "pe"
, dimension Time
]
, prod = \tokens -> case tokens of
(_:x:_) -> Just x
_ -> Nothing
} | 201 | rulePeDate :: Rule
rulePeDate = Rule
{ name = "pe <date>"
, pattern =
[ regex "pe"
, dimension Time
]
, prod = \tokens -> case tokens of
(_:x:_) -> Just x
_ -> Nothing
} | 201 | rulePeDate = Rule
{ name = "pe <date>"
, pattern =
[ regex "pe"
, dimension Time
]
, prod = \tokens -> case tokens of
(_:x:_) -> Just x
_ -> Nothing
} | 182 | false | true | 0 | 14 | 68 | 88 | 45 | 43 | null | null |
nbrunt/JSHOP | src/old/ver2/Diagnostics.hs | mit | -- | Forces a stop, e.g. after some user-specified pass.
stopD :: D a
stopD = D $ \dms ->
(Nothing, dms) | 108 | stopD :: D a
stopD = D $ \dms ->
(Nothing, dms) | 51 | stopD = D $ \dms ->
(Nothing, dms) | 38 | true | true | 0 | 7 | 25 | 30 | 17 | 13 | null | null |
izimbra/PLT2014 | Lab2/Compiler.hs | gpl-2.0 | compile :: String -> Program -> String
compile name p = unlines $ reverse $ code $ execState (compileProgram name p) emptyEnvC | 126 | compile :: String -> Program -> String
compile name p = unlines $ reverse $ code $ execState (compileProgram name p) emptyEnvC | 126 | compile name p = unlines $ reverse $ code $ execState (compileProgram name p) emptyEnvC | 87 | false | true | 0 | 8 | 21 | 49 | 24 | 25 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | If this instruction includes a combining function, this is the name of
-- the CombineValues instruction lifted into this instruction.
pgbkiOriginalCombineValuesStepName :: Lens' PartialGroupByKeyInstruction (Maybe Text)
pgbkiOriginalCombineValuesStepName
= lens _pgbkiOriginalCombineValuesStepName
(\ s a ->... | 364 | pgbkiOriginalCombineValuesStepName :: Lens' PartialGroupByKeyInstruction (Maybe Text)
pgbkiOriginalCombineValuesStepName
= lens _pgbkiOriginalCombineValuesStepName
(\ s a -> s{_pgbkiOriginalCombineValuesStepName = a}) | 225 | pgbkiOriginalCombineValuesStepName
= lens _pgbkiOriginalCombineValuesStepName
(\ s a -> s{_pgbkiOriginalCombineValuesStepName = a}) | 139 | true | true | 0 | 9 | 46 | 49 | 26 | 23 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'StreamingDistributionConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sdcAliases'
--
-- * 'sdcPriceClass'
--
-- * 'sdcLogging'
--
-- * 'sdcCallerReference'
--
-- * 'sdcS3Origin'
--
-- * 'sdcComment'
--
... | 1,012 | streamingDistributionConfig
:: Text -- ^ 'sdcCallerReference'
-> S3Origin -- ^ 'sdcS3Origin'
-> Text -- ^ 'sdcComment'
-> TrustedSigners -- ^ 'sdcTrustedSigners'
-> Bool -- ^ 'sdcEnabled'
-> StreamingDistributionConfig
streamingDistributionConfig pCallerReference_ pS3Origin_ pComment_ pTrustedSi... | 646 | streamingDistributionConfig pCallerReference_ pS3Origin_ pComment_ pTrustedSigners_ pEnabled_ =
StreamingDistributionConfig'
{ _sdcAliases = Nothing
, _sdcPriceClass = Nothing
, _sdcLogging = Nothing
, _sdcCallerReference = pCallerReference_
, _sdcS3Origin = pS3Origin_
, _sdcComment = pComme... | 403 | true | true | 0 | 11 | 194 | 125 | 80 | 45 | null | null |
rueshyna/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Patch.hs | mpl-2.0 | -- | An optional mask specifying which fields to update. At this time,
-- mutable fields are names and info. Acceptable values are \"names\" and
-- \"info\". If unspecified, all mutable fields will be updated.
vpUpdateMask :: Lens' VariantsPatch (Maybe FieldMask)
vpUpdateMask
= lens _vpUpdateMask (\ s a -> s{_vpUpdat... | 331 | vpUpdateMask :: Lens' VariantsPatch (Maybe FieldMask)
vpUpdateMask
= lens _vpUpdateMask (\ s a -> s{_vpUpdateMask = a}) | 121 | vpUpdateMask
= lens _vpUpdateMask (\ s a -> s{_vpUpdateMask = a}) | 67 | true | true | 0 | 9 | 53 | 50 | 27 | 23 | null | null |
tavisrudd/ghcjs-base | JavaScript/TypedArray/DataView/ST.hs | mit | readInt16LE, readInt16BE, unsafeReadInt16LE, unsafeReadInt16BE
:: Int -> STDataView s -> ST s Int16
readInt16LE idx dv = ST (I.js_m_getInt16LE idx dv) | 164 | readInt16LE, readInt16BE, unsafeReadInt16LE, unsafeReadInt16BE
:: Int -> STDataView s -> ST s Int16
readInt16LE idx dv = ST (I.js_m_getInt16LE idx dv) | 164 | readInt16LE idx dv = ST (I.js_m_getInt16LE idx dv) | 62 | false | true | 0 | 8 | 34 | 51 | 27 | 24 | null | null |
thoughtpolice/binary-serialise-cbor | bench/Real/Load.hs | bsd-3-clause | emptyTestStanza :: TestSuiteStanza
emptyTestStanza = TestSuiteStanza Nothing Nothing Nothing mempty | 99 | emptyTestStanza :: TestSuiteStanza
emptyTestStanza = TestSuiteStanza Nothing Nothing Nothing mempty | 99 | emptyTestStanza = TestSuiteStanza Nothing Nothing Nothing mempty | 64 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
dmbarbour/Sirea | src/Sirea/Internal/B0Impl.hs | bsd-3-clause | -- fwdB is the simplest behavior...
fwdB0 :: (Monad m) => B0 m x x
fwdB0 = id | 78 | fwdB0 :: (Monad m) => B0 m x x
fwdB0 = id | 41 | fwdB0 = id | 10 | true | true | 0 | 6 | 18 | 28 | 15 | 13 | null | null |
futtetennista/IntroductionToFunctionalProgramming | itfp/src/Chapter9.hs | mit | sizelbtree :: LBTree a b -> Int
sizelbtree (LTip _) =
1 | 57 | sizelbtree :: LBTree a b -> Int
sizelbtree (LTip _) =
1 | 57 | sizelbtree (LTip _) =
1 | 25 | false | true | 0 | 7 | 13 | 29 | 14 | 15 | null | null |
dicomgrid/dicom-haskell-library | src/Data/DICOM/Dictionary.hs | gpl-3.0 | referencedprintjobsequence :: [SequenceItem] -> Element
referencedprintjobsequence = sq $ tag (TagGroup 0x2100) (TagElement 0x0500) | 131 | referencedprintjobsequence :: [SequenceItem] -> Element
referencedprintjobsequence = sq $ tag (TagGroup 0x2100) (TagElement 0x0500) | 131 | referencedprintjobsequence = sq $ tag (TagGroup 0x2100) (TagElement 0x0500) | 75 | false | true | 0 | 8 | 13 | 39 | 20 | 19 | null | null |
tmcdonell/accelerate-lulesh | src/LULESH.hs | bsd-3-clause | -- Time Constraints
-- ================
-- | After all the solution variables are moved to the next time step, the
-- constrains for next time increment are calculated. Each constraint is
-- computed in each element, and the final constraint is the minimum over all
-- element values.
--
calcTimeConstraints
:: Para... | 740 | calcTimeConstraints
:: Parameters
-> Acc (Field R)
-> Acc (Field R)
-> Acc (Field R)
-> ( Acc (Scalar Time)
, Acc (Scalar Time) )
calcTimeConstraints param ss vdov arealg =
let
dt_courant = A.minimum . A.flatten $ A.zipWith3 (calcCourantConstraintForElem param) ss vdov arealg
... | 451 | calcTimeConstraints param ss vdov arealg =
let
dt_courant = A.minimum . A.flatten $ A.zipWith3 (calcCourantConstraintForElem param) ss vdov arealg
dt_hydro = A.minimum . A.flatten $ A.map (calcHydroConstraintForElem param) vdov
in
(dt_courant, dt_hydro) | 294 | true | true | 0 | 14 | 174 | 176 | 88 | 88 | null | null |
psandahl/big-engine | src/BigE/TextRenderer/Text.hs | mit | update :: MonadIO m => String -> Text -> m Text
update str text = do
let verts = mkCharacterBoxVertices (font text) str
indices = mkIndices $ length str
gridWidth' = getGridWidth verts
mesh' <- Mesh.update verts indices (mesh text)
return text { mesh = mesh', gridWidth = gridWidth', string =... | 392 | update :: MonadIO m => String -> Text -> m Text
update str text = do
let verts = mkCharacterBoxVertices (font text) str
indices = mkIndices $ length str
gridWidth' = getGridWidth verts
mesh' <- Mesh.update verts indices (mesh text)
return text { mesh = mesh', gridWidth = gridWidth', string =... | 392 | update str text = do
let verts = mkCharacterBoxVertices (font text) str
indices = mkIndices $ length str
gridWidth' = getGridWidth verts
mesh' <- Mesh.update verts indices (mesh text)
return text { mesh = mesh', gridWidth = gridWidth', string = str }
-- | Enable the 'Text'. I.e. enable the ... | 344 | false | true | 0 | 12 | 94 | 123 | 61 | 62 | null | null |
crogers1/manager | updatemgr/UpdateMgr/Types.hs | gpl-2.0 | updateStateStr DownloadedFiles = "downloaded-files" | 51 | updateStateStr DownloadedFiles = "downloaded-files" | 51 | updateStateStr DownloadedFiles = "downloaded-files" | 51 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/GlassBR/References.hs | bsd-2-clause | astm2009 = cMisc [author [mononym "ASTM"],
title "Standard Practice for Determining Load Resistance of Glass in Buildings",
publisher "ASTM International",
bookTitle "Standard E1300-09a",
year 2009, howPublishedU "https://www.astm.org"]
"astm2009" | 257 | astm2009 = cMisc [author [mononym "ASTM"],
title "Standard Practice for Determining Load Resistance of Glass in Buildings",
publisher "ASTM International",
bookTitle "Standard E1300-09a",
year 2009, howPublishedU "https://www.astm.org"]
"astm2009" | 257 | astm2009 = cMisc [author [mononym "ASTM"],
title "Standard Practice for Determining Load Resistance of Glass in Buildings",
publisher "ASTM International",
bookTitle "Standard E1300-09a",
year 2009, howPublishedU "https://www.astm.org"]
"astm2009" | 257 | false | false | 0 | 9 | 37 | 54 | 26 | 28 | null | null |
gittywithexcitement/hindent | src/HIndent/Styles/Gibiansky.hs | bsd-3-clause | rhss (GuardedRhss _ rs) =
flip onSeparateLines' rs $ \a@(GuardedRhs rhsLoc stmts exp) -> do
let manyStmts = length stmts > 1
remainder = do
if manyStmts then newline else space
rhsSeparator
if not manyStmts && lineBreakAfterRhs rhsLoc exp
then newline >> indented ... | 774 | rhss (GuardedRhss _ rs) =
flip onSeparateLines' rs $ \a@(GuardedRhs rhsLoc stmts exp) -> do
let manyStmts = length stmts > 1
remainder = do
if manyStmts then newline else space
rhsSeparator
if not manyStmts && lineBreakAfterRhs rhsLoc exp
then newline >> indented ... | 774 | rhss (GuardedRhss _ rs) =
flip onSeparateLines' rs $ \a@(GuardedRhs rhsLoc stmts exp) -> do
let manyStmts = length stmts > 1
remainder = do
if manyStmts then newline else space
rhsSeparator
if not manyStmts && lineBreakAfterRhs rhsLoc exp
then newline >> indented ... | 774 | false | false | 0 | 21 | 290 | 252 | 118 | 134 | null | null |
frankhucek/Todo | app/RegexPattern.hs | bsd-3-clause | -- Used to read Items from file/stdin
-- DOES NO PATTERN CHECKING - Left to regex.
-- Assumes input is of proper format
patternToItem :: String -> Item
patternToItem itemString = Item (read p :: Int) desc date
where list = Prelude.map unpack $ splitOn ":" (pack itemString)
p = list !! 0
desc = list... | 385 | patternToItem :: String -> Item
patternToItem itemString = Item (read p :: Int) desc date
where list = Prelude.map unpack $ splitOn ":" (pack itemString)
p = list !! 0
desc = list !! 1
date = list !! 2
-- Used to write Items to a file. | 265 | patternToItem itemString = Item (read p :: Int) desc date
where list = Prelude.map unpack $ splitOn ":" (pack itemString)
p = list !! 0
desc = list !! 1
date = list !! 2
-- Used to write Items to a file. | 233 | true | true | 3 | 11 | 100 | 98 | 49 | 49 | null | null |
cgo/jalla | Numeric/Jalla/CVector.hs | gpl-3.0 | setElems' :: CVector vec e => [(Index,e)] -> VMM s vec e ()
setElems' ies = VMM $ (get >>= \v -> liftIO $ mapM_ (\(i,e) -> unsafeSetElem v i e) ies) | 148 | setElems' :: CVector vec e => [(Index,e)] -> VMM s vec e ()
setElems' ies = VMM $ (get >>= \v -> liftIO $ mapM_ (\(i,e) -> unsafeSetElem v i e) ies) | 148 | setElems' ies = VMM $ (get >>= \v -> liftIO $ mapM_ (\(i,e) -> unsafeSetElem v i e) ies) | 88 | false | true | 0 | 14 | 31 | 97 | 50 | 47 | null | null |
ulikoehler/ProjectEuler | Euler56.hs | apache-2.0 | main = do
print $ maximum $ map digitSum expspace | 53 | main = do
print $ maximum $ map digitSum expspace | 53 | main = do
print $ maximum $ map digitSum expspace | 53 | false | false | 0 | 8 | 13 | 22 | 10 | 12 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Link to next page for this experiment collection.
eNextLink :: Lens' Experiments (Maybe Text)
eNextLink
= lens _eNextLink (\ s a -> s{_eNextLink = a}) | 157 | eNextLink :: Lens' Experiments (Maybe Text)
eNextLink
= lens _eNextLink (\ s a -> s{_eNextLink = a}) | 102 | eNextLink
= lens _eNextLink (\ s a -> s{_eNextLink = a}) | 58 | true | true | 0 | 9 | 28 | 48 | 25 | 23 | null | null |
marcellussiegburg/autotool | yesod/Handler/Gruppe.hs | gpl-2.0 | getGruppeR :: GruppeId -> Handler Html
getGruppeR = postGruppeR | 63 | getGruppeR :: GruppeId -> Handler Html
getGruppeR = postGruppeR | 63 | getGruppeR = postGruppeR | 24 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
stone-guru/tmmha | src/TMM/Workers.hs | gpl-3.0 | textTag bst (TagText t) = TagText (bst t) | 41 | textTag bst (TagText t) = TagText (bst t) | 41 | textTag bst (TagText t) = TagText (bst t) | 41 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | rebootTypes :: FrozenSet String
rebootTypes = ConstantUtils.mkSet $ map Types.rebootTypeToRaw [minBound..] | 106 | rebootTypes :: FrozenSet String
rebootTypes = ConstantUtils.mkSet $ map Types.rebootTypeToRaw [minBound..] | 106 | rebootTypes = ConstantUtils.mkSet $ map Types.rebootTypeToRaw [minBound..] | 74 | false | true | 0 | 7 | 10 | 35 | 16 | 19 | null | null |
mydaum/cabal | cabal-install/Distribution/Solver/Modular/Builder.hs | bsd-3-clause | close (PkgGoal qpn gr) = Goal (P qpn) gr | 49 | close (PkgGoal qpn gr) = Goal (P qpn) gr | 49 | close (PkgGoal qpn gr) = Goal (P qpn) gr | 49 | false | false | 0 | 7 | 17 | 28 | 13 | 15 | null | null |
xu-hao/QueryArrow | QueryArrow-common/src/QueryArrow/Parser.hs | bsd-3-clause | formulap :: FOParser Formula
formulap = do
formula1s <- sepBy1 formulaChoicep parp
let formula1 = fpar formula1s
(Aggregate . FReturn <$> returnp <*> pure formula1)
<|> return formula1 | 194 | formulap :: FOParser Formula
formulap = do
formula1s <- sepBy1 formulaChoicep parp
let formula1 = fpar formula1s
(Aggregate . FReturn <$> returnp <*> pure formula1)
<|> return formula1 | 194 | formulap = do
formula1s <- sepBy1 formulaChoicep parp
let formula1 = fpar formula1s
(Aggregate . FReturn <$> returnp <*> pure formula1)
<|> return formula1 | 165 | false | true | 0 | 12 | 37 | 72 | 31 | 41 | null | null |
keera-studios/hsQt | Qtc/Gui/QGraphicsView.hs | bsd-2-clause | resetCachedContent :: QGraphicsView a -> (()) -> IO ()
resetCachedContent x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGraphicsView_resetCachedContent cobj_x0 | 163 | resetCachedContent :: QGraphicsView a -> (()) -> IO ()
resetCachedContent x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGraphicsView_resetCachedContent cobj_x0 | 163 | resetCachedContent x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGraphicsView_resetCachedContent cobj_x0 | 108 | false | true | 0 | 8 | 25 | 54 | 26 | 28 | null | null |
anton-dessiatov/stack | src/Stack/Types/Package.hs | bsd-3-clause | dotCabalMainPath _ = Nothing | 28 | dotCabalMainPath _ = Nothing | 28 | dotCabalMainPath _ = Nothing | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jyh1/mini | src/Eval/Eval.hs | bsd-3-clause | evalCommand (Return e) = do
res <- evalExpr e
returned .= True
return res | 85 | evalCommand (Return e) = do
res <- evalExpr e
returned .= True
return res | 85 | evalCommand (Return e) = do
res <- evalExpr e
returned .= True
return res | 85 | false | false | 0 | 8 | 25 | 38 | 16 | 22 | null | null |
mbakke/ganeti | src/Ganeti/HTools/Backend/MonD.hs | bsd-2-clause | -- | The node-total CPU collector.
totalCPUCollector :: DataCollector
totalCPUCollector = DataCollector { dName = CPUload.dcName
, dCategory = CPUload.dcCategory
, dMkReport = mkCpuReport
, dUse = useNodeTotalCPU
... | 350 | totalCPUCollector :: DataCollector
totalCPUCollector = DataCollector { dName = CPUload.dcName
, dCategory = CPUload.dcCategory
, dMkReport = mkCpuReport
, dUse = useNodeTotalCPU
} | 315 | totalCPUCollector = DataCollector { dName = CPUload.dcName
, dCategory = CPUload.dcCategory
, dMkReport = mkCpuReport
, dUse = useNodeTotalCPU
} | 280 | true | true | 0 | 7 | 164 | 42 | 26 | 16 | null | null |
igrep/igrep-cashbook | hs2/src/IgrepCashbook.hs | mit | buildSummaryLine :: TextBuilder.Builder -> Int -> TextBuilder.Builder
buildSummaryLine header val =
header <> "\t" <> TextBuilder.fromString (show val) <> "\n" | 161 | buildSummaryLine :: TextBuilder.Builder -> Int -> TextBuilder.Builder
buildSummaryLine header val =
header <> "\t" <> TextBuilder.fromString (show val) <> "\n" | 161 | buildSummaryLine header val =
header <> "\t" <> TextBuilder.fromString (show val) <> "\n" | 91 | false | true | 4 | 8 | 21 | 58 | 26 | 32 | null | null |
toish/Pico | test/simple.hs | gpl-3.0 | main = do prg <- loadFile (file)
checkResult $ runProgram prg tape (-1) | 81 | main = do prg <- loadFile (file)
checkResult $ runProgram prg tape (-1) | 81 | main = do prg <- loadFile (file)
checkResult $ runProgram prg tape (-1) | 81 | false | false | 1 | 11 | 22 | 42 | 18 | 24 | null | null |
KommuSoft/dep-software | Dep.Ui.Utils.Boxes.hs | gpl-3.0 | setCurrentPos :: Boxes a -> DisplayRegion -> IO ()
setCurrentPos b | boxOrientation b == Horizontal = scp fst plusWidth (boxSpacing b) (boxItems b)
| otherwise = scp snd plusHeight (boxSpacing b) (boxItems b)
where scp :: (DisplayRegion -> Int) -> (DisplayRegion -> Int -> DisplayRegion) -> Int -> [W... | 681 | setCurrentPos :: Boxes a -> DisplayRegion -> IO ()
setCurrentPos b | boxOrientation b == Horizontal = scp fst plusWidth (boxSpacing b) (boxItems b)
| otherwise = scp snd plusHeight (boxSpacing b) (boxItems b)
where scp :: (DisplayRegion -> Int) -> (DisplayRegion -> Int -> DisplayRegion) -> Int -> [W... | 681 | setCurrentPos b | boxOrientation b == Horizontal = scp fst plusWidth (boxSpacing b) (boxItems b)
| otherwise = scp snd plusHeight (boxSpacing b) (boxItems b)
where scp :: (DisplayRegion -> Int) -> (DisplayRegion -> Int -> DisplayRegion) -> Int -> [Widget a] -> DisplayRegion -> IO ()
scp fa... | 630 | false | true | 6 | 13 | 254 | 263 | 125 | 138 | null | null |
mboogerd/hello-haskell | src/lyah/FunctionSyntax.hs | apache-2.0 | charName 'c' = "Cecil" | 22 | charName 'c' = "Cecil" | 22 | charName 'c' = "Cecil" | 22 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.Prim.hs | bsd-3-clause | -- | Satisfies @(quot\# x y) times\# y plus\# (rem\# x y) == x@.
remInt16X16# :: Int16X16# -> Int16X16# -> Int16X16#
remInt16X16# = remInt16X16# | 146 | remInt16X16# :: Int16X16# -> Int16X16# -> Int16X16#
remInt16X16# = remInt16X16# | 79 | remInt16X16# = remInt16X16# | 27 | true | true | 0 | 8 | 25 | 27 | 12 | 15 | null | null |
grandpascorpion/canon | Math/NumberTheory/Internals.hs | gpl-3.0 | crTrialDivCutoffSq = crTrialDivCutoff * crTrialDivCutoff | 59 | crTrialDivCutoffSq = crTrialDivCutoff * crTrialDivCutoff | 59 | crTrialDivCutoffSq = crTrialDivCutoff * crTrialDivCutoff | 59 | false | false | 1 | 5 | 7 | 13 | 5 | 8 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110316set6.hs | gpl-3.0 | sixtasklist :: [WorkSetup]
sixtasklist = [ WS my_ssetup (psetup_six_ttbar01j)
(rsetupGen p MLM (UserCutDef ucut) RunPGS 100000 num)
my_csetup
| p <- sixparamset , num <- sets ] | 250 | sixtasklist :: [WorkSetup]
sixtasklist = [ WS my_ssetup (psetup_six_ttbar01j)
(rsetupGen p MLM (UserCutDef ucut) RunPGS 100000 num)
my_csetup
| p <- sixparamset , num <- sets ] | 250 | sixtasklist = [ WS my_ssetup (psetup_six_ttbar01j)
(rsetupGen p MLM (UserCutDef ucut) RunPGS 100000 num)
my_csetup
| p <- sixparamset , num <- sets ] | 223 | false | true | 0 | 10 | 100 | 67 | 35 | 32 | null | null |
ocramz/sparse-linear-algebra | test/LibSpec.hs | gpl-3.0 | -- prop_spd' :: PropMatSPDVec Double -> Bool
-- prop_spd' (PropMatSPDVec m v) = prop_spd m v
-- | (A B)^T == (B^T A^T)
prop_matMat1 :: (MatrixRing (SpMatrix t), Eq t) => PropMatMat t -> Bool
prop_matMat1 (PropMatMat a b) =
transpose (a ## b) == (transpose b ##^ a) | 269 | prop_matMat1 :: (MatrixRing (SpMatrix t), Eq t) => PropMatMat t -> Bool
prop_matMat1 (PropMatMat a b) =
transpose (a ## b) == (transpose b ##^ a) | 147 | prop_matMat1 (PropMatMat a b) =
transpose (a ## b) == (transpose b ##^ a) | 75 | true | true | 0 | 9 | 53 | 82 | 41 | 41 | null | null |
sdiehl/ghc | compiler/basicTypes/Avail.hs | bsd-3-clause | -- | Names for non-fields made available by the availability information
availNonFldNames :: AvailInfo -> [Name]
availNonFldNames (Avail n) = [n] | 152 | availNonFldNames :: AvailInfo -> [Name]
availNonFldNames (Avail n) = [n] | 79 | availNonFldNames (Avail n) = [n] | 39 | true | true | 0 | 7 | 27 | 31 | 17 | 14 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/Graph/Topology/StateAnalysis.hs | bsd-3-clause | {- |
Find all minimal sets of state identifying edges.
For every minimal edge set @es@ it holds
1. @identify topo es@ is a singleton containing the flow topology.
2. @es@ is empty or removing one edge from @es@
makes @identify topo es@ returning more than one possible topology.
This algorithm basically finds can... | 825 | minimalGiven ::
(Node.C node) =>
FlowTopology node -> [[Graph.EitherEdge node]]
minimalGiven fullTopo =
concat $ reverse $
unfoldr
(\topoEdges ->
toMaybe (not $ null topoEdges) $ reducePatterns topoEdges)
[(Graph.fromMap (nodeDegrees fullTopo) $ Graph.edgeLabels fullTopo,
[])] | 318 | minimalGiven fullTopo =
concat $ reverse $
unfoldr
(\topoEdges ->
toMaybe (not $ null topoEdges) $ reducePatterns topoEdges)
[(Graph.fromMap (nodeDegrees fullTopo) $ Graph.edgeLabels fullTopo,
[])] | 232 | true | true | 0 | 11 | 168 | 118 | 60 | 58 | null | null |
yliu120/K3 | src/Language/K3/Codegen/CPP/Preprocessing.hs | apache-2.0 | mangleReservedNames' (Node (ECaseOf i :@: as) cs)
| i `elem` cppReservedNames = Node (ECaseOf (mangleName i) :@: as) mcs
| otherwise = Node (ECaseOf i :@: as) mcs
where
mcs = mangleReservedNames' <$> cs | 216 | mangleReservedNames' (Node (ECaseOf i :@: as) cs)
| i `elem` cppReservedNames = Node (ECaseOf (mangleName i) :@: as) mcs
| otherwise = Node (ECaseOf i :@: as) mcs
where
mcs = mangleReservedNames' <$> cs | 216 | mangleReservedNames' (Node (ECaseOf i :@: as) cs)
| i `elem` cppReservedNames = Node (ECaseOf (mangleName i) :@: as) mcs
| otherwise = Node (ECaseOf i :@: as) mcs
where
mcs = mangleReservedNames' <$> cs | 216 | false | false | 1 | 11 | 47 | 95 | 46 | 49 | null | null |
brendanhay/gogol | gogol-accesscontextmanager/gen/Network/Google/Resource/AccessContextManager/AccessPolicies/ServicePerimeters/List.hs | mpl-2.0 | -- | V1 error format.
apsplXgafv :: Lens' AccessPoliciesServicePerimetersList (Maybe Xgafv)
apsplXgafv
= lens _apsplXgafv (\ s a -> s{_apsplXgafv = a}) | 153 | apsplXgafv :: Lens' AccessPoliciesServicePerimetersList (Maybe Xgafv)
apsplXgafv
= lens _apsplXgafv (\ s a -> s{_apsplXgafv = a}) | 131 | apsplXgafv
= lens _apsplXgafv (\ s a -> s{_apsplXgafv = a}) | 61 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
dcreager/cabal | tests/Test/Distribution/Version.hs | bsd-3-clause | intermediateVersion :: Version -> Version -> Version
intermediateVersion v1 v2 | v1 >= v2 = error "intermediateVersion: v1 >= v2" | 129 | intermediateVersion :: Version -> Version -> Version
intermediateVersion v1 v2 | v1 >= v2 = error "intermediateVersion: v1 >= v2" | 129 | intermediateVersion v1 v2 | v1 >= v2 = error "intermediateVersion: v1 >= v2" | 76 | false | true | 0 | 8 | 19 | 37 | 17 | 20 | null | null |
pparkkin/eta | compiler/ETA/BasicTypes/OccName.hs | bsd-3-clause | isDataConNameSpace :: NameSpace -> Bool
isDataConNameSpace DataName = True | 74 | isDataConNameSpace :: NameSpace -> Bool
isDataConNameSpace DataName = True | 74 | isDataConNameSpace DataName = True | 34 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
urbanslug/ghc | compiler/types/Type.hs | bsd-3-clause | mkFamilyTyConApp :: TyCon -> [Type] -> Type
-- ^ Given a family instance TyCon and its arg types, return the
-- corresponding family type. E.g:
--
-- > data family T a
-- > data instance T (Maybe b) = MkT b
--
-- Where the instance tycon is :RTL, so:
--
-- > mkFamilyTyConApp :RTL Int = T (Maybe Int)
mkFamilyTyConApp... | 613 | mkFamilyTyConApp :: TyCon -> [Type] -> Type
mkFamilyTyConApp tc tys
| Just (fam_tc, fam_tys) <- tyConFamInst_maybe tc
, let tvs = tyConTyVars tc
fam_subst = ASSERT2( length tvs == length tys, ppr tc <+> ppr tys )
zipTopTvSubst tvs tys
= mkTyConApp fam_tc (substTys fam_subst fam_tys)
... | 353 | mkFamilyTyConApp tc tys
| Just (fam_tc, fam_tys) <- tyConFamInst_maybe tc
, let tvs = tyConTyVars tc
fam_subst = ASSERT2( length tvs == length tys, ppr tc <+> ppr tys )
zipTopTvSubst tvs tys
= mkTyConApp fam_tc (substTys fam_subst fam_tys)
| otherwise
= mkTyConApp tc tys | 309 | true | true | 0 | 14 | 146 | 148 | 72 | 76 | null | null |
spacekitteh/smcghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprGInstr (GSUB sz src1 src2 dst) = pprSizeRegRegReg (sLit "gsub") sz src1 src2 dst | 83 | pprGInstr (GSUB sz src1 src2 dst) = pprSizeRegRegReg (sLit "gsub") sz src1 src2 dst | 83 | pprGInstr (GSUB sz src1 src2 dst) = pprSizeRegRegReg (sLit "gsub") sz src1 src2 dst | 83 | false | false | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
jberryman/wai | mime-types/Network/Mime.hs | mit | -- | Get a list of all of the file name extensions.
--
-- > fileNameExtensions "foo.tar.gz" == ["tar.gz", "gz"]
fileNameExtensions :: FileName -> [Extension]
fileNameExtensions =
go . T.toLower . dropToExt
where
dropToExt = T.drop 1 . T.dropWhile (/= '.')
go e
| T.null e = []
| otherwise ... | 439 | fileNameExtensions :: FileName -> [Extension]
fileNameExtensions =
go . T.toLower . dropToExt
where
dropToExt = T.drop 1 . T.dropWhile (/= '.')
go e
| T.null e = []
| otherwise = e : go next
where
next = dropToExt e
-- | Path extension. May include multiple components, e.g.... | 327 | fileNameExtensions =
go . T.toLower . dropToExt
where
dropToExt = T.drop 1 . T.dropWhile (/= '.')
go e
| T.null e = []
| otherwise = e : go next
where
next = dropToExt e
-- | Path extension. May include multiple components, e.g. tar.gz | 281 | true | true | 6 | 9 | 115 | 123 | 56 | 67 | null | null |
gridaphobe/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body)
=> HsMatchContext idL -> Match idR body -> SDoc
pprMatchInCtxt ctxt match = hang (text "In" <+> pprMatchContext ctxt <> colon)
4 (pprMatch ctxt match) | 271 | pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body)
=> HsMatchContext idL -> Match idR body -> SDoc
pprMatchInCtxt ctxt match = hang (text "In" <+> pprMatchContext ctxt <> colon)
4 (pprMatch ctxt match) | 271 | pprMatchInCtxt ctxt match = hang (text "In" <+> pprMatchContext ctxt <> colon)
4 (pprMatch ctxt match) | 132 | false | true | 0 | 9 | 77 | 85 | 41 | 44 | null | null |
thalerjonathan/phd | coding/learning/haskell/conway/src/Main.hs | gpl-3.0 | initField :: Int -> Int -> Float -> IO [Int]
initField x y p = randFloats (x * y) >>= (\fs -> return (map (\f -> if f <= p then 1 else 0) fs)) | 142 | initField :: Int -> Int -> Float -> IO [Int]
initField x y p = randFloats (x * y) >>= (\fs -> return (map (\f -> if f <= p then 1 else 0) fs)) | 142 | initField x y p = randFloats (x * y) >>= (\fs -> return (map (\f -> if f <= p then 1 else 0) fs)) | 97 | false | true | 0 | 15 | 34 | 94 | 48 | 46 | null | null |
grwlf/cake3 | src/Development/Cake3/Types.hs | bsd-3-clause | -- | Converts string representation of Path into type-safe File. Internally,
-- files are stored in a form of offset from module root directory, plus the
-- path from top-level dir to module root and back (see @ModuleLocation@)
--
-- TODO: rename to mkFile
file' :: ModuleLocation -> FilePath -> File
file' pl f = FileT ... | 324 | file' :: ModuleLocation -> FilePath -> File
file' pl f = FileT pl f | 67 | file' pl f = FileT pl f | 23 | true | true | 0 | 6 | 57 | 38 | 20 | 18 | null | null |
seckcoder/vector | Data/Vector/Generic/Mutable.hs | bsd-3-clause | growFront v by = BOUNDS_CHECK(checkLength) "growFront" by
$ do vnew <- unsafeGrowFront v by
basicInitialize $ basicUnsafeSlice 0 by vnew
return vnew | 203 | growFront v by = BOUNDS_CHECK(checkLength) "growFront" by
$ do vnew <- unsafeGrowFront v by
basicInitialize $ basicUnsafeSlice 0 by vnew
return vnew | 203 | growFront v by = BOUNDS_CHECK(checkLength) "growFront" by
$ do vnew <- unsafeGrowFront v by
basicInitialize $ basicUnsafeSlice 0 by vnew
return vnew | 203 | false | false | 0 | 9 | 76 | 57 | 25 | 32 | null | null |
bennofs/cabal | cabal-install/Distribution/Client/ProjectPlanning.hs | bsd-3-clause | storePackageInstallDirs :: CabalDirLayout
-> CompilerId
-> InstalledPackageId
-> InstallDirs.InstallDirs FilePath
storePackageInstallDirs CabalDirLayout{cabalStorePackageDirectory}
compid ipkgid =
InstallDirs.InstallDirs... | 1,001 | storePackageInstallDirs :: CabalDirLayout
-> CompilerId
-> InstalledPackageId
-> InstallDirs.InstallDirs FilePath
storePackageInstallDirs CabalDirLayout{cabalStorePackageDirectory}
compid ipkgid =
InstallDirs.InstallDirs... | 1,001 | storePackageInstallDirs CabalDirLayout{cabalStorePackageDirectory}
compid ipkgid =
InstallDirs.InstallDirs {..}
where
prefix = cabalStorePackageDirectory compid ipkgid
bindir = prefix </> "bin"
libdir = prefix </> "lib"
libsubdir = ""
dynlibdir =... | 815 | false | true | 33 | 11 | 317 | 221 | 92 | 129 | null | null |
DanielG/stack | src/main/Main.hs | bsd-3-clause | upgradeCmd :: (Bool, String) -> GlobalOpts -> IO ()
upgradeCmd (fromGit, repo) go = withConfigAndLock go $ globalFixCodePage go $
upgrade (if fromGit then Just repo else Nothing) (globalResolver go) | 202 | upgradeCmd :: (Bool, String) -> GlobalOpts -> IO ()
upgradeCmd (fromGit, repo) go = withConfigAndLock go $ globalFixCodePage go $
upgrade (if fromGit then Just repo else Nothing) (globalResolver go) | 202 | upgradeCmd (fromGit, repo) go = withConfigAndLock go $ globalFixCodePage go $
upgrade (if fromGit then Just repo else Nothing) (globalResolver go) | 150 | false | true | 0 | 9 | 33 | 80 | 41 | 39 | null | null |
SEEK-Org/evaporate | src/Logging.hs | mit | logZip :: FilePath -> [FilePath] -> Text
logZip nameOfZip filePaths =
"Creating archive "
<> pack nameOfZip
<> foldMap logFileInZip filePaths
where
logFileInZip filePath = "\n " <> pack filePath
-- Based off the amazonka logger | 246 | logZip :: FilePath -> [FilePath] -> Text
logZip nameOfZip filePaths =
"Creating archive "
<> pack nameOfZip
<> foldMap logFileInZip filePaths
where
logFileInZip filePath = "\n " <> pack filePath
-- Based off the amazonka logger | 246 | logZip nameOfZip filePaths =
"Creating archive "
<> pack nameOfZip
<> foldMap logFileInZip filePaths
where
logFileInZip filePath = "\n " <> pack filePath
-- Based off the amazonka logger | 205 | false | true | 4 | 8 | 54 | 70 | 31 | 39 | null | null |
bgwines/pb-next | src/PbNext/ProtoParser.hs | bsd-3-clause | parseNWithFallback :: forall a b. Parser a -> Parser b -> Parser [a]
parseNWithFallback posParser negParser = catMaybes <$> sepEndBy maybeParser (many1 endl)
where
maybeParser :: Parser (Maybe a)
maybeParser = (try $ Just <$> posParser) <|> (const Nothing <$> negParser) | 290 | parseNWithFallback :: forall a b. Parser a -> Parser b -> Parser [a]
parseNWithFallback posParser negParser = catMaybes <$> sepEndBy maybeParser (many1 endl)
where
maybeParser :: Parser (Maybe a)
maybeParser = (try $ Just <$> posParser) <|> (const Nothing <$> negParser) | 290 | parseNWithFallback posParser negParser = catMaybes <$> sepEndBy maybeParser (many1 endl)
where
maybeParser :: Parser (Maybe a)
maybeParser = (try $ Just <$> posParser) <|> (const Nothing <$> negParser) | 221 | false | true | 1 | 9 | 60 | 104 | 52 | 52 | null | null |
intolerable/GroupProject | src/Emulator/CPU/Instructions/ARM/Opcodes.hs | bsd-2-clause | mvn :: (HasFlags s, HasRegisters s, MonadState s m)
=> DestRegister -> a -> ShiftRegister -> ConditionCode -> m ()
mvn dest _ src2 cCode = do
(cy, res2) <- use $ registers.src2
let val = complement res2
registers.dest .= val
when cCode $ do
setFlagsLogic val
flags.carry .= cy
-- Bit clear | 310 | mvn :: (HasFlags s, HasRegisters s, MonadState s m)
=> DestRegister -> a -> ShiftRegister -> ConditionCode -> m ()
mvn dest _ src2 cCode = do
(cy, res2) <- use $ registers.src2
let val = complement res2
registers.dest .= val
when cCode $ do
setFlagsLogic val
flags.carry .= cy
-- Bit clear | 310 | mvn dest _ src2 cCode = do
(cy, res2) <- use $ registers.src2
let val = complement res2
registers.dest .= val
when cCode $ do
setFlagsLogic val
flags.carry .= cy
-- Bit clear | 191 | false | true | 0 | 11 | 73 | 130 | 62 | 68 | null | null |
rueshyna/gogol | gogol-autoscaler/gen/Network/Google/Resource/Autoscaler/Zones/List.hs | mpl-2.0 | zlFilter :: Lens' ZonesList (Maybe Text)
zlFilter = lens _zlFilter (\ s a -> s{_zlFilter = a}) | 94 | zlFilter :: Lens' ZonesList (Maybe Text)
zlFilter = lens _zlFilter (\ s a -> s{_zlFilter = a}) | 94 | zlFilter = lens _zlFilter (\ s a -> s{_zlFilter = a}) | 53 | false | true | 1 | 9 | 16 | 48 | 24 | 24 | null | null |
rvion/ride | jetpack/src/Network/Wai/Handler/Warp/AsWai.hs | bsd-3-clause | set_wai_fileInfoDate x o = o { I.fileInfoDate = x} | 50 | set_wai_fileInfoDate x o = o { I.fileInfoDate = x} | 50 | set_wai_fileInfoDate x o = o { I.fileInfoDate = x} | 50 | false | false | 0 | 6 | 8 | 21 | 11 | 10 | null | null |
emwap/feldspar-language | src/Feldspar/Core/Types.hs | bsd-3-clause | typeEq (IVarType t1) (IVarType t2) = do
TypeEq <- typeEq t1 t2
return TypeEq | 84 | typeEq (IVarType t1) (IVarType t2) = do
TypeEq <- typeEq t1 t2
return TypeEq | 84 | typeEq (IVarType t1) (IVarType t2) = do
TypeEq <- typeEq t1 t2
return TypeEq | 84 | false | false | 0 | 8 | 21 | 41 | 18 | 23 | null | null |
hpacheco/jasminv | src/Language/Jasmin/Parser/Parser.hs | gpl-3.0 | delimited x m y = x *> m <* y | 29 | delimited x m y = x *> m <* y | 29 | delimited x m y = x *> m <* y | 29 | false | false | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
urbit/urbit | pkg/hs/urbit-atom/test/Main.hs | mit | prop_fast_atom_words_roundtrip :: Natural -> Bool
prop_fast_atom_words_roundtrip = dumpLoad F.atomWords F.wordsAtom | 115 | prop_fast_atom_words_roundtrip :: Natural -> Bool
prop_fast_atom_words_roundtrip = dumpLoad F.atomWords F.wordsAtom | 115 | prop_fast_atom_words_roundtrip = dumpLoad F.atomWords F.wordsAtom | 65 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
GaloisInc/ivory-tower-stm32 | ivory-bsp-stm32/src/Ivory/BSP/STM32F427/GPIO/Ports.hs | bsd-3-clause | gpioB :: GPIOPort
gpioB = mkGPIOPort gpiob_periph_base
(rccEnable rcc_ahb1en_gpiob)
(rccDisable rcc_ahb1en_gpiob)
1 | 145 | gpioB :: GPIOPort
gpioB = mkGPIOPort gpiob_periph_base
(rccEnable rcc_ahb1en_gpiob)
(rccDisable rcc_ahb1en_gpiob)
1 | 145 | gpioB = mkGPIOPort gpiob_periph_base
(rccEnable rcc_ahb1en_gpiob)
(rccDisable rcc_ahb1en_gpiob)
1 | 127 | false | true | 0 | 6 | 41 | 42 | 17 | 25 | null | null |
erochest/phaedrus | Phaedrus/Text/TfIdf.hs | apache-2.0 | tfDoc :: (Hashable a, Eq a) => M.HashMap a Int -> M.HashMap a Double
tfDoc m = M.map (tf maxf) m
where maxf = M.foldl' max 0 m | 130 | tfDoc :: (Hashable a, Eq a) => M.HashMap a Int -> M.HashMap a Double
tfDoc m = M.map (tf maxf) m
where maxf = M.foldl' max 0 m | 130 | tfDoc m = M.map (tf maxf) m
where maxf = M.foldl' max 0 m | 61 | false | true | 0 | 8 | 31 | 76 | 37 | 39 | null | null |
ksaveljev/hake-2 | src/Client/CLNewFX.hs | bsd-3-clause | monsterPlasmaShell :: V3 Float -> Quake ()
monsterPlasmaShell origin = do
freeParticles <- use $ clientGlobals.cgFreeParticles
addMonsterPlasmaShell freeParticles 0 40
where addMonsterPlasmaShell :: Maybe (IORef CParticleT) -> Int -> Int -> Quake ()
addMonsterPlasmaShell Nothing _ _ = return ()
... | 1,452 | monsterPlasmaShell :: V3 Float -> Quake ()
monsterPlasmaShell origin = do
freeParticles <- use $ clientGlobals.cgFreeParticles
addMonsterPlasmaShell freeParticles 0 40
where addMonsterPlasmaShell :: Maybe (IORef CParticleT) -> Int -> Int -> Quake ()
addMonsterPlasmaShell Nothing _ _ = return ()
... | 1,452 | monsterPlasmaShell origin = do
freeParticles <- use $ clientGlobals.cgFreeParticles
addMonsterPlasmaShell freeParticles 0 40
where addMonsterPlasmaShell :: Maybe (IORef CParticleT) -> Int -> Int -> Quake ()
addMonsterPlasmaShell Nothing _ _ = return ()
addMonsterPlasmaShell (Just pRef) idx ma... | 1,409 | false | true | 0 | 20 | 654 | 374 | 182 | 192 | null | null |
forked-upstream-packages-for-ghcjs/ghcjs | ghcjs/src/Gen2/Prim.hs | mit | genPrim _ _ MkWeakOp [r] [o,b,c] = PrimInline [j| `r` = h$makeWeak(`o`,`b`,`c`); |] | 83 | genPrim _ _ MkWeakOp [r] [o,b,c] = PrimInline [j| `r` = h$makeWeak(`o`,`b`,`c`); |] | 83 | genPrim _ _ MkWeakOp [r] [o,b,c] = PrimInline [j| `r` = h$makeWeak(`o`,`b`,`c`); |] | 83 | false | false | 0 | 6 | 12 | 36 | 21 | 15 | null | null |
SkyA1ex/tetris | src/Drawing.hs | bsd-3-clause | gameOverColor = makeColorI 181 7 7 220 | 38 | gameOverColor = makeColorI 181 7 7 220 | 38 | gameOverColor = makeColorI 181 7 7 220 | 38 | false | false | 1 | 5 | 6 | 18 | 7 | 11 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_KIX_STRING2 :: Int
wxSTC_KIX_STRING2 = 3 | 46 | wxSTC_KIX_STRING2 :: Int
wxSTC_KIX_STRING2 = 3 | 46 | wxSTC_KIX_STRING2 = 3 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
brendanhay/gogol | gogol-remotebuildexecution/gen/Network/Google/RemoteBuildExecution/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'GoogleDevtoolsRemotebuildbotResourceUsageStat' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gdrrusUsed'
--
-- * 'gdrrusTotal'
googleDevtoolsRemotebuildbotResourceUsageStat
:: GoogleDevtoolsRemotebuildbo... | 487 | googleDevtoolsRemotebuildbotResourceUsageStat
:: GoogleDevtoolsRemotebuildbotResourceUsageStat
googleDevtoolsRemotebuildbotResourceUsageStat =
GoogleDevtoolsRemotebuildbotResourceUsageStat'
{_gdrrusUsed = Nothing, _gdrrusTotal = Nothing} | 247 | googleDevtoolsRemotebuildbotResourceUsageStat =
GoogleDevtoolsRemotebuildbotResourceUsageStat'
{_gdrrusUsed = Nothing, _gdrrusTotal = Nothing} | 148 | true | true | 0 | 6 | 59 | 32 | 22 | 10 | null | null |
monsanto/hie | hie.hs | gpl-3.0 | extractDecl _ = Map.empty | 25 | extractDecl _ = Map.empty | 25 | extractDecl _ = Map.empty | 25 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
pepeiborra/bytestring-xml | src/Text/Xml/Tiny/Internal.hs | bsd-3-clause | -- | Non inclusive
end :: Config => Slice -> Int32
end (Slice o l) = o + l | 74 | end :: Config => Slice -> Int32
end (Slice o l) = o + l | 55 | end (Slice o l) = o + l | 23 | true | true | 0 | 6 | 18 | 40 | 19 | 21 | null | null |
lukexi/openvr-hs | src/Graphics/VR/OpenVR.hs | bsd-3-clause | trackedControllerRoleToC :: TrackedControllerRole -> CInt
trackedControllerRoleToC TrackedControllerRoleInvalid = k_TrackedControllerRole_Invalid | 149 | trackedControllerRoleToC :: TrackedControllerRole -> CInt
trackedControllerRoleToC TrackedControllerRoleInvalid = k_TrackedControllerRole_Invalid | 149 | trackedControllerRoleToC TrackedControllerRoleInvalid = k_TrackedControllerRole_Invalid | 91 | false | true | 0 | 5 | 12 | 18 | 9 | 9 | null | null |
sdiehl/ghc | compiler/GHC/HsToCore/PmCheck.hs | bsd-3-clause | checkGrdTree' (Guard (PmLet x e) tree) deltas = do
deltas' <- addPmCtDeltas deltas (PmCoreCt x e)
checkGrdTree' tree deltas'
-- Bang x: Diverge on x ~ ⊥, refine with x /~ ⊥ | 176 | checkGrdTree' (Guard (PmLet x e) tree) deltas = do
deltas' <- addPmCtDeltas deltas (PmCoreCt x e)
checkGrdTree' tree deltas'
-- Bang x: Diverge on x ~ ⊥, refine with x /~ ⊥ | 176 | checkGrdTree' (Guard (PmLet x e) tree) deltas = do
deltas' <- addPmCtDeltas deltas (PmCoreCt x e)
checkGrdTree' tree deltas'
-- Bang x: Diverge on x ~ ⊥, refine with x /~ ⊥ | 176 | false | false | 0 | 10 | 35 | 56 | 26 | 30 | null | null |
osa1/toylisp | src/Parser.hs | bsd-3-clause | parseLambdaOrFun :: Parser (Either (Expr Symbol) (Expr Lambda))
parseLambdaOrFun = liftM Right parseLambda <|> liftM Left parseSymbol | 133 | parseLambdaOrFun :: Parser (Either (Expr Symbol) (Expr Lambda))
parseLambdaOrFun = liftM Right parseLambda <|> liftM Left parseSymbol | 133 | parseLambdaOrFun = liftM Right parseLambda <|> liftM Left parseSymbol | 69 | false | true | 0 | 9 | 16 | 48 | 23 | 25 | null | null |
oldmanmike/hs-minecraft-nbt | src/Data/NBT/Encode.hs | bsd-3-clause | encodeNBT' (NTagByteArray payload) = encodeByteArray payload | 61 | encodeNBT' (NTagByteArray payload) = encodeByteArray payload | 61 | encodeNBT' (NTagByteArray payload) = encodeByteArray payload | 61 | false | false | 0 | 6 | 6 | 19 | 8 | 11 | null | null |
gvnkd/os_dep_jen | Helpers.hs | mit | dedup :: Ord a => [a] -> [a]
dedup = toList . fromList | 54 | dedup :: Ord a => [a] -> [a]
dedup = toList . fromList | 54 | dedup = toList . fromList | 25 | false | true | 0 | 9 | 12 | 39 | 18 | 21 | null | null |
markhibberd/juggernaut | src/Juggernaut/Api.hs | bsd-3-clause | workers :: [Module] -> [Target]
workers = map workers' | 54 | workers :: [Module] -> [Target]
workers = map workers' | 54 | workers = map workers' | 22 | false | true | 0 | 8 | 8 | 31 | 14 | 17 | null | null |
beni55/haste-compiler | src/Data/JSTarget/Optimize.hs | bsd-3-clause | tailLoopify _ fun = do
return fun
-- | Inline a tailcalled function @f@ when:
--
-- * @f@ does not refer to itself; and
-- * @f@ is defined immediately before its call site.
-- (@let f = ... in tailcall f@)
--
-- Should be called *after* 'tailLoopify' but *before* trampoline for best
-- effect. | 310 | tailLoopify _ fun = do
return fun
-- | Inline a tailcalled function @f@ when:
--
-- * @f@ does not refer to itself; and
-- * @f@ is defined immediately before its call site.
-- (@let f = ... in tailcall f@)
--
-- Should be called *after* 'tailLoopify' but *before* trampoline for best
-- effect. | 310 | tailLoopify _ fun = do
return fun
-- | Inline a tailcalled function @f@ when:
--
-- * @f@ does not refer to itself; and
-- * @f@ is defined immediately before its call site.
-- (@let f = ... in tailcall f@)
--
-- Should be called *after* 'tailLoopify' but *before* trampoline for best
-- effect. | 310 | false | false | 0 | 7 | 71 | 25 | 15 | 10 | null | null |
Velro/PolarisCover | src/ECSystem.hs | gpl-2.0 | emptySystem :: ECSystem
emptySystem = ECSystem Map.empty Map.empty Map.empty | 76 | emptySystem :: ECSystem
emptySystem = ECSystem Map.empty Map.empty Map.empty | 76 | emptySystem = ECSystem Map.empty Map.empty Map.empty | 52 | false | true | 0 | 6 | 8 | 24 | 12 | 12 | null | null |
frantisekfarka/ghc-dsi | compiler/codeGen/StgCmmExtCode.hs | bsd-3-clause | emitStore :: CmmExpr -> CmmExpr -> CmmParse ()
emitStore l r = code (F.emitStore l r) | 86 | emitStore :: CmmExpr -> CmmExpr -> CmmParse ()
emitStore l r = code (F.emitStore l r) | 86 | emitStore l r = code (F.emitStore l r) | 38 | false | true | 0 | 9 | 16 | 47 | 21 | 26 | null | null |
heathweiss/Tricad | src/CornerPoints/Points.hs | gpl-2.0 | {-
Front view of cube:
2 ---------- 3
| |
| | x-axis ---->
1 ---------- 4 y-axis: coming toward you.
z-axis: ^
|
f: front of cube
b: back of cube
Now each corner can be named with corner # and f (front) or b (back)
-}
{---------------- instance o... | 751 | axisEqual :: (Eq a, Num a, Ord a, Fractional a) => a -> a -> Bool
axisEqual a b
| (abs (a - b)) <= 0.011 = True
| otherwise = False | 144 | axisEqual a b
| (abs (a - b)) <= 0.011 = True
| otherwise = False | 78 | true | true | 0 | 12 | 223 | 93 | 45 | 48 | null | null |
ezyang/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv
avoidClashesOccEnv env occs = go env emptyUFM occs
where
go env _ [] = env
go env seenOnce ((OccName _ fs):occs)
| fs `elemUFM` env = go env seenOnce occs
| fs `elemUFM` seenOnce = go (addToUFM env fs 1) seenO... | 399 | avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv
avoidClashesOccEnv env occs = go env emptyUFM occs
where
go env _ [] = env
go env seenOnce ((OccName _ fs):occs)
| fs `elemUFM` env = go env seenOnce occs
| fs `elemUFM` seenOnce = go (addToUFM env fs 1) seenO... | 399 | avoidClashesOccEnv env occs = go env emptyUFM occs
where
go env _ [] = env
go env seenOnce ((OccName _ fs):occs)
| fs `elemUFM` env = go env seenOnce occs
| fs `elemUFM` seenOnce = go (addToUFM env fs 1) seenOnce occs
| otherwise = go env (addToUFM s... | 339 | false | true | 0 | 9 | 128 | 157 | 77 | 80 | null | null |
urbanslug/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | Combine two Safe Haskell modes correctly. Used for dealing with multiple flags.
-- This makes Safe Haskell very much a monoid but for now I prefer this as I don't
-- want to export this functionality from the module but do want to export the
-- type constructors.
combineSafeFlags :: SafeHaskellMode -> SafeHaskellM... | 935 | combineSafeFlags :: SafeHaskellMode -> SafeHaskellMode -> DynP SafeHaskellMode
combineSafeFlags a b | a == Sf_None = return b
| b == Sf_None = return a
| a == b = return a
| otherwise = addErr errm >> return (panic e... | 666 | combineSafeFlags a b | a == Sf_None = return b
| b == Sf_None = return a
| a == b = return a
| otherwise = addErr errm >> return (panic errm)
where errm = "Incompatible Safe Haskell flags! ("
... | 587 | true | true | 0 | 9 | 301 | 136 | 66 | 70 | null | null |
d0kt0r0/Tidal | src/Sound/Tidal/Core.hs | gpl-3.0 | _every :: Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
_every 0 _ p = p | 84 | _every :: Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
_every 0 _ p = p | 84 | _every 0 _ p = p | 16 | false | true | 0 | 10 | 20 | 54 | 24 | 30 | null | null |
adamflott/scotty | Web/Scotty/Action.hs | bsd-3-clause | -- | Add to the response headers. Header names are case-insensitive.
addHeader :: Monad m => T.Text -> T.Text -> ActionT e m ()
addHeader = changeHeader add | 156 | addHeader :: Monad m => T.Text -> T.Text -> ActionT e m ()
addHeader = changeHeader add | 87 | addHeader = changeHeader add | 28 | true | true | 0 | 9 | 27 | 43 | 21 | 22 | null | null |
bgaster/blocks | Blocks.hs | mit | blockIDS = 4 :: BlockID | 24 | blockIDS = 4 :: BlockID | 24 | blockIDS = 4 :: BlockID | 24 | false | false | 0 | 4 | 5 | 9 | 5 | 4 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.