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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Skyfold/postgrest | test/SpecHelper.hs | mit | testCfgNoJWT :: Text -> AppConfig
testCfgNoJWT testDbConn = (testCfg testDbConn) { configJwtSecret = Nothing } | 110 | testCfgNoJWT :: Text -> AppConfig
testCfgNoJWT testDbConn = (testCfg testDbConn) { configJwtSecret = Nothing } | 110 | testCfgNoJWT testDbConn = (testCfg testDbConn) { configJwtSecret = Nothing } | 76 | false | true | 0 | 7 | 14 | 32 | 17 | 15 | null | null |
mrlovre/super-memory | Pro2/src/Utility.hs | gpl-3.0 | takeWhileIncluding p (l:rest) = if
| p l -> l : takeWhileIncluding p rest
| otherwise -> [l] | 100 | takeWhileIncluding p (l:rest) = if
| p l -> l : takeWhileIncluding p rest
| otherwise -> [l] | 100 | takeWhileIncluding p (l:rest) = if
| p l -> l : takeWhileIncluding p rest
| otherwise -> [l] | 100 | false | false | 2 | 9 | 25 | 52 | 24 | 28 | null | null |
michiexile/hplex | pershom/src/Math/Simplicial/Simplex.hs | bsd-3-clause | dimension' :: Simplex a -> Int
dimension' (C _ d v)
| null v = 0
| otherwise = d | 88 | dimension' :: Simplex a -> Int
dimension' (C _ d v)
| null v = 0
| otherwise = d | 88 | dimension' (C _ d v)
| null v = 0
| otherwise = d | 57 | false | true | 1 | 8 | 27 | 48 | 22 | 26 | null | null |
danieldietrich/llrbtree | Data/Set/WBTree.hs | bsd-3-clause | fromList :: Ord a => [a] -> WBTree a
fromList = foldl' (flip insert) empty | 74 | fromList :: Ord a => [a] -> WBTree a
fromList = foldl' (flip insert) empty | 74 | fromList = foldl' (flip insert) empty | 37 | false | true | 0 | 8 | 14 | 45 | 20 | 25 | null | null |
Noeda/caramia | src/Graphics/Caramia/Prelude.hs | mit | -- | Same as `atomicModifyIORef'` but does not return a value.
atomicModifyIORef_' :: IORef a -> (a -> a) -> IO ()
atomicModifyIORef_' ref fun = atomicModifyIORef' ref $ \old -> ( fun old, () ) | 193 | atomicModifyIORef_' :: IORef a -> (a -> a) -> IO ()
atomicModifyIORef_' ref fun = atomicModifyIORef' ref $ \old -> ( fun old, () ) | 130 | atomicModifyIORef_' ref fun = atomicModifyIORef' ref $ \old -> ( fun old, () ) | 78 | true | true | 0 | 8 | 35 | 63 | 32 | 31 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F15.hs | bsd-3-clause | -- glLoadProgramNV -------------------------------------------------------------
glLoadProgramNV
:: MonadIO m
=> GLenum -- ^ @target@ of type [VertexAttribEnumNV](Graphics-GL-Groups.html#VertexAttribEnumNV).
-> GLuint -- ^ @id@.
-> GLsizei -- ^ @len@.
-> Ptr GLubyte -- ^ @program@ pointing to @len@ elements ... | 426 | glLoadProgramNV
:: MonadIO m
=> GLenum -- ^ @target@ of type [VertexAttribEnumNV](Graphics-GL-Groups.html#VertexAttribEnumNV).
-> GLuint -- ^ @id@.
-> GLsizei -- ^ @len@.
-> Ptr GLubyte -- ^ @program@ pointing to @len@ elements of type @GLubyte@.
-> m ()
glLoadProgramNV v1 v2 v3 v4 = liftIO $ dyn515 ptr_glL... | 344 | glLoadProgramNV v1 v2 v3 v4 = liftIO $ dyn515 ptr_glLoadProgramNV v1 v2 v3 v4 | 77 | true | true | 0 | 12 | 67 | 75 | 37 | 38 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs | bsd-3-clause | gl_DYNAMIC_READ :: GLenum
gl_DYNAMIC_READ = 0x88E9 | 50 | gl_DYNAMIC_READ :: GLenum
gl_DYNAMIC_READ = 0x88E9 | 50 | gl_DYNAMIC_READ = 0x88E9 | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
adnelson/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyReportPart (App _ (P (DCon _ _ _) n _) ttn)
| n == reflm "NamePart" =
case runElab initEState (reifyTTName ttn) (initElaborator (sMN 0 "hole") initContext emptyContext Erased) of
Error e -> Left . InternalMsg $
"could not reify name term " ++
show ttn ++
" when reflecting an error:... | 370 | reifyReportPart (App _ (P (DCon _ _ _) n _) ttn)
| n == reflm "NamePart" =
case runElab initEState (reifyTTName ttn) (initElaborator (sMN 0 "hole") initContext emptyContext Erased) of
Error e -> Left . InternalMsg $
"could not reify name term " ++
show ttn ++
" when reflecting an error:... | 370 | reifyReportPart (App _ (P (DCon _ _ _) n _) ttn)
| n == reflm "NamePart" =
case runElab initEState (reifyTTName ttn) (initElaborator (sMN 0 "hole") initContext emptyContext Erased) of
Error e -> Left . InternalMsg $
"could not reify name term " ++
show ttn ++
" when reflecting an error:... | 370 | false | false | 0 | 13 | 100 | 146 | 69 | 77 | null | null |
clample/lamdabtc | backend/src/General/Util.hs | bsd-3-clause | getBranchStep :: [a] -> [Int] -> Tree a -> Maybe [a]
getBranchStep acc (i:is) tree = do
let val = tree^.node
subTree' <- getSubTree i tree
getBranchStep (val:acc) is subTree' | 180 | getBranchStep :: [a] -> [Int] -> Tree a -> Maybe [a]
getBranchStep acc (i:is) tree = do
let val = tree^.node
subTree' <- getSubTree i tree
getBranchStep (val:acc) is subTree' | 180 | getBranchStep acc (i:is) tree = do
let val = tree^.node
subTree' <- getSubTree i tree
getBranchStep (val:acc) is subTree' | 127 | false | true | 0 | 10 | 35 | 94 | 46 | 48 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects MyThreadIdOp = True | 40 | primOpHasSideEffects MyThreadIdOp = True | 40 | primOpHasSideEffects MyThreadIdOp = True | 40 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
clockworkdevstudio/Idlewild-Lang | Lexer.hs | bsd-2-clause | matchConstant :: CodeTransformation ()
matchConstant =
do consume integral
LEX_PENDING LEX_PENDING []
TOKEN_INT_CONSTANT
consume decimalPoint
LEX_PENDING LEX_DONE []
TOKEN_FLOAT_CONSTANT
consume fractional
LEX_PENDING LEX_ER... | 1,015 | matchConstant :: CodeTransformation ()
matchConstant =
do consume integral
LEX_PENDING LEX_PENDING []
TOKEN_INT_CONSTANT
consume decimalPoint
LEX_PENDING LEX_DONE []
TOKEN_FLOAT_CONSTANT
consume fractional
LEX_PENDING LEX_ER... | 1,015 | matchConstant =
do consume integral
LEX_PENDING LEX_PENDING []
TOKEN_INT_CONSTANT
consume decimalPoint
LEX_PENDING LEX_DONE []
TOKEN_FLOAT_CONSTANT
consume fractional
LEX_PENDING LEX_ERROR "Expecting fractional part of float... | 976 | false | true | 4 | 8 | 370 | 186 | 80 | 106 | null | null |
shlevy/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | findExternalRules :: Bool -- Omit pragmas
-> [CoreBind]
-> [CoreRule] -- Local rules for imported fns
-> UnfoldEnv -- Ids that are exported, so we need their rules
-> ([CoreBind], [CoreRule])
-- See Note [Finding external rules]
findExternal... | 4,516 | findExternalRules :: Bool -- Omit pragmas
-> [CoreBind]
-> [CoreRule] -- Local rules for imported fns
-> UnfoldEnv -- Ids that are exported, so we need their rules
-> ([CoreBind], [CoreRule])
findExternalRules omit_prags binds imp_id_rules u... | 4,479 | findExternalRules omit_prags binds imp_id_rules unfold_env
= (trimmed_binds, filter keep_rule all_rules)
where
imp_rules = filter expose_rule imp_id_rules
imp_user_rule_fvs = mapUnionVarSet user_rule_rhs_fvs imp_rules
user_rule_rhs_fvs rule | isAutoRule rule = emptyVarSet
... | 4,208 | true | true | 18 | 12 | 1,645 | 499 | 286 | 213 | null | null |
metasepi/c2ats | src/Language/C2ATS/Process.hs | gpl-3.0 | flatGlobal :: GlobalDecls -> [FlatG]
flatGlobal gmap = theTags ++ theObjs ++ theTypeDefs
where
theTags = Map.assocs $ Map.map FGTag $ gTags gmap
theObjs = Map.assocs $ Map.map FGObj $ Map.mapKeys NamedRef $ gObjs gmap
theTypeDefs = Map.assocs $ Map.map FGType $ Map.mapKeys NamedRef $ gTypeDefs g... | 405 | flatGlobal :: GlobalDecls -> [FlatG]
flatGlobal gmap = theTags ++ theObjs ++ theTypeDefs
where
theTags = Map.assocs $ Map.map FGTag $ gTags gmap
theObjs = Map.assocs $ Map.map FGObj $ Map.mapKeys NamedRef $ gObjs gmap
theTypeDefs = Map.assocs $ Map.map FGType $ Map.mapKeys NamedRef $ gTypeDefs g... | 405 | flatGlobal gmap = theTags ++ theObjs ++ theTypeDefs
where
theTags = Map.assocs $ Map.map FGTag $ gTags gmap
theObjs = Map.assocs $ Map.map FGObj $ Map.mapKeys NamedRef $ gObjs gmap
theTypeDefs = Map.assocs $ Map.map FGType $ Map.mapKeys NamedRef $ gTypeDefs gmap
--------------------------------... | 368 | false | true | 0 | 9 | 72 | 120 | 58 | 62 | null | null |
shockkolate/containers | Data/Map/Base.hs | bsd-3-clause | deleteMin (Bin _ kx x l r) = balanceR kx x (deleteMin l) r | 61 | deleteMin (Bin _ kx x l r) = balanceR kx x (deleteMin l) r | 61 | deleteMin (Bin _ kx x l r) = balanceR kx x (deleteMin l) r | 61 | false | false | 0 | 7 | 16 | 38 | 18 | 20 | null | null |
23Skidoo/xmlhtml | src/Text/XmlHtml/Common.hs | bsd-3-clause | encodingName UTF16LE = "UTF-16" | 31 | encodingName UTF16LE = "UTF-16" | 31 | encodingName UTF16LE = "UTF-16" | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
fizruk/tubes | src/Tubes/Model/Universe.hs | bsd-3-clause | applyPlayerAction :: PlayerAction -> PlayerId -> Universe -> Universe
applyPlayerAction (PlayerStartAction point) = playerStartAction point | 146 | applyPlayerAction :: PlayerAction -> PlayerId -> Universe -> Universe
applyPlayerAction (PlayerStartAction point) = playerStartAction point | 146 | applyPlayerAction (PlayerStartAction point) = playerStartAction point | 76 | false | true | 0 | 7 | 21 | 35 | 17 | 18 | null | null |
fmapfmapfmap/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/BatchGetDeployments.hs | mpl-2.0 | -- | The response status code.
bgdrsResponseStatus :: Lens' BatchGetDeploymentsResponse Int
bgdrsResponseStatus = lens _bgdrsResponseStatus (\ s a -> s{_bgdrsResponseStatus = a}) | 178 | bgdrsResponseStatus :: Lens' BatchGetDeploymentsResponse Int
bgdrsResponseStatus = lens _bgdrsResponseStatus (\ s a -> s{_bgdrsResponseStatus = a}) | 147 | bgdrsResponseStatus = lens _bgdrsResponseStatus (\ s a -> s{_bgdrsResponseStatus = a}) | 86 | true | true | 0 | 9 | 21 | 40 | 22 | 18 | null | null |
vincenthz/cryptonite | Crypto/MAC/KMAC.hs | bsd-3-clause | rightEncode :: Int -> Builder
rightEncode x = digits <> byte len
where
digits = i2osp x
len = fromIntegral (builderLength digits) | 142 | rightEncode :: Int -> Builder
rightEncode x = digits <> byte len
where
digits = i2osp x
len = fromIntegral (builderLength digits) | 142 | rightEncode x = digits <> byte len
where
digits = i2osp x
len = fromIntegral (builderLength digits) | 112 | false | true | 0 | 7 | 34 | 50 | 24 | 26 | null | null |
joelwilliamson/validator | AttoScoped.hs | agpl-3.0 | regularBlockFinish = eq >> sep >> rhs <* sep | 44 | regularBlockFinish = eq >> sep >> rhs <* sep | 44 | regularBlockFinish = eq >> sep >> rhs <* sep | 44 | false | false | 0 | 7 | 8 | 18 | 9 | 9 | null | null |
glebovitz/demo | src/DataAnalysis/Application/Handler/Export.hs | mit | toXmlRows :: Monad m => (row -> Conduit row m Event) -> Conduit row m Event
toXmlRows renderRow =
do yield EventBeginDocument
with "rows"
(awaitForever (with "row" . renderRow))
yield EventEndDocument
-- | With opening/closing tags for the given name, render the inner
-- conduit inside it. | 313 | toXmlRows :: Monad m => (row -> Conduit row m Event) -> Conduit row m Event
toXmlRows renderRow =
do yield EventBeginDocument
with "rows"
(awaitForever (with "row" . renderRow))
yield EventEndDocument
-- | With opening/closing tags for the given name, render the inner
-- conduit inside it. | 313 | toXmlRows renderRow =
do yield EventBeginDocument
with "rows"
(awaitForever (with "row" . renderRow))
yield EventEndDocument
-- | With opening/closing tags for the given name, render the inner
-- conduit inside it. | 237 | false | true | 0 | 12 | 69 | 84 | 39 | 45 | null | null |
xmonad/xmonad-contrib | XMonad/Hooks/ToggleHook.hs | bsd-3-clause | -- | Whether the next window will trigger the hook @name@.
willHookNext :: String -> X Bool
willHookNext n = _get n fst | 119 | willHookNext :: String -> X Bool
willHookNext n = _get n fst | 60 | willHookNext n = _get n fst | 27 | true | true | 0 | 7 | 22 | 33 | 14 | 19 | null | null |
aszlig/language-javascript | src/Language/JavaScript/Pretty/Printer.hs | bsd-3-clause | rn (NN (JSExpressionPostfix s xs op)) foo = rJS (xs ++ [op]) foo | 76 | rn (NN (JSExpressionPostfix s xs op)) foo = rJS (xs ++ [op]) foo | 76 | rn (NN (JSExpressionPostfix s xs op)) foo = rJS (xs ++ [op]) foo | 76 | false | false | 0 | 9 | 24 | 42 | 21 | 21 | null | null |
gleachkr/Carnap | Carnap/src/Carnap/Languages/PurePropositional/Logic/Allen.hs | gpl-3.0 | allenNotation :: String -> String
allenNotation x = case runParser altparser 0 "" x of
Left e -> show e
Right s -> s
where altparser = do s <- handlecon <|> try handleatom <|> handleLParen <|> handleRParen <|> fallback
rest <- (e... | 1,150 | allenNotation :: String -> String
allenNotation x = case runParser altparser 0 "" x of
Left e -> show e
Right s -> s
where altparser = do s <- handlecon <|> try handleatom <|> handleLParen <|> handleRParen <|> fallback
rest <- (eof... | 1,148 | allenNotation x = case runParser altparser 0 "" x of
Left e -> show e
Right s -> s
where altparser = do s <- handlecon <|> try handleatom <|> handleLParen <|> handleRParen <|> fallback
rest <- (eof >> return "") <|> altparser
... | 1,114 | false | true | 7 | 12 | 585 | 354 | 161 | 193 | null | null |
konn/reactive-objc | AppDelegate.hs | bsd-3-clause | object :: Message "object"
object = NotifObject | 47 | object :: Message "object"
object = NotifObject | 47 | object = NotifObject | 20 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
zeekay/lambdabot | unlambda/Language/Unlambda.hs | mit | sh S = showChar 's' | 28 | sh S = showChar 's' | 28 | sh S = showChar 's' | 28 | false | false | 1 | 5 | 13 | 15 | 5 | 10 | null | null |
erm0l0v/Cards | src/Game/Cards/Hand.hs | bsd-3-clause | join _ [x] = show x | 19 | join _ [x] = show x | 19 | join _ [x] = show x | 19 | false | false | 1 | 5 | 5 | 19 | 8 | 11 | null | null |
facebookincubator/duckling | Duckling/AmountOfMoney/EN/TT/Rules.hs | bsd-3-clause | rules :: [Rule]
rules =
[ ruleAGrand
, ruleGrand
, ruleDollarCoin
] | 75 | rules :: [Rule]
rules =
[ ruleAGrand
, ruleGrand
, ruleDollarCoin
] | 75 | rules =
[ ruleAGrand
, ruleGrand
, ruleDollarCoin
] | 59 | false | true | 0 | 5 | 19 | 23 | 14 | 9 | null | null |
peterokagey/haskellOEIS | src/Palindromes/A298477.hs | apache-2.0 | a298477 :: Int -> Int
a298477 n = 2 * length (filter (==targetSize) $ map a298475 [2^(n-1)..2^n - 1]) where
targetSize = a090701 n | 133 | a298477 :: Int -> Int
a298477 n = 2 * length (filter (==targetSize) $ map a298475 [2^(n-1)..2^n - 1]) where
targetSize = a090701 n | 133 | a298477 n = 2 * length (filter (==targetSize) $ map a298475 [2^(n-1)..2^n - 1]) where
targetSize = a090701 n | 111 | false | true | 0 | 13 | 26 | 77 | 40 | 37 | null | null |
manyoo/ghcjs | src/Gen2/Foreign.hs | mit | ghcjsCheckCConv :: CCallConv -> TcM CCallConv
ghcjsCheckCConv CCallConv = return CCallConv | 99 | ghcjsCheckCConv :: CCallConv -> TcM CCallConv
ghcjsCheckCConv CCallConv = return CCallConv | 99 | ghcjsCheckCConv CCallConv = return CCallConv | 53 | false | true | 0 | 6 | 19 | 24 | 11 | 13 | null | null |
brendanhay/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The green component of the color, from 0.0 to 1.0.
rcGreen :: Lens' RgbColor (Maybe Double)
rcGreen
= lens _rcGreen (\ s a -> s{_rcGreen = a}) .
mapping _Coerce | 173 | rcGreen :: Lens' RgbColor (Maybe Double)
rcGreen
= lens _rcGreen (\ s a -> s{_rcGreen = a}) .
mapping _Coerce | 117 | rcGreen
= lens _rcGreen (\ s a -> s{_rcGreen = a}) .
mapping _Coerce | 76 | true | true | 0 | 10 | 39 | 55 | 28 | 27 | null | null |
j5b/ps-pc | ConsoleOutput.hs | gpl-3.0 | conceptToConsole (And (Neg T) T) = botConsole++andConsole++botConsole | 69 | conceptToConsole (And (Neg T) T) = botConsole++andConsole++botConsole | 69 | conceptToConsole (And (Neg T) T) = botConsole++andConsole++botConsole | 69 | false | false | 0 | 8 | 6 | 32 | 15 | 17 | null | null |
henrytill/deviser | src/Deviser/Evaluator.hs | bsd-3-clause | eval (List [Atom "quote", value]) = return value | 64 | eval (List [Atom "quote", value]) = return value | 64 | eval (List [Atom "quote", value]) = return value | 64 | false | false | 0 | 8 | 23 | 28 | 13 | 15 | null | null |
ulricha/dsh | src/Database/DSH/CL/Opt/LoopInvariant.hs | bsd-3-clause | searchInvariantExprT :: [Ident] -> TransformC CL (Expr, PathC)
searchInvariantExprT localVars = complexPathT localVars <+ promoteT (traverseT localVars) | 152 | searchInvariantExprT :: [Ident] -> TransformC CL (Expr, PathC)
searchInvariantExprT localVars = complexPathT localVars <+ promoteT (traverseT localVars) | 152 | searchInvariantExprT localVars = complexPathT localVars <+ promoteT (traverseT localVars) | 89 | false | true | 0 | 8 | 16 | 48 | 24 | 24 | null | null |
da-x/buildsome | src/Lib/FSHook/Protocol.hs | gpl-2.0 | showFunc (Exec path) = unwords ["exec:", show path] | 51 | showFunc (Exec path) = unwords ["exec:", show path] | 51 | showFunc (Exec path) = unwords ["exec:", show path] | 51 | false | false | 0 | 7 | 7 | 28 | 13 | 15 | null | null |
RossMeikleham/Project-Euler-Haskell | 37.hs | mit | euler37 = sum $ filter (isRightTruncatePrime) $
filter (isLeftTruncatePrime) $
dropWhile (< 10) $ getPrimesUpTo 750000 | 147 | euler37 = sum $ filter (isRightTruncatePrime) $
filter (isLeftTruncatePrime) $
dropWhile (< 10) $ getPrimesUpTo 750000 | 147 | euler37 = sum $ filter (isRightTruncatePrime) $
filter (isLeftTruncatePrime) $
dropWhile (< 10) $ getPrimesUpTo 750000 | 147 | false | false | 3 | 9 | 44 | 48 | 22 | 26 | null | null |
alphaHeavy/quickfix-hs | src/AlphaHeavy/FIX/FIX42/Factory.hs | bsd-3-clause | reject :: RefSeqNum -> Reject
reject refSeqNum = Reject (AlphaHeavy.FIX.Field refSeqNum) Nothing | 96 | reject :: RefSeqNum -> Reject
reject refSeqNum = Reject (AlphaHeavy.FIX.Field refSeqNum) Nothing | 96 | reject refSeqNum = Reject (AlphaHeavy.FIX.Field refSeqNum) Nothing | 66 | false | true | 0 | 8 | 11 | 32 | 16 | 16 | null | null |
DavidAlphaFox/ghc | utils/haddock/haddock-api/src/Haddock/Utils.hs | bsd-3-clause | -- | Extract a module's short description.
toInstalledDescription :: InstalledInterface -> Maybe (MDoc Name)
toInstalledDescription = fmap mkMeta . hmi_description . instInfo | 174 | toInstalledDescription :: InstalledInterface -> Maybe (MDoc Name)
toInstalledDescription = fmap mkMeta . hmi_description . instInfo | 131 | toInstalledDescription = fmap mkMeta . hmi_description . instInfo | 65 | true | true | 0 | 8 | 21 | 36 | 18 | 18 | null | null |
adinapoli/memento | src/Memento/Logger.hs | mit | --------------------------------------------------------------------------------
cyan :: Text -> IO ()
cyan = colorised Cyan | 124 | cyan :: Text -> IO ()
cyan = colorised Cyan | 43 | cyan = colorised Cyan | 21 | true | true | 0 | 7 | 10 | 24 | 12 | 12 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | tileHeight ProtossArbiterTribunal = 2 | 37 | tileHeight ProtossArbiterTribunal = 2 | 37 | tileHeight ProtossArbiterTribunal = 2 | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ml9951/ThreadScope | GUI/SummaryView.hs | bsd-3-clause | gcStats :: StatsAccum -> GcStats
gcStats StatsAccum{..} =
GcStats {
gcNumThreads = nThreads,
gcParWorkBalance,
gcGenStats = [ mkGcStatsEntry gen (gcGather gen)
| gen <- gens ],
gcTotalStats = mkGcStatsEntry gcGenTot (gcGather gcGenTot)
}
where
... | 2,731 | gcStats :: StatsAccum -> GcStats
gcStats StatsAccum{..} =
GcStats {
gcNumThreads = nThreads,
gcParWorkBalance,
gcGenStats = [ mkGcStatsEntry gen (gcGather gen)
| gen <- gens ],
gcTotalStats = mkGcStatsEntry gcGenTot (gcGather gcGenTot)
}
where
... | 2,731 | gcStats StatsAccum{..} =
GcStats {
gcNumThreads = nThreads,
gcParWorkBalance,
gcGenStats = [ mkGcStatsEntry gen (gcGather gen)
| gen <- gens ],
gcTotalStats = mkGcStatsEntry gcGenTot (gcGather gcGenTot)
}
where
nThreads = fromMaybe 1 dmaxParNT... | 2,698 | false | true | 9 | 13 | 955 | 650 | 325 | 325 | null | null |
vincenthz/hs-cryptohash | Bench/Bench.hs | bsd-3-clause | hashmany (i,u,f) = f . foldl u i | 32 | hashmany (i,u,f) = f . foldl u i | 32 | hashmany (i,u,f) = f . foldl u i | 32 | false | false | 0 | 6 | 7 | 27 | 14 | 13 | null | null |
trenta3/zeno-0.2.0.1 | src/Zeno/Utils.hs | mit | containsDuplicates :: (Foldable t, Ord a) => t a -> Bool
containsDuplicates = toList >>> (\x -> length (nubOrd x) /= length x) | 127 | containsDuplicates :: (Foldable t, Ord a) => t a -> Bool
containsDuplicates = toList >>> (\x -> length (nubOrd x) /= length x) | 126 | containsDuplicates = toList >>> (\x -> length (nubOrd x) /= length x) | 69 | false | true | 0 | 11 | 23 | 61 | 31 | 30 | null | null |
kairuku/stack | src/Stack/SDist.hs | bsd-3-clause | getSDistFileList :: M env m => LocalPackage -> m (String, Path Abs File)
getSDistFileList lp =
withSystemTempDirectory (stackProgName <> "-sdist") $ \tmpdir -> do
menv <- getMinimalEnvOverride
let bopts = defaultBuildOpts
baseConfigOpts <- mkBaseConfigOpts bopts
(_, _mbp, locals, _ex... | 1,386 | getSDistFileList :: M env m => LocalPackage -> m (String, Path Abs File)
getSDistFileList lp =
withSystemTempDirectory (stackProgName <> "-sdist") $ \tmpdir -> do
menv <- getMinimalEnvOverride
let bopts = defaultBuildOpts
baseConfigOpts <- mkBaseConfigOpts bopts
(_, _mbp, locals, _ex... | 1,386 | getSDistFileList lp =
withSystemTempDirectory (stackProgName <> "-sdist") $ \tmpdir -> do
menv <- getMinimalEnvOverride
let bopts = defaultBuildOpts
baseConfigOpts <- mkBaseConfigOpts bopts
(_, _mbp, locals, _extraToBuild, sourceMap) <- loadSourceMap NeedTargets bopts
runInBa... | 1,313 | false | true | 2 | 20 | 404 | 387 | 192 | 195 | null | null |
anchor/rados-haskell | bench/Async.hs | bsd-3-clause | forAsyncs :: (AsyncWrite -> Async (Maybe RadosError)) -> [ByteString] -> IO ()
forAsyncs f oids = do
runConnect (Just "pingu") (parseConfig "/etc/ceph/prod.conf") $
runPool "vaultaire" . runAsync $ do
mapM testAppend oids >>= cleanup
mapM testRemove oids >>= cleanup
retur... | 513 | forAsyncs :: (AsyncWrite -> Async (Maybe RadosError)) -> [ByteString] -> IO ()
forAsyncs f oids = do
runConnect (Just "pingu") (parseConfig "/etc/ceph/prod.conf") $
runPool "vaultaire" . runAsync $ do
mapM testAppend oids >>= cleanup
mapM testRemove oids >>= cleanup
retur... | 513 | forAsyncs f oids = do
runConnect (Just "pingu") (parseConfig "/etc/ceph/prod.conf") $
runPool "vaultaire" . runAsync $ do
mapM testAppend oids >>= cleanup
mapM testRemove oids >>= cleanup
return ()
where
testAppend o = runObject o $ append "hai"
testRemove o = r... | 434 | false | true | 0 | 12 | 146 | 201 | 92 | 109 | null | null |
guillaume-nargeot/project-euler-haskell | src/Util.hs | bsd-3-clause | interleave :: [[a]] -> [a]
interleave = concat . transpose | 58 | interleave :: [[a]] -> [a]
interleave = concat . transpose | 58 | interleave = concat . transpose | 31 | false | true | 0 | 8 | 9 | 35 | 17 | 18 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Element.hs | mit | -- | Setup callback on 'OnTextInput' event
huiElementSetOnTextInputCallback :: (Parent HUIElement a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to 'HUIElement' or ancestor
-> OnTextInputCallback
-> m ()
huiElementSetOnTextInputCallback p f = liftIO $ do
let ptr = parentPointer p
f' v1 = f =<< loadConst... | 480 | huiElementSetOnTextInputCallback :: (Parent HUIElement a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to 'HUIElement' or ancestor
-> OnTextInputCallback
-> m ()
huiElementSetOnTextInputCallback p f = liftIO $ do
let ptr = parentPointer p
f' v1 = f =<< loadConstUrhoText v1
[C.exp| void { $(HUIElement* ... | 437 | huiElementSetOnTextInputCallback p f = liftIO $ do
let ptr = parentPointer p
f' v1 = f =<< loadConstUrhoText v1
[C.exp| void { $(HUIElement* ptr)->SetOnTextInputCallback($funConst:(void (*f')(const String*))) } |]
-- | Callback function for react to resize. | 268 | true | true | 0 | 12 | 83 | 98 | 50 | 48 | null | null |
mietek/stack | src/test/Network/HTTP/Download/VerifiedSpec.hs | bsd-3-clause | getExamplePath :: Path Abs Dir -> IO (Path Abs File)
getExamplePath dir = do
file <- parseRelFile "cabal-install-1.22.4.0.tar.gz"
return (dir </> file)
-- | An example DownloadRequest that uses a SHA1 | 209 | getExamplePath :: Path Abs Dir -> IO (Path Abs File)
getExamplePath dir = do
file <- parseRelFile "cabal-install-1.22.4.0.tar.gz"
return (dir </> file)
-- | An example DownloadRequest that uses a SHA1 | 209 | getExamplePath dir = do
file <- parseRelFile "cabal-install-1.22.4.0.tar.gz"
return (dir </> file)
-- | An example DownloadRequest that uses a SHA1 | 156 | false | true | 0 | 9 | 39 | 58 | 27 | 31 | null | null |
urbanslug/ghc | compiler/basicTypes/SrcLoc.hs | bsd-3-clause | -- | Move the 'SrcLoc' down by one line if the character is a newline,
-- to the next 8-char tabstop if it is a tab, and across by one
-- character in any other case
advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc
advanceSrcLoc (SrcLoc f l _) '\n' = SrcLoc f (l + 1) 1 | 271 | advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc
advanceSrcLoc (SrcLoc f l _) '\n' = SrcLoc f (l + 1) 1 | 105 | advanceSrcLoc (SrcLoc f l _) '\n' = SrcLoc f (l + 1) 1 | 55 | true | true | 0 | 10 | 56 | 56 | 28 | 28 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/InfoTypes/List.hs | mpl-2.0 | -- | Creates a value of 'InfoTypesList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itlParent'
--
-- * 'itlXgafv'
--
-- * 'itlLanguageCode'
--
-- * 'itlUploadProtocol'
--
-- * 'itlAccessToken'
--
-- * 'itlUploadType'
--
-- * 'itlF... | 717 | infoTypesList
:: InfoTypesList
infoTypesList =
InfoTypesList'
{ _itlParent = Nothing
, _itlXgafv = Nothing
, _itlLanguageCode = Nothing
, _itlUploadProtocol = Nothing
, _itlAccessToken = Nothing
, _itlUploadType = Nothing
, _itlFilter = Nothing
, _itlLocationId = Nothing
, _itl... | 344 | infoTypesList =
InfoTypesList'
{ _itlParent = Nothing
, _itlXgafv = Nothing
, _itlLanguageCode = Nothing
, _itlUploadProtocol = Nothing
, _itlAccessToken = Nothing
, _itlUploadType = Nothing
, _itlFilter = Nothing
, _itlLocationId = Nothing
, _itlCallback = Nothing
} | 309 | true | true | 1 | 7 | 154 | 95 | 65 | 30 | null | null |
DavidAlphaFox/darcs | src/Darcs/Repository/Lock.hs | gpl-2.0 | environmentHelpLocks :: ([String],[String])
environmentHelpLocks = (["DARCS_SLOPPY_LOCKS"],[
"If on some filesystems you get an error of the kind:",
"",
" darcs: takeLock [...]: atomic_create [...]: unsupported operation",
"",
"you may want to try to export DARCS_SLOPPY_LOCKS=True."]) | 293 | environmentHelpLocks :: ([String],[String])
environmentHelpLocks = (["DARCS_SLOPPY_LOCKS"],[
"If on some filesystems you get an error of the kind:",
"",
" darcs: takeLock [...]: atomic_create [...]: unsupported operation",
"",
"you may want to try to export DARCS_SLOPPY_LOCKS=True."]) | 293 | environmentHelpLocks = (["DARCS_SLOPPY_LOCKS"],[
"If on some filesystems you get an error of the kind:",
"",
" darcs: takeLock [...]: atomic_create [...]: unsupported operation",
"",
"you may want to try to export DARCS_SLOPPY_LOCKS=True."]) | 249 | false | true | 0 | 6 | 42 | 47 | 30 | 17 | null | null |
tjhunter/karps | haskell/src/Spark/Core/Internal/OpFunctions.hs | apache-2.0 | simpleShowOp (NodeDistributedOp op') = soName op' | 49 | simpleShowOp (NodeDistributedOp op') = soName op' | 49 | simpleShowOp (NodeDistributedOp op') = soName op' | 49 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
lukexi/ghc | libraries/base/GHC/Event/Thread.hs | bsd-3-clause | getSystemTimerManager :: IO TM.TimerManager
getSystemTimerManager = do
Just mgr <- readIORef timerManager
return mgr | 120 | getSystemTimerManager :: IO TM.TimerManager
getSystemTimerManager = do
Just mgr <- readIORef timerManager
return mgr | 120 | getSystemTimerManager = do
Just mgr <- readIORef timerManager
return mgr | 76 | false | true | 0 | 8 | 17 | 35 | 15 | 20 | null | null |
swift-nav/libsbp | haskell/src/SwiftNav/SBP.hs | lgpl-3.0 | mergeValues _ (Object b) = Object b | 44 | mergeValues _ (Object b) = Object b | 44 | mergeValues _ (Object b) = Object b | 44 | false | false | 1 | 6 | 15 | 22 | 9 | 13 | null | null |
brendanhay/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/List.hs | mpl-2.0 | -- | Optional. The number of jobs to retrieve per \"page\" of results. If
-- there are more remaining results than this number, the response message
-- will contain a valid value in the \`next_page_token\` field. The default
-- value is 20, and the maximum page size is 100.
pjlPageSize :: Lens' ProjectsJobsList (Maybe ... | 415 | pjlPageSize :: Lens' ProjectsJobsList (Maybe Int32)
pjlPageSize
= lens _pjlPageSize (\ s a -> s{_pjlPageSize = a}) .
mapping _Coerce | 140 | pjlPageSize
= lens _pjlPageSize (\ s a -> s{_pjlPageSize = a}) .
mapping _Coerce | 88 | true | true | 0 | 10 | 76 | 58 | 31 | 27 | null | null |
revnull/fixfile | tests/TestTrie.hs | lgpl-3.0 | prop_TrieFoldable :: [(BS.ByteString, Int)] -> Bool
prop_TrieFoldable xs = testAll where
testAll = listSum == trieSum && listSum == frozenTrieSum
xs' = nubBy ((==) `on` fst) $ sortBy (compare `on` fst) xs
listSum = getSum $ foldMap (Sum . snd) xs'
trie = foldr (uncurry insertTrie) empty xs' :: Fix (Trie... | 422 | prop_TrieFoldable :: [(BS.ByteString, Int)] -> Bool
prop_TrieFoldable xs = testAll where
testAll = listSum == trieSum && listSum == frozenTrieSum
xs' = nubBy ((==) `on` fst) $ sortBy (compare `on` fst) xs
listSum = getSum $ foldMap (Sum . snd) xs'
trie = foldr (uncurry insertTrie) empty xs' :: Fix (Trie... | 422 | prop_TrieFoldable xs = testAll where
testAll = listSum == trieSum && listSum == frozenTrieSum
xs' = nubBy ((==) `on` fst) $ sortBy (compare `on` fst) xs
listSum = getSum $ foldMap (Sum . snd) xs'
trie = foldr (uncurry insertTrie) empty xs' :: Fix (Trie Int)
trieSum = getSum $ foldMapF Sum trie
f... | 370 | false | true | 0 | 8 | 90 | 169 | 91 | 78 | null | null |
didmar/helm | src/FRP/Helm/Color.hs | mit | {-| Calculate a complementary color for a provided color. Useful for outlining
a filled shape in a color clearly distinguishable from the fill color. -}
complement :: Color -> Color
complement (Color r g b a) = hsva (fromIntegral ((round (h + 180) :: Int) `mod` 360)) (s / mx) mx a
where
mx = r `max` g `max` b... | 557 | complement :: Color -> Color
complement (Color r g b a) = hsva (fromIntegral ((round (h + 180) :: Int) `mod` 360)) (s / mx) mx a
where
mx = r `max` g `max` b
mn = r `min` g `min` b
s = mx - mn
h | mx == r = (g - b) / s * 60
| mx == g = (b - r) / s * 60 + 120
| mx == b = (r - g) / s * 60 + ... | 400 | complement (Color r g b a) = hsva (fromIntegral ((round (h + 180) :: Int) `mod` 360)) (s / mx) mx a
where
mx = r `max` g `max` b
mn = r `min` g `min` b
s = mx - mn
h | mx == r = (g - b) / s * 60
| mx == g = (b - r) / s * 60 + 120
| mx == b = (r - g) / s * 60 + 240
| otherwise = undef... | 371 | true | true | 9 | 13 | 166 | 247 | 122 | 125 | null | null |
ezyang/ghc | testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs | bsd-3-clause | -- | Helper for mkIntType, mkFloatType, mkStringType
mkPrimType :: DataRep -> String -> DataType
mkPrimType dr str = DataType
{ tycon = str
, datarep = dr
} | 230 | mkPrimType :: DataRep -> String -> DataType
mkPrimType dr str = DataType
{ tycon = str
, datarep = dr
} | 177 | mkPrimType dr str = DataType
{ tycon = str
, datarep = dr
} | 133 | true | true | 0 | 8 | 101 | 48 | 24 | 24 | null | null |
naushadh/persistent | persistent/Database/Persist/Sql/Orphan/PersistStore.hs | mit | recordTypeFromKey :: Key record -> record
recordTypeFromKey _ = error "dummyFromKey" | 84 | recordTypeFromKey :: Key record -> record
recordTypeFromKey _ = error "dummyFromKey" | 84 | recordTypeFromKey _ = error "dummyFromKey" | 42 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
luke-clifton/memorable-bits | src/Data/Memorable/Internal.hs | bsd-2-clause | -- | Pad this pattern out with hex digits. Useful when you want some human
-- readability, but also want full coverage of the data. See 'Hex' for details.
--
-- >>> import Data.Word
-- >>> import Data.Memorable.Theme.Fantasy
-- >>> renderMemorable (padHex rpgWeapons) (0xdeadbeef01020304 :: Word64)
-- "sacred-club-of-gh... | 417 | padHex :: forall n a. Proxy a -> Proxy (PadTo Hex n a)
padHex _ = Proxy | 71 | padHex _ = Proxy | 16 | true | true | 0 | 9 | 64 | 47 | 27 | 20 | null | null |
goldfirere/units | units-test/Tests/PhysicalConstants.hs | bsd-3-clause | -- eps0
vacuumPermittivity :: CompatibleUnit l SIPermittivityUnit
=> MkQu_UL SIPermittivityUnit l
vacuumPermittivity =
(1 / (4 * pi * 1e-7 * 299792458**2)) % (undefined :: SIPermittivityUnit) | 195 | vacuumPermittivity :: CompatibleUnit l SIPermittivityUnit
=> MkQu_UL SIPermittivityUnit l
vacuumPermittivity =
(1 / (4 * pi * 1e-7 * 299792458**2)) % (undefined :: SIPermittivityUnit) | 187 | vacuumPermittivity =
(1 / (4 * pi * 1e-7 * 299792458**2)) % (undefined :: SIPermittivityUnit) | 95 | true | true | 0 | 12 | 29 | 62 | 33 | 29 | null | null |
jlouis/combinatorrent | src/Process/Tracker.hs | bsd-2-clause | urlEncodeVars [] = [] | 21 | urlEncodeVars [] = [] | 21 | urlEncodeVars [] = [] | 21 | false | false | 0 | 6 | 3 | 13 | 6 | 7 | null | null |
kawu/factorized-tag-parser | src/NLP/Partage/Auto.hs | bsd-2-clause | -- | Transform the rule into the corresponding sequence
-- (to be added to an automaton).
ruleSeq :: Rule -> [Edge DID]
ruleSeq Rule{..} = map Body bodyR ++ [Head headR] | 169 | ruleSeq :: Rule -> [Edge DID]
ruleSeq Rule{..} = map Body bodyR ++ [Head headR] | 79 | ruleSeq Rule{..} = map Body bodyR ++ [Head headR] | 49 | true | true | 0 | 7 | 30 | 47 | 24 | 23 | null | null |
d0kt0r0/estuary | common/src/Estuary/Types/Definition.hs | gpl-3.0 | definitionForRendering (SeeTime x) = SeeTime x | 46 | definitionForRendering (SeeTime x) = SeeTime x | 46 | definitionForRendering (SeeTime x) = SeeTime x | 46 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | iallocatorModeAlloc :: String
iallocatorModeAlloc = Types.iAllocatorModeToRaw IAllocatorAlloc | 93 | iallocatorModeAlloc :: String
iallocatorModeAlloc = Types.iAllocatorModeToRaw IAllocatorAlloc | 93 | iallocatorModeAlloc = Types.iAllocatorModeToRaw IAllocatorAlloc | 63 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
mrakgr/futhark | src/Futhark/Representation/SOACS/SOAC.hs | bsd-3-clause | soacType (Scanomap _ outersize outerfun innerfun _ _) =
staticShapes $
let acc_tp = map (`arrayOfRow` outersize) $ lambdaReturnType outerfun
acc_el_tp = lambdaReturnType innerfun
res_el_tp = drop (length acc_tp) acc_el_tp
in case res_el_tp of
[] -> acc_tp
_ -> acc_tp ++ map (`arra... | 348 | soacType (Scanomap _ outersize outerfun innerfun _ _) =
staticShapes $
let acc_tp = map (`arrayOfRow` outersize) $ lambdaReturnType outerfun
acc_el_tp = lambdaReturnType innerfun
res_el_tp = drop (length acc_tp) acc_el_tp
in case res_el_tp of
[] -> acc_tp
_ -> acc_tp ++ map (`arra... | 348 | soacType (Scanomap _ outersize outerfun innerfun _ _) =
staticShapes $
let acc_tp = map (`arrayOfRow` outersize) $ lambdaReturnType outerfun
acc_el_tp = lambdaReturnType innerfun
res_el_tp = drop (length acc_tp) acc_el_tp
in case res_el_tp of
[] -> acc_tp
_ -> acc_tp ++ map (`arra... | 348 | false | false | 0 | 13 | 83 | 113 | 58 | 55 | null | null |
christiaanb/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | stableNamePrimTyConName = mkPrimTc (fsLit "StableName#") stableNamePrimTyConKey stableNamePrimTyCon | 105 | stableNamePrimTyConName = mkPrimTc (fsLit "StableName#") stableNamePrimTyConKey stableNamePrimTyCon | 105 | stableNamePrimTyConName = mkPrimTc (fsLit "StableName#") stableNamePrimTyConKey stableNamePrimTyCon | 105 | false | false | 0 | 7 | 12 | 19 | 9 | 10 | null | null |
uduki/hsQt | Qtc/Enums/Gui/QMovie.hs | bsd-2-clause | ieMovieState :: Int -> MovieState
ieMovieState x = QEnum (CMovieState x) | 72 | ieMovieState :: Int -> MovieState
ieMovieState x = QEnum (CMovieState x) | 72 | ieMovieState x = QEnum (CMovieState x) | 38 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
ben-schulz/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | -- TODO: find uses and destroy them, doing this case analysis at call sites
-- | Give a notion of end location associated with an FC
fc_end :: FC -> (Int, Int)
fc_end (FC _ _ end) = end | 185 | fc_end :: FC -> (Int, Int)
fc_end (FC _ _ end) = end | 52 | fc_end (FC _ _ end) = end | 25 | true | true | 0 | 7 | 38 | 36 | 20 | 16 | null | null |
cornell-pl/HsAdapton | weak-hashtables/src/Data/HashTable/Weak/Internal/Utils.hs | bsd-3-clause | ------------------------------------------------------------------------------
nextBestPrime :: Int -> Int
nextBestPrime x = fromEnum yi
where
xi = toEnum x
idx = binarySearch primeSizes xi
yi = V.unsafeIndex primeSizes idx
------------------------------------------------------------------------------ | 320 | nextBestPrime :: Int -> Int
nextBestPrime x = fromEnum yi
where
xi = toEnum x
idx = binarySearch primeSizes xi
yi = V.unsafeIndex primeSizes idx
------------------------------------------------------------------------------ | 241 | nextBestPrime x = fromEnum yi
where
xi = toEnum x
idx = binarySearch primeSizes xi
yi = V.unsafeIndex primeSizes idx
------------------------------------------------------------------------------ | 213 | true | true | 2 | 7 | 44 | 66 | 29 | 37 | null | null |
jimcrayne/mozilla-extract-extensions | Text/PrintMozillaINI.hs | bsd-2-clause | doc :: ShowS -> Doc
doc = (:) | 29 | doc :: ShowS -> Doc
doc = (:) | 29 | doc = (:) | 9 | false | true | 0 | 5 | 7 | 17 | 10 | 7 | null | null |
tmcgilchrist/riak-haskell-client | riak/src/Network/Riak/CRDT.hs | apache-2.0 | modMap :: MapField -> MapValueOp -> Map -> Map
modMap ix op (Map m) = Map $ M.alter (Just . modifyMapValue op) ix m | 115 | modMap :: MapField -> MapValueOp -> Map -> Map
modMap ix op (Map m) = Map $ M.alter (Just . modifyMapValue op) ix m | 115 | modMap ix op (Map m) = Map $ M.alter (Just . modifyMapValue op) ix m | 68 | false | true | 0 | 9 | 23 | 59 | 29 | 30 | null | null |
oldmanmike/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (HsRnBracketOut e ps) = ppr e $$ text "pending(rn)" <+> ppr ps | 71 | ppr_expr (HsRnBracketOut e ps) = ppr e $$ text "pending(rn)" <+> ppr ps | 71 | ppr_expr (HsRnBracketOut e ps) = ppr e $$ text "pending(rn)" <+> ppr ps | 71 | false | false | 0 | 7 | 12 | 34 | 15 | 19 | null | null |
fredmorcos/attic | projects/pet/archive/pet_haskell_simpleparse/PetParser.hs | isc | parseNote :: PetParser String
parseNote = pSatMany ((/= '\n'), "A note -> any text until a newline") | 100 | parseNote :: PetParser String
parseNote = pSatMany ((/= '\n'), "A note -> any text until a newline") | 100 | parseNote = pSatMany ((/= '\n'), "A note -> any text until a newline") | 70 | false | true | 1 | 7 | 16 | 30 | 15 | 15 | null | null |
SamLex/TheCodeOfLife | src/Misc.hs | gpl-3.0 | ver3d :: (GLdouble, GLdouble, GLdouble) -> IO ()
ver3d (x, y, z) = vertex $ Vertex3 x y z | 89 | ver3d :: (GLdouble, GLdouble, GLdouble) -> IO ()
ver3d (x, y, z) = vertex $ Vertex3 x y z | 89 | ver3d (x, y, z) = vertex $ Vertex3 x y z | 40 | false | true | 0 | 7 | 18 | 56 | 29 | 27 | null | null |
vikraman/ghc | compiler/utils/Outputable.hs | bsd-3-clause | isOrAre _ = text "are" | 24 | isOrAre _ = text "are" | 24 | isOrAre _ = text "are" | 24 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
kim/amazonka | amazonka-sns/gen/Network/AWS/SNS/Types.hs | mpl-2.0 | -- | EndpointArn for mobile app and device.
eEndpointArn :: Lens' Endpoint (Maybe Text)
eEndpointArn = lens _eEndpointArn (\s a -> s { _eEndpointArn = a }) | 155 | eEndpointArn :: Lens' Endpoint (Maybe Text)
eEndpointArn = lens _eEndpointArn (\s a -> s { _eEndpointArn = a }) | 111 | eEndpointArn = lens _eEndpointArn (\s a -> s { _eEndpointArn = a }) | 67 | true | true | 0 | 9 | 26 | 46 | 25 | 21 | null | null |
ooz/Hafer | src/Hafer/Export/ClassDiagram/DotHTML.hs | mit | convertTypes :: [Type] -> String
convertTypes ts = case (map (\a -> convertType a) ts) of
t:ts' -> reduceSep (t:ts') ", "
[] -> "" | 141 | convertTypes :: [Type] -> String
convertTypes ts = case (map (\a -> convertType a) ts) of
t:ts' -> reduceSep (t:ts') ", "
[] -> "" | 141 | convertTypes ts = case (map (\a -> convertType a) ts) of
t:ts' -> reduceSep (t:ts') ", "
[] -> "" | 108 | false | true | 3 | 10 | 35 | 73 | 37 | 36 | null | null |
lukexi/stack | src/Stack/Types/Config.hs | bsd-3-clause | ghcVariantName GHCIntegerSimple = "integersimple" | 49 | ghcVariantName GHCIntegerSimple = "integersimple" | 49 | ghcVariantName GHCIntegerSimple = "integersimple" | 49 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvLxcDevices :: String
hvLxcDevices = "devices" | 47 | hvLxcDevices :: String
hvLxcDevices = "devices" | 47 | hvLxcDevices = "devices" | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
srhb/quickcheck | examples/Set.hs | bsd-3-clause | unit :: a -> Set a
unit x = Node x empty empty | 46 | unit :: a -> Set a
unit x = Node x empty empty | 46 | unit x = Node x empty empty | 27 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
tundra/nls | hs/Method.hs | apache-2.0 | -- Given two score records returns the union where for each tag the most
-- specific score is selected, along with an ordering that says how the first
-- argument compared to the second. That is, better means that there was an
-- entry in the first whose score was a more specific match than the second, and
-- worse mea... | 1,578 | compareScoreRecords :: ScoreRecord -> ScoreRecord -> (ScoreRecordOrdering, ScoreRecord)
compareScoreRecords (ScoreRecord as) (ScoreRecord bs) = (ordering, ScoreRecord minRecord)
where
aMap = Map.fromList as
bMap = Map.fromList bs
-- The result will consider the record entries from both scores, padding
... | 1,195 | compareScoreRecords (ScoreRecord as) (ScoreRecord bs) = (ordering, ScoreRecord minRecord)
where
aMap = Map.fromList as
bMap = Map.fromList bs
-- The result will consider the record entries from both scores, padding
-- any absent ones with ScoreAbsent.
allTags = Set.toList (Set.union (Map.keysSet a... | 1,107 | true | true | 5 | 10 | 311 | 342 | 176 | 166 | null | null |
DavidAlphaFox/darcs | src/Darcs/Repository/HashedRepo.hs | gpl-2.0 | skipPristine :: B.ByteString -> B.ByteString
skipPristine ps = case tryDropPristineName ps of
Just rest -> B.drop 1 $ BC.dropWhile (/= '\n') rest
Nothing -> ps
-- |tryDropPristineName returns the result of dropping the pristineName from
-- the input, if it was present, otherwise it returns Nothing. | 308 | skipPristine :: B.ByteString -> B.ByteString
skipPristine ps = case tryDropPristineName ps of
Just rest -> B.drop 1 $ BC.dropWhile (/= '\n') rest
Nothing -> ps
-- |tryDropPristineName returns the result of dropping the pristineName from
-- the input, if it was present, otherwise it returns Nothing. | 308 | skipPristine ps = case tryDropPristineName ps of
Just rest -> B.drop 1 $ BC.dropWhile (/= '\n') rest
Nothing -> ps
-- |tryDropPristineName returns the result of dropping the pristineName from
-- the input, if it was present, otherwise it returns Nothing. | 263 | false | true | 0 | 10 | 54 | 72 | 34 | 38 | null | null |
charlesrosenbauer/Bzo-Compiler | src/HigherOrder.hs | gpl-3.0 | hashFlt :: Double -> I.Int64
-- 6822318947978559215 is decimal form of 0x5eadbeefdeadbeef, 6822318947978559215 is decimal 0x700dba11f00dba11
hashFlt x = round $ (6822318947978559215.0 * x) + 6822318947978559215.0 | 212 | hashFlt :: Double -> I.Int64
hashFlt x = round $ (6822318947978559215.0 * x) + 6822318947978559215.0 | 100 | hashFlt x = round $ (6822318947978559215.0 * x) + 6822318947978559215.0 | 71 | true | true | 0 | 8 | 25 | 36 | 19 | 17 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_T3_HTML_DEFAULT :: Int
wxSTC_T3_HTML_DEFAULT = 15 | 55 | wxSTC_T3_HTML_DEFAULT :: Int
wxSTC_T3_HTML_DEFAULT = 15 | 55 | wxSTC_T3_HTML_DEFAULT = 15 | 26 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
nevrenato/HetsAlloy | Common/Lexer.hs | gpl-2.0 | spaceT :: CharParser st Token
spaceT = asSeparator " " | 54 | spaceT :: CharParser st Token
spaceT = asSeparator " " | 54 | spaceT = asSeparator " " | 24 | false | true | 0 | 6 | 9 | 25 | 10 | 15 | null | null |
brendanhay/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ConnectSettings' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csBackendType'
--
-- * 'csServerCaCert'
--
-- * 'csDatabaseVersion'
--
-- * 'csKind'
--
-- * 'csIPAddresses'
connectSettings
:: ConnectSetti... | 519 | connectSettings
:: ConnectSettings
connectSettings =
ConnectSettings'
{ _csBackendType = Nothing
, _csServerCaCert = Nothing
, _csDatabaseVersion = Nothing
, _csKind = Nothing
, _csIPAddresses = Nothing
} | 234 | connectSettings =
ConnectSettings'
{ _csBackendType = Nothing
, _csServerCaCert = Nothing
, _csDatabaseVersion = Nothing
, _csKind = Nothing
, _csIPAddresses = Nothing
} | 195 | true | true | 1 | 7 | 106 | 63 | 41 | 22 | null | null |
donatello/plivo-haskell | test/Example.hs | bsd-3-clause | main :: IO ()
main = do
case testResponse of
Left a -> print a
Right a -> B.putStr . buildXML $ a
putStrLn ""
putStrLn . show $ testResponse
settings <- initApiSettings "MAOTBINZLKMJDLZDK2ZD" "YmY5YTI2YmIzNWFmMmYyZjY3NzkxNGQ3M2Y3OTBm"
(c, r) <- get_account settings
putStrLn (show c)
B.putStrLn r | 320 | main :: IO ()
main = do
case testResponse of
Left a -> print a
Right a -> B.putStr . buildXML $ a
putStrLn ""
putStrLn . show $ testResponse
settings <- initApiSettings "MAOTBINZLKMJDLZDK2ZD" "YmY5YTI2YmIzNWFmMmYyZjY3NzkxNGQ3M2Y3OTBm"
(c, r) <- get_account settings
putStrLn (show c)
B.putStrLn r | 320 | main = do
case testResponse of
Left a -> print a
Right a -> B.putStr . buildXML $ a
putStrLn ""
putStrLn . show $ testResponse
settings <- initApiSettings "MAOTBINZLKMJDLZDK2ZD" "YmY5YTI2YmIzNWFmMmYyZjY3NzkxNGQ3M2Y3OTBm"
(c, r) <- get_account settings
putStrLn (show c)
B.putStrLn r | 306 | false | true | 0 | 13 | 68 | 125 | 54 | 71 | null | null |
tcoenraad/functioneel-programmeren | practica/serie3/7.replace.hs | mit | vervang p n (Leaf1a i) = Leaf1a i | 33 | vervang p n (Leaf1a i) = Leaf1a i | 33 | vervang p n (Leaf1a i) = Leaf1a i | 33 | false | false | 0 | 6 | 7 | 25 | 10 | 15 | null | null |
ksaveljev/hake-2 | src/Client/CLNewFX.hs | bsd-3-clause | wsColorTable :: UV.Vector Int
wsColorTable = UV.fromList [ 2 * 8, 13 * 8, 21 * 8, 18 * 8 ] | 90 | wsColorTable :: UV.Vector Int
wsColorTable = UV.fromList [ 2 * 8, 13 * 8, 21 * 8, 18 * 8 ] | 90 | wsColorTable = UV.fromList [ 2 * 8, 13 * 8, 21 * 8, 18 * 8 ] | 60 | false | true | 1 | 7 | 20 | 52 | 26 | 26 | null | null |
zaxtax/hakaru | haskell/Tests/Disintegrate.hs | bsd-3-clause | naiveBayes'
:: Cond ('HArray ('HArray 'HNat)) ('HArray 'HNat)
naiveBayes' =
lam $ \t ->
Prelude.error "TODO define naiveBayes'" | 139 | naiveBayes'
:: Cond ('HArray ('HArray 'HNat)) ('HArray 'HNat)
naiveBayes' =
lam $ \t ->
Prelude.error "TODO define naiveBayes'" | 139 | naiveBayes' =
lam $ \t ->
Prelude.error "TODO define naiveBayes'" | 73 | false | true | 2 | 11 | 29 | 65 | 30 | 35 | null | null |
meiersi/system-io-write | src/Codec/Bounded/Encoding/Utf8.hs | bsd-3-clause | word32Hex :: Encoding Word32
word32Hex = encodeWordHex | 54 | word32Hex :: Encoding Word32
word32Hex = encodeWordHex | 54 | word32Hex = encodeWordHex | 25 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/WebGLRenderingContextBase.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContextBase.polygonOffset Mozilla WebGLRenderingContextBase.polygonOffset documentation>
polygonOffset ::
(MonadDOM m, IsWebGLRenderingContextBase self) =>
self -> GLfloat -> GLfloat -> m ()
polygonOffset self factor uni... | 460 | polygonOffset ::
(MonadDOM m, IsWebGLRenderingContextBase self) =>
self -> GLfloat -> GLfloat -> m ()
polygonOffset self factor units
= liftDOM
(void
((toWebGLRenderingContextBase self) ^. jsf "polygonOffset"
[toJSVal factor, toJSVal units])) | 301 | polygonOffset self factor units
= liftDOM
(void
((toWebGLRenderingContextBase self) ^. jsf "polygonOffset"
[toJSVal factor, toJSVal units])) | 169 | true | true | 0 | 12 | 96 | 95 | 46 | 49 | null | null |
mightymoose/liquidhaskell | benchmarks/ghc-7.4.1/IO/Handle/Text.hs | bsd-3-clause | writeBlocks :: Handle -> Bool -> Bool -> Newline -> Buffer CharBufElem -> String -> IO ()
writeBlocks hdl line_buffered add_nl nl
buf@Buffer{ bufRaw=raw, bufSize=len } s =
let
shoveString :: Int -> [Char] -> [Char] -> IO ()
shoveString !n [] [] = do
commitBuffer hdl raw len n False{-no flush... | 1,241 | writeBlocks :: Handle -> Bool -> Bool -> Newline -> Buffer CharBufElem -> String -> IO ()
writeBlocks hdl line_buffered add_nl nl
buf@Buffer{ bufRaw=raw, bufSize=len } s =
let
shoveString :: Int -> [Char] -> [Char] -> IO ()
shoveString !n [] [] = do
commitBuffer hdl raw len n False{-no flush... | 1,241 | writeBlocks hdl line_buffered add_nl nl
buf@Buffer{ bufRaw=raw, bufSize=len } s =
let
shoveString :: Int -> [Char] -> [Char] -> IO ()
shoveString !n [] [] = do
commitBuffer hdl raw len n False{-no flush-} True{-release-}
shoveString !n [] rest = do
shoveString n rest []
shoveSt... | 1,151 | false | true | 0 | 17 | 475 | 405 | 194 | 211 | null | null |
ierton/yteratee | src/Data/Yteratee/Binary.hs | bsd-3-clause | endianRead4
:: (LL.ListLike s Word8, Monad m) =>
Endian
-> Yteratee s m Word32
endianRead4 e = do
c1 <- I.head
c2 <- I.head
c3 <- I.head
c4 <- I.head
case e of
MSB -> return $
(((((fromIntegral c1
`shiftL` 8) .|. fromIntegral c2)
`shiftL` 8) .|. f... | 585 | endianRead4
:: (LL.ListLike s Word8, Monad m) =>
Endian
-> Yteratee s m Word32
endianRead4 e = do
c1 <- I.head
c2 <- I.head
c3 <- I.head
c4 <- I.head
case e of
MSB -> return $
(((((fromIntegral c1
`shiftL` 8) .|. fromIntegral c2)
`shiftL` 8) .|. f... | 585 | endianRead4 e = do
c1 <- I.head
c2 <- I.head
c3 <- I.head
c4 <- I.head
case e of
MSB -> return $
(((((fromIntegral c1
`shiftL` 8) .|. fromIntegral c2)
`shiftL` 8) .|. fromIntegral c3)
`shiftL` 8) .|. fromIntegral c4
LSB -> return $
... | 494 | false | true | 0 | 23 | 230 | 225 | 116 | 109 | null | null |
brendanhay/gogol | gogol-dns/gen/Network/Google/DNS/Types/Product.hs | mpl-2.0 | -- | Number of seconds that this ResourceRecordSet can be cached by
-- resolvers.
rrsTtl :: Lens' ResourceRecordSet (Maybe Int32)
rrsTtl
= lens _rrsTtl (\ s a -> s{_rrsTtl = a}) .
mapping _Coerce | 203 | rrsTtl :: Lens' ResourceRecordSet (Maybe Int32)
rrsTtl
= lens _rrsTtl (\ s a -> s{_rrsTtl = a}) .
mapping _Coerce | 121 | rrsTtl
= lens _rrsTtl (\ s a -> s{_rrsTtl = a}) .
mapping _Coerce | 73 | true | true | 1 | 10 | 41 | 58 | 29 | 29 | null | null |
frantisekfarka/ghc-dsi | compiler/utils/IOEnv.hs | bsd-3-clause | uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a
uninterruptibleMaskM_ (IOEnv m) = IOEnv (\ env -> uninterruptibleMask_ (m env)) | 131 | uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a
uninterruptibleMaskM_ (IOEnv m) = IOEnv (\ env -> uninterruptibleMask_ (m env)) | 131 | uninterruptibleMaskM_ (IOEnv m) = IOEnv (\ env -> uninterruptibleMask_ (m env)) | 79 | false | true | 0 | 10 | 19 | 54 | 26 | 28 | null | null |
christiaanb/clash-prelude-playground | examples/SCaseTest.hs | bsd-2-clause | testInput :: Signal (Maybe Integer)
testInput = match oscillate $ \case
True_ en -> Just <$> counter en 1
False_ _ -> signal Nothing | 140 | testInput :: Signal (Maybe Integer)
testInput = match oscillate $ \case
True_ en -> Just <$> counter en 1
False_ _ -> signal Nothing | 140 | testInput = match oscillate $ \case
True_ en -> Just <$> counter en 1
False_ _ -> signal Nothing | 104 | false | true | 3 | 7 | 31 | 46 | 24 | 22 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 600457 = 5051 | 33 | getValueFromProduct 600457 = 5051 | 33 | getValueFromProduct 600457 = 5051 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
5hubh4m/99-haskell-problems | Lists.hs | mit | numElem (_ : xs) = 1 + numElem xs | 33 | numElem (_ : xs) = 1 + numElem xs | 33 | numElem (_ : xs) = 1 + numElem xs | 33 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
atupal/xmonad-mirror | xmonad/tests/Properties/Floating.hs | mit | prop_float_delete (nex :: NonEmptyWindowsStackSet) = do
let NonEmptyWindowsStackSet x = nex
w <- arbitraryWindow nex
let s = float w geom x
t = delete w s
return $ not (w `member` t)
where
geom = RationalRect 100 100 100 100 | 254 | prop_float_delete (nex :: NonEmptyWindowsStackSet) = do
let NonEmptyWindowsStackSet x = nex
w <- arbitraryWindow nex
let s = float w geom x
t = delete w s
return $ not (w `member` t)
where
geom = RationalRect 100 100 100 100 | 254 | prop_float_delete (nex :: NonEmptyWindowsStackSet) = do
let NonEmptyWindowsStackSet x = nex
w <- arbitraryWindow nex
let s = float w geom x
t = delete w s
return $ not (w `member` t)
where
geom = RationalRect 100 100 100 100 | 254 | false | false | 0 | 10 | 70 | 101 | 47 | 54 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.