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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AlexanderPankiv/ghc | compiler/hsSyn/PlaceHolder.hs | bsd-3-clause | placeHolderNamesTc :: NameSet
placeHolderNamesTc = emptyNameSet | 63 | placeHolderNamesTc :: NameSet
placeHolderNamesTc = emptyNameSet | 63 | placeHolderNamesTc = emptyNameSet | 33 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
mrd/camfort | src/Camfort/Specification/Units.hs | apache-2.0 | replaceImplicitNames :: Data a => M.Map UnitInfo UnitInfo -> a -> a
replaceImplicitNames implicitMap = transformBi replace
where
replace u@(UnitParamPosAbs _) = fromMaybe u $ M.lookup u implicitMap
replace u = u
{-| Check and infer units-of-measure for a program
This produces an outpu... | 366 | replaceImplicitNames :: Data a => M.Map UnitInfo UnitInfo -> a -> a
replaceImplicitNames implicitMap = transformBi replace
where
replace u@(UnitParamPosAbs _) = fromMaybe u $ M.lookup u implicitMap
replace u = u
{-| Check and infer units-of-measure for a program
This produces an outpu... | 366 | replaceImplicitNames implicitMap = transformBi replace
where
replace u@(UnitParamPosAbs _) = fromMaybe u $ M.lookup u implicitMap
replace u = u
{-| Check and infer units-of-measure for a program
This produces an output of all the unit information for a program -} | 298 | false | true | 1 | 8 | 87 | 81 | 39 | 42 | null | null |
qpliu/esolang | featured/glass.hs | gpl-3.0 | parseFunction :: String -> [Function] -> [Token] -> [Class]
parseFunction className fns (TokenName fnName@(c:_):tokens)
| isLower c = parseCommands (parseEndFunction className fns fnName) [] tokens
| otherwise = error "parse error" | 235 | parseFunction :: String -> [Function] -> [Token] -> [Class]
parseFunction className fns (TokenName fnName@(c:_):tokens)
| isLower c = parseCommands (parseEndFunction className fns fnName) [] tokens
| otherwise = error "parse error" | 235 | parseFunction className fns (TokenName fnName@(c:_):tokens)
| isLower c = parseCommands (parseEndFunction className fns fnName) [] tokens
| otherwise = error "parse error" | 175 | false | true | 4 | 10 | 34 | 108 | 51 | 57 | null | null |
joshcough/L5-Haskell | src/L/L1/L1L2AST.hs | mit | parseInstructionList :: (FromSExpr x, FromSExpr s) => SExpr -> ParseResult [(Instruction x s)]
parseInstructionList (List exps) = traverse fromSExpr exps | 154 | parseInstructionList :: (FromSExpr x, FromSExpr s) => SExpr -> ParseResult [(Instruction x s)]
parseInstructionList (List exps) = traverse fromSExpr exps | 154 | parseInstructionList (List exps) = traverse fromSExpr exps | 58 | false | true | 0 | 10 | 20 | 58 | 29 | 29 | null | null |
Fuuzetsu/stack | src/Stack/Build/ConstructPlan.hs | bsd-3-clause | extendDepsPath :: PackageIdentifier -> DepsPath -> DepsPath
extendDepsPath ident dp = DepsPath
{ dpLength = dpLength dp + 1
, dpNameLength = dpNameLength dp + T.length (packageNameText (packageIdentifierName ident))
, dpPath = [ident]
} | 252 | extendDepsPath :: PackageIdentifier -> DepsPath -> DepsPath
extendDepsPath ident dp = DepsPath
{ dpLength = dpLength dp + 1
, dpNameLength = dpNameLength dp + T.length (packageNameText (packageIdentifierName ident))
, dpPath = [ident]
} | 252 | extendDepsPath ident dp = DepsPath
{ dpLength = dpLength dp + 1
, dpNameLength = dpNameLength dp + T.length (packageNameText (packageIdentifierName ident))
, dpPath = [ident]
} | 192 | false | true | 0 | 13 | 49 | 82 | 42 | 40 | null | null |
brsunter/AdventOfCodeHaskell | src/Day7/Day7.hs | mit | runCircuit :: CircuitBox -> Circuit -> Memo (CircuitBox, Circuit) Word16 Word16
runCircuit b (Signal a) = return a | 114 | runCircuit :: CircuitBox -> Circuit -> Memo (CircuitBox, Circuit) Word16 Word16
runCircuit b (Signal a) = return a | 114 | runCircuit b (Signal a) = return a | 34 | false | true | 0 | 8 | 17 | 46 | 23 | 23 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/Data/OldList.hs | bsd-3-clause | -- Add an element to the end of a queue.
snocSB :: SnocBuilder a -> a -> SnocBuilder a
snocSB (SnocBuilder lp f r) x = sb (lp + 1) f (x:r) | 139 | snocSB :: SnocBuilder a -> a -> SnocBuilder a
snocSB (SnocBuilder lp f r) x = sb (lp + 1) f (x:r) | 97 | snocSB (SnocBuilder lp f r) x = sb (lp + 1) f (x:r) | 51 | true | true | 0 | 7 | 32 | 62 | 31 | 31 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Math/DeltaGraph.hs | mit | -- | Delete an edge
deleteEdge :: Graph -> E -> Graph
deleteEdge gr e = gammaApplyDeltaT gr $ MinusE e | 102 | deleteEdge :: Graph -> E -> Graph
deleteEdge gr e = gammaApplyDeltaT gr $ MinusE e | 82 | deleteEdge gr e = gammaApplyDeltaT gr $ MinusE e | 48 | true | true | 0 | 6 | 20 | 35 | 17 | 18 | null | null |
graninas/Andromeda | src/Andromeda/Types/Common/Value.hs | bsd-3-clause | floatValue :: Float -> Value
floatValue = FloatValue | 52 | floatValue :: Float -> Value
floatValue = FloatValue | 52 | floatValue = FloatValue | 23 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | beckoningly = id | 16 | beckoningly = id | 16 | beckoningly = id | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
acowley/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | diffUnfold _ uf1 uf2
= [fsep [ppr uf1, text "/=", ppr uf2]] | 63 | diffUnfold _ uf1 uf2
= [fsep [ppr uf1, text "/=", ppr uf2]] | 63 | diffUnfold _ uf1 uf2
= [fsep [ppr uf1, text "/=", ppr uf2]] | 63 | false | false | 1 | 9 | 15 | 36 | 17 | 19 | null | null |
DaMSL/K3 | src/Language/K3/Driver/Driver.hs | apache-2.0 | formatAST _ PrintSyntax p = programS p | 38 | formatAST _ PrintSyntax p = programS p | 38 | formatAST _ PrintSyntax p = programS p | 38 | false | false | 1 | 5 | 6 | 15 | 6 | 9 | null | null |
PseudoPower/AFSM | src/Data/AFSM/SF/Core.hs | mit | loopSF :: SF (a, c) (b, c) -> SF a b
loopSF (SF f0) = SF (f1 f0)
where
f1 f0 a = (SF (f1 f0'), b)
where
(SF f0', (b, c)) = f0 (a, c) | 152 | loopSF :: SF (a, c) (b, c) -> SF a b
loopSF (SF f0) = SF (f1 f0)
where
f1 f0 a = (SF (f1 f0'), b)
where
(SF f0', (b, c)) = f0 (a, c) | 152 | loopSF (SF f0) = SF (f1 f0)
where
f1 f0 a = (SF (f1 f0'), b)
where
(SF f0', (b, c)) = f0 (a, c) | 115 | false | true | 0 | 8 | 55 | 115 | 60 | 55 | null | null |
tyoko-dev/rwhile-B-haskell | src/Parser.hs | agpl-3.0 | parseVal :: String -> Either ParseError Val
parseVal = parse (pVal <* eof) "(unknown)" | 86 | parseVal :: String -> Either ParseError Val
parseVal = parse (pVal <* eof) "(unknown)" | 86 | parseVal = parse (pVal <* eof) "(unknown)" | 42 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
pacak/sqroll | benchmarks/Benchmarks.hs | bsd-3-clause | withBenchmarkFile :: (Sqroll -> IO ()) -> IO ()
withBenchmarkFile f = withSqroll "benchmark.db" f >> removeFile "benchmark.db" | 126 | withBenchmarkFile :: (Sqroll -> IO ()) -> IO ()
withBenchmarkFile f = withSqroll "benchmark.db" f >> removeFile "benchmark.db" | 126 | withBenchmarkFile f = withSqroll "benchmark.db" f >> removeFile "benchmark.db" | 78 | false | true | 0 | 9 | 17 | 47 | 22 | 25 | null | null |
garetxe/cabal | cabal-install/Distribution/Client/FileMonitor.hs | bsd-3-clause | -- | Probe the file system to see if any of the monitored files have changed.
--
-- It returns Nothing if any file changed, or returns a possibly updated
-- file 'MonitorStateFileSet' plus an indicator of whether it actually changed.
--
-- We may need to update the cache since there may be changes in the filesystem
-- ... | 1,170 | probeFileSystem :: FilePath -> MonitorStateFileSet
-> IO (Either FilePath (MonitorStateFileSet, CacheChanged))
probeFileSystem root (MonitorStateFileSet singlePaths globPaths) =
runChangedM $
MonitorStateFileSet
<$> traverseWithKey (probeFileStatus root) singlePaths
<*> traverse ... | 361 | probeFileSystem root (MonitorStateFileSet singlePaths globPaths) =
runChangedM $
MonitorStateFileSet
<$> traverseWithKey (probeFileStatus root) singlePaths
<*> traverse (probeGlobStatus root ".") globPaths | 234 | true | true | 0 | 10 | 218 | 100 | 57 | 43 | null | null |
thomie/vector | Data/Vector/Fusion/Stream/Monadic.hs | bsd-3-clause | or (Stream step t) = or_loop SPEC t
where
or_loop !_ s
= do
r <- step s
case r of
Yield False s' -> or_loop SPEC s'
Yield True _ -> return True
Skip s' -> or_loop SPEC s'
Done -> return False | 290 | or (Stream step t) = or_loop SPEC t
where
or_loop !_ s
= do
r <- step s
case r of
Yield False s' -> or_loop SPEC s'
Yield True _ -> return True
Skip s' -> or_loop SPEC s'
Done -> return False | 290 | or (Stream step t) = or_loop SPEC t
where
or_loop !_ s
= do
r <- step s
case r of
Yield False s' -> or_loop SPEC s'
Yield True _ -> return True
Skip s' -> or_loop SPEC s'
Done -> return False | 290 | false | false | 0 | 10 | 142 | 105 | 46 | 59 | null | null |
marcmo/hsDiagnosis | src/Diag/Config.hs | bsd-3-clause | lookupVerbose = lookup_ "verbose" | 33 | lookupVerbose = lookup_ "verbose" | 33 | lookupVerbose = lookup_ "verbose" | 33 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
feliposz/learning-stuff | haskell/c9lectures-ch2.hs | mit | -- C#: var t6 = myList.Sum();
-- Python: t6 = sum(myList)
t7 = sum myList | 73 | t7 = sum myList | 15 | t7 = sum myList | 15 | true | false | 0 | 5 | 14 | 11 | 6 | 5 | null | null |
felixsch/xdg | src/System/Environment/XDG/Internal/Ini.hs | gpl-3.0 | pMap :: Parser (String, IniValue)
pMap = do
name <- pName
pEquals
value <- pString
pEnd
tr <- many1 $ translations name
return (name, cob value tr)
where
cob v m = IMap $ M.fromList $ ("C", v) : m
translations name = (,) <$ lexme (string name) <*> pI... | 355 | pMap :: Parser (String, IniValue)
pMap = do
name <- pName
pEquals
value <- pString
pEnd
tr <- many1 $ translations name
return (name, cob value tr)
where
cob v m = IMap $ M.fromList $ ("C", v) : m
translations name = (,) <$ lexme (string name) <*> pI... | 355 | pMap = do
name <- pName
pEquals
value <- pString
pEnd
tr <- many1 $ translations name
return (name, cob value tr)
where
cob v m = IMap $ M.fromList $ ("C", v) : m
translations name = (,) <$ lexme (string name) <*> pIndex <* pEquals <*> pString <* pEn... | 321 | false | true | 0 | 14 | 125 | 143 | 70 | 73 | null | null |
janschulz/pandoc | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | elemToRunStyle _ _ _ = defaultRunStyle | 38 | elemToRunStyle _ _ _ = defaultRunStyle | 38 | elemToRunStyle _ _ _ = defaultRunStyle | 38 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/TextEncoder.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder.encode Mozilla TextEncoder.encode documentation>
encode ::
(MonadDOM m, ToJSString input) =>
TextEncoder -> Maybe input -> m Uint8Array
encode self input
= liftDOM
((self ^. jsf "encode" [toJSVal input]) >>= fromJSValUnchecked) | 319 | encode ::
(MonadDOM m, ToJSString input) =>
TextEncoder -> Maybe input -> m Uint8Array
encode self input
= liftDOM
((self ^. jsf "encode" [toJSVal input]) >>= fromJSValUnchecked) | 202 | encode self input
= liftDOM
((self ^. jsf "encode" [toJSVal input]) >>= fromJSValUnchecked) | 99 | true | true | 0 | 12 | 57 | 74 | 37 | 37 | null | null |
fmap/clippings | tests/Reader.hs | mit | getTitle :: Clipping -> String
getTitle = title . document | 58 | getTitle :: Clipping -> String
getTitle = title . document | 58 | getTitle = title . document | 27 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
zepto-lang/zepto-js | src/Zepto/Primitives/TypeCheckPrimitives.hs | gpl-2.0 | isRational ([SimpleVal (Number (NumS _))]) = return $ fromSimple $ Bool True | 76 | isRational ([SimpleVal (Number (NumS _))]) = return $ fromSimple $ Bool True | 76 | isRational ([SimpleVal (Number (NumS _))]) = return $ fromSimple $ Bool True | 76 | false | false | 0 | 12 | 11 | 41 | 20 | 21 | null | null |
candide-guevara/programming_challenges | haskell_learning/regular_expression.hs | gpl-2.0 | head_maybe l = Just $ head l | 29 | head_maybe l = Just $ head l | 29 | head_maybe l = Just $ head l | 29 | false | false | 0 | 6 | 7 | 16 | 7 | 9 | null | null |
bdoering/hs-pi-upload | src/Config.hs | bsd-3-clause | -- Where final files are stored
-- staticDir = "/mnt/passport/src/hs-pi-upload/static/" -- Where static HTML resources are stored
staticDir = "/home/bd/develop/hs-pi-upload/static/" | 184 | staticDir = "/home/bd/develop/hs-pi-upload/static/" | 51 | staticDir = "/home/bd/develop/hs-pi-upload/static/" | 51 | true | false | 0 | 4 | 22 | 8 | 5 | 3 | null | null |
selectel/mongoDB-haskell | Database/MongoDB/Query.hs | apache-2.0 | isCursorClosed :: (MonadIO m, MonadBase IO m) => Cursor -> Action m Bool
isCursorClosed (Cursor _ _ var) = do
Batch _ cid docs <- fulfill =<< readMVar var
return (cid == 0 && null docs)
-- ** Aggregate | 218 | isCursorClosed :: (MonadIO m, MonadBase IO m) => Cursor -> Action m Bool
isCursorClosed (Cursor _ _ var) = do
Batch _ cid docs <- fulfill =<< readMVar var
return (cid == 0 && null docs)
-- ** Aggregate | 218 | isCursorClosed (Cursor _ _ var) = do
Batch _ cid docs <- fulfill =<< readMVar var
return (cid == 0 && null docs)
-- ** Aggregate | 145 | false | true | 0 | 11 | 55 | 97 | 45 | 52 | null | null |
delta4d/codewars | kata/algebraic-isomorphism/ISO.hs | mit | -- a = b -> S a = S b
isoS :: ISO a b -> ISO (Maybe a) (Maybe b)
isoS = isoMaybe | 80 | isoS :: ISO a b -> ISO (Maybe a) (Maybe b)
isoS = isoMaybe | 58 | isoS = isoMaybe | 15 | true | true | 0 | 8 | 23 | 38 | 19 | 19 | null | null |
hpacheco/HAAP | src/HAAP/Utils.hs | mit | mapFstM :: Monad m => (a -> m c) -> (a,b) -> m (c,b)
mapFstM f (x,y) = f x >>= \x' -> return (x',y) | 99 | mapFstM :: Monad m => (a -> m c) -> (a,b) -> m (c,b)
mapFstM f (x,y) = f x >>= \x' -> return (x',y) | 99 | mapFstM f (x,y) = f x >>= \x' -> return (x',y) | 46 | false | true | 0 | 10 | 24 | 87 | 45 | 42 | null | null |
xfchen/Monud | src/InputParse.hs | bsd-3-clause | parseNumberedCmd :: A.Parser InputVal
parseNumberedCmd = do
A.skipSpace
times <- A.decimal
A.skipSpace
first <- A.letter
rest <- A.takeWhile (/=';')
C.option "" ";"
let cmd = cons first rest
return $ NumberedCmd (times, cmd) | 240 | parseNumberedCmd :: A.Parser InputVal
parseNumberedCmd = do
A.skipSpace
times <- A.decimal
A.skipSpace
first <- A.letter
rest <- A.takeWhile (/=';')
C.option "" ";"
let cmd = cons first rest
return $ NumberedCmd (times, cmd) | 240 | parseNumberedCmd = do
A.skipSpace
times <- A.decimal
A.skipSpace
first <- A.letter
rest <- A.takeWhile (/=';')
C.option "" ";"
let cmd = cons first rest
return $ NumberedCmd (times, cmd) | 202 | false | true | 0 | 10 | 48 | 100 | 46 | 54 | null | null |
momomimachli/Valet | src/Data/Valet.hs | gpl-3.0 | valet ::
Monoid r
=> a -- ^ Initial value of the valet.
-> Valet r m a
valet = pure | 109 | valet ::
Monoid r
=> a -- ^ Initial value of the valet.
-> Valet r m a
valet = pure | 109 | valet = pure | 12 | false | true | 0 | 8 | 46 | 36 | 16 | 20 | null | null |
qpliu/esolang | blo/hs/LLVMGen.hs | gpl-3.0 | writeName :: Gen g => String -> g ()
writeName "main" = writeCode "main" | 72 | writeName :: Gen g => String -> g ()
writeName "main" = writeCode "main" | 72 | writeName "main" = writeCode "main" | 35 | false | true | 0 | 9 | 13 | 38 | 16 | 22 | null | null |
manyoo/Morakot | Config.hs | bsd-3-clause | serverVersion = "0.1" | 28 | serverVersion = "0.1" | 28 | serverVersion = "0.1" | 28 | false | false | 1 | 5 | 9 | 10 | 3 | 7 | null | null |
rcook/hqdsl | src/app/Main.hs | mit | main :: IO ()
main = do
let
t = table "clients" [
"first_name",
"middle_name",
"last_name",
"birthdate"
]
s = select (\[t, j0, j1] -> [
column t "first_name",
column j0 "last_name",
column j1 "first_namex",
column j1 "last_name"
]) $
... | 548 | main :: IO ()
main = do
let
t = table "clients" [
"first_name",
"middle_name",
"last_name",
"birthdate"
]
s = select (\[t, j0, j1] -> [
column t "first_name",
column j0 "last_name",
column j1 "first_namex",
column j1 "last_name"
]) $
... | 548 | main = do
let
t = table "clients" [
"first_name",
"middle_name",
"last_name",
"birthdate"
]
s = select (\[t, j0, j1] -> [
column t "first_name",
column j0 "last_name",
column j1 "first_namex",
column j1 "last_name"
]) $
from t [... | 534 | false | true | 0 | 19 | 189 | 206 | 104 | 102 | null | null |
timsears/species | Math/Combinatorics/Species/TH.hs | bsd-3-clause | mkEnumerableInst :: Name -> SpeciesAST -> Struct -> Maybe Name -> Q Dec
mkEnumerableInst nm sp st code = do
clauses <- mkIsoClauses (isJust code) sp st
let stTy = case code of
Just cd -> [t| Mu $(conT cd) |]
Nothing -> spToTy undefined sp -- undefined is OK, it isn't recursive
... | 841 | mkEnumerableInst :: Name -> SpeciesAST -> Struct -> Maybe Name -> Q Dec
mkEnumerableInst nm sp st code = do
clauses <- mkIsoClauses (isJust code) sp st
let stTy = case code of
Just cd -> [t| Mu $(conT cd) |]
Nothing -> spToTy undefined sp -- undefined is OK, it isn't recursive
... | 841 | mkEnumerableInst nm sp st code = do
clauses <- mkIsoClauses (isJust code) sp st
let stTy = case code of
Just cd -> [t| Mu $(conT cd) |]
Nothing -> spToTy undefined sp -- undefined is OK, it isn't recursive
-- so won't use that argument
... | 769 | false | true | 0 | 13 | 236 | 183 | 93 | 90 | null | null |
rpglover64/lens | src/Control/Lens/Internal/TH.hs | bsd-3-clause | foldTypeName :: Name
foldTypeName = mkLensName_tc "Control.Lens.Type" "Fold" | 97 | foldTypeName :: Name
foldTypeName = mkLensName_tc "Control.Lens.Type" "Fold" | 97 | foldTypeName = mkLensName_tc "Control.Lens.Type" "Fold" | 66 | false | true | 0 | 5 | 28 | 16 | 8 | 8 | null | null |
gcross/habit-of-fate | sources/library/HabitOfFate/Server/Requests/Shared/MarkHabit.hs | agpl-3.0 | handleWeb ∷ Environment → ScottyM ()
handleWeb environment = do
Scotty.post "/habits/:habit_id/mark/success" $ mark SuccessResult
Scotty.post "/habits/:habit_id/mark/failure" $ mark FailureResult
where
mark ∷ SuccessOrFailureResult → ActionM ()
mark result = webTransaction environment $ do
habit_id ← getPa... | 504 | handleWeb ∷ Environment → ScottyM ()
handleWeb environment = do
Scotty.post "/habits/:habit_id/mark/success" $ mark SuccessResult
Scotty.post "/habits/:habit_id/mark/failure" $ mark FailureResult
where
mark ∷ SuccessOrFailureResult → ActionM ()
mark result = webTransaction environment $ do
habit_id ← getPa... | 504 | handleWeb environment = do
Scotty.post "/habits/:habit_id/mark/success" $ mark SuccessResult
Scotty.post "/habits/:habit_id/mark/failure" $ mark FailureResult
where
mark ∷ SuccessOrFailureResult → ActionM ()
mark result = webTransaction environment $ do
habit_id ← getParam "habit_id"
log [i|Marking #{h... | 467 | false | true | 0 | 11 | 84 | 147 | 68 | 79 | null | null |
glguy/hpaste | src/Main.hs | bsd-3-clause | handleDelAnnot :: Int -> [(String,Int)] -> Action
handleDelAnnot pid ls =
do mbPaste <- exec_db $ getPaste pid
case mbPaste of
Nothing -> outputNotFound $ "no paste " ++ show pid
Just paste -> do exec_db (delAnnotations pid (map snd ls))
redirectToView pid (paste_parentid paste)
... | 385 | handleDelAnnot :: Int -> [(String,Int)] -> Action
handleDelAnnot pid ls =
do mbPaste <- exec_db $ getPaste pid
case mbPaste of
Nothing -> outputNotFound $ "no paste " ++ show pid
Just paste -> do exec_db (delAnnotations pid (map snd ls))
redirectToView pid (paste_parentid paste)
... | 385 | handleDelAnnot pid ls =
do mbPaste <- exec_db $ getPaste pid
case mbPaste of
Nothing -> outputNotFound $ "no paste " ++ show pid
Just paste -> do exec_db (delAnnotations pid (map snd ls))
redirectToView pid (paste_parentid paste)
-- | Redirect the user to view another paste usin... | 335 | false | true | 0 | 16 | 98 | 117 | 56 | 61 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/VertexProgram.hs | bsd-3-clause | gl_MATRIX9 :: GLenum
gl_MATRIX9 = 0x88C9 | 40 | gl_MATRIX9 :: GLenum
gl_MATRIX9 = 0x88C9 | 40 | gl_MATRIX9 = 0x88C9 | 19 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
urbanslug/ghc | testsuite/tests/concurrent/prog002/Thread.hs | bsd-3-clause | contmReturn :: a -> (ContM req rsp m a)
contmReturn x = ContM(\c -> c x) | 72 | contmReturn :: a -> (ContM req rsp m a)
contmReturn x = ContM(\c -> c x) | 72 | contmReturn x = ContM(\c -> c x) | 32 | false | true | 0 | 9 | 15 | 50 | 23 | 27 | null | null |
michalt/cvector | Data/CVector.hs | bsd-3-clause | --
-- Monadic initialisation
--
replicateM :: Monad m => Int -> m a -> m (CVector a)
replicateM = G.replicateM | 111 | replicateM :: Monad m => Int -> m a -> m (CVector a)
replicateM = G.replicateM | 78 | replicateM = G.replicateM | 25 | true | true | 0 | 10 | 21 | 43 | 22 | 21 | null | null |
s9gf4ult/yesod | yesod-core/Yesod/Core/Handler.hs | mit | -- | Set the language in the user session. Will show up in 'languages' on the
-- next request.
setLanguage :: MonadHandler m => Text -> m ()
setLanguage = setSession langKey | 173 | setLanguage :: MonadHandler m => Text -> m ()
setLanguage = setSession langKey | 78 | setLanguage = setSession langKey | 32 | true | true | 0 | 8 | 31 | 32 | 16 | 16 | null | null |
guoy34/ampersand | src/Database/Design/Ampersand/Core/AbstractSyntaxTree.hs | gpl-3.0 | -- cartesian product
-- SJ 20130118: The fatals are superfluous, but only if the type checker works correctly. For that reason, they are not being removed. Not even for performance reasons.
l .==. r = if source l/=source r || target l/=target r then fatal 424 ("Cannot equate (with operator \"==\") expression l of typ... | 455 | l .==. r = if source l/=source r || target l/=target r then fatal 424 ("Cannot equate (with operator \"==\") expression l of type "++show (sign l)++"\n "++show l++"\n with expression r of type "++show (sign r)++"\n "++show r++".") else
EEqu (l,r) | 264 | l .==. r = if source l/=source r || target l/=target r then fatal 424 ("Cannot equate (with operator \"==\") expression l of type "++show (sign l)++"\n "++show l++"\n with expression r of type "++show (sign r)++"\n "++show r++".") else
EEqu (l,r) | 264 | true | false | 1 | 18 | 91 | 120 | 59 | 61 | null | null |
mbelicki/valdemar | src/Emitter.hs | gpl-3.0 | emitConstant (S.IntegerExpr n (S.TypeInteger bits))
= return $ LLVM.Const.Int (fromIntegral bits) (toInteger n) | 115 | emitConstant (S.IntegerExpr n (S.TypeInteger bits))
= return $ LLVM.Const.Int (fromIntegral bits) (toInteger n) | 115 | emitConstant (S.IntegerExpr n (S.TypeInteger bits))
= return $ LLVM.Const.Int (fromIntegral bits) (toInteger n) | 115 | false | false | 2 | 9 | 16 | 54 | 25 | 29 | null | null |
peletomi/icanhasren | Tests.hs | gpl-3.0 | -- take two from the third from the end of the name
prop_extractBackBack ns = map (reverse . drop 2 . take 4 . reverse) (map baseName ns) == createNewNames "[Xn:-3,-2]" ns | 171 | prop_extractBackBack ns = map (reverse . drop 2 . take 4 . reverse) (map baseName ns) == createNewNames "[Xn:-3,-2]" ns | 119 | prop_extractBackBack ns = map (reverse . drop 2 . take 4 . reverse) (map baseName ns) == createNewNames "[Xn:-3,-2]" ns | 119 | true | false | 1 | 11 | 31 | 56 | 25 | 31 | null | null |
brendanhay/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/Rollback.hs | mpl-2.0 | -- | Multipart request metadata.
pzcnprPayload :: Lens' ProjectsZonesClustersNodePoolsRollback RollbackNodePoolUpgradeRequest
pzcnprPayload
= lens _pzcnprPayload
(\ s a -> s{_pzcnprPayload = a}) | 202 | pzcnprPayload :: Lens' ProjectsZonesClustersNodePoolsRollback RollbackNodePoolUpgradeRequest
pzcnprPayload
= lens _pzcnprPayload
(\ s a -> s{_pzcnprPayload = a}) | 169 | pzcnprPayload
= lens _pzcnprPayload
(\ s a -> s{_pzcnprPayload = a}) | 76 | true | true | 1 | 9 | 28 | 46 | 22 | 24 | null | null |
unknownloner/calccomp | Asm/Parser.hs | mit | num :: Parser Expr
num = do
x <- integer
return $ Literal (Num $ fromIntegral x) | 88 | num :: Parser Expr
num = do
x <- integer
return $ Literal (Num $ fromIntegral x) | 88 | num = do
x <- integer
return $ Literal (Num $ fromIntegral x) | 69 | false | true | 1 | 12 | 24 | 45 | 19 | 26 | null | null |
carliros/Simple-San-Simon-Functional-Web-Browser | src/Process/DownloadProcess.hs | bsd-3-clause | pageNoDisponible :: String -> String -> String
pageNoDisponible error link
= "<html>\
\<head> <style> span {text-decoration: underline}</style></head>\
\<body>\
\<h1> This webpage is not available.</h1>\
\<p> Error returned: " ++ error ++ " </p>\
... | 494 | pageNoDisponible :: String -> String -> String
pageNoDisponible error link
= "<html>\
\<head> <style> span {text-decoration: underline}</style></head>\
\<body>\
\<h1> This webpage is not available.</h1>\
\<p> Error returned: " ++ error ++ " </p>\
... | 494 | pageNoDisponible error link
= "<html>\
\<head> <style> span {text-decoration: underline}</style></head>\
\<body>\
\<h1> This webpage is not available.</h1>\
\<p> Error returned: " ++ error ++ " </p>\
\<p> The webpage at <span>" ++ link ++ "</spa... | 447 | false | true | 0 | 8 | 152 | 40 | 20 | 20 | null | null |
cocreature/leksah | src/IDE/Workspaces.hs | gpl-2.0 | packageTry :: PackageAction -> IDEAction
packageTry f = workspaceTry $ do
maybePackage <- lift $ readIDE activePack
case maybePackage of
Just p -> runPackage f p
Nothing -> do
window <- lift getMainWindow
resp <- liftIO $ do
md... | 1,238 | packageTry :: PackageAction -> IDEAction
packageTry f = workspaceTry $ do
maybePackage <- lift $ readIDE activePack
case maybePackage of
Just p -> runPackage f p
Nothing -> do
window <- lift getMainWindow
resp <- liftIO $ do
md... | 1,238 | packageTry f = workspaceTry $ do
maybePackage <- lift $ readIDE activePack
case maybePackage of
Just p -> runPackage f p
Nothing -> do
window <- lift getMainWindow
resp <- liftIO $ do
md <- messageDialogNew (Just window) [] Mes... | 1,197 | false | true | 0 | 22 | 553 | 288 | 125 | 163 | null | null |
kylefeng28/Hello-World | haskell/hello.hs | gpl-3.0 | main = putStrLn (__ "Hello, world!") | 36 | main = putStrLn (__ "Hello, world!") | 36 | main = putStrLn (__ "Hello, world!") | 36 | false | false | 0 | 7 | 5 | 15 | 7 | 8 | null | null |
kojiromike/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | processTransforms :: Archive -> Idris ()
processTransforms ar = do
ts <- getEntry [] "ibc_transforms" ar
mapM_ (\ (n, t) -> addTrans n t) ts | 148 | processTransforms :: Archive -> Idris ()
processTransforms ar = do
ts <- getEntry [] "ibc_transforms" ar
mapM_ (\ (n, t) -> addTrans n t) ts | 148 | processTransforms ar = do
ts <- getEntry [] "ibc_transforms" ar
mapM_ (\ (n, t) -> addTrans n t) ts | 107 | false | true | 0 | 11 | 32 | 71 | 33 | 38 | null | null |
mrb/soundwave | Soundwave/Data.hs | mit | requestType :: Maybe Request -> RequestType
requestType r = do
let datum = request (fromJust r)
let n = utf8 (name datum)
if n =~ "%" :: Bool then
Query
else if n =~ "\\*" :: Bool then
Aggregate
else if n =~ "^n:" :: Bool then
PeerContact
else
Update | 281 | requestType :: Maybe Request -> RequestType
requestType r = do
let datum = request (fromJust r)
let n = utf8 (name datum)
if n =~ "%" :: Bool then
Query
else if n =~ "\\*" :: Bool then
Aggregate
else if n =~ "^n:" :: Bool then
PeerContact
else
Update | 281 | requestType r = do
let datum = request (fromJust r)
let n = utf8 (name datum)
if n =~ "%" :: Bool then
Query
else if n =~ "\\*" :: Bool then
Aggregate
else if n =~ "^n:" :: Bool then
PeerContact
else
Update | 237 | false | true | 0 | 12 | 80 | 105 | 54 | 51 | null | null |
ierton/yteratee | src/Tests.hs | bsd-3-clause | prop_convstream2 xs = P.length xs > 0 ==>
runner2 (enumPure1Chunk xs $ convStreamE convId I.head)
== runner1 (enumPure1Chunk xs I.head)
where types = xs :: [Int] | 207 | prop_convstream2 xs = P.length xs > 0 ==>
runner2 (enumPure1Chunk xs $ convStreamE convId I.head)
== runner1 (enumPure1Chunk xs I.head)
where types = xs :: [Int] | 207 | prop_convstream2 xs = P.length xs > 0 ==>
runner2 (enumPure1Chunk xs $ convStreamE convId I.head)
== runner1 (enumPure1Chunk xs I.head)
where types = xs :: [Int] | 207 | false | false | 0 | 11 | 71 | 73 | 35 | 38 | null | null |
Mikehunan/network | Network.hs | bsd-3-clause | connectTo _ (UnixSocket path) = do
bracketOnError
(socket AF_UNIX Stream 0)
(sClose)
(\sock -> do
connect sock (SockAddrUnix path)
socketToHandle sock ReadWriteMode
)
#endif
#if defined(IPV6_SOCKET_SUPPORT) | 263 | connectTo _ (UnixSocket path) = do
bracketOnError
(socket AF_UNIX Stream 0)
(sClose)
(\sock -> do
connect sock (SockAddrUnix path)
socketToHandle sock ReadWriteMode
)
#endif
#if defined(IPV6_SOCKET_SUPPORT) | 263 | connectTo _ (UnixSocket path) = do
bracketOnError
(socket AF_UNIX Stream 0)
(sClose)
(\sock -> do
connect sock (SockAddrUnix path)
socketToHandle sock ReadWriteMode
)
#endif
#if defined(IPV6_SOCKET_SUPPORT) | 263 | false | false | 0 | 14 | 82 | 72 | 35 | 37 | null | null |
utky/lycopene | src/Lycopene/TH.hs | apache-2.0 | str :: QuasiQuoter
str = QuasiQuoter
{ quoteExp = stringE
, quotePat = undefined
, quoteType = undefined
, quoteDec = undefined
} | 197 | str :: QuasiQuoter
str = QuasiQuoter
{ quoteExp = stringE
, quotePat = undefined
, quoteType = undefined
, quoteDec = undefined
} | 197 | str = QuasiQuoter
{ quoteExp = stringE
, quotePat = undefined
, quoteType = undefined
, quoteDec = undefined
} | 178 | false | true | 0 | 6 | 90 | 37 | 23 | 14 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | cleanCommand :: CommandUI CleanFlags
cleanCommand = CommandUI
{ commandName = "clean"
, commandSynopsis = "Clean up after a build."
, commandDescription = Just $ \_ ->
"Removes .hi, .o, preprocessed sources, etc.\n"
, commandNotes = Nothing
, commandUsage = \pname ->
"Us... | 885 | cleanCommand :: CommandUI CleanFlags
cleanCommand = CommandUI
{ commandName = "clean"
, commandSynopsis = "Clean up after a build."
, commandDescription = Just $ \_ ->
"Removes .hi, .o, preprocessed sources, etc.\n"
, commandNotes = Nothing
, commandUsage = \pname ->
"Us... | 885 | cleanCommand = CommandUI
{ commandName = "clean"
, commandSynopsis = "Clean up after a build."
, commandDescription = Just $ \_ ->
"Removes .hi, .o, preprocessed sources, etc.\n"
, commandNotes = Nothing
, commandUsage = \pname ->
"Usage: " ++ pname ++ " clean [FLAGS]\n"... | 848 | false | true | 0 | 14 | 240 | 180 | 104 | 76 | null | null |
phischu/fragnix | tests/packages/scotty/Network.Wai.hs | bsd-3-clause | mapResponseStatus f (ResponseBuilder s h b) = ResponseBuilder (f s) h b | 71 | mapResponseStatus f (ResponseBuilder s h b) = ResponseBuilder (f s) h b | 71 | mapResponseStatus f (ResponseBuilder s h b) = ResponseBuilder (f s) h b | 71 | false | false | 0 | 7 | 11 | 34 | 16 | 18 | null | null |
spechub/Hets | CspCASLProver/CspCASLProver.hs | gpl-2.0 | -- | The wrapper function that is CspCASL Prover
cspCASLProver :: Prover CspCASLSign CspCASLSen CspCASLMorphism () ()
cspCASLProver = (mkProverTemplate cspCASLProverS () cspCASLProverProve)
{ proverUsable = checkBinary "isabelle" } | 233 | cspCASLProver :: Prover CspCASLSign CspCASLSen CspCASLMorphism () ()
cspCASLProver = (mkProverTemplate cspCASLProverS () cspCASLProverProve)
{ proverUsable = checkBinary "isabelle" } | 184 | cspCASLProver = (mkProverTemplate cspCASLProverS () cspCASLProverProve)
{ proverUsable = checkBinary "isabelle" } | 115 | true | true | 0 | 8 | 30 | 54 | 27 | 27 | null | null |
MultiMC/Old-QuickMod.io | Handler/Home.hs | mit | -- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majority of the code you will write in Yesod lives in these handler
-- functions. You can spread them across multiple files if you are so
-- inclined, or cre... | 487 | getHomeR :: Handler Html
getHomeR = do
defaultLayout $ do
setTitle "Welcome To QuickMod.io!"
$(widgetFile "homepage") | 137 | getHomeR = do
defaultLayout $ do
setTitle "Welcome To QuickMod.io!"
$(widgetFile "homepage") | 112 | true | true | 0 | 13 | 99 | 50 | 24 | 26 | null | null |
bmillwood/pointfree | Plugin/Pl/Rules.hs | mit | equalsE = Quote $ Var Inf "==" | 34 | equalsE = Quote $ Var Inf "==" | 34 | equalsE = Quote $ Var Inf "==" | 34 | false | false | 0 | 6 | 10 | 15 | 7 | 8 | null | null |
onponomarev/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | xenKernel :: String
xenKernel = AutoConf.xenKernel | 50 | xenKernel :: String
xenKernel = AutoConf.xenKernel | 50 | xenKernel = AutoConf.xenKernel | 30 | false | true | 0 | 6 | 5 | 20 | 8 | 12 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/Touch.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/Touch.identifier Mozilla Touch.identifier documentation>
getIdentifier :: (MonadDOM m) => Touch -> m Word
getIdentifier self
= liftDOM (round <$> ((self ^. js "identifier") >>= valToNumber)) | 248 | getIdentifier :: (MonadDOM m) => Touch -> m Word
getIdentifier self
= liftDOM (round <$> ((self ^. js "identifier") >>= valToNumber)) | 135 | getIdentifier self
= liftDOM (round <$> ((self ^. js "identifier") >>= valToNumber)) | 86 | true | true | 0 | 11 | 29 | 58 | 30 | 28 | null | null |
acowley/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | exprIsExpandable :: CoreExpr -> Bool
exprIsExpandable = exprIsCheap' isExpandableApp | 84 | exprIsExpandable :: CoreExpr -> Bool
exprIsExpandable = exprIsCheap' isExpandableApp | 84 | exprIsExpandable = exprIsCheap' isExpandableApp | 47 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
energyflowanalysis/efa-2.1 | sandbox/genetic_programming/Polynome.hs | bsd-3-clause | replaceSubterm (s :* t) (R:ps) q = s :* (replaceSubterm t ps q) | 63 | replaceSubterm (s :* t) (R:ps) q = s :* (replaceSubterm t ps q) | 63 | replaceSubterm (s :* t) (R:ps) q = s :* (replaceSubterm t ps q) | 63 | false | false | 1 | 8 | 12 | 45 | 21 | 24 | null | null |
craft095/scandir | ScanDir.hs | bsd-3-clause | main :: IO ()
main = execParser opts >>= scan >>= putStrLn
where
opts = info (helper <*> mkOpts)
( fullDesc
<> progDesc "Print a greeting for TARGET"
<> header "hello - a test for optparse-applicative" ) | 229 | main :: IO ()
main = execParser opts >>= scan >>= putStrLn
where
opts = info (helper <*> mkOpts)
( fullDesc
<> progDesc "Print a greeting for TARGET"
<> header "hello - a test for optparse-applicative" ) | 229 | main = execParser opts >>= scan >>= putStrLn
where
opts = info (helper <*> mkOpts)
( fullDesc
<> progDesc "Print a greeting for TARGET"
<> header "hello - a test for optparse-applicative" ) | 215 | false | true | 0 | 9 | 62 | 64 | 31 | 33 | null | null |
dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/UpdateApp.hs | mpl-2.0 | -- | 'UpdateAppResponse' constructor.
updateAppResponse :: UpdateAppResponse
updateAppResponse = UpdateAppResponse | 114 | updateAppResponse :: UpdateAppResponse
updateAppResponse = UpdateAppResponse | 76 | updateAppResponse = UpdateAppResponse | 37 | true | true | 0 | 4 | 9 | 12 | 7 | 5 | null | null |
UCSD-PL/nano-js | Language/Nano/ESC/Types.hs | bsd-3-clause | newVCond :: SourceSpan -> F.Pred -> VCond
------------------------------------------------------------------
newVCond l p = VC $ M.singleton l p | 149 | newVCond :: SourceSpan -> F.Pred -> VCond
newVCond l p = VC $ M.singleton l p | 81 | newVCond l p = VC $ M.singleton l p | 35 | true | true | 2 | 8 | 21 | 46 | 20 | 26 | null | null |
spanners/cis194 | 05-type-classes/calculator.hs | unlicense | testMM ∷ Maybe MinMax
testMM = testExp | 38 | testMM ∷ Maybe MinMax
testMM = testExp | 38 | testMM = testExp | 16 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
beni55/cryptol | src/Cryptol/Eval/Value.hs | bsd-3-clause | toExpr :: Type -> Value -> Maybe Expr
toExpr ty val = case (ty, val) of
(TRec tfs, VRecord vfs) -> do
let fns = map fst vfs
guard (map fst tfs == fns)
fes <- zipWithM toExpr (map snd tfs) (map snd vfs)
return $ ERec (zip fns fes)
(TCon (TC (TCTuple tl)) ts, VTuple tvs) -> do
guard (tl == (length... | 1,226 | toExpr :: Type -> Value -> Maybe Expr
toExpr ty val = case (ty, val) of
(TRec tfs, VRecord vfs) -> do
let fns = map fst vfs
guard (map fst tfs == fns)
fes <- zipWithM toExpr (map snd tfs) (map snd vfs)
return $ ERec (zip fns fes)
(TCon (TC (TCTuple tl)) ts, VTuple tvs) -> do
guard (tl == (length... | 1,226 | toExpr ty val = case (ty, val) of
(TRec tfs, VRecord vfs) -> do
let fns = map fst vfs
guard (map fst tfs == fns)
fes <- zipWithM toExpr (map snd tfs) (map snd vfs)
return $ ERec (zip fns fes)
(TCon (TC (TCTuple tl)) ts, VTuple tvs) -> do
guard (tl == (length tvs))
ETuple `fmap` zipWithM toEx... | 1,188 | false | true | 11 | 12 | 325 | 629 | 301 | 328 | null | null |
yxm4109/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | --
-- code blocks
--
codeBlock :: GenParser Char ParserState Block
codeBlock = codeBlockWith "verbatim" <|> codeBlockWith "Verbatim" <|> lhsCodeBlock | 150 | codeBlock :: GenParser Char ParserState Block
codeBlock = codeBlockWith "verbatim" <|> codeBlockWith "Verbatim" <|> lhsCodeBlock | 128 | codeBlock = codeBlockWith "verbatim" <|> codeBlockWith "Verbatim" <|> lhsCodeBlock | 82 | true | true | 1 | 7 | 20 | 39 | 18 | 21 | null | null |
QuickChick/Luck | luck/examples-template/Stlc-template.hs | mit | gen :: Gen (Maybe Term)
gen = $(mkGenQ defFlags{_fileName="examples/STLC.luck", _maxUnroll=2}) tProxy1 | 102 | gen :: Gen (Maybe Term)
gen = $(mkGenQ defFlags{_fileName="examples/STLC.luck", _maxUnroll=2}) tProxy1 | 102 | gen = $(mkGenQ defFlags{_fileName="examples/STLC.luck", _maxUnroll=2}) tProxy1 | 78 | false | true | 1 | 10 | 10 | 50 | 24 | 26 | null | null |
noteed/intake | Intake/Http.hs | bsd-3-clause | instanciate :: MonadSnap m => Chan Command -> m ()
instanciate chan = do
mname <- getParam "name"
case mname of
Just name -> do
WorkflowId i <- liftIO $ instanciate' chan name
writeBS . S8.pack $ i ++ "\n"
_ -> pass | 239 | instanciate :: MonadSnap m => Chan Command -> m ()
instanciate chan = do
mname <- getParam "name"
case mname of
Just name -> do
WorkflowId i <- liftIO $ instanciate' chan name
writeBS . S8.pack $ i ++ "\n"
_ -> pass | 239 | instanciate chan = do
mname <- getParam "name"
case mname of
Just name -> do
WorkflowId i <- liftIO $ instanciate' chan name
writeBS . S8.pack $ i ++ "\n"
_ -> pass | 188 | false | true | 0 | 16 | 66 | 107 | 46 | 61 | null | null |
micknelso/language-c | src/Language/CFamily/C/Analysis/Export.hs | bsd-3-clause | -- | express storage in terms of storage specifiers.
--
-- This isn't always possible and depends on the context the identifier is declared.
-- Most importantly, if there is a /conflicting/ declaration in scope, export is impossible.
-- Furthermore, automatic storage is impossible in file scope.
-- If the storage can a... | 436 | exportStorage :: Storage -> [CStorageSpec]
exportStorage NoStorage = [] | 71 | exportStorage NoStorage = [] | 28 | true | true | 0 | 6 | 67 | 29 | 18 | 11 | null | null |
lukexi/ftgl3-haskell | Graphics/Rendering/FTGL3.hs | bsd-2-clause | -- | Create textured display list fonts. These can scale somewhat well,
-- | but lose quality quickly. They are much faster than polygonal fonts,
-- | though, so are suitable for large quantities of text. Especially suited
-- | well to text that changes with most frames, because it doesn't incur the
-- | (normally... | 452 | createTextureFont :: String -> IO Font
createTextureFont file = withCString file fcreateTextureFont | 99 | createTextureFont file = withCString file fcreateTextureFont | 60 | true | true | 0 | 7 | 76 | 37 | 18 | 19 | null | null |
green-haskell/ghc | compiler/basicTypes/Unique.hs | bsd-3-clause | mkTupleTyConUnique UnboxedTuple a = mkUnique '5' (3*a) | 60 | mkTupleTyConUnique UnboxedTuple a = mkUnique '5' (3*a) | 60 | mkTupleTyConUnique UnboxedTuple a = mkUnique '5' (3*a) | 60 | false | false | 0 | 7 | 12 | 23 | 11 | 12 | null | null |
AndrewRademacher/matrix-tracing | src/Main.hs | mit | countFull m 1 = Node (m, 1) [] | 30 | countFull m 1 = Node (m, 1) [] | 30 | countFull m 1 = Node (m, 1) [] | 30 | false | false | 1 | 6 | 7 | 29 | 12 | 17 | null | null |
snoyberg/ghc | libraries/base/GHC/List.hs | bsd-3-clause | maximum [] = errorEmptyList "maximum" | 51 | maximum [] = errorEmptyList "maximum" | 51 | maximum [] = errorEmptyList "maximum" | 51 | false | false | 1 | 5 | 18 | 17 | 6 | 11 | null | null |
jyp/ControlledFusion | Control/Fusion/List/NonEmptyNu.hs | gpl-3.0 | sumNeNu :: NeNuList Int -> Int
sumNeNu = foldNeNu (+) 0 | 55 | sumNeNu :: NeNuList Int -> Int
sumNeNu = foldNeNu (+) 0 | 55 | sumNeNu = foldNeNu (+) 0 | 24 | false | true | 0 | 7 | 10 | 31 | 14 | 17 | null | null |
ekmett/thyme | src/Data/Thyme/Calendar/Internal.hs | bsd-3-clause | toMondayOrdinal :: OrdinalDate -> Day -> MondayWeek
toMondayOrdinal (OrdinalDate y yd) (ModifiedJulianDay mjd) = MondayWeek y
(fromIntegral $ d7div - div k 7) (fromIntegral $ d7mod + 1) where
d = mjd + 2
k = d - fromIntegral yd
(d7div, d7mod) = divMod d 7
| 277 | toMondayOrdinal :: OrdinalDate -> Day -> MondayWeek
toMondayOrdinal (OrdinalDate y yd) (ModifiedJulianDay mjd) = MondayWeek y
(fromIntegral $ d7div - div k 7) (fromIntegral $ d7mod + 1) where
d = mjd + 2
k = d - fromIntegral yd
(d7div, d7mod) = divMod d 7
| 277 | toMondayOrdinal (OrdinalDate y yd) (ModifiedJulianDay mjd) = MondayWeek y
(fromIntegral $ d7div - div k 7) (fromIntegral $ d7mod + 1) where
d = mjd + 2
k = d - fromIntegral yd
(d7div, d7mod) = divMod d 7
| 225 | false | true | 4 | 10 | 67 | 127 | 58 | 69 | null | null |
ScrambledEggsOnToast/Kai | src/Kai/LP.hs | bsd-3-clause | initialLPState = LPState
{ sourceFeed = emptyFeed
, currentSC = 0
, pathSC = []
, accumTokens = S.empty
} | 115 | initialLPState = LPState
{ sourceFeed = emptyFeed
, currentSC = 0
, pathSC = []
, accumTokens = S.empty
} | 115 | initialLPState = LPState
{ sourceFeed = emptyFeed
, currentSC = 0
, pathSC = []
, accumTokens = S.empty
} | 115 | false | false | 1 | 8 | 29 | 43 | 23 | 20 | null | null |
Siprj/mmum | test/Spec.hs | bsd-3-clause | main :: IO ()
main = defaultMain tests | 38 | main :: IO ()
main = defaultMain tests | 38 | main = defaultMain tests | 24 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
deyaaeldeen/nAnnotizer | Dynamizer/Logging.hs | gpl-3.0 | fromRVarT :: RVarT m a -> (a -> b) -> (forall x. Lift Prim m x -> (x -> b) -> b) -> b
fromRVarT = unsafeCoerce | 110 | fromRVarT :: RVarT m a -> (a -> b) -> (forall x. Lift Prim m x -> (x -> b) -> b) -> b
fromRVarT = unsafeCoerce | 110 | fromRVarT = unsafeCoerce | 24 | false | true | 0 | 13 | 26 | 65 | 34 | 31 | null | null |
bitemyapp/strive | library/Strive/Internal/HTTP.hs | mit | -- | Perform an HTTP request.
http :: (QueryLike q, FromJSON j) => Method -> Client -> String -> q -> IO (Result j)
http httpMethod client resource query = do
request <- buildRequest httpMethod client resource query
response <- performRequest client request
return (handleResponse response)
-- | Build a request. | 319 | http :: (QueryLike q, FromJSON j) => Method -> Client -> String -> q -> IO (Result j)
http httpMethod client resource query = do
request <- buildRequest httpMethod client resource query
response <- performRequest client request
return (handleResponse response)
-- | Build a request. | 289 | http httpMethod client resource query = do
request <- buildRequest httpMethod client resource query
response <- performRequest client request
return (handleResponse response)
-- | Build a request. | 203 | true | true | 0 | 12 | 57 | 102 | 49 | 53 | null | null |
fffej/haskellprojects | chase/Chase.hs | bsd-2-clause | diffusionRate :: Double
diffusionRate = 0.1 | 43 | diffusionRate :: Double
diffusionRate = 0.1 | 43 | diffusionRate = 0.1 | 19 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-printers/Language/Drasil/TeX/Helpers.hs | bsd-2-clause | -----------------------------------------------------------------------------
-- Now create standard LaTeX stuff
count, mathbb, usepackage :: String -> D
count = command "newcounter" | 188 | count, mathbb, usepackage :: String -> D
count = command "newcounter" | 74 | count = command "newcounter" | 33 | true | true | 4 | 7 | 23 | 35 | 15 | 20 | null | null |
spacekitteh/smcghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags WordLeOp = Just (mo_wordULe dflags) | 60 | translateOp dflags WordLeOp = Just (mo_wordULe dflags) | 60 | translateOp dflags WordLeOp = Just (mo_wordULe dflags) | 60 | false | false | 0 | 7 | 12 | 22 | 9 | 13 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2021/M02/D26/Solution.hs | mit | indent :: Int -> String -> String
indent x str = replicate x ' ' ++ str | 71 | indent :: Int -> String -> String
indent x str = replicate x ' ' ++ str | 71 | indent x str = replicate x ' ' ++ str | 37 | false | true | 0 | 8 | 16 | 39 | 17 | 22 | null | null |
FranklinChen/Idris-dev | src/IRTS/CodegenJavaScript.hs | bsd-3-clause | translateConstant (Fl f) = JSNum (JSFloat f) | 62 | translateConstant (Fl f) = JSNum (JSFloat f) | 62 | translateConstant (Fl f) = JSNum (JSFloat f) | 62 | false | false | 0 | 7 | 24 | 25 | 11 | 14 | null | null |
jtapolczai/Hephaestos | Crawling/Hephaestos/Fetch/Forest.hs | apache-2.0 | -- |A wrapper around 'downloadForest' that runs a crawler based on a
-- successor function, an initial state, and a URL.
-- In addition, a new directory is created for the downloaded files.
--
-- This function does quite a lot. For details, see 'downloadForest'.
complexDownload :: (Collection results (Path URI, Succ... | 961 | complexDownload :: (Collection results (Path URI, SuccessorNode SomeException i b),
ToJSON i)
=> FetchOptions
-> Successor SomeException i b -- ^Successor function.
-> b -- ^Initial state for the successor function.
-> URI -- ^Initial U... | 695 | complexDownload opts succ initialState url = do
uuid <- nextRandom
let opts' = opts & savePath %~ (</> (decodeString $ show uuid))
node = ([], SuccessorNode initialState (Inner url mempty))
downloadForest opts' succ $ Co.singleton node
-- |Variant of 'complexDownload' that runs a crawler without a stat... | 322 | true | true | 0 | 14 | 253 | 179 | 93 | 86 | null | null |
bmoix/dots-and-boxes | dots-boxes.hs | mit | getPlayer 4 = return hard | 25 | getPlayer 4 = return hard | 25 | getPlayer 4 = return hard | 25 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
kim/amazonka | amazonka-sqs/gen/Network/AWS/SQS/Types.hs | mpl-2.0 | -- | 'DeleteMessageBatchResultEntry' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'dmbre1Id' @::@ 'Text'
--
deleteMessageBatchResultEntry :: Text -- ^ 'dmbre1Id'
-> DeleteMessageBatchResultEntry
deleteMessageBatchResultEntry p1 = DeleteMessageBatchResu... | 354 | deleteMessageBatchResultEntry :: Text -- ^ 'dmbre1Id'
-> DeleteMessageBatchResultEntry
deleteMessageBatchResultEntry p1 = DeleteMessageBatchResultEntry
{ _dmbre1Id = p1
} | 208 | deleteMessageBatchResultEntry p1 = DeleteMessageBatchResultEntry
{ _dmbre1Id = p1
} | 91 | true | true | 0 | 6 | 74 | 33 | 21 | 12 | null | null |
dgvncsz0f/nws | test/Jerimum/Tests/Integration/PostgreSQL/InsertTests.hs | bsd-3-clause | tests :: TestTree
tests = do
testGroup
"INSERT"
[buildTest (ReplIntegrationTest beforeAllTests afterAllTests insertTest)] | 131 | tests :: TestTree
tests = do
testGroup
"INSERT"
[buildTest (ReplIntegrationTest beforeAllTests afterAllTests insertTest)] | 131 | tests = do
testGroup
"INSERT"
[buildTest (ReplIntegrationTest beforeAllTests afterAllTests insertTest)] | 113 | false | true | 0 | 11 | 22 | 35 | 17 | 18 | null | null |
kojiromike/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | ibc i (IBCHeader tgt n) f = return f { ibc_hdrs = (tgt, n) : ibc_hdrs f } | 73 | ibc i (IBCHeader tgt n) f = return f { ibc_hdrs = (tgt, n) : ibc_hdrs f } | 73 | ibc i (IBCHeader tgt n) f = return f { ibc_hdrs = (tgt, n) : ibc_hdrs f } | 73 | false | false | 1 | 9 | 17 | 50 | 23 | 27 | null | null |
aartifact/aartifact-verifier | src/ExpSQL.hs | mit | cnv eix pix oix min0 vs (Exp (Bind Times _ (T[e1,e2]))) =
let l = [Syn "{", Syn "\\prod_{", Exp e1, Syn "\\rbrace", Syn "{", Exp e2, Syn "}", Syn "}"]
(vs3, eix3, min3) = cnvAll (eix+1) eix 0 (min0+1) vs l
(vs'', _, min3') = dof eix pix oix min0 min3 "Product" "null" "false" vs3
in (vs'', eix3+1, min3') | 320 | cnv eix pix oix min0 vs (Exp (Bind Times _ (T[e1,e2]))) =
let l = [Syn "{", Syn "\\prod_{", Exp e1, Syn "\\rbrace", Syn "{", Exp e2, Syn "}", Syn "}"]
(vs3, eix3, min3) = cnvAll (eix+1) eix 0 (min0+1) vs l
(vs'', _, min3') = dof eix pix oix min0 min3 "Product" "null" "false" vs3
in (vs'', eix3+1, min3') | 320 | cnv eix pix oix min0 vs (Exp (Bind Times _ (T[e1,e2]))) =
let l = [Syn "{", Syn "\\prod_{", Exp e1, Syn "\\rbrace", Syn "{", Exp e2, Syn "}", Syn "}"]
(vs3, eix3, min3) = cnvAll (eix+1) eix 0 (min0+1) vs l
(vs'', _, min3') = dof eix pix oix min0 min3 "Product" "null" "false" vs3
in (vs'', eix3+1, min3') | 320 | false | false | 0 | 12 | 75 | 196 | 102 | 94 | null | null |
sgillespie/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc
-- Just add information w/o updating the origin!
pushErrCtxtSameOrigin err loc@(CtLoc { ctl_env = lcl })
= loc { ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } } | 215 | pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc
pushErrCtxtSameOrigin err loc@(CtLoc { ctl_env = lcl })
= loc { ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } } | 166 | pushErrCtxtSameOrigin err loc@(CtLoc { ctl_env = lcl })
= loc { ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } } | 115 | true | true | 0 | 11 | 39 | 67 | 36 | 31 | null | null |
yairchu/defend | src/Chess.hs | gpl-3.0 | takeUntilIncluding func (x : xs)
| func x = [x]
| otherwise = x : takeUntilIncluding func xs | 96 | takeUntilIncluding func (x : xs)
| func x = [x]
| otherwise = x : takeUntilIncluding func xs | 96 | takeUntilIncluding func (x : xs)
| func x = [x]
| otherwise = x : takeUntilIncluding func xs | 96 | false | false | 1 | 8 | 21 | 46 | 22 | 24 | null | null |
rueshyna/gogol | gogol-resourceviews/gen/Network/Google/ResourceViews/Types/Product.hs | mpl-2.0 | -- | The total number of resources in the resource view.
rvSize :: Lens' ResourceView (Maybe Word32)
rvSize
= lens _rvSize (\ s a -> s{_rvSize = a}) .
mapping _Coerce | 174 | rvSize :: Lens' ResourceView (Maybe Word32)
rvSize
= lens _rvSize (\ s a -> s{_rvSize = a}) .
mapping _Coerce | 117 | rvSize
= lens _rvSize (\ s a -> s{_rvSize = a}) .
mapping _Coerce | 73 | true | true | 0 | 10 | 38 | 55 | 28 | 27 | null | null |
geocurnoff/nikki | src/Sorts/Robots/Cannon.hs | lgpl-3.0 | mkCannonball :: Space -> Cannon -> IO Chipmunk
mkCannonball space cannon = do
(barrelPosition, barrelAngle) <- getRenderPositionAndAngle (barrel cannon)
let ball = Circle (fromUber 3.5)
ballDesc = mkShapeDescription cannonballShapeAttributes ball
baryCenterOffset = vmap fromUber (Vector 3.5 3.5)... | 981 | mkCannonball :: Space -> Cannon -> IO Chipmunk
mkCannonball space cannon = do
(barrelPosition, barrelAngle) <- getRenderPositionAndAngle (barrel cannon)
let ball = Circle (fromUber 3.5)
ballDesc = mkShapeDescription cannonballShapeAttributes ball
baryCenterOffset = vmap fromUber (Vector 3.5 3.5)... | 981 | mkCannonball space cannon = do
(barrelPosition, barrelAngle) <- getRenderPositionAndAngle (barrel cannon)
let ball = Circle (fromUber 3.5)
ballDesc = mkShapeDescription cannonballShapeAttributes ball
baryCenterOffset = vmap fromUber (Vector 3.5 3.5)
pos = position2vector
(bar... | 934 | false | true | 0 | 16 | 240 | 255 | 123 | 132 | null | null |
onponomarev/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * Exclusive storage
-- | Error margin used to compare physical disks
partMargin :: Double
partMargin = 0.01 | 111 | partMargin :: Double
partMargin = 0.01 | 38 | partMargin = 0.01 | 17 | true | true | 0 | 6 | 19 | 20 | 9 | 11 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT19.hs | gpl-3.0 | one, zero :: Nat
zero = Z | 25 | one, zero :: Nat
zero = Z | 25 | zero = Z | 8 | false | true | 0 | 4 | 6 | 13 | 8 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.