Search is not available for this dataset
repo_name string | path string | license string | full_code string | full_size int64 | uncommented_code string | uncommented_size int64 | function_only_code string | function_only_size int64 | is_commented bool | is_signatured bool | n_ast_errors int64 | ast_max_depth int64 | n_whitespaces int64 | n_ast_nodes int64 | n_ast_terminals int64 | n_ast_nonterminals int64 | loc int64 | cycloplexity int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mightymoose/liquidhaskell | benchmarks/text-0.11.2.3/Data/Text/Lazy.hs | bsd-3-clause | isPrefixOf _ Empty = False | 27 | isPrefixOf _ Empty = False | 27 | isPrefixOf _ Empty = False | 27 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
xificurC/scheme-interpreter | Main.hs | bsd-3-clause | unpackStr notString = throwError (TypeMismatch "string" notString) | 67 | unpackStr notString = throwError (TypeMismatch "string" notString) | 67 | unpackStr notString = throwError (TypeMismatch "string" notString) | 67 | false | false | 1 | 7 | 7 | 23 | 9 | 14 | null | null |
notae/haskell-exercise | pack/MultiTypeContainer.hs | bsd-3-clause | testPairCmapA :: [Pair Int Bool Maybe]
testPairCmapA = cmapA (map Just) pair | 76 | testPairCmapA :: [Pair Int Bool Maybe]
testPairCmapA = cmapA (map Just) pair | 76 | testPairCmapA = cmapA (map Just) pair | 37 | false | true | 0 | 8 | 11 | 38 | 17 | 21 | null | null |
alephcloud/hs-configuration-tools | src/Configuration/Utils/Http.hs | mit | hstcKeyFile ∷ Lens' HttpServiceTLSConfiguration FilePath
hstcKeyFile = lens _hstcKeyFile $ \s a → s { _hstcKeyFile = a} | 119 | hstcKeyFile ∷ Lens' HttpServiceTLSConfiguration FilePath
hstcKeyFile = lens _hstcKeyFile $ \s a → s { _hstcKeyFile = a} | 119 | hstcKeyFile = lens _hstcKeyFile $ \s a → s { _hstcKeyFile = a} | 62 | false | true | 1 | 9 | 17 | 42 | 20 | 22 | null | null |
DataStewardshipPortal/ds-wizard | DSServer/app/Auth.hs | apache-2.0 | doLoginAction :: PGPool -> User -> Action -> Action
doLoginAction pool user action = do
mSession <- runQuery pool $ getSessionByUser user
case mSession of
Nothing -> errorResponse "We are sorry, internal error happened. Please contact the administrator."
Just session -> do
setSession $ s_session_id se... | 338 | doLoginAction :: PGPool -> User -> Action -> Action
doLoginAction pool user action = do
mSession <- runQuery pool $ getSessionByUser user
case mSession of
Nothing -> errorResponse "We are sorry, internal error happened. Please contact the administrator."
Just session -> do
setSession $ s_session_id se... | 338 | doLoginAction pool user action = do
mSession <- runQuery pool $ getSessionByUser user
case mSession of
Nothing -> errorResponse "We are sorry, internal error happened. Please contact the administrator."
Just session -> do
setSession $ s_session_id session
action | 286 | false | true | 0 | 13 | 70 | 85 | 38 | 47 | null | null |
gnn/Hets | OWL2/Keywords.hs | gpl-2.0 | booleanS :: String
booleanS = "boolean" | 39 | booleanS :: String
booleanS = "boolean" | 39 | booleanS = "boolean" | 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
Xuyuanp/hscheme | main.hs | apache-2.0 | symbol :: Parser Char
symbol = oneOf "!#$%&|*+-/:<=>?@^_~" | 58 | symbol :: Parser Char
symbol = oneOf "!#$%&|*+-/:<=>?@^_~" | 58 | symbol = oneOf "!#$%&|*+-/:<=>?@^_~" | 36 | false | true | 1 | 5 | 7 | 20 | 8 | 12 | null | null |
CarstenKoenig/AdventOfCode2016 | Day1/Main.hs | mit | walk (dx,dy) d ((x,y), visited, found) =
walk (dx,dy) (d-1) ((x+dx,y+dy), visited, found) | 91 | walk (dx,dy) d ((x,y), visited, found) =
walk (dx,dy) (d-1) ((x+dx,y+dy), visited, found) | 91 | walk (dx,dy) d ((x,y), visited, found) =
walk (dx,dy) (d-1) ((x+dx,y+dy), visited, found) | 91 | false | false | 0 | 8 | 14 | 82 | 45 | 37 | null | null |
alphalambda/hsmath | src/Learn/Geometry/ex17visible.hs | gpl-2.0 | next = left + grain | 19 | next = left + grain | 19 | next = left + grain | 19 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
glguy/config-value | test/Main.hs | mit | number :: Number -> Value ()
number = Number () | 47 | number :: Number -> Value ()
number = Number () | 47 | number = Number () | 18 | false | true | 0 | 8 | 9 | 31 | 13 | 18 | null | null |
sgillespie/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | pprPat (SumPat pat alt arity _) = sumParens (pprAlternative ppr pat alt arity) | 78 | pprPat (SumPat pat alt arity _) = sumParens (pprAlternative ppr pat alt arity) | 78 | pprPat (SumPat pat alt arity _) = sumParens (pprAlternative ppr pat alt arity) | 78 | false | false | 0 | 7 | 12 | 36 | 17 | 19 | null | null |
gwright83/Wheeler | src/Math/Symbolic/Wheeler/Minkowski.hs | bsd-3-clause | minkowskiIndex_ :: String -> String -> VarIndex
minkowskiIndex_ = mkIndex_ minkowskiManifold | 92 | minkowskiIndex_ :: String -> String -> VarIndex
minkowskiIndex_ = mkIndex_ minkowskiManifold | 92 | minkowskiIndex_ = mkIndex_ minkowskiManifold | 44 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
wuerges/vlsi_verification | src/Graph.hs | bsd-3-clause | embedNand' :: [Node] -> Node -> GState ()
embedNand' is o = do
n <- newWire
modify $ insEdge (n, o, False)
embedAnd' is n
-- | Inserts an Or function into the graph | 171 | embedNand' :: [Node] -> Node -> GState ()
embedNand' is o = do
n <- newWire
modify $ insEdge (n, o, False)
embedAnd' is n
-- | Inserts an Or function into the graph | 171 | embedNand' is o = do
n <- newWire
modify $ insEdge (n, o, False)
embedAnd' is n
-- | Inserts an Or function into the graph | 129 | false | true | 0 | 9 | 40 | 67 | 33 | 34 | null | null |
Kwarrtz/microparsec | src/Text/Microparsec.hs | mit | - | Matches zero or more expressions until a termination
-- parser succeeds. The value of the terminator is discarded.
till ::
(MonadPlus m) =>
ParserT s m a ->
ParserT s m a' ->
ParserT s m [a]
till e x = let go = x *> return [] <|> (:) <$> e <*> go in go
| 267 | till ::
(MonadPlus m) =>
ParserT s m a ->
ParserT s m a' ->
ParserT s m [a]
till e x = let go = x *> return [] <|> (:) <$> e <*> go in go | 145 | till e x = let go = x *> return [] <|> (:) <$> e <*> go in go | 61 | true | true | 5 | 14 | 68 | 120 | 58 | 62 | null | null |
philopon/sql-simple | Database/Sql/Simple.hs | mit | execute :: (I.ToRow b q, I.Backend b) => b -> I.Query -> q -> I.Sql bs ()
execute = I.execute | 93 | execute :: (I.ToRow b q, I.Backend b) => b -> I.Query -> q -> I.Sql bs ()
execute = I.execute | 93 | execute = I.execute | 19 | false | true | 0 | 11 | 19 | 63 | 30 | 33 | null | null |
darthdeus/ghc-mod-ng | Language/Haskell/GhcMod/GhcPkg.hs | bsd-3-clause | ghcPkgDbOpt :: GhcPkgDb -> [String]
ghcPkgDbOpt GlobalDb = ["--global"] | 71 | ghcPkgDbOpt :: GhcPkgDb -> [String]
ghcPkgDbOpt GlobalDb = ["--global"] | 71 | ghcPkgDbOpt GlobalDb = ["--global"] | 35 | false | true | 0 | 6 | 8 | 24 | 13 | 11 | null | null |
zeekay/lambdabot | scripts/GenHaddock.hs | mit | main :: IO ()
main = do
system $ "wget -nc "++
"http://haskell.org/ghc/docs/latest/html/libraries/doc-index.html"
dir <- getCurrentDirectory
let filesdir = dir ++ "/haskell.org/ghc/docs/latest/html/libraries/"
files <- getDirectoryContents filesdir
let docfiles = filter ("doc-index-"`isPrefi... | 463 | main :: IO ()
main = do
system $ "wget -nc "++
"http://haskell.org/ghc/docs/latest/html/libraries/doc-index.html"
dir <- getCurrentDirectory
let filesdir = dir ++ "/haskell.org/ghc/docs/latest/html/libraries/"
files <- getDirectoryContents filesdir
let docfiles = filter ("doc-index-"`isPrefi... | 463 | main = do
system $ "wget -nc "++
"http://haskell.org/ghc/docs/latest/html/libraries/doc-index.html"
dir <- getCurrentDirectory
let filesdir = dir ++ "/haskell.org/ghc/docs/latest/html/libraries/"
files <- getDirectoryContents filesdir
let docfiles = filter ("doc-index-"`isPrefixOf`) files
... | 449 | false | true | 0 | 11 | 86 | 126 | 59 | 67 | null | null |
cullina/Extractor | src/Interval.hs | bsd-3-clause | halfInterval (Interval low high) True =
Interval ((low + high) / 2) high | 77 | halfInterval (Interval low high) True =
Interval ((low + high) / 2) high | 77 | halfInterval (Interval low high) True =
Interval ((low + high) / 2) high | 77 | false | false | 0 | 9 | 17 | 38 | 19 | 19 | null | null |
pepeiborra/bytestring-xml | src/Text/Xml/Tiny/Internal/Monad.hs | bsd-3-clause | unsafeIO :: Config => String -> IO a -> ParseMonad s a
unsafeIO msg action = unsafeLiftIO $ do
#ifdef TRACE_UNSAFE
res <- trace ("About to start unsafe IO: " ++ msg) $ action
trace ("Completed unsafe IO: " ++ msg) $ return res
#else
action
#endif
| 254 | unsafeIO :: Config => String -> IO a -> ParseMonad s a
unsafeIO msg action = unsafeLiftIO $ do
#ifdef TRACE_UNSAFE
res <- trace ("About to start unsafe IO: " ++ msg) $ action
trace ("Completed unsafe IO: " ++ msg) $ return res
#else
action
#endif
| 254 | unsafeIO msg action = unsafeLiftIO $ do
#ifdef TRACE_UNSAFE
res <- trace ("About to start unsafe IO: " ++ msg) $ action
trace ("Completed unsafe IO: " ++ msg) $ return res
#else
action
#endif
| 199 | false | true | 0 | 12 | 54 | 85 | 41 | 44 | null | null |
brendanhay/gogol | gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs | mpl-2.0 | -- | All video segments where the recognized logo appears. There might be
-- multiple instances of the same logo class appearing in one VideoSegment.
gooSegments :: Lens' GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation [GoogleCloudVideointelligenceV1p1beta1_VideoSegment]
gooSegments
= lens _gooSegment... | 385 | gooSegments :: Lens' GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation [GoogleCloudVideointelligenceV1p1beta1_VideoSegment]
gooSegments
= lens _gooSegments (\ s a -> s{_gooSegments = a}) .
_Default
. _Coerce | 235 | gooSegments
= lens _gooSegments (\ s a -> s{_gooSegments = a}) .
_Default
. _Coerce | 97 | true | true | 0 | 11 | 58 | 54 | 29 | 25 | null | null |
ml9951/ghc | libraries/pastm/Control/NoRec/STM.hs | bsd-3-clause | newTVar :: a -> STM (TVar a)
newTVar x = STM $ \s -> case newTVar# x s of
(# s', tv #) -> (# s', TVar tv #) | 135 | newTVar :: a -> STM (TVar a)
newTVar x = STM $ \s -> case newTVar# x s of
(# s', tv #) -> (# s', TVar tv #) | 135 | newTVar x = STM $ \s -> case newTVar# x s of
(# s', tv #) -> (# s', TVar tv #) | 106 | false | true | 0 | 11 | 56 | 64 | 32 | 32 | null | null |
tittoassini/flat | test/Spec.hs | bsd-3-clause | -- Array Word8
c3 = pre c3a | 28 | c3 = pre c3a | 12 | c3 = pre c3a | 12 | true | false | 1 | 5 | 7 | 14 | 5 | 9 | null | null |
ezyang/ghc | libraries/base/Data/Char.hs | bsd-3-clause | isMark :: Char -> Bool
isMark c = case generalCategory c of
NonSpacingMark -> True
SpacingCombiningMark -> True
EnclosingMark -> True
_ -> False
-- | Selects Unicode numeric characters, including digits from various
-- scripts, Roman numerals,... | 1,068 | isMark :: Char -> Bool
isMark c = case generalCategory c of
NonSpacingMark -> True
SpacingCombiningMark -> True
EnclosingMark -> True
_ -> False
-- | Selects Unicode numeric characters, including digits from various
-- scripts, Roman numerals,... | 1,068 | isMark c = case generalCategory c of
NonSpacingMark -> True
SpacingCombiningMark -> True
EnclosingMark -> True
_ -> False
-- | Selects Unicode numeric characters, including digits from various
-- scripts, Roman numerals, et cetera.
--
-- This ... | 1,045 | false | true | 0 | 8 | 239 | 91 | 61 | 30 | null | null |
roldugin/LiveFusion | Data/LiveFusion/Loop/Expr.hs | bsd-3-clause | (AppE f1 x1) ==? (AppE f2 x2) = (f1 ==? f2) && (x1 ==? x2) | 58 | (AppE f1 x1) ==? (AppE f2 x2) = (f1 ==? f2) && (x1 ==? x2) | 58 | (AppE f1 x1) ==? (AppE f2 x2) = (f1 ==? f2) && (x1 ==? x2) | 58 | false | false | 0 | 7 | 14 | 46 | 23 | 23 | null | null |
gabluc/CIS194-Solutions | src/Homework7/Editor.hs | bsd-3-clause | getCommand :: Editor b Command
getCommand = io $ readCom <$> getLine
where
readCom "" = Noop
readCom inp@(c:cs) | isDigit c = maybe Noop Line (readMay inp)
| toUpper c == 'L' = Load (unwords $ words cs)
| c == '?' = Help
| otherwise =... | 415 | getCommand :: Editor b Command
getCommand = io $ readCom <$> getLine
where
readCom "" = Noop
readCom inp@(c:cs) | isDigit c = maybe Noop Line (readMay inp)
| toUpper c == 'L' = Load (unwords $ words cs)
| c == '?' = Help
| otherwise =... | 415 | getCommand = io $ readCom <$> getLine
where
readCom "" = Noop
readCom inp@(c:cs) | isDigit c = maybe Noop Line (readMay inp)
| toUpper c == 'L' = Load (unwords $ words cs)
| c == '?' = Help
| otherwise = maybe Noop read $
... | 384 | false | true | 1 | 11 | 183 | 155 | 73 | 82 | null | null |
5outh/rapcandy | src/Bot.hs | mit | tweet :: Config -> String -> IO (Response BL.ByteString)
tweet config status = do
url <- parseUrl $ "https://api.twitter.com/1.1/statuses/update.json?status=" ++ HTTP.urlEncode status
req <- signWithConfig config url{ method = "POST" }
manager <- newManager tlsManagerSettings
httpLbs req manager | 304 | tweet :: Config -> String -> IO (Response BL.ByteString)
tweet config status = do
url <- parseUrl $ "https://api.twitter.com/1.1/statuses/update.json?status=" ++ HTTP.urlEncode status
req <- signWithConfig config url{ method = "POST" }
manager <- newManager tlsManagerSettings
httpLbs req manager | 304 | tweet config status = do
url <- parseUrl $ "https://api.twitter.com/1.1/statuses/update.json?status=" ++ HTTP.urlEncode status
req <- signWithConfig config url{ method = "POST" }
manager <- newManager tlsManagerSettings
httpLbs req manager | 247 | false | true | 0 | 10 | 45 | 93 | 43 | 50 | null | null |
utsav2601/cmpe295A | hake/RuleDefs.hs | mit | makeDependCxxObj :: Options -> String -> String -> HRule
makeDependCxxObj opts phase src =
let objfile = (objectFilePath opts src)
in
makeDependCxxArch opts phase src objfile (dependFilePath objfile) | 213 | makeDependCxxObj :: Options -> String -> String -> HRule
makeDependCxxObj opts phase src =
let objfile = (objectFilePath opts src)
in
makeDependCxxArch opts phase src objfile (dependFilePath objfile) | 213 | makeDependCxxObj opts phase src =
let objfile = (objectFilePath opts src)
in
makeDependCxxArch opts phase src objfile (dependFilePath objfile) | 156 | false | true | 0 | 10 | 41 | 73 | 33 | 40 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Unboxed.hs | bsd-3-clause | foldM'_ = G.foldM'_ | 19 | foldM'_ = G.foldM'_ | 19 | foldM'_ = G.foldM'_ | 19 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
jwiegley/ghc-release | utils/haddock/src/Haddock/Parser.hs | gpl-3.0 | parseParas :: DynFlags
-> String -- ^ String to parse
-> Doc RdrName
parseParas d = parse (p <* skipSpace) . encodeUtf8 . (++ "\n")
where
p :: Parser (Doc RdrName)
p = mconcat <$> paragraph d `sepBy` many (skipHorizontalSpace *> "\n")
-- | Parse a text paragraph. Actually just a w... | 419 | parseParas :: DynFlags
-> String -- ^ String to parse
-> Doc RdrName
parseParas d = parse (p <* skipSpace) . encodeUtf8 . (++ "\n")
where
p :: Parser (Doc RdrName)
p = mconcat <$> paragraph d `sepBy` many (skipHorizontalSpace *> "\n")
-- | Parse a text paragraph. Actually just a w... | 419 | parseParas d = parse (p <* skipSpace) . encodeUtf8 . (++ "\n")
where
p :: Parser (Doc RdrName)
p = mconcat <$> paragraph d `sepBy` many (skipHorizontalSpace *> "\n")
-- | Parse a text paragraph. Actually just a wrapper over 'parseStringBS' which
-- drops leading whitespace and encodes the string to UTF8 firs... | 322 | false | true | 1 | 9 | 104 | 95 | 50 | 45 | null | null |
IreneKnapp/Faction | faction/Distribution/Client/PackageIndex.hs | bsd-3-clause | reverseTopologicalOrder :: PackageFixedDeps pkg => PackageIndex pkg -> [pkg]
reverseTopologicalOrder index = map toPkgId
. Graph.topSort
. Graph.transposeG
$ graph
where (graph, toPkgId, _) = dependencyGraph index
-- | Given a ... | 801 | reverseTopologicalOrder :: PackageFixedDeps pkg => PackageIndex pkg -> [pkg]
reverseTopologicalOrder index = map toPkgId
. Graph.topSort
. Graph.transposeG
$ graph
where (graph, toPkgId, _) = dependencyGraph index
-- | Given a ... | 801 | reverseTopologicalOrder index = map toPkgId
. Graph.topSort
. Graph.transposeG
$ graph
where (graph, toPkgId, _) = dependencyGraph index
-- | Given a package index where we assume we want to use all the packages
-- (use 'depend... | 724 | false | true | 0 | 8 | 210 | 81 | 45 | 36 | null | null |
phischu/fragnix | tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.Types.hs | bsd-3-clause | enqueueControl :: TQueue Control -> Control -> IO ()
enqueueControl ctlQ ctl = atomically $ writeTQueue ctlQ ctl | 112 | enqueueControl :: TQueue Control -> Control -> IO ()
enqueueControl ctlQ ctl = atomically $ writeTQueue ctlQ ctl | 112 | enqueueControl ctlQ ctl = atomically $ writeTQueue ctlQ ctl | 59 | false | true | 0 | 8 | 17 | 41 | 19 | 22 | null | null |
beni55/ghcjs | src/Compiler/JMacro/QQ.hs | mit | regexLiteral :: JMParser String
regexLiteral = do
_ <- char '/'
x <- concat <$> many myChar
_ <- char '/'
b <- option False (char '/' >> return True)
if b
then mzero
else return x
where myChar = do
c <- noneOf ['/','\n']
case c of
'\\' -> do
... | 396 | regexLiteral :: JMParser String
regexLiteral = do
_ <- char '/'
x <- concat <$> many myChar
_ <- char '/'
b <- option False (char '/' >> return True)
if b
then mzero
else return x
where myChar = do
c <- noneOf ['/','\n']
case c of
'\\' -> do
... | 396 | regexLiteral = do
_ <- char '/'
x <- concat <$> many myChar
_ <- char '/'
b <- option False (char '/' >> return True)
if b
then mzero
else return x
where myChar = do
c <- noneOf ['/','\n']
case c of
'\\' -> do
c2 <- anyChar
... | 364 | false | true | 1 | 14 | 170 | 164 | 73 | 91 | null | null |
pepeiborra/narradar | src/Narradar/Examples.hs | bsd-3-clause | -- --------------------------------------------------------
-- Normalization of formulas with propositional connectives
-- --------------------------------------------------------
gt x y = term "gt" [x,y] | 204 | gt x y = term "gt" [x,y] | 24 | gt x y = term "gt" [x,y] | 24 | true | false | 0 | 6 | 17 | 25 | 14 | 11 | null | null |
jstolarek/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | string_txt (LStr s1 _) s2 = unpackLitString s1 ++ s2 | 52 | string_txt (LStr s1 _) s2 = unpackLitString s1 ++ s2 | 52 | string_txt (LStr s1 _) s2 = unpackLitString s1 ++ s2 | 52 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
coolhacks/scripts-hacks | examples/shellcheck-master/ShellCheck/Analytics.hs | mit | prop_checkUnquotedDollarAt = verify checkUnquotedDollarAt "ls $@" | 65 | prop_checkUnquotedDollarAt = verify checkUnquotedDollarAt "ls $@" | 65 | prop_checkUnquotedDollarAt = verify checkUnquotedDollarAt "ls $@" | 65 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
norm2782/shake-bin | src/Main.hs | bsd-3-clause | -- | Get the commandline arguments, if any, look for a Shakefile, and try
-- to execute it. Error out if no shakefile is found.
main :: IO ()
main = do
args <- getArgs
files <- getDirectoryContents =<< getCurrentDirectory
maybe (error "No shakefile found") (runShakefile args) $ find isShakefile files | 310 | main :: IO ()
main = do
args <- getArgs
files <- getDirectoryContents =<< getCurrentDirectory
maybe (error "No shakefile found") (runShakefile args) $ find isShakefile files | 182 | main = do
args <- getArgs
files <- getDirectoryContents =<< getCurrentDirectory
maybe (error "No shakefile found") (runShakefile args) $ find isShakefile files | 168 | true | true | 0 | 11 | 59 | 71 | 32 | 39 | null | null |
yuto-matsum/contest-util-hs | src/Euler/040.hs | mit | :: Integer -> Integer
d n = keta m i where
m = number n
i = index n
-- keta 3456 0 == 6, keta 3456 2 == 4 | 110 | :: Integer -> Integer
d n = keta m i where
m = number n
i = index n
-- keta 3456 0 == 6, keta 3456 2 == 4 | 110 | :: Integer -> Integer
d n = keta m i where
m = number n
i = index n
-- keta 3456 0 == 6, keta 3456 2 == 4 | 110 | false | false | 0 | 7 | 34 | 43 | 21 | 22 | null | null |
expipiplus1/vulkan | src/Vulkan/Core11/Enums/CommandPoolTrimFlags.hs | bsd-3-clause | conNameCommandPoolTrimFlags :: String
conNameCommandPoolTrimFlags = "CommandPoolTrimFlags" | 90 | conNameCommandPoolTrimFlags :: String
conNameCommandPoolTrimFlags = "CommandPoolTrimFlags" | 90 | conNameCommandPoolTrimFlags = "CommandPoolTrimFlags" | 52 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
allanderek/ipclib | examples/PepaOde.hs | gpl-2.0 | interpretParseResult :: Either ParseError ParsedModel -> String
interpretParseResult (Left err) = show err | 110 | interpretParseResult :: Either ParseError ParsedModel -> String
interpretParseResult (Left err) = show err | 110 | interpretParseResult (Left err) = show err | 46 | false | true | 0 | 6 | 16 | 36 | 16 | 20 | null | null |
dysinger/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The price per instance.
pdPrice :: Lens' PricingDetail (Maybe Double)
pdPrice = lens _pdPrice (\s a -> s { _pdPrice = a }) | 127 | pdPrice :: Lens' PricingDetail (Maybe Double)
pdPrice = lens _pdPrice (\s a -> s { _pdPrice = a }) | 98 | pdPrice = lens _pdPrice (\s a -> s { _pdPrice = a }) | 52 | true | true | 1 | 9 | 24 | 49 | 25 | 24 | null | null |
bredelings/BAli-Phy | haskell/Range.hs | gpl-2.0 | getIntegerBounds _ = error "getIntegerBounds is undefined if argument is not an IntegerInterval!" | 128 | getIntegerBounds _ = error "getIntegerBounds is undefined if argument is not an IntegerInterval!" | 128 | getIntegerBounds _ = error "getIntegerBounds is undefined if argument is not an IntegerInterval!" | 128 | false | false | 0 | 5 | 43 | 12 | 5 | 7 | null | null |
trygvis/hledger | hledger-web/hledger-web.hs | gpl-3.0 | server :: String -> Int -> [Opt] -> [String] -> Journal -> IO ()
server baseurl port opts args j = do
printf "Starting http server on port %d with base url %s\n" port baseurl
let a = App{getStatic=static staticdir
,appRoot=pack baseurl
,appOpts=opts
,appArgs=args
... | 496 | server :: String -> Int -> [Opt] -> [String] -> Journal -> IO ()
server baseurl port opts args j = do
printf "Starting http server on port %d with base url %s\n" port baseurl
let a = App{getStatic=static staticdir
,appRoot=pack baseurl
,appOpts=opts
,appArgs=args
... | 496 | server baseurl port opts args j = do
printf "Starting http server on port %d with base url %s\n" port baseurl
let a = App{getStatic=static staticdir
,appRoot=pack baseurl
,appOpts=opts
,appArgs=args
,appJournal=j
}
withStore "hledger" $ do
putVa... | 431 | false | true | 0 | 12 | 150 | 146 | 74 | 72 | null | null |
AntoineSavage/haskell | Puzzles/src/Data/Sudoku.hs | gpl-2.0 | constraint :: (Pos -> Pos) -> Grid -> Grid
constraint f g =
let asList = M.toList g
asSingletonMaps = map toSingletonMap asList
toSingletonMap (k,v) = M.singleton (f k) $ M.singleton k v
groupedByConstrainedKey = M.unionsWith M.union asSingletonMaps
asMapList = M.elems groupedByConstrainedKey
... | 401 | constraint :: (Pos -> Pos) -> Grid -> Grid
constraint f g =
let asList = M.toList g
asSingletonMaps = map toSingletonMap asList
toSingletonMap (k,v) = M.singleton (f k) $ M.singleton k v
groupedByConstrainedKey = M.unionsWith M.union asSingletonMaps
asMapList = M.elems groupedByConstrainedKey
... | 401 | constraint f g =
let asList = M.toList g
asSingletonMaps = map toSingletonMap asList
toSingletonMap (k,v) = M.singleton (f k) $ M.singleton k v
groupedByConstrainedKey = M.unionsWith M.union asSingletonMaps
asMapList = M.elems groupedByConstrainedKey
asNewGrid = concatMap (newDomain . M.toLis... | 358 | false | true | 0 | 12 | 80 | 141 | 70 | 71 | null | null |
green-haskell/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | -- | Create a template local for a series of types
mkTemplateLocals :: [Type] -> [Id]
mkTemplateLocals = mkTemplateLocalsNum 1 | 126 | mkTemplateLocals :: [Type] -> [Id]
mkTemplateLocals = mkTemplateLocalsNum 1 | 75 | mkTemplateLocals = mkTemplateLocalsNum 1 | 40 | true | true | 0 | 6 | 19 | 25 | 14 | 11 | null | null |
brendanhay/gogol | gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Create.hs | mpl-2.0 | -- | Creates a value of 'ProjectsTopicsCreate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ptcXgafv'
--
-- * 'ptcUploadProtocol'
--
-- * 'ptcAccessToken'
--
-- * 'ptcUploadType'
--
-- * 'ptcPayload'
--
-- * 'ptcName'
--
-- * 'ptcC... | 724 | projectsTopicsCreate
:: Topic -- ^ 'ptcPayload'
-> Text -- ^ 'ptcName'
-> ProjectsTopicsCreate
projectsTopicsCreate pPtcPayload_ pPtcName_ =
ProjectsTopicsCreate'
{ _ptcXgafv = Nothing
, _ptcUploadProtocol = Nothing
, _ptcAccessToken = Nothing
, _ptcUploadType = Nothing
, _ptcPayload =... | 395 | projectsTopicsCreate pPtcPayload_ pPtcName_ =
ProjectsTopicsCreate'
{ _ptcXgafv = Nothing
, _ptcUploadProtocol = Nothing
, _ptcAccessToken = Nothing
, _ptcUploadType = Nothing
, _ptcPayload = pPtcPayload_
, _ptcName = pPtcName_
, _ptcCallback = Nothing
} | 288 | true | true | 0 | 8 | 150 | 96 | 62 | 34 | null | null |
brendanhay/gogol | gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs | mpl-2.0 | -- | A revision (commit) ID.
gscRevisionId :: Lens' GerritSourceContext (Maybe Text)
gscRevisionId
= lens _gscRevisionId
(\ s a -> s{_gscRevisionId = a}) | 161 | gscRevisionId :: Lens' GerritSourceContext (Maybe Text)
gscRevisionId
= lens _gscRevisionId
(\ s a -> s{_gscRevisionId = a}) | 132 | gscRevisionId
= lens _gscRevisionId
(\ s a -> s{_gscRevisionId = a}) | 76 | true | true | 0 | 9 | 30 | 48 | 25 | 23 | null | null |
fredokun/piexplorer | src/Syntax.hs | gpl-3.0 | ppName (Priv p) = "#" ++ p | 26 | ppName (Priv p) = "#" ++ p | 26 | ppName (Priv p) = "#" ++ p | 26 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
jrockway/c2hs | src/Data/Attributes.hs | gpl-2.0 | copyAttr :: Attr a => AttrTable a -> NodeInfo -> NodeInfo -> AttrTable a
copyAttr at ats ats'
| isUndef av = assert (isUndef (getAttr at ats'))
at
| otherwise =
updAttr at ats' av
where
av = getAttr at ats
-- | auxiliary functions for error messages
-- | 288 | copyAttr :: Attr a => AttrTable a -> NodeInfo -> NodeInfo -> AttrTable a
copyAttr at ats ats'
| isUndef av = assert (isUndef (getAttr at ats'))
at
| otherwise =
updAttr at ats' av
where
av = getAttr at ats
-- | auxiliary functions for error messages
-- | 288 | copyAttr at ats ats'
| isUndef av = assert (isUndef (getAttr at ats'))
at
| otherwise =
updAttr at ats' av
where
av = getAttr at ats
-- | auxiliary functions for error messages
-- | 215 | false | true | 2 | 10 | 84 | 103 | 47 | 56 | null | null |
jmikkola/Athena | src/test-Inference.hs | mit | simpleInference :: Assertion
simpleInference = do
let intExpr = intVal 123
assertExprTypes tInt intExpr
let lessExpr = E.Binary [] E.Less (intVal 5) (intVal 6)
assertExprTypes tBool lessExpr
let notExpr = E.Unary [] E.BoolNot (boolVal True)
assertExprTypes tBool notExpr
let parenExpr = E.Paren [] $ str... | 700 | simpleInference :: Assertion
simpleInference = do
let intExpr = intVal 123
assertExprTypes tInt intExpr
let lessExpr = E.Binary [] E.Less (intVal 5) (intVal 6)
assertExprTypes tBool lessExpr
let notExpr = E.Unary [] E.BoolNot (boolVal True)
assertExprTypes tBool notExpr
let parenExpr = E.Paren [] $ str... | 700 | simpleInference = do
let intExpr = intVal 123
assertExprTypes tInt intExpr
let lessExpr = E.Binary [] E.Less (intVal 5) (intVal 6)
assertExprTypes tBool lessExpr
let notExpr = E.Unary [] E.BoolNot (boolVal True)
assertExprTypes tBool notExpr
let parenExpr = E.Paren [] $ strVal "foo"
assertExprTypes t... | 671 | false | true | 0 | 13 | 137 | 289 | 127 | 162 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT22.hs | gpl-3.0 | qfac (S x) acc = qfac x (S x * acc) | 35 | qfac (S x) acc = qfac x (S x * acc) | 35 | qfac (S x) acc = qfac x (S x * acc) | 35 | false | false | 0 | 8 | 10 | 32 | 15 | 17 | null | null |
mumuki/mulang | src/Language/Mulang/Ast/Visitor.hs | gpl-3.0 | extractSingleExpression (Attribute v1 e) = Just (e, \e -> (Attribute v1 e)) | 83 | extractSingleExpression (Attribute v1 e) = Just (e, \e -> (Attribute v1 e)) | 83 | extractSingleExpression (Attribute v1 e) = Just (e, \e -> (Attribute v1 e)) | 83 | false | false | 0 | 9 | 19 | 39 | 20 | 19 | null | null |
susoDominguez/eNominalTerms-Alpha | ParserTrm.hs | unlicense | parseProb :: Parser Prob
parseProb = do xs <- sepBy parseConstr (char ',')
spaces >> eof
return xs <?> "List of #|= Constrains" | 157 | parseProb :: Parser Prob
parseProb = do xs <- sepBy parseConstr (char ',')
spaces >> eof
return xs <?> "List of #|= Constrains" | 157 | parseProb = do xs <- sepBy parseConstr (char ',')
spaces >> eof
return xs <?> "List of #|= Constrains" | 132 | false | true | 1 | 10 | 52 | 53 | 22 | 31 | null | null |
astro/haskell-torrent | src/Data/ByteString/Parser.hs | bsd-2-clause | mkState :: L.ByteString -> Int64 -> S
mkState l = case l of
L.Empty -> S B.empty L.empty
L.Chunk x xs -> S x xs
-- | Run the Get monad applies a 'get'-based parser on the input ByteString | 201 | mkState :: L.ByteString -> Int64 -> S
mkState l = case l of
L.Empty -> S B.empty L.empty
L.Chunk x xs -> S x xs
-- | Run the Get monad applies a 'get'-based parser on the input ByteString | 201 | mkState l = case l of
L.Empty -> S B.empty L.empty
L.Chunk x xs -> S x xs
-- | Run the Get monad applies a 'get'-based parser on the input ByteString | 163 | false | true | 3 | 6 | 52 | 64 | 31 | 33 | null | null |
knutwalker/hocker | src/lib/Hocker/Flags.hs | apache-2.0 | validateFlags :: [String] -> Either FError RunCommand -> Either HelpOutput RunCommand
validateFlags = lmap . usage | 114 | validateFlags :: [String] -> Either FError RunCommand -> Either HelpOutput RunCommand
validateFlags = lmap . usage | 114 | validateFlags = lmap . usage | 28 | false | true | 1 | 8 | 15 | 43 | 19 | 24 | null | null |
nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles | ParserCombinators/src/Decimal.hs | gpl-3.0 | fractionOrDecimal :: Parser DoubleOrRational
fractionOrDecimal =
(Left <$> try parseDecimal <?> "Decimal")
<|> (Right <$> try parseFraction <?> "Fraction") | 167 | fractionOrDecimal :: Parser DoubleOrRational
fractionOrDecimal =
(Left <$> try parseDecimal <?> "Decimal")
<|> (Right <$> try parseFraction <?> "Fraction") | 167 | fractionOrDecimal =
(Left <$> try parseDecimal <?> "Decimal")
<|> (Right <$> try parseFraction <?> "Fraction") | 122 | false | true | 4 | 9 | 30 | 53 | 25 | 28 | null | null |
vTurbine/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | bindersOf :: Bind b -> [b]
-- If you edit this function, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
bindersOf (NonRec binder _) = [binder] | 188 | bindersOf :: Bind b -> [b]
bindersOf (NonRec binder _) = [binder] | 66 | bindersOf (NonRec binder _) = [binder] | 38 | true | true | 0 | 7 | 33 | 37 | 20 | 17 | null | null |
Philonous/hexpat-internals | Text/XML/Expat/Internal/IO.hs | bsd-3-clause | encodingToString :: Encoding -> String
encodingToString ASCII = "US-ASCII" | 77 | encodingToString :: Encoding -> String
encodingToString ASCII = "US-ASCII" | 77 | encodingToString ASCII = "US-ASCII" | 38 | false | true | 0 | 5 | 11 | 22 | 10 | 12 | null | null |
yousufmsoliman/music | Source (Haskell)/Scale.hs | gpl-3.0 | ---- MODAL
ionian = makeScale [ unison, maj2, maj3, perf4, perf5, maj6, maj7, octv ] | 84 | ionian = makeScale [ unison, maj2, maj3, perf4, perf5, maj6, maj7, octv ] | 73 | ionian = makeScale [ unison, maj2, maj3, perf4, perf5, maj6, maj7, octv ] | 73 | true | false | 1 | 6 | 14 | 37 | 21 | 16 | null | null |
psibi/yesod | yesod-core/Yesod/Core/Content.hs | mit | typeOgv :: ContentType
typeOgv = "video/ogg" | 44 | typeOgv :: ContentType
typeOgv = "video/ogg" | 44 | typeOgv = "video/ogg" | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
tonyday567/maths-extended | src/Statistics/Distribution/Combo.hs | mit | cumulative :: ComboDistribution -> Double -> Double
cumulative (CD split m s r l sl) x =
split *
D.cumulative (N.normalDistr m s)
x +
(1 - split) *
D.cumulative
(L.laplace (1 / r)
(1 / l)
sl
m)
x | 273 | cumulative :: ComboDistribution -> Double -> Double
cumulative (CD split m s r l sl) x =
split *
D.cumulative (N.normalDistr m s)
x +
(1 - split) *
D.cumulative
(L.laplace (1 / r)
(1 / l)
sl
m)
x | 273 | cumulative (CD split m s r l sl) x =
split *
D.cumulative (N.normalDistr m s)
x +
(1 - split) *
D.cumulative
(L.laplace (1 / r)
(1 / l)
sl
m)
x | 221 | false | true | 0 | 11 | 117 | 111 | 56 | 55 | null | null |
tjakway/ghcjvm | compiler/types/Coercion.hs | bsd-3-clause | setNominalRole_maybe (ForAllCo tv kind_co co)
= ForAllCo tv kind_co <$> setNominalRole_maybe co | 97 | setNominalRole_maybe (ForAllCo tv kind_co co)
= ForAllCo tv kind_co <$> setNominalRole_maybe co | 97 | setNominalRole_maybe (ForAllCo tv kind_co co)
= ForAllCo tv kind_co <$> setNominalRole_maybe co | 97 | false | false | 2 | 6 | 13 | 34 | 14 | 20 | null | null |
DrSLDR/logoff | src/Logoff.hs | mit | -- Focus left (or top-down defocus left)
focusL :: Sequent -> Sequent
focusL (Neutral (IStruct (P i)) o) = LFocus (P i) o | 121 | focusL :: Sequent -> Sequent
focusL (Neutral (IStruct (P i)) o) = LFocus (P i) o | 80 | focusL (Neutral (IStruct (P i)) o) = LFocus (P i) o | 51 | true | true | 0 | 13 | 22 | 55 | 26 | 29 | null | null |
well-typed/generics-sop | generics-sop/src/Generics/SOP/TH.hs | bsd-3-clause | metadataType :: Q Type -> DatatypeVariant -> Name -> [TH.ConstructorInfo] -> Q Dec
metadataType typ variant typeName cs =
tySynInstDCompat ''DatatypeInfoOf Nothing [typ] (metadataType' variant typeName cs) | 207 | metadataType :: Q Type -> DatatypeVariant -> Name -> [TH.ConstructorInfo] -> Q Dec
metadataType typ variant typeName cs =
tySynInstDCompat ''DatatypeInfoOf Nothing [typ] (metadataType' variant typeName cs) | 207 | metadataType typ variant typeName cs =
tySynInstDCompat ''DatatypeInfoOf Nothing [typ] (metadataType' variant typeName cs) | 124 | false | true | 0 | 10 | 28 | 71 | 35 | 36 | null | null |
snoyberg/ghc | compiler/typecheck/TcSplice.hs | bsd-3-clause | -- Result type is Type (= Q Typ)
tcBrackTy (DecBrG _) = tcMetaTy decsQTyConName | 80 | tcBrackTy (DecBrG _) = tcMetaTy decsQTyConName | 47 | tcBrackTy (DecBrG _) = tcMetaTy decsQTyConName | 47 | true | false | 0 | 7 | 14 | 19 | 9 | 10 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Directory/Types/Product.hs | mpl-2.0 | -- | Kind of resource this is.
schKind :: Lens' Schema Text
schKind = lens _schKind (\ s a -> s{_schKind = a}) | 110 | schKind :: Lens' Schema Text
schKind = lens _schKind (\ s a -> s{_schKind = a}) | 79 | schKind = lens _schKind (\ s a -> s{_schKind = a}) | 50 | true | true | 0 | 9 | 22 | 40 | 22 | 18 | null | null |
mokus0/monad-loops | src/Control/Monad/Loops.hs | bsd-3-clause | unfoldWhileM' :: (Monad m, MonadPlus f) => (a -> Bool) -> m a -> m (f a)
unfoldWhileM' p m = loop mzero
where
loop xs = do
x <- m
if p x
then loop (xs `mplus` return x)
else return xs
| 253 | unfoldWhileM' :: (Monad m, MonadPlus f) => (a -> Bool) -> m a -> m (f a)
unfoldWhileM' p m = loop mzero
where
loop xs = do
x <- m
if p x
then loop (xs `mplus` return x)
else return xs
| 253 | unfoldWhileM' p m = loop mzero
where
loop xs = do
x <- m
if p x
then loop (xs `mplus` return x)
else return xs
| 180 | false | true | 0 | 11 | 112 | 110 | 54 | 56 | null | null |
telser/keter | Keter/LabelMap.hs | mit | memberTree ("*":ls) (WildcardExcept w _) = memberTree ls $ labelEntryMap w | 74 | memberTree ("*":ls) (WildcardExcept w _) = memberTree ls $ labelEntryMap w | 74 | memberTree ("*":ls) (WildcardExcept w _) = memberTree ls $ labelEntryMap w | 74 | false | false | 0 | 7 | 10 | 36 | 17 | 19 | null | null |
christiaanb/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | marshalObjectIdKey = mkPreludeMiscIdUnique 151 | 57 | marshalObjectIdKey = mkPreludeMiscIdUnique 151 | 57 | marshalObjectIdKey = mkPreludeMiscIdUnique 151 | 57 | false | false | 0 | 5 | 14 | 9 | 4 | 5 | null | null |
pparkkin/eta | compiler/ETA/HsSyn/HsUtils.hs | bsd-3-clause | hsLInstDeclBinders (L _ (TyFamInstD {})) = [] | 45 | hsLInstDeclBinders (L _ (TyFamInstD {})) = [] | 45 | hsLInstDeclBinders (L _ (TyFamInstD {})) = [] | 45 | false | false | 0 | 9 | 6 | 26 | 13 | 13 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Delete.hs | mpl-2.0 | -- | User profile ID associated with this request.
cfvdProFileId :: Lens' CreativeFieldValuesDelete Int64
cfvdProFileId
= lens _cfvdProFileId
(\ s a -> s{_cfvdProFileId = a})
. _Coerce | 198 | cfvdProFileId :: Lens' CreativeFieldValuesDelete Int64
cfvdProFileId
= lens _cfvdProFileId
(\ s a -> s{_cfvdProFileId = a})
. _Coerce | 147 | cfvdProFileId
= lens _cfvdProFileId
(\ s a -> s{_cfvdProFileId = a})
. _Coerce | 92 | true | true | 2 | 8 | 40 | 51 | 24 | 27 | null | null |
bitemyapp/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | mk_forall_ty exp tvs (L _ (HsParTy ty)) = mk_forall_ty exp tvs ty | 67 | mk_forall_ty exp tvs (L _ (HsParTy ty)) = mk_forall_ty exp tvs ty | 67 | mk_forall_ty exp tvs (L _ (HsParTy ty)) = mk_forall_ty exp tvs ty | 67 | false | false | 0 | 9 | 13 | 34 | 16 | 18 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_POV_STRINGEOL :: Int
wxSTC_POV_STRINGEOL = 7 | 50 | wxSTC_POV_STRINGEOL :: Int
wxSTC_POV_STRINGEOL = 7 | 50 | wxSTC_POV_STRINGEOL = 7 | 23 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
michaeljklein/CPlug | gitTools/stats.hs | bsd-3-clause | main = do
process <- runCommand "./dump_all_versions.sh"
waiter <- waitForProcess process
printStats <- join . liftM (mapM_ printOne . allStats) . getAllPoints $ "."
removeFiles <- join $ liftM (mapM_ removeFile) (getStatsFiles ".")
seq waiter (seq printStats (seq removeFiles (putStrLn "done"))) | 306 | main = do
process <- runCommand "./dump_all_versions.sh"
waiter <- waitForProcess process
printStats <- join . liftM (mapM_ printOne . allStats) . getAllPoints $ "."
removeFiles <- join $ liftM (mapM_ removeFile) (getStatsFiles ".")
seq waiter (seq printStats (seq removeFiles (putStrLn "done"))) | 306 | main = do
process <- runCommand "./dump_all_versions.sh"
waiter <- waitForProcess process
printStats <- join . liftM (mapM_ printOne . allStats) . getAllPoints $ "."
removeFiles <- join $ liftM (mapM_ removeFile) (getStatsFiles ".")
seq waiter (seq printStats (seq removeFiles (putStrLn "done"))) | 306 | false | false | 0 | 14 | 50 | 116 | 53 | 63 | null | null |
massysett/rainbow | lib/Rainbow.hs | bsd-3-clause | -- | Change the background color. Whether this affects 8-color
-- terminals, 256-color terminals, or both depends on the 'Y.Radiant'.
back :: Y.Radiant -> Y.Chunk -> Y.Chunk
back (Y.Radiant c8 c256) c = c & Y.scheme . Y.style8 . Y.back .~ c8
& Y.scheme . Y.style256 . Y.back .~ c256 | 285 | back :: Y.Radiant -> Y.Chunk -> Y.Chunk
back (Y.Radiant c8 c256) c = c & Y.scheme . Y.style8 . Y.back .~ c8
& Y.scheme . Y.style256 . Y.back .~ c256 | 150 | back (Y.Radiant c8 c256) c = c & Y.scheme . Y.style8 . Y.back .~ c8
& Y.scheme . Y.style256 . Y.back .~ c256 | 110 | true | true | 4 | 11 | 52 | 95 | 45 | 50 | null | null |
ml9951/ghc | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | getCondCode :: CmmExpr -> NatM CondCode
-- almost the same as everywhere else - but we need to
-- extend small integers to 32 bit or 64 bit first
getCondCode (CmmMachOp mop [x, y])
= do
dflags <- getDynFlags
case mop of
MO_F_Eq W32 -> condFltCode EQQ x y
MO_F_Ne W32 -> condFltCode NE x y
... | 2,079 | getCondCode :: CmmExpr -> NatM CondCode
getCondCode (CmmMachOp mop [x, y])
= do
dflags <- getDynFlags
case mop of
MO_F_Eq W32 -> condFltCode EQQ x y
MO_F_Ne W32 -> condFltCode NE x y
MO_F_Gt W32 -> condFltCode GTT x y
MO_F_Ge W32 -> condFltCode GE x y
MO_F_Lt W32 -> condFltCode... | 1,971 | getCondCode (CmmMachOp mop [x, y])
= do
dflags <- getDynFlags
case mop of
MO_F_Eq W32 -> condFltCode EQQ x y
MO_F_Ne W32 -> condFltCode NE x y
MO_F_Gt W32 -> condFltCode GTT x y
MO_F_Ge W32 -> condFltCode GE x y
MO_F_Lt W32 -> condFltCode LTT x y
MO_F_Le W32 -> condFltCod... | 1,931 | true | true | 0 | 12 | 813 | 620 | 288 | 332 | null | null |
gridaphobe/target | examples/Data/ByteString/Fusion.hs | mit | -- | Element function expressing a prefix reduction only
--
{-@ scanEFL :: (Word8 -> Word8 -> Word8) -> AccEFLJ Word8 @-}
scanEFL :: (Word8 -> Word8 -> Word8) -> AccEFL Word8
scanEFL f = \a e -> (f a e :*: JustS a) | 215 | scanEFL :: (Word8 -> Word8 -> Word8) -> AccEFL Word8
scanEFL f = \a e -> (f a e :*: JustS a) | 92 | scanEFL f = \a e -> (f a e :*: JustS a) | 39 | true | true | 0 | 8 | 44 | 57 | 30 | 27 | null | null |
juodaspaulius/clafer | src/Language/Clafer/Intermediate/TypeSystem.hs | mit | unionType TBoolean = [booleanType] | 34 | unionType TBoolean = [booleanType] | 34 | unionType TBoolean = [booleanType] | 34 | false | false | 1 | 5 | 3 | 15 | 6 | 9 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F33.hs | bsd-3-clause | -- glWindowPos3f ---------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glWindowPos.xml OpenGL 2.x>. The vector equivalent of this command is 'glWindowPos3fv'.
glWindowPos3f
:: MonadIO m
=> GLfloat -- ^ @x@ of type @CoordF@.
-> GLfloat -- ... | 460 | glWindowPos3f
:: MonadIO m
=> GLfloat -- ^ @x@ of type @CoordF@.
-> GLfloat -- ^ @y@ of type @CoordF@.
-> GLfloat -- ^ @z@ of type @CoordF@.
-> m ()
glWindowPos3f v1 v2 v3 = liftIO $ dyn43 ptr_glWindowPos3f v1 v2 v3 | 225 | glWindowPos3f v1 v2 v3 = liftIO $ dyn43 ptr_glWindowPos3f v1 v2 v3 | 66 | true | true | 0 | 11 | 72 | 64 | 32 | 32 | null | null |
RoboNickBot/talkbot | src/TalkBot/IO.hs | gpl-3.0 | conversate :: String -> RespGen IO
conversate msg = do
(resp, debug) <- respond msg
liftIO $ flushPrint resp
liftIO $ debugPrint debug
commandLoop
-- TODO
-- This could use a Reader monad because it's output depends on the
-- "environment" of the nicks list | 266 | conversate :: String -> RespGen IO
conversate msg = do
(resp, debug) <- respond msg
liftIO $ flushPrint resp
liftIO $ debugPrint debug
commandLoop
-- TODO
-- This could use a Reader monad because it's output depends on the
-- "environment" of the nicks list | 266 | conversate msg = do
(resp, debug) <- respond msg
liftIO $ flushPrint resp
liftIO $ debugPrint debug
commandLoop
-- TODO
-- This could use a Reader monad because it's output depends on the
-- "environment" of the nicks list | 231 | false | true | 0 | 8 | 53 | 68 | 31 | 37 | null | null |
mrakgr/futhark | src/Futhark/CodeGen/ImpGen.hs | bsd-3-clause | subExpNotArray :: SubExp -> ImpM op Bool
subExpNotArray se = subExpType se >>= \case
Array {} -> return False
_ -> return True | 137 | subExpNotArray :: SubExp -> ImpM op Bool
subExpNotArray se = subExpType se >>= \case
Array {} -> return False
_ -> return True | 137 | subExpNotArray se = subExpType se >>= \case
Array {} -> return False
_ -> return True | 96 | false | true | 2 | 6 | 33 | 55 | 25 | 30 | null | null |
ekr/tamarin-prover | lib/term/src/Term/VTerm.hs | gpl-3.0 | varTerm :: v -> VTerm c v
varTerm = lit . Var | 45 | varTerm :: v -> VTerm c v
varTerm = lit . Var | 45 | varTerm = lit . Var | 19 | false | true | 0 | 6 | 11 | 24 | 12 | 12 | null | null |
fmapfmapfmap/amazonka | amazonka-swf/gen/Network/AWS/SWF/DescribeWorkflowExecution.hs | mpl-2.0 | -- | The number of tasks for this workflow execution. This includes open and
-- closed tasks of all types.
dwersOpenCounts :: Lens' DescribeWorkflowExecutionResponse WorkflowExecutionOpenCounts
dwersOpenCounts = lens _dwersOpenCounts (\ s a -> s{_dwersOpenCounts = a}) | 268 | dwersOpenCounts :: Lens' DescribeWorkflowExecutionResponse WorkflowExecutionOpenCounts
dwersOpenCounts = lens _dwersOpenCounts (\ s a -> s{_dwersOpenCounts = a}) | 161 | dwersOpenCounts = lens _dwersOpenCounts (\ s a -> s{_dwersOpenCounts = a}) | 74 | true | true | 1 | 9 | 35 | 44 | 23 | 21 | null | null |
andreagenso/java2scala | src/J2s/Parser.hs | apache-2.0 | pPrimaryNNAv = (\a ids -> AGS.sem_PrimaryNNA_PrimNNAMethodInvocationMN ids a) <$ pSpecialSimbol "(" <*> pArgumentList <* pSpecialSimbol ")"
<|> (\ e ids -> AGS.sem_PrimaryNNA_PrimNNAArrayAccessExprName ids e) <$ pSpecialSimbol "[" <*> pExpression <* pSpecialSimbol "]"
<|> pSuccee... | 541 | pPrimaryNNAv = (\a ids -> AGS.sem_PrimaryNNA_PrimNNAMethodInvocationMN ids a) <$ pSpecialSimbol "(" <*> pArgumentList <* pSpecialSimbol ")"
<|> (\ e ids -> AGS.sem_PrimaryNNA_PrimNNAArrayAccessExprName ids e) <$ pSpecialSimbol "[" <*> pExpression <* pSpecialSimbol "]"
<|> pSuccee... | 541 | pPrimaryNNAv = (\a ids -> AGS.sem_PrimaryNNA_PrimNNAMethodInvocationMN ids a) <$ pSpecialSimbol "(" <*> pArgumentList <* pSpecialSimbol ")"
<|> (\ e ids -> AGS.sem_PrimaryNNA_PrimNNAArrayAccessExprName ids e) <$ pSpecialSimbol "[" <*> pExpression <* pSpecialSimbol "]"
<|> pSuccee... | 541 | false | false | 10 | 11 | 162 | 137 | 68 | 69 | null | null |
lynnard/cocos2d-hs | src/Graphics/UI/Cocos2d/Director.hs | bsd-3-clause | director_resume :: (DirectorPtr arg'1) => arg'1 -> HoppyP.IO ()
director_resume arg'1 =
HoppyFHR.withCppPtr (toDirector arg'1) $ \arg'1' ->
(director_resume' arg'1') | 169 | director_resume :: (DirectorPtr arg'1) => arg'1 -> HoppyP.IO ()
director_resume arg'1 =
HoppyFHR.withCppPtr (toDirector arg'1) $ \arg'1' ->
(director_resume' arg'1') | 169 | director_resume arg'1 =
HoppyFHR.withCppPtr (toDirector arg'1) $ \arg'1' ->
(director_resume' arg'1') | 105 | false | true | 0 | 8 | 23 | 60 | 30 | 30 | null | null |
goldfirere/th-desugar | Language/Haskell/TH/Desugar/FV.hs | bsd-3-clause | -- | Adjust the free variables of something following 'DTyVarBndr's.
fv_dtvbs :: [DTyVarBndr flag] -> OSet Name -> OSet Name
fv_dtvbs tvbs fvs = foldr fv_dtvb fvs tvbs | 167 | fv_dtvbs :: [DTyVarBndr flag] -> OSet Name -> OSet Name
fv_dtvbs tvbs fvs = foldr fv_dtvb fvs tvbs | 98 | fv_dtvbs tvbs fvs = foldr fv_dtvb fvs tvbs | 42 | true | true | 0 | 7 | 27 | 44 | 21 | 23 | null | null |
romanb/amazonka | amazonka-rds/gen/Network/AWS/RDS/DeleteDBInstance.hs | mpl-2.0 | -- | 'DeleteDBInstanceResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'ddbirDBInstance' @::@ 'Maybe' 'DBInstance'
--
deleteDBInstanceResponse :: DeleteDBInstanceResponse
deleteDBInstanceResponse = DeleteDBInstanceResponse
{ _ddbirDBInstance = Nothing
} | 305 | deleteDBInstanceResponse :: DeleteDBInstanceResponse
deleteDBInstanceResponse = DeleteDBInstanceResponse
{ _ddbirDBInstance = Nothing
} | 143 | deleteDBInstanceResponse = DeleteDBInstanceResponse
{ _ddbirDBInstance = Nothing
} | 90 | true | true | 0 | 6 | 39 | 25 | 17 | 8 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_LUMINANCE_FLOAT16_ATI :: GLenum
gl_LUMINANCE_FLOAT16_ATI = 0x881E | 68 | gl_LUMINANCE_FLOAT16_ATI :: GLenum
gl_LUMINANCE_FLOAT16_ATI = 0x881E | 68 | gl_LUMINANCE_FLOAT16_ATI = 0x881E | 33 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/FrenchHorn.hs | bsd-3-clause | frenchHorn :: Instr
frenchHorn = Instr
"French_horn"
"French Horn"
(Legend "McGill" "2" "19")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 73.41 26 "d2"))
(Pitch 73.41 26 "d2")
(Amplitude 4355.76 (HarmonicFreq 28 (Pitch 155.563 39 "d#3")) 2.0e-2))
(InstrR... | 930 | frenchHorn :: Instr
frenchHorn = Instr
"French_horn"
"French Horn"
(Legend "McGill" "2" "19")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 73.41 26 "d2"))
(Pitch 73.41 26 "d2")
(Amplitude 4355.76 (HarmonicFreq 28 (Pitch 155.563 39 "d#3")) 2.0e-2))
(InstrR... | 930 | frenchHorn = Instr
"French_horn"
"French Horn"
(Legend "McGill" "2" "19")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 73.41 26 "d2"))
(Pitch 73.41 26 "d2")
(Amplitude 4355.76 (HarmonicFreq 28 (Pitch 155.563 39 "d#3")) 2.0e-2))
(InstrRange
(Ha... | 910 | false | true | 0 | 14 | 342 | 287 | 160 | 127 | null | null |
kawu/tag-vanilla | src/NLP/TAG/Vanilla/Tests.hs | bsd-2-clause | caught :: Tr
caught = INode "S"
[ INode "NP" []
, INode "VP"
[ INode "V" [FNode "caught"]
, INode "NP" [] ]
] | 137 | caught :: Tr
caught = INode "S"
[ INode "NP" []
, INode "VP"
[ INode "V" [FNode "caught"]
, INode "NP" [] ]
] | 137 | caught = INode "S"
[ INode "NP" []
, INode "VP"
[ INode "V" [FNode "caught"]
, INode "NP" [] ]
] | 124 | false | true | 0 | 10 | 52 | 65 | 30 | 35 | null | null |
literate-unitb/literate-unitb | src/Document/Tests/Cubes.hs | mit | result10 :: String
result10 = unlines
[ "error 31:21:"
, " type error: a calculation must include at least one reasoning step"
] | 143 | result10 :: String
result10 = unlines
[ "error 31:21:"
, " type error: a calculation must include at least one reasoning step"
] | 143 | result10 = unlines
[ "error 31:21:"
, " type error: a calculation must include at least one reasoning step"
] | 124 | false | true | 0 | 6 | 37 | 26 | 12 | 14 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DeleteNetworkAclEntry.hs | mpl-2.0 | -- | Indicates whether the rule is an egress rule.
dnaeEgress :: Lens' DeleteNetworkAclEntry Bool
dnaeEgress = lens _dnaeEgress (\s a -> s { _dnaeEgress = a }) | 159 | dnaeEgress :: Lens' DeleteNetworkAclEntry Bool
dnaeEgress = lens _dnaeEgress (\s a -> s { _dnaeEgress = a }) | 108 | dnaeEgress = lens _dnaeEgress (\s a -> s { _dnaeEgress = a }) | 61 | true | true | 0 | 9 | 27 | 40 | 22 | 18 | null | null |
alios/lcars2 | Data/Torrent/MetaInfo.hs | bsd-3-clause | openBin :: IOMode -> Integer -> Integer -> FilePath -> IO Handle
openBin mode p l dir = do
h <- openBinaryFile (encodeString dir) mode
hSeek h AbsoluteSeek p
return h | 172 | openBin :: IOMode -> Integer -> Integer -> FilePath -> IO Handle
openBin mode p l dir = do
h <- openBinaryFile (encodeString dir) mode
hSeek h AbsoluteSeek p
return h | 172 | openBin mode p l dir = do
h <- openBinaryFile (encodeString dir) mode
hSeek h AbsoluteSeek p
return h | 107 | false | true | 0 | 11 | 36 | 80 | 34 | 46 | null | null |
BartAdv/hoogle | src/Input/Haddock.hs | bsd-3-clause | -- partial application, to share the initialisation cost
unGADT (GDataDecl a b c d e _ [] f) = DataDecl a b c d e [] f | 119 | unGADT (GDataDecl a b c d e _ [] f) = DataDecl a b c d e [] f | 61 | unGADT (GDataDecl a b c d e _ [] f) = DataDecl a b c d e [] f | 61 | true | false | 0 | 8 | 27 | 49 | 24 | 25 | null | null |
toZen/XMonad | xmonad.hs | gpl-3.0 | myBackgroundColor = "#fe8e38" | 33 | myBackgroundColor = "#fe8e38" | 33 | myBackgroundColor = "#fe8e38" | 33 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
xcv-/LCC | src/Main.hs | gpl-3.0 | printHelp :: IO ExitCode
printHelp = do
progName <- getProgName
mapM_ putStrLn
[ "Syntax: " ++ progName ++ " compile <target-language> <opts...>"
, "Available target languages:"
, "\tjava"
, ""
, "Help: " ++ progName ++ " help topic"
, "Available help topics:"
, "\tlc-... | 374 | printHelp :: IO ExitCode
printHelp = do
progName <- getProgName
mapM_ putStrLn
[ "Syntax: " ++ progName ++ " compile <target-language> <opts...>"
, "Available target languages:"
, "\tjava"
, ""
, "Help: " ++ progName ++ " help topic"
, "Available help topics:"
, "\tlc-... | 374 | printHelp = do
progName <- getProgName
mapM_ putStrLn
[ "Syntax: " ++ progName ++ " compile <target-language> <opts...>"
, "Available target languages:"
, "\tjava"
, ""
, "Help: " ++ progName ++ " help topic"
, "Available help topics:"
, "\tlc-lang"
, "\tjava"
... | 349 | false | true | 0 | 10 | 117 | 75 | 39 | 36 | null | null |
kolmodin/herl | Process.hs | apache-2.0 | exceptionAtom ExcThrown = AT.am_throw | 37 | exceptionAtom ExcThrown = AT.am_throw | 37 | exceptionAtom ExcThrown = AT.am_throw | 37 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | happyReduce_32 = happyReduce 5# 13# happyReduction_32 | 53 | happyReduce_32 = happyReduce 5# 13# happyReduction_32 | 53 | happyReduce_32 = happyReduce 5# 13# happyReduction_32 | 53 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
roberth/uu-helium | lib/simple/List.hs | gpl-3.0 | partition :: (a -> Bool) -> [a] -> ([a],[a])
partition p xs = foldr select ([],[]) xs
where select x (ts,fs) | p x = (x:ts,fs)
| otherwise = (ts,x:fs)
-- groupBy splits its list argument into a list of lists of equal, adjacent
-- elements. ... | 391 | partition :: (a -> Bool) -> [a] -> ([a],[a])
partition p xs = foldr select ([],[]) xs
where select x (ts,fs) | p x = (x:ts,fs)
| otherwise = (ts,x:fs)
-- groupBy splits its list argument into a list of lists of equal, adjacent
-- elements. ... | 391 | partition p xs = foldr select ([],[]) xs
where select x (ts,fs) | p x = (x:ts,fs)
| otherwise = (ts,x:fs)
-- groupBy splits its list argument into a list of lists of equal, adjacent
-- elements. e.g.,
-- groupBy "Mississippi" == ["M","i","ss","i","ss","... | 332 | false | true | 0 | 8 | 132 | 123 | 67 | 56 | null | null |
axman6/HLZ4 | src/Codec/Compression/HLZ4/Decode.hs | bsd-3-clause | getDestRemaining :: Decoder Int
getDestRemaining = getState >>= \st -> return (_dlen st - _doff st) | 99 | getDestRemaining :: Decoder Int
getDestRemaining = getState >>= \st -> return (_dlen st - _doff st) | 99 | getDestRemaining = getState >>= \st -> return (_dlen st - _doff st) | 67 | false | true | 0 | 10 | 15 | 39 | 19 | 20 | null | null |
jeffchao/hedgewars-accessible | gameServer/HWProtoLobbyState.hs | gpl-2.0 | handleCmd_lobby ["FOLLOW", asknick] = do
(_, rnc) <- ask
ci <- clientByNick asknick
let ri = clientRoom rnc $ fromJust ci
let clRoom = room rnc ri
if isNothing ci || ri == lobbyId then
return []
else
handleCmd_lobby ["JOIN_ROOM", name clRoom]
---------------------------
... | 351 | handleCmd_lobby ["FOLLOW", asknick] = do
(_, rnc) <- ask
ci <- clientByNick asknick
let ri = clientRoom rnc $ fromJust ci
let clRoom = room rnc ri
if isNothing ci || ri == lobbyId then
return []
else
handleCmd_lobby ["JOIN_ROOM", name clRoom]
---------------------------
... | 351 | handleCmd_lobby ["FOLLOW", asknick] = do
(_, rnc) <- ask
ci <- clientByNick asknick
let ri = clientRoom rnc $ fromJust ci
let clRoom = room rnc ri
if isNothing ci || ri == lobbyId then
return []
else
handleCmd_lobby ["JOIN_ROOM", name clRoom]
---------------------------
... | 351 | false | false | 0 | 11 | 99 | 112 | 54 | 58 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.