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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gbataille/pandoc | src/Text/Pandoc/Readers/Docx/Lists.hs | gpl-2.0 | blocksToDefinitions' defAcc acc
((Div (_, classes1, _) blks1) : (Div (ident2, classes2, kvs2) blks2) : blks)
| "DefinitionTerm" `elem` classes1 && "Definition" `elem` classes2 =
let remainingAttr2 = (ident2, delete "Definition" classes2, kvs2)
pair = case remainingAttr2 == ("", [], []) of
Tru... | 510 | blocksToDefinitions' defAcc acc
((Div (_, classes1, _) blks1) : (Div (ident2, classes2, kvs2) blks2) : blks)
| "DefinitionTerm" `elem` classes1 && "Definition" `elem` classes2 =
let remainingAttr2 = (ident2, delete "Definition" classes2, kvs2)
pair = case remainingAttr2 == ("", [], []) of
Tru... | 510 | blocksToDefinitions' defAcc acc
((Div (_, classes1, _) blks1) : (Div (ident2, classes2, kvs2) blks2) : blks)
| "DefinitionTerm" `elem` classes1 && "Definition" `elem` classes2 =
let remainingAttr2 = (ident2, delete "Definition" classes2, kvs2)
pair = case remainingAttr2 == ("", [], []) of
Tru... | 510 | false | false | 0 | 16 | 108 | 193 | 105 | 88 | null | null |
Frefreak/solitaire-solver | src/Solver.hs | bsd-3-clause | getCardFromPos bd (PMain i j) = pile bd !! i !! j | 49 | getCardFromPos bd (PMain i j) = pile bd !! i !! j | 49 | getCardFromPos bd (PMain i j) = pile bd !! i !! j | 49 | false | false | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
spechub/Hets | THF/Utils.hs | gpl-2.0 | rewriteUnitaryFormula' :: (RewriteFuns a, a) -> THFUnitaryFormula
-> Result THFUnitaryFormula
rewriteUnitaryFormula' (fns, d) uf = case uf of
TUF_THF_Conditional {} ->
mkError ("THF.Utils.rewriteUnitaryFOrmula: " ++
"Conditional not in THF0!") uf
TUF_THF_Quantified_Formula qf -... | 909 | rewriteUnitaryFormula' :: (RewriteFuns a, a) -> THFUnitaryFormula
-> Result THFUnitaryFormula
rewriteUnitaryFormula' (fns, d) uf = case uf of
TUF_THF_Conditional {} ->
mkError ("THF.Utils.rewriteUnitaryFOrmula: " ++
"Conditional not in THF0!") uf
TUF_THF_Quantified_Formula qf -... | 909 | rewriteUnitaryFormula' (fns, d) uf = case uf of
TUF_THF_Conditional {} ->
mkError ("THF.Utils.rewriteUnitaryFOrmula: " ++
"Conditional not in THF0!") uf
TUF_THF_Quantified_Formula qf -> liftM TUF_THF_Quantified_Formula $
rewriteQuantifiedFormula fns (fns, d) qf
TUF_THF_Unary_Formula c lf -> liftM (TUF... | 788 | false | true | 0 | 12 | 169 | 283 | 139 | 144 | null | null |
m-alvarez/jhc | drift_processed/Ho/Type.hs | mit | hoTypeSynonyms_u f r@HoTcInfo{hoTypeSynonyms = x} = r{hoTypeSynonyms = f x} | 76 | hoTypeSynonyms_u f r@HoTcInfo{hoTypeSynonyms = x} = r{hoTypeSynonyms = f x} | 76 | hoTypeSynonyms_u f r@HoTcInfo{hoTypeSynonyms = x} = r{hoTypeSynonyms = f x} | 76 | false | false | 0 | 9 | 10 | 34 | 18 | 16 | null | null |
AndrewRademacher/hs-ebay-trading | repl/Main.hs | mit | sandbox :: EbayConf
sandbox = unsafePerformIO $ getSandbox | 58 | sandbox :: EbayConf
sandbox = unsafePerformIO $ getSandbox | 58 | sandbox = unsafePerformIO $ getSandbox | 38 | false | true | 2 | 6 | 7 | 23 | 9 | 14 | null | null |
alphalambda/codeworld | codeworld-prediction/src/CodeWorld/Prediction/Trivial.hs | apache-2.0 | handleNextEvents ::
StepFun s -> AnimationRate -> EventQueue s -> TState s -> TState s
handleNextEvents step rate eq ts =
foldl' (flip (handleNextEvent step rate)) ts $
map (\((t, _p), h) -> (t, h)) $ M.toList eq | 227 | handleNextEvents ::
StepFun s -> AnimationRate -> EventQueue s -> TState s -> TState s
handleNextEvents step rate eq ts =
foldl' (flip (handleNextEvent step rate)) ts $
map (\((t, _p), h) -> (t, h)) $ M.toList eq | 227 | handleNextEvents step rate eq ts =
foldl' (flip (handleNextEvent step rate)) ts $
map (\((t, _p), h) -> (t, h)) $ M.toList eq | 133 | false | true | 2 | 10 | 52 | 115 | 56 | 59 | null | null |
spechub/Hets | HasCASL/Symbol.hs | gpl-2.0 | hideSymbol :: Symbol -> Env -> Env
hideSymbol sym sig =
let i = symName sym
cm = classMap sig
tm = typeMap sig
as = assumps sig in
case symType sym of
ClassAsItemType _ -> sig
{ classMap = Map.map
(\ ci -> ci { classKinds = Set.filter
(Set.notMembe... | 947 | hideSymbol :: Symbol -> Env -> Env
hideSymbol sym sig =
let i = symName sym
cm = classMap sig
tm = typeMap sig
as = assumps sig in
case symType sym of
ClassAsItemType _ -> sig
{ classMap = Map.map
(\ ci -> ci { classKinds = Set.filter
(Set.notMembe... | 947 | hideSymbol sym sig =
let i = symName sym
cm = classMap sig
tm = typeMap sig
as = assumps sig in
case symType sym of
ClassAsItemType _ -> sig
{ classMap = Map.map
(\ ci -> ci { classKinds = Set.filter
(Set.notMember i . idsOfKind) $ classKinds ci })... | 912 | false | true | 0 | 23 | 359 | 353 | 178 | 175 | null | null |
mikeizbicki/simd | src/Data/SIMD/SIMD4.hs | bsd-3-clause | primVector((X4 Float), V_FloatX4, MV_FloatX4)
newtype instance VUM.MVector s (X4 Double) = MV_DoubleX4 (P.MVector s (X4 Double)) | 129 | primVector((X4 Float), V_FloatX4, MV_FloatX4)
newtype instance VUM.MVector s (X4 Double) = MV_DoubleX4 (P.MVector s (X4 Double)) | 129 | primVector((X4 Float), V_FloatX4, MV_FloatX4)
newtype instance VUM.MVector s (X4 Double) = MV_DoubleX4 (P.MVector s (X4 Double)) | 129 | false | false | 0 | 9 | 16 | 61 | 31 | 30 | null | null |
olorin/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | The routes in the route table.
rtRoutes :: Lens' RouteTable [Route]
rtRoutes = lens _rtRoutes (\ s a -> s{_rtRoutes = a}) . _Default . _Coerce | 147 | rtRoutes :: Lens' RouteTable [Route]
rtRoutes = lens _rtRoutes (\ s a -> s{_rtRoutes = a}) . _Default . _Coerce | 111 | rtRoutes = lens _rtRoutes (\ s a -> s{_rtRoutes = a}) . _Default . _Coerce | 74 | true | true | 0 | 11 | 27 | 51 | 28 | 23 | null | null |
lfritz/python-type-inference | infer-python-types/src/InferPythonTypes.hs | bsd-3-clause | step2 :: [String] -> [(String, ModuleSpan)] -> Mode -> Configuration
-> UserSuppliedTypes -> Statistics -> IO ()
step2 filenames asts mode c userSuppliedTypes@(_, userSpecifiedModules, _) s =
do let moduleNames = Set.fromList $ map fst asts
externalModules = userSpecifiedModules Set.\\ moduleNames
... | 935 | step2 :: [String] -> [(String, ModuleSpan)] -> Mode -> Configuration
-> UserSuppliedTypes -> Statistics -> IO ()
step2 filenames asts mode c userSuppliedTypes@(_, userSpecifiedModules, _) s =
do let moduleNames = Set.fromList $ map fst asts
externalModules = userSpecifiedModules Set.\\ moduleNames
... | 935 | step2 filenames asts mode c userSuppliedTypes@(_, userSpecifiedModules, _) s =
do let moduleNames = Set.fromList $ map fst asts
externalModules = userSpecifiedModules Set.\\ moduleNames
c' = c { cfgExternalModules = externalModules }
unless (printRaw mode)
$ putStr (showConfi... | 816 | false | true | 22 | 8 | 319 | 246 | 135 | 111 | null | null |
tmcdonell/accelerate-lulesh | src/Init.hs | bsd-3-clause | -- | Initialise the volume of each element.
--
-- Since we begin with a regular hexahedral mesh we just compute the volume
-- directly and initialise all elements to that value.
--
initElemVolume :: Int -> Acc (Field Volume)
initElemVolume numElem =
let
sh = constant (Z :. numElem :. numElem :. numElem)
w... | 484 | initElemVolume :: Int -> Acc (Field Volume)
initElemVolume numElem =
let
sh = constant (Z :. numElem :. numElem :. numElem)
w = _WIDTH / P.fromIntegral numElem
h = _HEIGHT / P.fromIntegral numElem
d = _DEPTH / P.fromIntegral numElem
v = w * h * d
in
A.fill sh v | 303 | initElemVolume numElem =
let
sh = constant (Z :. numElem :. numElem :. numElem)
w = _WIDTH / P.fromIntegral numElem
h = _HEIGHT / P.fromIntegral numElem
d = _DEPTH / P.fromIntegral numElem
v = w * h * d
in
A.fill sh v | 259 | true | true | 0 | 13 | 124 | 123 | 63 | 60 | null | null |
hdbc/hdbc-sqlite3 | testsrc/TestSbasics.hs | bsd-3-clause | runReplace = dbTestCase (\dbh ->
do sRun dbh "INSERT INTO hdbctest1 VALUES (?, ?, ?, ?)" r1
sRun dbh "INSERT INTO hdbctest1 VALUES (?, ?, 2, ?)" r2
commit dbh
sth <- prepare dbh "SELECT * FROM hdbctest1 WHERE testname = 'runReplace' ORDER BY testid"
sExecute sth []
sFetchRow sth >... | 711 | runReplace = dbTestCase (\dbh ->
do sRun dbh "INSERT INTO hdbctest1 VALUES (?, ?, ?, ?)" r1
sRun dbh "INSERT INTO hdbctest1 VALUES (?, ?, 2, ?)" r2
commit dbh
sth <- prepare dbh "SELECT * FROM hdbctest1 WHERE testname = 'runReplace' ORDER BY testid"
sExecute sth []
sFetchRow sth >... | 711 | runReplace = dbTestCase (\dbh ->
do sRun dbh "INSERT INTO hdbctest1 VALUES (?, ?, ?, ?)" r1
sRun dbh "INSERT INTO hdbctest1 VALUES (?, ?, 2, ?)" r2
commit dbh
sth <- prepare dbh "SELECT * FROM hdbctest1 WHERE testname = 'runReplace' ORDER BY testid"
sExecute sth []
sFetchRow sth >... | 711 | false | false | 1 | 16 | 231 | 206 | 96 | 110 | null | null |
mrakgr/futhark | src/Futhark/Representation/AST/Attributes/Ranges.hs | bsd-3-clause | expRanges (DoLoop ctxmerge valmerge (ForLoop i iterations) body) =
zipWith returnedRange valmerge $ rangesOf body
where bound_in_loop =
HS.fromList $ i : map (paramName . fst) (ctxmerge++valmerge) ++
concatMap (patternNames . bindingPattern) (bodyBindings body)
returnedRange mergeparam ... | 1,021 | expRanges (DoLoop ctxmerge valmerge (ForLoop i iterations) body) =
zipWith returnedRange valmerge $ rangesOf body
where bound_in_loop =
HS.fromList $ i : map (paramName . fst) (ctxmerge++valmerge) ++
concatMap (patternNames . bindingPattern) (bodyBindings body)
returnedRange mergeparam ... | 1,021 | expRanges (DoLoop ctxmerge valmerge (ForLoop i iterations) body) =
zipWith returnedRange valmerge $ rangesOf body
where bound_in_loop =
HS.fromList $ i : map (paramName . fst) (ctxmerge++valmerge) ++
concatMap (patternNames . bindingPattern) (bodyBindings body)
returnedRange mergeparam ... | 1,021 | false | false | 0 | 18 | 286 | 338 | 163 | 175 | null | null |
forste/haReFork | tools/base/ParseOld.hs | bsd-3-clause | handleFlag ParseInternal f = show . testParser f | 51 | handleFlag ParseInternal f = show . testParser f | 51 | handleFlag ParseInternal f = show . testParser f | 51 | false | false | 0 | 6 | 10 | 20 | 8 | 12 | null | null |
ouanixi/hs2ast | tests/HS2AST/Tests/Sexpr.hs | gpl-3.0 | -- canShowVars v = Prelude.length (showVar v) > 0
-- Simplified Sexpr builders; don't perform generic type-matching stuff
sLeaf :: Data a => a -> L.Lisp
sLeaf = strConstr | 171 | sLeaf :: Data a => a -> L.Lisp
sLeaf = strConstr | 48 | sLeaf = strConstr | 17 | true | true | 0 | 9 | 29 | 33 | 15 | 18 | null | null |
JohnLato/scryptic | src/Scryptic/Monad.hs | gpl-3.0 | mapScrypticM :: (forall x. m x -> n x) -> ScrypticM m a -> ScrypticM n a
mapScrypticM f = ScrypticM . mapStateT f . runSM | 121 | mapScrypticM :: (forall x. m x -> n x) -> ScrypticM m a -> ScrypticM n a
mapScrypticM f = ScrypticM . mapStateT f . runSM | 121 | mapScrypticM f = ScrypticM . mapStateT f . runSM | 48 | false | true | 0 | 9 | 25 | 61 | 29 | 32 | null | null |
andrewaguiar/s99-haskell | tfidf/tf-idf.hs | mit | tfIdfTerm corpus@(Corpus docs) term = tfIdfDocument docs vIdf term
-- First I calculate the idf then pass the value already processed
where vIdf = idf corpus term | 233 | tfIdfTerm corpus@(Corpus docs) term = tfIdfDocument docs vIdf term
-- First I calculate the idf then pass the value already processed
where vIdf = idf corpus term | 233 | tfIdfTerm corpus@(Corpus docs) term = tfIdfDocument docs vIdf term
-- First I calculate the idf then pass the value already processed
where vIdf = idf corpus term | 233 | false | false | 0 | 8 | 97 | 40 | 20 | 20 | null | null |
olsner/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | externallyVisibleCLabel (RtsLabel _) = True | 54 | externallyVisibleCLabel (RtsLabel _) = True | 54 | externallyVisibleCLabel (RtsLabel _) = True | 54 | false | false | 0 | 7 | 15 | 15 | 7 | 8 | null | null |
nikivazou/hscolour | Language/Haskell/HsColour.hs | gpl-2.0 | hscolour' MIRC pref _ = MIRC.hscolour pref | 55 | hscolour' MIRC pref _ = MIRC.hscolour pref | 55 | hscolour' MIRC pref _ = MIRC.hscolour pref | 55 | false | false | 0 | 6 | 19 | 21 | 8 | 13 | null | null |
roberth/uu-helium | demo/ParserLibrary.hs | gpl-3.0 | pack :: Parser s a -> Parser s b -> Parser s c -> Parser s b
pack s1 p s2 = s1 *> p <* s2 | 100 | pack :: Parser s a -> Parser s b -> Parser s c -> Parser s b
pack s1 p s2 = s1 *> p <* s2 | 100 | pack s1 p s2 = s1 *> p <* s2 | 30 | false | true | 0 | 8 | 37 | 58 | 27 | 31 | null | null |
flowbox-public/fgl | Data/Graph/Inductive/Query/BCC.hs | bsd-3-clause | embedContexts :: DynGraph gr => Context a b -> [gr a b] -> [gr a b]
embedContexts (_,v,l,s) gs = map (\(x,y)-> x & y) (zip lc gs)
where lc = map (\e->(e,v,l,e)) lc'
lc'= map (\g->[ e | e <- s, gelem (snd e) g]) gs
---------------------------------------------------------------... | 555 | embedContexts :: DynGraph gr => Context a b -> [gr a b] -> [gr a b]
embedContexts (_,v,l,s) gs = map (\(x,y)-> x & y) (zip lc gs)
where lc = map (\e->(e,v,l,e)) lc'
lc'= map (\g->[ e | e <- s, gelem (snd e) g]) gs
---------------------------------------------------------------... | 555 | embedContexts (_,v,l,s) gs = map (\(x,y)-> x & y) (zip lc gs)
where lc = map (\e->(e,v,l,e)) lc'
lc'= map (\g->[ e | e <- s, gelem (snd e) g]) gs
------------------------------------------------------------------------------
-- Given a node v and a list of graphs, this functio... | 487 | false | true | 0 | 12 | 119 | 181 | 97 | 84 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/TypeCheck/Monad/CodeState.hs | bsd-3-clause | mergeStates :: CodeState -> CodeState -> TcDeclM CodeState
mergeStates (CodeState vm1 ls1 es1) (CodeState vm2 ls2 es2) = do
newVm <- mergeVarMaps vm1 vm2
newExns <- mergeExns es1 es2
let newState = CodeState {
varMapSt = newVm,
lockMods = ls1 <++> ls2,
exnS ... | 561 | mergeStates :: CodeState -> CodeState -> TcDeclM CodeState
mergeStates (CodeState vm1 ls1 es1) (CodeState vm2 ls2 es2) = do
newVm <- mergeVarMaps vm1 vm2
newExns <- mergeExns es1 es2
let newState = CodeState {
varMapSt = newVm,
lockMods = ls1 <++> ls2,
exnS ... | 561 | mergeStates (CodeState vm1 ls1 es1) (CodeState vm2 ls2 es2) = do
newVm <- mergeVarMaps vm1 vm2
newExns <- mergeExns es1 es2
let newState = CodeState {
varMapSt = newVm,
lockMods = ls1 <++> ls2,
exnS = newExns
}
tracePrint ("\n" ++ codeStateMod... | 502 | false | true | 0 | 12 | 143 | 141 | 70 | 71 | null | null |
sopvop/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | checkLicense :: PackageDescription -> [PackageCheck]
checkLicense pkg =
catMaybes [
check (license pkg == UnspecifiedLicense) $
PackageDistInexcusable
"The 'license' field is missing."
, check (license pkg == AllRightsReserved) $
PackageDistSuspicious
"The 'license' is AllRightsRes... | 2,426 | checkLicense :: PackageDescription -> [PackageCheck]
checkLicense pkg =
catMaybes [
check (license pkg == UnspecifiedLicense) $
PackageDistInexcusable
"The 'license' field is missing."
, check (license pkg == AllRightsReserved) $
PackageDistSuspicious
"The 'license' is AllRightsRes... | 2,426 | checkLicense pkg =
catMaybes [
check (license pkg == UnspecifiedLicense) $
PackageDistInexcusable
"The 'license' field is missing."
, check (license pkg == AllRightsReserved) $
PackageDistSuspicious
"The 'license' is AllRightsReserved. Is that really what you want?"
, case licens... | 2,373 | false | true | 0 | 17 | 672 | 569 | 279 | 290 | null | null |
ytakano/tsukuyomi | tests/json/json_haskell.hs | bsd-3-clause | x2 = 16 * 16 * (C.ord h2) | 25 | x2 = 16 * 16 * (C.ord h2) | 25 | x2 = 16 * 16 * (C.ord h2) | 25 | false | false | 0 | 8 | 7 | 22 | 11 | 11 | null | null |
meiersi/bytestring | Data/ByteString/Char8.hs | bsd-3-clause | -- | 'foldl', applied to a binary operator, a starting value (typically
-- the left-identity of the operator), and a ByteString, reduces the
-- ByteString using the binary operator, from left to right.
foldl :: (a -> Char -> a) -> a -> ByteString -> a
foldl f = B.foldl (\a c -> f a (w2c c)) | 291 | foldl :: (a -> Char -> a) -> a -> ByteString -> a
foldl f = B.foldl (\a c -> f a (w2c c)) | 89 | foldl f = B.foldl (\a c -> f a (w2c c)) | 39 | true | true | 0 | 10 | 56 | 66 | 35 | 31 | null | null |
cocreature/leksah | src/IDE/Pane/Modules.hs | gpl-2.0 | -- * Expander State
emptyExpansion = ExpanderState ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) | 144 | emptyExpansion = ExpanderState ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) | 123 | emptyExpansion = ExpanderState ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) ([],[]) | 123 | true | false | 0 | 7 | 30 | 128 | 74 | 54 | null | null |
Chiel92/ants | simulation/Caching.hs | gpl-2.0 | drawHorAboveEdge :: Float -> Int -> Int -> Int -> [Point]
drawHorAboveEdge scale x1 x2 ypos
| x1 > x2 = reverse (drawHorAboveEdge scale x2 x1 ypos)
| otherwise = toPointEdge scale 2 (Pos x1 ypos)
: [ toPointEdge scale d (Pos x ypos) | x <- [x1..x2-1], d <- [1, 0] ] | 289 | drawHorAboveEdge :: Float -> Int -> Int -> Int -> [Point]
drawHorAboveEdge scale x1 x2 ypos
| x1 > x2 = reverse (drawHorAboveEdge scale x2 x1 ypos)
| otherwise = toPointEdge scale 2 (Pos x1 ypos)
: [ toPointEdge scale d (Pos x ypos) | x <- [x1..x2-1], d <- [1, 0] ] | 289 | drawHorAboveEdge scale x1 x2 ypos
| x1 > x2 = reverse (drawHorAboveEdge scale x2 x1 ypos)
| otherwise = toPointEdge scale 2 (Pos x1 ypos)
: [ toPointEdge scale d (Pos x ypos) | x <- [x1..x2-1], d <- [1, 0] ] | 231 | false | true | 1 | 11 | 76 | 140 | 70 | 70 | null | null |
sdiehl/ghc | testsuite/tests/simplCore/should_compile/T14779a.hs | bsd-3-clause | eqS :: String -> String -> Bool
eqS [] [] = True | 48 | eqS :: String -> String -> Bool
eqS [] [] = True | 48 | eqS [] [] = True | 16 | false | true | 0 | 6 | 11 | 33 | 15 | 18 | null | null |
spechub/Hets | CSL/AS_BASIC_CSL.hs | gpl-2.0 | cmpGCs (GCR a) (GCI b) = cmpFloatToInt a b | 42 | cmpGCs (GCR a) (GCI b) = cmpFloatToInt a b | 42 | cmpGCs (GCR a) (GCI b) = cmpFloatToInt a b | 42 | false | false | 0 | 6 | 8 | 30 | 13 | 17 | null | null |
Helium4Haskell/helium | src/commands/texthint/TextHint/Main.hs | gpl-3.0 | alertESCAPABLES :: String
alertESCAPABLES = ['"', escapeChar] | 61 | alertESCAPABLES :: String
alertESCAPABLES = ['"', escapeChar] | 61 | alertESCAPABLES = ['"', escapeChar] | 35 | false | true | 0 | 6 | 6 | 24 | 11 | 13 | null | null |
mk12/lam | src/Lam/Eval.hs | mit | lookupVal x env = M.lookup x env | 32 | lookupVal x env = M.lookup x env | 32 | lookupVal x env = M.lookup x env | 32 | false | false | 0 | 6 | 6 | 18 | 8 | 10 | null | null |
bitemyapp/checkers | src/Test/QuickCheck/Checkers.hs | bsd-3-clause | meq4 f g = \a b c d ->
model (f a b c d) =-= g (model a) (model b) (model c) (model d) | 95 | meq4 f g = \a b c d ->
model (f a b c d) =-= g (model a) (model b) (model c) (model d) | 95 | meq4 f g = \a b c d ->
model (f a b c d) =-= g (model a) (model b) (model c) (model d) | 95 | false | false | 0 | 9 | 33 | 74 | 36 | 38 | null | null |
rodrigofegui/UnB | 2017.2/Linguagens de Programação/Trab 2_Ver 2/Tst_F6LAE.hs | gpl-3.0 | ava_17 = Not (Bool False) | 25 | ava_17 = Not (Bool False) | 25 | ava_17 = Not (Bool False) | 25 | false | false | 1 | 6 | 4 | 18 | 7 | 11 | null | null |
bsummer4/ogz | src/Gen.hs | agpl-3.0 | voxelPattern ∷ BitField3D D → Cube
voxelPattern bf = f <$> indexTree depth
where (Z:.w:.h:.d, f) = A.toFunction bf
errmsg = "3d bit fields must be cubes with sizes that are powers of two. Not %s"
depth = case (depthNeeded w, w≡h && h≡d) of
(Just requiredDepth, True) → requiredDepth
... | 399 | voxelPattern ∷ BitField3D D → Cube
voxelPattern bf = f <$> indexTree depth
where (Z:.w:.h:.d, f) = A.toFunction bf
errmsg = "3d bit fields must be cubes with sizes that are powers of two. Not %s"
depth = case (depthNeeded w, w≡h && h≡d) of
(Just requiredDepth, True) → requiredDepth
... | 399 | voxelPattern bf = f <$> indexTree depth
where (Z:.w:.h:.d, f) = A.toFunction bf
errmsg = "3d bit fields must be cubes with sizes that are powers of two. Not %s"
depth = case (depthNeeded w, w≡h && h≡d) of
(Just requiredDepth, True) → requiredDepth
_ ... | 364 | false | true | 2 | 14 | 132 | 143 | 73 | 70 | null | null |
jimenezrick/cook.hs | src/Cook/Recipe.hs | mit | runPipe :: NonEmpty Step -> Recipe f ()
runPipe pipe = runPipeOut pipe >>= recipeIO . T.putStr | 94 | runPipe :: NonEmpty Step -> Recipe f ()
runPipe pipe = runPipeOut pipe >>= recipeIO . T.putStr | 94 | runPipe pipe = runPipeOut pipe >>= recipeIO . T.putStr | 54 | false | true | 0 | 7 | 16 | 41 | 19 | 22 | null | null |
hlian/feelings.blackfriday | src/Main.hs | mit | main :: IO ()
main = do
feelings <- initialFeelingsM
_ <- repeatedTimer (serialize feelings) (sDelay 1)
httpServe config (site feelings)
where
config = setPort 4445 mempty | 183 | main :: IO ()
main = do
feelings <- initialFeelingsM
_ <- repeatedTimer (serialize feelings) (sDelay 1)
httpServe config (site feelings)
where
config = setPort 4445 mempty | 183 | main = do
feelings <- initialFeelingsM
_ <- repeatedTimer (serialize feelings) (sDelay 1)
httpServe config (site feelings)
where
config = setPort 4445 mempty | 169 | false | true | 0 | 10 | 38 | 74 | 34 | 40 | null | null |
chupaaaaaaan/nn-with-haskell | src/Perceptron.hs | bsd-3-clause | p_and :: Vector Double -> Double
p_and x
| tmp <= 0.0 = 0.0
| otherwise = 1.0
where
tmp = w <.> x + b
b = -0.7
w = vector [0.5,0.5] | 149 | p_and :: Vector Double -> Double
p_and x
| tmp <= 0.0 = 0.0
| otherwise = 1.0
where
tmp = w <.> x + b
b = -0.7
w = vector [0.5,0.5] | 149 | p_and x
| tmp <= 0.0 = 0.0
| otherwise = 1.0
where
tmp = w <.> x + b
b = -0.7
w = vector [0.5,0.5] | 116 | false | true | 6 | 8 | 50 | 95 | 41 | 54 | null | null |
AlainODea-haskell/tenable-securitycenter | app/ApiClient.hs | apache-2.0 | createApiClient :: FilePath
-> IO ApiClient
createApiClient configFilename = do
configFile <- L8.readFile configFilename
let config = either error id $ eitherDecode configFile
let hostname = securityCenterHost $ config
let u = securityCenterUsername config
let p = securityCenterPassword config... | 459 | createApiClient :: FilePath
-> IO ApiClient
createApiClient configFilename = do
configFile <- L8.readFile configFilename
let config = either error id $ eitherDecode configFile
let hostname = securityCenterHost $ config
let u = securityCenterUsername config
let p = securityCenterPassword config... | 459 | createApiClient configFilename = do
configFile <- L8.readFile configFilename
let config = either error id $ eitherDecode configFile
let hostname = securityCenterHost $ config
let u = securityCenterUsername config
let p = securityCenterPassword config
manager <- newManager tlsManagerSettings
(t, session) <... | 399 | false | true | 0 | 12 | 89 | 144 | 63 | 81 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Html/ParseLazy.hs | gpl-3.0 | chardata :: HParser CharData
chardata = freetext | 48 | chardata :: HParser CharData
chardata = freetext | 48 | chardata = freetext | 19 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
rahulmutt/ghcvm | libraries/base/Control/Monad/ST/Lazy/Imp.hs | bsd-3-clause | runST :: (forall s. ST s a) -> a
runST (ST st) = runRW# (\s -> case st (S# s) of (r, _) -> r) | 93 | runST :: (forall s. ST s a) -> a
runST (ST st) = runRW# (\s -> case st (S# s) of (r, _) -> r) | 93 | runST (ST st) = runRW# (\s -> case st (S# s) of (r, _) -> r) | 60 | false | true | 0 | 11 | 24 | 73 | 38 | 35 | null | null |
emilaxelsson/operational-alacarte | tests/Tests.hs | bsd-3-clause | main = do
Simple.main
Advanced.main | 43 | main = do
Simple.main
Advanced.main | 43 | main = do
Simple.main
Advanced.main | 43 | false | false | 1 | 8 | 12 | 20 | 7 | 13 | null | null |
olsner/ghc | compiler/coreSyn/PprCore.hs | bsd-3-clause | pprOptCo :: Coercion -> SDoc
pprOptCo co = sdocWithDynFlags $ \dflags ->
if gopt Opt_SuppressCoercions dflags
then text "..."
else parens (sep [ppr co, dcolon <+> ppr (coercionType co)]) | 228 | pprOptCo :: Coercion -> SDoc
pprOptCo co = sdocWithDynFlags $ \dflags ->
if gopt Opt_SuppressCoercions dflags
then text "..."
else parens (sep [ppr co, dcolon <+> ppr (coercionType co)]) | 228 | pprOptCo co = sdocWithDynFlags $ \dflags ->
if gopt Opt_SuppressCoercions dflags
then text "..."
else parens (sep [ppr co, dcolon <+> ppr (coercionType co)]) | 199 | false | true | 0 | 15 | 70 | 74 | 37 | 37 | null | null |
jdubrule/bond | compiler/tests/Tests/Syntax/JSON.hs | mit | -- | Helper method that JSON encodes to lazy text
encodeText :: ToJSON a => a -> LT.Text
encodeText o = decodeUtf8 (encodePretty' config o)
where config = (Config 2 compare)
-- | Asserts that the given JSON decodes into the expected value | 241 | encodeText :: ToJSON a => a -> LT.Text
encodeText o = decodeUtf8 (encodePretty' config o)
where config = (Config 2 compare)
-- | Asserts that the given JSON decodes into the expected value | 191 | encodeText o = decodeUtf8 (encodePretty' config o)
where config = (Config 2 compare)
-- | Asserts that the given JSON decodes into the expected value | 152 | true | true | 0 | 7 | 45 | 56 | 28 | 28 | null | null |
ahushh/Monaba | monaba/src/Utils/YobaMarkup.hs | mit | tryWakabaTags :: Parsec Text () Expr
tryWakabaTags = try spoilerwakaba | 70 | tryWakabaTags :: Parsec Text () Expr
tryWakabaTags = try spoilerwakaba | 70 | tryWakabaTags = try spoilerwakaba | 33 | false | true | 0 | 7 | 9 | 29 | 12 | 17 | null | null |
guoguo12/haskell-ptable | ptable.hs | apache-2.0 | gnum "Pr" = -1 | 14 | gnum "Pr" = -1 | 14 | gnum "Pr" = -1 | 14 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
pdownen/sequent-core | src/Language/SequentCore/OccurAnal.hs | bsd-3-clause | occAnalCommand env (Eval term frames end)
= occAnalCut env term (frames, end) | 79 | occAnalCommand env (Eval term frames end)
= occAnalCut env term (frames, end) | 79 | occAnalCommand env (Eval term frames end)
= occAnalCut env term (frames, end) | 79 | false | false | 0 | 6 | 13 | 38 | 17 | 21 | null | null |
AmpersandTarski/ampersand | src/Ampersand/Input/ADL1/Parser.hs | gpl-3.0 | --- ServiceRule ::= 'SERVICE' RoleList 'MAINTAINS' ADLidList
--TODO: Rename the RoleRule to RoleMantains and RoleRelation to RoleEdits.
pServiceRule :: AmpParser P_RoleRule
pServiceRule = try (Maintain <$> currPos
<* pKey "SERVICE"
<*> pRole True `sepBy1` pComma
... | 406 | pServiceRule :: AmpParser P_RoleRule
pServiceRule = try (Maintain <$> currPos
<* pKey "SERVICE"
<*> pRole True `sepBy1` pComma
<* pKey "MAINTAINS")
<*> pADLid `sepBy1` pComma | 270 | pServiceRule = try (Maintain <$> currPos
<* pKey "SERVICE"
<*> pRole True `sepBy1` pComma
<* pKey "MAINTAINS")
<*> pADLid `sepBy1` pComma | 233 | true | true | 3 | 10 | 137 | 74 | 37 | 37 | null | null |
niteria/haddock | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | bsd-2-clause | ppr_mono_ty _ (HsPArrTy ty) u q = pabrackets (ppr_mono_lty pREC_TOP ty u q) | 89 | ppr_mono_ty _ (HsPArrTy ty) u q = pabrackets (ppr_mono_lty pREC_TOP ty u q) | 89 | ppr_mono_ty _ (HsPArrTy ty) u q = pabrackets (ppr_mono_lty pREC_TOP ty u q) | 89 | false | false | 0 | 7 | 26 | 36 | 17 | 19 | null | null |
fmapfmapfmap/amazonka | amazonka-iam/gen/Network/AWS/IAM/ListInstanceProfilesForRole.hs | mpl-2.0 | -- | The name of the role to list instance profiles for.
lipfrRoleName :: Lens' ListInstanceProfilesForRole Text
lipfrRoleName = lens _lipfrRoleName (\ s a -> s{_lipfrRoleName = a}) | 181 | lipfrRoleName :: Lens' ListInstanceProfilesForRole Text
lipfrRoleName = lens _lipfrRoleName (\ s a -> s{_lipfrRoleName = a}) | 124 | lipfrRoleName = lens _lipfrRoleName (\ s a -> s{_lipfrRoleName = a}) | 68 | true | true | 1 | 9 | 27 | 45 | 22 | 23 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/nativeGen/PIC.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Generate code to calculate the address that should be put in the
-- PIC base register.
-- This is called by MachCodeGen for every CmmProc that accessed the
-- PIC base register. It adds the appropriate instructions to the
-- top of the ... | 2,396 | initializePicBase_ppc
:: Arch -> OS -> Reg
-> [NatCmmDecl CmmStatics PPC.Instr]
-> NatM [NatCmmDecl CmmStatics PPC.Instr]
initializePicBase_ppc ArchPPC os picReg
(CmmProc info lab live (ListGraph blocks) : statics)
| osElfTarget os
= do
let
gotOffset = PPC.ImmCons... | 1,488 | initializePicBase_ppc ArchPPC os picReg
(CmmProc info lab live (ListGraph blocks) : statics)
| osElfTarget os
= do
let
gotOffset = PPC.ImmConstantDiff
(PPC.ImmCLbl gotLabel)
(PPC.ImmCLbl mkPicBaseLabel)
blocks' ... | 1,342 | true | true | 0 | 21 | 848 | 359 | 186 | 173 | null | null |
cjw-charleswu/Wizard | RockPaperScissors/src/Main.hs | bsd-3-clause | gameLoop :: IO()
gameLoop = do
putStrLn ""
play
agreedToRematch <- askRematch
if agreedToRematch
then gameLoop
else putStrLn "" | 143 | gameLoop :: IO()
gameLoop = do
putStrLn ""
play
agreedToRematch <- askRematch
if agreedToRematch
then gameLoop
else putStrLn "" | 143 | gameLoop = do
putStrLn ""
play
agreedToRematch <- askRematch
if agreedToRematch
then gameLoop
else putStrLn "" | 126 | false | true | 0 | 9 | 34 | 52 | 22 | 30 | null | null |
msakai/multiset-large | Data/MultiSet/Large.hs | bsd-3-clause | {--------------------------------------------------------------------
Occurence lists
--------------------------------------------------------------------}
-- | /O(n)/. Convert the multiset to a list of element\/occurence pairs.
toOccurList :: MultiSet a -> [(a,Occur)]
toOccurList = toAscOccurList | 302 | toOccurList :: MultiSet a -> [(a,Occur)]
toOccurList = toAscOccurList | 69 | toOccurList = toAscOccurList | 28 | true | true | 0 | 7 | 28 | 29 | 17 | 12 | null | null |
brendanhay/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/NotificationChannels/Verify.hs | mpl-2.0 | -- | Multipart request metadata.
pncvPayload :: Lens' ProjectsNotificationChannelsVerify VerifyNotificationChannelRequest
pncvPayload
= lens _pncvPayload (\ s a -> s{_pncvPayload = a}) | 186 | pncvPayload :: Lens' ProjectsNotificationChannelsVerify VerifyNotificationChannelRequest
pncvPayload
= lens _pncvPayload (\ s a -> s{_pncvPayload = a}) | 153 | pncvPayload
= lens _pncvPayload (\ s a -> s{_pncvPayload = a}) | 64 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
sdiehl/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVSxL II16) addr
return (Any II64 code) | 158 | getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVSxL II16) addr
return (Any II64 code) | 158 | getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVSxL II16) addr
return (Any II64 code) | 158 | false | false | 0 | 11 | 29 | 78 | 35 | 43 | null | null |
facebookincubator/duckling | Duckling/Numeral/EN/Rules.hs | bsd-3-clause | ruleSkipHundreds1 :: Rule
ruleSkipHundreds1 = Rule
{ name = "one eleven"
, pattern =
[ regex "(one|two|three|four|five|six|seven|eight|nine)"
, regex "(ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|fou?rty|fifty|sixty|seventy|eighty|ninety)"
]
, prod = \... | 708 | ruleSkipHundreds1 :: Rule
ruleSkipHundreds1 = Rule
{ name = "one eleven"
, pattern =
[ regex "(one|two|three|four|five|six|seven|eight|nine)"
, regex "(ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|fou?rty|fifty|sixty|seventy|eighty|ninety)"
]
, prod = \... | 708 | ruleSkipHundreds1 = Rule
{ name = "one eleven"
, pattern =
[ regex "(one|two|three|four|five|six|seven|eight|nine)"
, regex "(ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|fou?rty|fifty|sixty|seventy|eighty|ninety)"
]
, prod = \tokens -> case tokens of
... | 682 | false | true | 0 | 19 | 154 | 199 | 98 | 101 | null | null |
Enamex/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | constDocs c@(AType (ATInt (ITFixed IT64))) = "Sixty-four bits (unsigned)" | 73 | constDocs c@(AType (ATInt (ITFixed IT64))) = "Sixty-four bits (unsigned)" | 73 | constDocs c@(AType (ATInt (ITFixed IT64))) = "Sixty-four bits (unsigned)" | 73 | false | false | 1 | 12 | 8 | 35 | 15 | 20 | null | null |
kallisti-dev/cond | src/Control/Conditional.hs | bsd-3-clause | condPlus ((p,v):ls) = if' p (return v) (condPlus ls) | 52 | condPlus ((p,v):ls) = if' p (return v) (condPlus ls) | 52 | condPlus ((p,v):ls) = if' p (return v) (condPlus ls) | 52 | false | false | 0 | 7 | 8 | 44 | 21 | 23 | null | null |
gleachkr/Carnap | Carnap-GHCJS/src/Carnap/GHCJS/Action/TruthTable.hs | gpl-3.0 | traverseBPT :: BPT -> [Either Char PureForm]
traverseBPT (Leaf f) = [Right f] | 77 | traverseBPT :: BPT -> [Either Char PureForm]
traverseBPT (Leaf f) = [Right f] | 77 | traverseBPT (Leaf f) = [Right f] | 32 | false | true | 0 | 7 | 12 | 38 | 19 | 19 | null | null |
RaphaelJ/getwebb.org | JobsDaemon/ExifTags.hs | gpl-3.0 | jobExifTags :: App -> FileId -> IO ()
jobExifTags app fileId = do
Just file <- runDBIO app $ get fileId
let path = getPath (uploadDir app (fileHash file)) Original
tags <- exifTags path
when (not $ null tags) $ runDBIO app $ do
mFile <- get fileId
case mFile of
Just _ ->
... | 552 | jobExifTags :: App -> FileId -> IO ()
jobExifTags app fileId = do
Just file <- runDBIO app $ get fileId
let path = getPath (uploadDir app (fileHash file)) Original
tags <- exifTags path
when (not $ null tags) $ runDBIO app $ do
mFile <- get fileId
case mFile of
Just _ ->
... | 552 | jobExifTags app fileId = do
Just file <- runDBIO app $ get fileId
let path = getPath (uploadDir app (fileHash file)) Original
tags <- exifTags path
when (not $ null tags) $ runDBIO app $ do
mFile <- get fileId
case mFile of
Just _ ->
forM_ tags $ \(title, ... | 514 | false | true | 0 | 16 | 181 | 179 | 82 | 97 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Patch.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
baspUploadType :: Lens' BillingAccountsSinksPatch (Maybe Text)
baspUploadType
= lens _baspUploadType
(\ s a -> s{_baspUploadType = a}) | 213 | baspUploadType :: Lens' BillingAccountsSinksPatch (Maybe Text)
baspUploadType
= lens _baspUploadType
(\ s a -> s{_baspUploadType = a}) | 142 | baspUploadType
= lens _baspUploadType
(\ s a -> s{_baspUploadType = a}) | 79 | true | true | 0 | 8 | 34 | 49 | 25 | 24 | null | null |
isomorphism/csound-expression | src/Csound/Options.hs | bsd-3-clause | setInput :: String -> Options
setInput a = def { csdFlags = def { audioFileOutput = def { input = Just a } } } | 110 | setInput :: String -> Options
setInput a = def { csdFlags = def { audioFileOutput = def { input = Just a } } } | 110 | setInput a = def { csdFlags = def { audioFileOutput = def { input = Just a } } } | 80 | false | true | 0 | 11 | 24 | 45 | 25 | 20 | null | null |
pparkkin/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp WriteOffAddrOp_Char = Just $ addrWriteOp jbyte mempty | 62 | simpleOp WriteOffAddrOp_Char = Just $ addrWriteOp jbyte mempty | 62 | simpleOp WriteOffAddrOp_Char = Just $ addrWriteOp jbyte mempty | 62 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
romanb/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/Types.hs | mpl-2.0 | -- | The status of the restore action. Returns starting, restoring, completed, or
-- failed.
rsStatus :: Lens' RestoreStatus (Maybe Text)
rsStatus = lens _rsStatus (\s a -> s { _rsStatus = a }) | 193 | rsStatus :: Lens' RestoreStatus (Maybe Text)
rsStatus = lens _rsStatus (\s a -> s { _rsStatus = a }) | 100 | rsStatus = lens _rsStatus (\s a -> s { _rsStatus = a }) | 55 | true | true | 0 | 9 | 33 | 47 | 26 | 21 | null | null |
guoguo12/haskell-ptable | ptable.hs | apache-2.0 | gnum "P" = 15 | 13 | gnum "P" = 15 | 13 | gnum "P" = 15 | 13 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ekmett/ghc | compiler/main/DynFlags.hs | bsd-3-clause | opt_L :: DynFlags -> [String]
opt_L dflags = sOpt_L (settings dflags) | 85 | opt_L :: DynFlags -> [String]
opt_L dflags = sOpt_L (settings dflags) | 85 | opt_L dflags = sOpt_L (settings dflags) | 39 | false | true | 0 | 8 | 26 | 36 | 16 | 20 | null | null |
Ulrar/cstodo | Application.hs | bsd-3-clause | -- | Run DB queries
db :: ReaderT SqlBackend (HandlerT App IO) a -> IO a
db = handler . runDB | 93 | db :: ReaderT SqlBackend (HandlerT App IO) a -> IO a
db = handler . runDB | 73 | db = handler . runDB | 20 | true | true | 4 | 7 | 20 | 47 | 19 | 28 | null | null |
glutamate/space | Test.hs | bsd-3-clause | white = (255, 255, 255) | 23 | white = (255, 255, 255) | 23 | white = (255, 255, 255) | 23 | false | false | 0 | 5 | 4 | 15 | 9 | 6 | null | null |
andir/ganeti | src/Ganeti/Locking/Waiting.hs | bsd-2-clause | revisitRequests :: (Lock a, Ord b, Ord c)
=> S.Set b -- ^ the owners where the requests keyed by them
-- already have been revisited
-> S.Set b -- ^ the owners where requests keyed by them need
-- to be revisited
-> Lo... | 1,338 | revisitRequests :: (Lock a, Ord b, Ord c)
=> S.Set b -- ^ the owners where the requests keyed by them
-- already have been revisited
-> S.Set b -- ^ the owners where requests keyed by them need
-- to be revisited
-> Lo... | 1,240 | revisitRequests notify todo state =
let getRequests (pending, reqs) owner =
(M.delete owner pending
, fromMaybe S.empty (M.lookup owner pending) `S.union` reqs)
(pending', requests) = S.foldl' getRequests (lwPending state, S.empty)
todo
revisitedOwners = S.ma... | 827 | true | true | 0 | 14 | 492 | 342 | 183 | 159 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'VGM.swap'
vgm_swap = VGM.swap | 34 | vgm_swap = VGM.swap | 19 | vgm_swap = VGM.swap | 19 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
siddhanathan/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | isSrcUnpacked :: SrcUnpackedness -> Bool
isSrcUnpacked SrcUnpack = True | 71 | isSrcUnpacked :: SrcUnpackedness -> Bool
isSrcUnpacked SrcUnpack = True | 71 | isSrcUnpacked SrcUnpack = True | 30 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
shlevy/ghc | compiler/cmm/PprC.hs | bsd-3-clause | -- StgWord
mkP_ = text "(P_)" | 30 | mkP_ = text "(P_)" | 19 | mkP_ = text "(P_)" | 19 | true | false | 1 | 5 | 6 | 14 | 5 | 9 | null | null |
olorin/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types/Product.hs | mpl-2.0 | -- | The regular expression pattern that a string configuration option value
-- with this restriction must match.
orrPattern :: Lens' OptionRestrictionRegex (Maybe Text)
orrPattern = lens _orrPattern (\ s a -> s{_orrPattern = a}) | 229 | orrPattern :: Lens' OptionRestrictionRegex (Maybe Text)
orrPattern = lens _orrPattern (\ s a -> s{_orrPattern = a}) | 115 | orrPattern = lens _orrPattern (\ s a -> s{_orrPattern = a}) | 59 | true | true | 0 | 9 | 34 | 47 | 26 | 21 | null | null |
zyla/rybu | src/Eval.hs | bsd-3-clause | evalExpr env (ArraySum arrayE) = do
array <- requireArray =<< evalExpr env arrayE
values <- mapM requireInt array
pure $ Int $ sum values | 149 | evalExpr env (ArraySum arrayE) = do
array <- requireArray =<< evalExpr env arrayE
values <- mapM requireInt array
pure $ Int $ sum values | 149 | evalExpr env (ArraySum arrayE) = do
array <- requireArray =<< evalExpr env arrayE
values <- mapM requireInt array
pure $ Int $ sum values | 149 | false | false | 0 | 9 | 35 | 61 | 26 | 35 | null | null |
colah/ImplicitCAD | tests/MessageSpec/Util.hs | agpl-3.0 | (-->) :: String -> [Message] -> Expectation
(-->) source value =
getOpenscadMessages scadOptions [] source `shouldReturn` value
where
scadOptions = generateScadOpts
-- | An even smaller wrapper which runs a program, and only returns the generated messages. for the test suite. | 285 | (-->) :: String -> [Message] -> Expectation
(-->) source value =
getOpenscadMessages scadOptions [] source `shouldReturn` value
where
scadOptions = generateScadOpts
-- | An even smaller wrapper which runs a program, and only returns the generated messages. for the test suite. | 285 | (-->) source value =
getOpenscadMessages scadOptions [] source `shouldReturn` value
where
scadOptions = generateScadOpts
-- | An even smaller wrapper which runs a program, and only returns the generated messages. for the test suite. | 241 | false | true | 0 | 7 | 49 | 55 | 31 | 24 | null | null |
cchalmers/dense | src/Data/Dense/Boxed.hs | bsd-3-clause | -- Monadic initialisation ----------------------------------------------
-- | O(n) Construct an array of the given shape by filling each position
-- with the monadic value.
replicateM :: (Monad m, Shape f) => Layout f -> m a -> m (BArray f a)
replicateM = G.replicateM | 271 | replicateM :: (Monad m, Shape f) => Layout f -> m a -> m (BArray f a)
replicateM = G.replicateM | 95 | replicateM = G.replicateM | 25 | true | true | 0 | 10 | 45 | 56 | 29 | 27 | null | null |
wmoss/multileveldb | src/Network/Server/MultiLevelDB/Server.hs | bsd-2-clause | loadPrimaryIndex = loadIndex lastPrimaryKey makePrimaryKey | 58 | loadPrimaryIndex = loadIndex lastPrimaryKey makePrimaryKey | 58 | loadPrimaryIndex = loadIndex lastPrimaryKey makePrimaryKey | 58 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | [Output Only] The number of instances in the managed instance group that
-- are scheduled to be deleted or are currently being deleted.
igmasDeleting :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasDeleting
= lens _igmasDeleting
(\ s a -> s{_igmasDeleting = a})
. mapping _Coerce | 313 | igmasDeleting :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasDeleting
= lens _igmasDeleting
(\ s a -> s{_igmasDeleting = a})
. mapping _Coerce | 172 | igmasDeleting
= lens _igmasDeleting
(\ s a -> s{_igmasDeleting = a})
. mapping _Coerce | 100 | true | true | 2 | 8 | 58 | 61 | 29 | 32 | null | null |
cabrera/hkv | src/Server.hs | mit | getSocket :: Maybe Int -> IO Socket
getSocket Nothing = error "usage: Server <port>" | 84 | getSocket :: Maybe Int -> IO Socket
getSocket Nothing = error "usage: Server <port>" | 84 | getSocket Nothing = error "usage: Server <port>" | 48 | false | true | 0 | 7 | 13 | 31 | 13 | 18 | null | null |
syunta/Scheme-hs | test/ParserSpec.hs | mit | spec :: Spec
spec = do
describe "parse" $ do
it "parses list to sobj" $ do
parse "(1)" `shouldBe` SList [SInt 1] Nil
parse "(1 2)" `shouldBe` SList [SInt 1, SInt 2] Nil
parse "(1 (2 3))" `shouldBe` SList [SInt 1, SList [SInt 2, SInt 3] Nil] Nil
it "parse empty list to sobj" $ do
parse ... | 1,345 | spec :: Spec
spec = do
describe "parse" $ do
it "parses list to sobj" $ do
parse "(1)" `shouldBe` SList [SInt 1] Nil
parse "(1 2)" `shouldBe` SList [SInt 1, SInt 2] Nil
parse "(1 (2 3))" `shouldBe` SList [SInt 1, SList [SInt 2, SInt 3] Nil] Nil
it "parse empty list to sobj" $ do
parse ... | 1,345 | spec = do
describe "parse" $ do
it "parses list to sobj" $ do
parse "(1)" `shouldBe` SList [SInt 1] Nil
parse "(1 2)" `shouldBe` SList [SInt 1, SInt 2] Nil
parse "(1 (2 3))" `shouldBe` SList [SInt 1, SList [SInt 2, SInt 3] Nil] Nil
it "parse empty list to sobj" $ do
parse "()" `shouldB... | 1,332 | false | true | 0 | 19 | 353 | 550 | 258 | 292 | null | null |
shockkolate/web-routes | test/Test.hs | bsd-3-clause | case_fromPathInfo :: Assertion
case_fromPathInfo =
do fromPathInfo "/home" @?= Right Home
fromPathInfo "/article/0" @?= Right (Article 0)
case fromPathInfo "/" :: Either String Sitemap of
Left _ -> return ()
url -> assertFailure $ "expected a Left, but got: " ++ show url | 310 | case_fromPathInfo :: Assertion
case_fromPathInfo =
do fromPathInfo "/home" @?= Right Home
fromPathInfo "/article/0" @?= Right (Article 0)
case fromPathInfo "/" :: Either String Sitemap of
Left _ -> return ()
url -> assertFailure $ "expected a Left, but got: " ++ show url | 310 | case_fromPathInfo =
do fromPathInfo "/home" @?= Right Home
fromPathInfo "/article/0" @?= Right (Article 0)
case fromPathInfo "/" :: Either String Sitemap of
Left _ -> return ()
url -> assertFailure $ "expected a Left, but got: " ++ show url | 279 | false | true | 0 | 11 | 81 | 92 | 41 | 51 | null | null |
rueshyna/gogol | gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'QueryList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'qlQueries'
queryList
:: QueryList
queryList =
QueryList'
{ _qlQueries = Nothing
} | 267 | queryList
:: QueryList
queryList =
QueryList'
{ _qlQueries = Nothing
} | 86 | queryList =
QueryList'
{ _qlQueries = Nothing
} | 59 | true | true | 1 | 7 | 60 | 31 | 17 | 14 | null | null |
snoyberg/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | -- | Add additional top-level declarations. The added declarations will be type
-- checked along with the current declaration group.
addTopDecls :: [Dec] -> Q ()
addTopDecls ds = Q (qAddTopDecls ds) | 198 | addTopDecls :: [Dec] -> Q ()
addTopDecls ds = Q (qAddTopDecls ds) | 65 | addTopDecls ds = Q (qAddTopDecls ds) | 36 | true | true | 0 | 7 | 31 | 37 | 19 | 18 | null | null |
input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/API/Internal/Handlers.hs | mit | resetWalletState :: PassiveWalletLayer IO -> Handler NoContent
resetWalletState w = liftIO (WalletLayer.resetWalletState w) >> return NoContent | 143 | resetWalletState :: PassiveWalletLayer IO -> Handler NoContent
resetWalletState w = liftIO (WalletLayer.resetWalletState w) >> return NoContent | 143 | resetWalletState w = liftIO (WalletLayer.resetWalletState w) >> return NoContent | 80 | false | true | 0 | 9 | 15 | 42 | 19 | 23 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Primitive.Mutable.hs | bsd-3-clause | write = G.write | 15 | write = G.write | 15 | write = G.write | 15 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
wavewave/lhc-analysis-collection | heavyhiggs/lhcoparser.hs | gpl-3.0 | countmark :: (MonadIO m) => Int -> Int -> Pipe a a m r
countmark marker n = go n
where go i = do when (i `mod` marker == 0) $ do
liftIO (print i)
x <- await
yield x
go (i+1) | 251 | countmark :: (MonadIO m) => Int -> Int -> Pipe a a m r
countmark marker n = go n
where go i = do when (i `mod` marker == 0) $ do
liftIO (print i)
x <- await
yield x
go (i+1) | 251 | countmark marker n = go n
where go i = do when (i `mod` marker == 0) $ do
liftIO (print i)
x <- await
yield x
go (i+1) | 196 | false | true | 0 | 12 | 120 | 116 | 55 | 61 | null | null |
gchrupala/morfette | src/GramLab/Data/Diff/FuzzyEditTree.hs | bsd-2-clause | prop_apply :: (String,String) -> Bool
prop_apply (w,w') = w' == apply (make w w') w | 152 | prop_apply :: (String,String) -> Bool
prop_apply (w,w') = w' == apply (make w w') w | 84 | prop_apply (w,w') = w' == apply (make w w') w | 46 | false | true | 0 | 8 | 83 | 47 | 25 | 22 | null | null |
tmishima/bindings-Oculus | Bindings/OculusRift.hs | apache-2.0 | -- | Re-centers the sensor orientation.
-- Normally this will recenter the (x,y,z) translational components and the yaw
-- component of orientation.
--
ovrHmd_RecenterPose :: OvrHmd -> IO ()
ovrHmd_RecenterPose = c_ovrHmd_RecenterPose | 235 | ovrHmd_RecenterPose :: OvrHmd -> IO ()
ovrHmd_RecenterPose = c_ovrHmd_RecenterPose | 82 | ovrHmd_RecenterPose = c_ovrHmd_RecenterPose | 43 | true | true | 0 | 7 | 32 | 24 | 14 | 10 | null | null |
sergv/vector | Data/Vector/Generic.hs | bsd-3-clause | postscanl f z = unstream . inplace (S.postscanl f z) id . stream | 64 | postscanl f z = unstream . inplace (S.postscanl f z) id . stream | 64 | postscanl f z = unstream . inplace (S.postscanl f z) id . stream | 64 | false | false | 2 | 9 | 12 | 40 | 16 | 24 | null | null |
rahulmutt/ghcvm | compiler/Eta/SimplStg/UnariseStg.hs | bsd-3-clause | unariseArg :: UnariseEnv -> StgArg -> [StgArg]
unariseArg rho (StgVarArg x) = map StgVarArg (unariseId rho x) | 109 | unariseArg :: UnariseEnv -> StgArg -> [StgArg]
unariseArg rho (StgVarArg x) = map StgVarArg (unariseId rho x) | 109 | unariseArg rho (StgVarArg x) = map StgVarArg (unariseId rho x) | 62 | false | true | 0 | 7 | 16 | 51 | 24 | 27 | null | null |
nikita-volkov/deque | library/Deque/Strict/State.hs | mit | {-|
\(\mathcal{O}(1)\).
Check whether deque is empty.
-}
null :: MonadState (Deque a) m => m Bool
null = gets Deque.null | 121 | null :: MonadState (Deque a) m => m Bool
null = gets Deque.null | 63 | null = gets Deque.null | 22 | true | true | 0 | 8 | 21 | 35 | 17 | 18 | null | null |
Erdwolf/autotool-bonn | src/Hilbert/Match.hs | gpl-2.0 | mbtl Nothing = zero | 19 | mbtl Nothing = zero | 19 | mbtl Nothing = zero | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
randen/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | optionVerbosity :: (flags -> Flag Verbosity)
-> (Flag Verbosity -> flags -> flags)
-> OptionField flags
optionVerbosity get set =
option "v" ["verbose"]
"Control verbosity (n is 0--3, default verbosity level is 1)"
get set
(optArg "n" (fmap Flag flagToVerbosity)
... | 432 | optionVerbosity :: (flags -> Flag Verbosity)
-> (Flag Verbosity -> flags -> flags)
-> OptionField flags
optionVerbosity get set =
option "v" ["verbose"]
"Control verbosity (n is 0--3, default verbosity level is 1)"
get set
(optArg "n" (fmap Flag flagToVerbosity)
... | 432 | optionVerbosity get set =
option "v" ["verbose"]
"Control verbosity (n is 0--3, default verbosity level is 1)"
get set
(optArg "n" (fmap Flag flagToVerbosity)
(Flag verbose) -- default Value if no n is given
(fmap (Just . showForCabal) . flagToList)) | 296 | false | true | 0 | 11 | 133 | 115 | 56 | 59 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_OP_INDEX_EXT :: GLenum
gl_OP_INDEX_EXT = 0x8782 | 50 | gl_OP_INDEX_EXT :: GLenum
gl_OP_INDEX_EXT = 0x8782 | 50 | gl_OP_INDEX_EXT = 0x8782 | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
tibbe/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | pprCLbl (CmmLabel _ str CmmData) = ftext str | 51 | pprCLbl (CmmLabel _ str CmmData) = ftext str | 51 | pprCLbl (CmmLabel _ str CmmData) = ftext str | 51 | false | false | 0 | 6 | 14 | 23 | 10 | 13 | null | null |
jrockway/c2hs | src/C2HS/Gen/Bind.hs | gpl-2.0 | -- | check for floating C types
--
isFloatCPrimType :: CPrimType -> Bool
isFloatCPrimType = (`elem` [CFloatPT, CDoublePT, CLDoublePT]) | 135 | isFloatCPrimType :: CPrimType -> Bool
isFloatCPrimType = (`elem` [CFloatPT, CDoublePT, CLDoublePT]) | 100 | isFloatCPrimType = (`elem` [CFloatPT, CDoublePT, CLDoublePT]) | 62 | true | true | 0 | 6 | 19 | 32 | 21 | 11 | null | null |
nadyac/todo-list | src/ReadTest.hs | gpl-3.0 | item_breakdown [x] elementList count =
do
-- if the element is a new subsection header or a newline, then we know that it is not a subsection item
if (length x > 0)
then
do
let a = head x
if (a == '#' || a == ' ')
... | 842 | item_breakdown [x] elementList count =
do
-- if the element is a new subsection header or a newline, then we know that it is not a subsection item
if (length x > 0)
then
do
let a = head x
if (a == '#' || a == ' ')
... | 842 | item_breakdown [x] elementList count =
do
-- if the element is a new subsection header or a newline, then we know that it is not a subsection item
if (length x > 0)
then
do
let a = head x
if (a == '#' || a == ' ')
... | 842 | false | false | 1 | 18 | 492 | 132 | 68 | 64 | null | null |
ghc-android/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | bcIdPrimRep :: Id -> PrimRep
bcIdPrimRep = typePrimRep . bcIdUnaryType | 70 | bcIdPrimRep :: Id -> PrimRep
bcIdPrimRep = typePrimRep . bcIdUnaryType | 70 | bcIdPrimRep = typePrimRep . bcIdUnaryType | 41 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
matt-keibler/svg-playground | src/Animation.hs | bsd-3-clause | interpolate :: Int -> Int -> Int -> [Int]
interpolate num is ie = take num $ round <$> (iterate (+ (diff :: Double)) . fromIntegral) is
where diff = fromIntegral (ie - is) / fromIntegral (num - 1)
-- Point | 208 | interpolate :: Int -> Int -> Int -> [Int]
interpolate num is ie = take num $ round <$> (iterate (+ (diff :: Double)) . fromIntegral) is
where diff = fromIntegral (ie - is) / fromIntegral (num - 1)
-- Point | 208 | interpolate num is ie = take num $ round <$> (iterate (+ (diff :: Double)) . fromIntegral) is
where diff = fromIntegral (ie - is) / fromIntegral (num - 1)
-- Point | 166 | false | true | 0 | 11 | 43 | 100 | 52 | 48 | null | null |
rbermani/ib-api | src/IB/Client/Parser.hs | gpl-3.0 | pStrDouble :: Parser Double
pStrDouble = read <$> pStr | 54 | pStrDouble :: Parser Double
pStrDouble = read <$> pStr | 54 | pStrDouble = read <$> pStr | 26 | false | true | 1 | 6 | 8 | 22 | 9 | 13 | null | null |
atodorov/bdcs | src/BDCS/Export/TmpFiles.hs | lgpl-2.1 | -- Parse a uid/gid (only supports strings)
-- Which can also be set to '-' to mean the default for the type
parseId :: Parsec String () (Maybe T.Text)
parseId = parseMaybeDash getTextField | 188 | parseId :: Parsec String () (Maybe T.Text)
parseId = parseMaybeDash getTextField | 80 | parseId = parseMaybeDash getTextField | 37 | true | true | 1 | 8 | 32 | 37 | 17 | 20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.