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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ekmett/ghc | compiler/typecheck/TcTypeNats.hs | bsd-3-clause | interactInertExp _ _ _ _ = [] | 29 | interactInertExp _ _ _ _ = [] | 29 | interactInertExp _ _ _ _ = [] | 29 | false | false | 1 | 6 | 6 | 17 | 7 | 10 | null | null |
sordina/GLM | src/GLM/Parser.hs | mit | entryItems :: T.T [EntryItem]
entryItems = P.sepEndBy item T.pTSemi | 67 | entryItems :: T.T [EntryItem]
entryItems = P.sepEndBy item T.pTSemi | 67 | entryItems = P.sepEndBy item T.pTSemi | 37 | false | true | 0 | 7 | 8 | 35 | 15 | 20 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2020/M06/D29/Exercise.hs | mit | {--
2. Given the current date, and the average steps walked so far, and, a new
piece of information, the number of steps walked today, compute the new yearly
step average (an int, please)
--}
averageSteps :: Day -> Int -> Int -> Int
averageSteps date ave stepsToday = undefined | 278 | averageSteps :: Day -> Int -> Int -> Int
averageSteps date ave stepsToday = undefined | 85 | averageSteps date ave stepsToday = undefined | 44 | true | true | 0 | 7 | 50 | 31 | 16 | 15 | null | null |
synsem/texhs | src/Text/TeX/Parser/Core.hs | gpl-3.0 | -------------------- Fundamental parsers
-- | Fundamental parser for 'Token' streams.
satisfy :: (Token -> Bool) -> TeXParser Token
satisfy p = tokenPrim show nextpos test
where
nextpos pos _ _ = updatePosToken pos
test t = if p t then Just t else Nothing
-- Increment column for each token, ignore line number. | 323 | satisfy :: (Token -> Bool) -> TeXParser Token
satisfy p = tokenPrim show nextpos test
where
nextpos pos _ _ = updatePosToken pos
test t = if p t then Just t else Nothing
-- Increment column for each token, ignore line number. | 236 | satisfy p = tokenPrim show nextpos test
where
nextpos pos _ _ = updatePosToken pos
test t = if p t then Just t else Nothing
-- Increment column for each token, ignore line number. | 190 | true | true | 0 | 7 | 64 | 78 | 39 | 39 | null | null |
brendanhay/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/Rollback.hs | mpl-2.0 | -- | OAuth access token.
pzcnprAccessToken :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
pzcnprAccessToken
= lens _pzcnprAccessToken
(\ s a -> s{_pzcnprAccessToken = a}) | 192 | pzcnprAccessToken :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
pzcnprAccessToken
= lens _pzcnprAccessToken
(\ s a -> s{_pzcnprAccessToken = a}) | 167 | pzcnprAccessToken
= lens _pzcnprAccessToken
(\ s a -> s{_pzcnprAccessToken = a}) | 88 | true | true | 1 | 9 | 29 | 52 | 25 | 27 | null | null |
matonix/pfds | app/Viz.hs | bsd-3-clause | constructGraphs :: DotView a => [a] -> Gr String String
constructGraphs = uncurry mkGraph . fst . foldl cons (([], []), [0..]) | 127 | constructGraphs :: DotView a => [a] -> Gr String String
constructGraphs = uncurry mkGraph . fst . foldl cons (([], []), [0..]) | 126 | constructGraphs = uncurry mkGraph . fst . foldl cons (([], []), [0..]) | 70 | false | true | 1 | 9 | 22 | 71 | 35 | 36 | null | null |
mariefarrell/Hets | Common/DefaultMorphism.hs | gpl-2.0 | compOfDefaultMorphism :: Monad m => DefaultMorphism sign
-> DefaultMorphism sign -> m (DefaultMorphism sign)
compOfDefaultMorphism (MkMorphism s1 _) (MkMorphism _ s3) =
return $ MkMorphism s1 s3 | 200 | compOfDefaultMorphism :: Monad m => DefaultMorphism sign
-> DefaultMorphism sign -> m (DefaultMorphism sign)
compOfDefaultMorphism (MkMorphism s1 _) (MkMorphism _ s3) =
return $ MkMorphism s1 s3 | 200 | compOfDefaultMorphism (MkMorphism s1 _) (MkMorphism _ s3) =
return $ MkMorphism s1 s3 | 89 | false | true | 0 | 11 | 32 | 72 | 33 | 39 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | withQStyleOptionFrameV2Result :: IO (Ptr (TQStyleOptionFrameV2 a)) -> IO (QStyleOptionFrameV2 a)
withQStyleOptionFrameV2Result f
= withObjectResult qtc_QStyleOptionFrameV2_getFinalizer f | 188 | withQStyleOptionFrameV2Result :: IO (Ptr (TQStyleOptionFrameV2 a)) -> IO (QStyleOptionFrameV2 a)
withQStyleOptionFrameV2Result f
= withObjectResult qtc_QStyleOptionFrameV2_getFinalizer f | 188 | withQStyleOptionFrameV2Result f
= withObjectResult qtc_QStyleOptionFrameV2_getFinalizer f | 91 | false | true | 0 | 10 | 17 | 47 | 22 | 25 | null | null |
Garygunn94/DFS | CommonResources/src/MongodbHelpers.hs | bsd-3-clause | mongoDbIp :: IO String
mongoDbIp = defEnv "MONGODB_IP" Prelude.id "127.0.0.1" True | 82 | mongoDbIp :: IO String
mongoDbIp = defEnv "MONGODB_IP" Prelude.id "127.0.0.1" True | 82 | mongoDbIp = defEnv "MONGODB_IP" Prelude.id "127.0.0.1" True | 59 | false | true | 0 | 6 | 10 | 31 | 13 | 18 | null | null |
hesselink/stack | src/Data/Attoparsec/Args.hs | bsd-3-clause | -- | A basic argument parser. It supports space-separated text, and
-- string quotation with identity escaping: \x -> x.
argsParser :: EscapingMode -> Parser Text [String]
argsParser mode = many (P.skipSpace *> (quoted <|> unquoted)) <*
P.skipSpace <* (P.endOfInput <?> "unterminated string")
where
unquoted = P.many1 naked
quoted = P.char '"' *> string <* P.char '"'
string = many (case mode of
Escaping -> escaped <|> nonquote
NoEscaping -> nonquote)
escaped = P.char '\\' *> P.anyChar
nonquote = P.satisfy (not . (=='"'))
naked = P.satisfy (not . flip elem ("\" " :: String)) | 664 | argsParser :: EscapingMode -> Parser Text [String]
argsParser mode = many (P.skipSpace *> (quoted <|> unquoted)) <*
P.skipSpace <* (P.endOfInput <?> "unterminated string")
where
unquoted = P.many1 naked
quoted = P.char '"' *> string <* P.char '"'
string = many (case mode of
Escaping -> escaped <|> nonquote
NoEscaping -> nonquote)
escaped = P.char '\\' *> P.anyChar
nonquote = P.satisfy (not . (=='"'))
naked = P.satisfy (not . flip elem ("\" " :: String)) | 543 | argsParser mode = many (P.skipSpace *> (quoted <|> unquoted)) <*
P.skipSpace <* (P.endOfInput <?> "unterminated string")
where
unquoted = P.many1 naked
quoted = P.char '"' *> string <* P.char '"'
string = many (case mode of
Escaping -> escaped <|> nonquote
NoEscaping -> nonquote)
escaped = P.char '\\' *> P.anyChar
nonquote = P.satisfy (not . (=='"'))
naked = P.satisfy (not . flip elem ("\" " :: String)) | 492 | true | true | 5 | 12 | 179 | 199 | 103 | 96 | null | null |
fabianbergmark/YQL | src/YQL/Rest.hs | bsd-2-clause | timeout :: Int -> Data.YQLM ()
timeout ms = do
Data.rest . Data.Rest.timeout ?= (ms * 1000) | 93 | timeout :: Int -> Data.YQLM ()
timeout ms = do
Data.rest . Data.Rest.timeout ?= (ms * 1000) | 93 | timeout ms = do
Data.rest . Data.Rest.timeout ?= (ms * 1000) | 62 | false | true | 0 | 10 | 18 | 53 | 25 | 28 | null | null |
bitraten/bitrest | src/Database.hs | agpl-3.0 | execute :: (P.ToRow q) => P.Query -> q -> IO Int64
execute = withPool P.execute | 79 | execute :: (P.ToRow q) => P.Query -> q -> IO Int64
execute = withPool P.execute | 79 | execute = withPool P.execute | 28 | false | true | 0 | 9 | 14 | 46 | 21 | 25 | null | null |
randen/cabal | cabal-install/Main.hs | bsd-3-clause | win32SelfUpgradeAction :: Win32SelfUpgradeFlags -> [String] -> Action
win32SelfUpgradeAction selfUpgradeFlags (pid:path:_extraArgs) _globalFlags = do
let verbosity = fromFlag (win32SelfUpgradeVerbosity selfUpgradeFlags)
Win32SelfUpgrade.deleteOldExeFile verbosity (read pid) path | 283 | win32SelfUpgradeAction :: Win32SelfUpgradeFlags -> [String] -> Action
win32SelfUpgradeAction selfUpgradeFlags (pid:path:_extraArgs) _globalFlags = do
let verbosity = fromFlag (win32SelfUpgradeVerbosity selfUpgradeFlags)
Win32SelfUpgrade.deleteOldExeFile verbosity (read pid) path | 283 | win32SelfUpgradeAction selfUpgradeFlags (pid:path:_extraArgs) _globalFlags = do
let verbosity = fromFlag (win32SelfUpgradeVerbosity selfUpgradeFlags)
Win32SelfUpgrade.deleteOldExeFile verbosity (read pid) path | 213 | false | true | 0 | 13 | 27 | 81 | 38 | 43 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Objects.hs | bsd-2-clause | mkIp4Address :: (Word8, Word8, Word8, Word8) -> Ip4Address
mkIp4Address (a, b, c, d) = Ip4Address a b c d | 105 | mkIp4Address :: (Word8, Word8, Word8, Word8) -> Ip4Address
mkIp4Address (a, b, c, d) = Ip4Address a b c d | 105 | mkIp4Address (a, b, c, d) = Ip4Address a b c d | 46 | false | true | 0 | 6 | 18 | 51 | 29 | 22 | null | null |
alcidesv/ReH | hs-src/Rede/SpdyProtocol/Session.hs | bsd-3-clause | createStreamWindowInfo :: Int -> SessionM IO (Int, WaitList)
createStreamWindowInfo stream_id = do
if odd stream_id
then do
initial_size_ioref <- asks initialWindowSize
sz <- liftIO $ readMVar initial_size_ioref
return (sz, D.empty)
else do
-- Working around bug on Firefox
return (10000000, D.empty) | 379 | createStreamWindowInfo :: Int -> SessionM IO (Int, WaitList)
createStreamWindowInfo stream_id = do
if odd stream_id
then do
initial_size_ioref <- asks initialWindowSize
sz <- liftIO $ readMVar initial_size_ioref
return (sz, D.empty)
else do
-- Working around bug on Firefox
return (10000000, D.empty) | 379 | createStreamWindowInfo stream_id = do
if odd stream_id
then do
initial_size_ioref <- asks initialWindowSize
sz <- liftIO $ readMVar initial_size_ioref
return (sz, D.empty)
else do
-- Working around bug on Firefox
return (10000000, D.empty) | 317 | false | true | 0 | 12 | 119 | 96 | 47 | 49 | null | null |
tumarkin/vandelay | src/Vandelay/DSL/Core/IO.hs | bsd-3-clause | safeGetHandle ∷ (MonadError ErrorMsg m, MonadIO m) ⇒ Maybe FilePath → m Handle
safeGetHandle Nothing = return stdout | 117 | safeGetHandle ∷ (MonadError ErrorMsg m, MonadIO m) ⇒ Maybe FilePath → m Handle
safeGetHandle Nothing = return stdout | 117 | safeGetHandle Nothing = return stdout | 37 | false | true | 0 | 7 | 18 | 44 | 21 | 23 | null | null |
kapilash/dc | src/sudokus/hs/ExactCover/src/ExactCover.hs | bsd-3-clause | chooseCol :: EC -> Maybe (Int,[Int])
chooseCol e@(EC vec rows cols _) =
case foldl (colFindFold e) (-1, maxBound) cols of
(-1,_) -> Nothing
(x, 0) -> Nothing
(x, count) -> Just $ (x, colTrueRows e x) | 217 | chooseCol :: EC -> Maybe (Int,[Int])
chooseCol e@(EC vec rows cols _) =
case foldl (colFindFold e) (-1, maxBound) cols of
(-1,_) -> Nothing
(x, 0) -> Nothing
(x, count) -> Just $ (x, colTrueRows e x) | 217 | chooseCol e@(EC vec rows cols _) =
case foldl (colFindFold e) (-1, maxBound) cols of
(-1,_) -> Nothing
(x, 0) -> Nothing
(x, count) -> Just $ (x, colTrueRows e x) | 180 | false | true | 0 | 10 | 54 | 123 | 67 | 56 | null | null |
spacekitteh/smcghc | compiler/codeGen/StgCmmUtils.hs | bsd-3-clause | assignTemp :: CmmExpr -> FCode LocalReg
-- Make sure the argument is in a local register.
-- We don't bother being particularly aggressive with avoiding
-- unnecessary local registers, since we can rely on a later
-- optimization pass to inline as necessary (and skipping out
-- on things like global registers can be a little dangerous
-- due to them being trashed on foreign calls--though it means
-- the optimization pass doesn't have to do as much work)
assignTemp (CmmReg (CmmLocal reg)) = return reg | 505 | assignTemp :: CmmExpr -> FCode LocalReg
assignTemp (CmmReg (CmmLocal reg)) = return reg | 87 | assignTemp (CmmReg (CmmLocal reg)) = return reg | 47 | true | true | 0 | 11 | 85 | 47 | 25 | 22 | null | null |
pminten/xhaskell | simple-cipher/example.hs | mit | caesar :: (Int -> Int -> Int) -> String -> String -> String
caesar op = zipWith rotate . cycle
where
rotate k x = if isAlpha k && isAlpha x
then toAlpha (op (fromAlpha x) (fromAlpha k) `mod` 26)
else x
fromAlpha = subtract (fromEnum 'a') . fromEnum
toAlpha = toEnum . (fromEnum 'a' +)
isAlpha x = x >= 'a' && x <= 'z' | 367 | caesar :: (Int -> Int -> Int) -> String -> String -> String
caesar op = zipWith rotate . cycle
where
rotate k x = if isAlpha k && isAlpha x
then toAlpha (op (fromAlpha x) (fromAlpha k) `mod` 26)
else x
fromAlpha = subtract (fromEnum 'a') . fromEnum
toAlpha = toEnum . (fromEnum 'a' +)
isAlpha x = x >= 'a' && x <= 'z' | 367 | caesar op = zipWith rotate . cycle
where
rotate k x = if isAlpha k && isAlpha x
then toAlpha (op (fromAlpha x) (fromAlpha k) `mod` 26)
else x
fromAlpha = subtract (fromEnum 'a') . fromEnum
toAlpha = toEnum . (fromEnum 'a' +)
isAlpha x = x >= 'a' && x <= 'z' | 307 | false | true | 3 | 13 | 115 | 161 | 80 | 81 | null | null |
EarthCitizen/baskell | test/Gen.hs | bsd-3-clause | showValue (FloatingValue d) = show d | 37 | showValue (FloatingValue d) = show d | 37 | showValue (FloatingValue d) = show d | 37 | false | false | 0 | 7 | 6 | 18 | 8 | 10 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFGraphTest.hs | lgpl-2.1 | testGraphFormula02a = testFormulaLookup "02a" f2 s1 Nothing | 59 | testGraphFormula02a = testFormulaLookup "02a" f2 s1 Nothing | 59 | testGraphFormula02a = testFormulaLookup "02a" f2 s1 Nothing | 59 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
23Skidoo/ghc-parmake | src/GHC/ParMake/Util.hs | bsd-3-clause | -- | Wraps a list of words to a list of lines of words of a particular width.
wrapLine :: Int -> [String] -> [[String]]
wrapLine width = wrap 0 []
where wrap :: Int -> [String] -> [String] -> [[String]]
wrap 0 [] (w:ws)
| length w + 1 > width
= wrap (length w) [w] ws
wrap col line (w:ws)
| col + length w + 1 > width
= reverse line : wrap 0 [] (w:ws)
wrap col line (w:ws)
= let col' = col + length w + 1
in wrap col' (w:line) ws
wrap _ [] [] = []
wrap _ line [] = [reverse line] | 590 | wrapLine :: Int -> [String] -> [[String]]
wrapLine width = wrap 0 []
where wrap :: Int -> [String] -> [String] -> [[String]]
wrap 0 [] (w:ws)
| length w + 1 > width
= wrap (length w) [w] ws
wrap col line (w:ws)
| col + length w + 1 > width
= reverse line : wrap 0 [] (w:ws)
wrap col line (w:ws)
= let col' = col + length w + 1
in wrap col' (w:line) ws
wrap _ [] [] = []
wrap _ line [] = [reverse line] | 512 | wrapLine width = wrap 0 []
where wrap :: Int -> [String] -> [String] -> [[String]]
wrap 0 [] (w:ws)
| length w + 1 > width
= wrap (length w) [w] ws
wrap col line (w:ws)
| col + length w + 1 > width
= reverse line : wrap 0 [] (w:ws)
wrap col line (w:ws)
= let col' = col + length w + 1
in wrap col' (w:line) ws
wrap _ [] [] = []
wrap _ line [] = [reverse line] | 470 | true | true | 7 | 14 | 221 | 280 | 141 | 139 | null | null |
nakamuray/htig | HTIG/StatusHook.hs | bsd-3-clause | doT :: (String -> String) -> StatusHook
doT f = doF' $ \st -> st { stText = f $ stText st } | 91 | doT :: (String -> String) -> StatusHook
doT f = doF' $ \st -> st { stText = f $ stText st } | 91 | doT f = doF' $ \st -> st { stText = f $ stText st } | 51 | false | true | 0 | 10 | 22 | 49 | 26 | 23 | null | null |
brendanhay/gogol | gogol-chat/gen/Network/Google/Chat/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ActionResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'arURL'
--
-- * 'arType'
--
-- * 'arDialogAction'
actionResponse
:: ActionResponse
actionResponse =
ActionResponse'
{_arURL = Nothing, _arType = Nothing, _arDialogAction = Nothing} | 364 | actionResponse
:: ActionResponse
actionResponse =
ActionResponse'
{_arURL = Nothing, _arType = Nothing, _arDialogAction = Nothing} | 140 | actionResponse =
ActionResponse'
{_arURL = Nothing, _arType = Nothing, _arDialogAction = Nothing} | 103 | true | true | 0 | 7 | 66 | 50 | 30 | 20 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x00CD' = "\x0049\x0301" | 39 | decomposeChar '\x00CD' = "\x0049\x0301" | 39 | decomposeChar '\x00CD' = "\x0049\x0301" | 39 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
raventid/coursera_learning | haskell/stepik/4.2numbers_as_bits.hs | mit | intToBit 0 = Zero | 17 | intToBit 0 = Zero | 17 | intToBit 0 = Zero | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
rgleichman/glance | test/VisualTranslateTests.hs | gpl-3.0 | -- | nestedTests / collapseTest
nestedTests :: [String]
nestedTests = [
"y = (\\x -> x) 0",
"y = f (\\x -> x)",
"y = f x",
"y = let x = 1 in f (g x)",
"y = f []",
"y = f [1]",
"y = f [1,2]",
"y = f [g 3, h 5]",
"y = f $ g (\\x -> x)",
"y = f y",
"y = f (g y)",
"y = f1 (f2 ( f3 (f4 2))) 1", -- test compose embedded in apply
"y = f0 $ f1 $ f2 z (f4 $ f5 q) $ x", -- compose embedded in compose
"fibs = cons 1 (zipWith (+) fibs (tail fibs))",
"y = foo (3 + bazOf2) bazOf2 where bazOf2 = baz 2",
"y = foo (3 + bazOf2) (8 * bazOf2) where bazOf2 = baz 2",
"Foo x = 1",
"Foo 1 x = 2",
"Foo (Bar x) = 1",
"Foo (Bar (Baz x)) = 1",
"Foo (Bar (Baz (Foot x))) = 1",
"Foo (Bar x) (Baz y) = 1",
"Foo (Bar x) = f 2",
"Foo (Bar x) = f x",
"y x = case x of {Just w -> (let (z,_) = w in z)}",
"y = case x of 1 -> f 0",
"y (Port x) = case x of 0 -> 1",
"y (x@(Foo y)) = if 0 then x else 1"
] | 932 | nestedTests :: [String]
nestedTests = [
"y = (\\x -> x) 0",
"y = f (\\x -> x)",
"y = f x",
"y = let x = 1 in f (g x)",
"y = f []",
"y = f [1]",
"y = f [1,2]",
"y = f [g 3, h 5]",
"y = f $ g (\\x -> x)",
"y = f y",
"y = f (g y)",
"y = f1 (f2 ( f3 (f4 2))) 1", -- test compose embedded in apply
"y = f0 $ f1 $ f2 z (f4 $ f5 q) $ x", -- compose embedded in compose
"fibs = cons 1 (zipWith (+) fibs (tail fibs))",
"y = foo (3 + bazOf2) bazOf2 where bazOf2 = baz 2",
"y = foo (3 + bazOf2) (8 * bazOf2) where bazOf2 = baz 2",
"Foo x = 1",
"Foo 1 x = 2",
"Foo (Bar x) = 1",
"Foo (Bar (Baz x)) = 1",
"Foo (Bar (Baz (Foot x))) = 1",
"Foo (Bar x) (Baz y) = 1",
"Foo (Bar x) = f 2",
"Foo (Bar x) = f x",
"y x = case x of {Just w -> (let (z,_) = w in z)}",
"y = case x of 1 -> f 0",
"y (Port x) = case x of 0 -> 1",
"y (x@(Foo y)) = if 0 then x else 1"
] | 900 | nestedTests = [
"y = (\\x -> x) 0",
"y = f (\\x -> x)",
"y = f x",
"y = let x = 1 in f (g x)",
"y = f []",
"y = f [1]",
"y = f [1,2]",
"y = f [g 3, h 5]",
"y = f $ g (\\x -> x)",
"y = f y",
"y = f (g y)",
"y = f1 (f2 ( f3 (f4 2))) 1", -- test compose embedded in apply
"y = f0 $ f1 $ f2 z (f4 $ f5 q) $ x", -- compose embedded in compose
"fibs = cons 1 (zipWith (+) fibs (tail fibs))",
"y = foo (3 + bazOf2) bazOf2 where bazOf2 = baz 2",
"y = foo (3 + bazOf2) (8 * bazOf2) where bazOf2 = baz 2",
"Foo x = 1",
"Foo 1 x = 2",
"Foo (Bar x) = 1",
"Foo (Bar (Baz x)) = 1",
"Foo (Bar (Baz (Foot x))) = 1",
"Foo (Bar x) (Baz y) = 1",
"Foo (Bar x) = f 2",
"Foo (Bar x) = f x",
"y x = case x of {Just w -> (let (z,_) = w in z)}",
"y = case x of 1 -> f 0",
"y (Port x) = case x of 0 -> 1",
"y (x@(Foo y)) = if 0 then x else 1"
] | 876 | true | true | 0 | 5 | 290 | 101 | 67 | 34 | null | null |
alfpark/bond | compiler/src/Language/Bond/Codegen/TypeMapping.hs | mit | csType (BT_UserDefined decl args) = declTypeName decl <<>> (angles <$> localWith (const csTypeMapping) (commaSepTypeNames args)) | 128 | csType (BT_UserDefined decl args) = declTypeName decl <<>> (angles <$> localWith (const csTypeMapping) (commaSepTypeNames args)) | 128 | csType (BT_UserDefined decl args) = declTypeName decl <<>> (angles <$> localWith (const csTypeMapping) (commaSepTypeNames args)) | 128 | false | false | 0 | 10 | 14 | 48 | 23 | 25 | null | null |
kim/amazonka | amazonka-elb/gen/Network/AWS/ELB/DescribeTags.hs | mpl-2.0 | -- | A list of tag description structures.
dtrTagDescriptions :: Lens' DescribeTagsResponse [TagDescription]
dtrTagDescriptions =
lens _dtrTagDescriptions (\s a -> s { _dtrTagDescriptions = a })
. _List | 214 | dtrTagDescriptions :: Lens' DescribeTagsResponse [TagDescription]
dtrTagDescriptions =
lens _dtrTagDescriptions (\s a -> s { _dtrTagDescriptions = a })
. _List | 171 | dtrTagDescriptions =
lens _dtrTagDescriptions (\s a -> s { _dtrTagDescriptions = a })
. _List | 105 | true | true | 2 | 9 | 39 | 53 | 26 | 27 | null | null |
mattias-lundell/timber-llvm | src/Scp.hs | bsd-3-clause | peel _ _ _ = False | 18 | peel _ _ _ = False | 18 | peel _ _ _ = False | 18 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Dimension value for the ID of the directory site. This is a read-only,
-- auto-generated field.
plalDirectorySiteIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalDirectorySiteIdDimensionValue
= lens _plalDirectorySiteIdDimensionValue
(\ s a -> s{_plalDirectorySiteIdDimensionValue = a}) | 318 | plalDirectorySiteIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalDirectorySiteIdDimensionValue
= lens _plalDirectorySiteIdDimensionValue
(\ s a -> s{_plalDirectorySiteIdDimensionValue = a}) | 217 | plalDirectorySiteIdDimensionValue
= lens _plalDirectorySiteIdDimensionValue
(\ s a -> s{_plalDirectorySiteIdDimensionValue = a}) | 136 | true | true | 0 | 9 | 42 | 47 | 26 | 21 | null | null |
limaner2002/EPC-tools | USACScripts/src/Scripts/Opts.hs | bsd-3-clause | initialReviewParser :: Parser (IO ())
initialReviewParser = fmap void $ runInitialReview
<$> reviewBaseConfParser
<*> boundsParser
<*> hostUrlParser
<*> logModeParser
<*> csvConfParser
<*> rampupParser
<*> nthreadParser | 233 | initialReviewParser :: Parser (IO ())
initialReviewParser = fmap void $ runInitialReview
<$> reviewBaseConfParser
<*> boundsParser
<*> hostUrlParser
<*> logModeParser
<*> csvConfParser
<*> rampupParser
<*> nthreadParser | 233 | initialReviewParser = fmap void $ runInitialReview
<$> reviewBaseConfParser
<*> boundsParser
<*> hostUrlParser
<*> logModeParser
<*> csvConfParser
<*> rampupParser
<*> nthreadParser | 195 | false | true | 20 | 8 | 38 | 77 | 40 | 37 | null | null |
romanb/amazonka | amazonka-cloudsearch-domains/gen/Network/AWS/CloudSearchDomains/Types.hs | mpl-2.0 | -- | The description for a warning returned by the document service.
dswMessage :: Lens' DocumentServiceWarning (Maybe Text)
dswMessage = lens _dswMessage (\s a -> s { _dswMessage = a }) | 186 | dswMessage :: Lens' DocumentServiceWarning (Maybe Text)
dswMessage = lens _dswMessage (\s a -> s { _dswMessage = a }) | 117 | dswMessage = lens _dswMessage (\s a -> s { _dswMessage = a }) | 61 | true | true | 0 | 9 | 30 | 46 | 25 | 21 | null | null |
spechub/Hets | CASL/Freeness.hs | gpl-2.0 | homomorphy_form (Predication ps ts r) = Predication ps ts' r
where ts' = map homomorphy_term ts | 100 | homomorphy_form (Predication ps ts r) = Predication ps ts' r
where ts' = map homomorphy_term ts | 100 | homomorphy_form (Predication ps ts r) = Predication ps ts' r
where ts' = map homomorphy_term ts | 100 | false | false | 0 | 7 | 20 | 38 | 18 | 20 | null | null |
anammari/pandoc | src/Text/Pandoc/Readers/RST.hs | gpl-2.0 | escapedChar :: GenParser Char st Inline
escapedChar = escaped anyChar | 69 | escapedChar :: GenParser Char st Inline
escapedChar = escaped anyChar | 69 | escapedChar = escaped anyChar | 29 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
aktowns/pdfkiths | examples/testswizzle.hs | mit | swizzleDescription :: SwizzleVoid
swizzleDescription _ _ = do
putStrLn "No soup for you" | 90 | swizzleDescription :: SwizzleVoid
swizzleDescription _ _ = do
putStrLn "No soup for you" | 90 | swizzleDescription _ _ = do
putStrLn "No soup for you" | 56 | false | true | 0 | 8 | 14 | 28 | 11 | 17 | null | null |
dat2/haskell-scheme | src/Main.hs | mit | repl :: IO ()
repl = runInputT defaultSettings $ liftIO nativeBindings >>= loop
where
loop env = do
result <- getInputLine "lisp> "
case result of
Nothing -> return ()
Just "quit" -> return ()
Just s -> liftIO (interpret env s) >>= outputStrLn >> loop env | 297 | repl :: IO ()
repl = runInputT defaultSettings $ liftIO nativeBindings >>= loop
where
loop env = do
result <- getInputLine "lisp> "
case result of
Nothing -> return ()
Just "quit" -> return ()
Just s -> liftIO (interpret env s) >>= outputStrLn >> loop env | 297 | repl = runInputT defaultSettings $ liftIO nativeBindings >>= loop
where
loop env = do
result <- getInputLine "lisp> "
case result of
Nothing -> return ()
Just "quit" -> return ()
Just s -> liftIO (interpret env s) >>= outputStrLn >> loop env | 283 | false | true | 1 | 15 | 88 | 123 | 52 | 71 | null | null |
zenhack/haskell-capnp | cmd/capnpc-haskell/Trans/PureToHaskell.hs | mit | firstClassInstances :: Word64 -> P.Data -> [Decl]
firstClassInstances _thisMod P.Data{ typeName, typeParams } =
let typ = typeWithParams typeName typeParams
ctx = typeParamsCerializeCtx typeParams
in
[ instance_ ctx ["Classes"] "Cerialize" [tuName "s", typ] []
, instance_ ctx ["Classes"] "Cerialize" [tuName "s", TApp (tgName ["V"] "Vector") [typ]]
[ iValue "cerialize" [] (egName ["GenHelpersPure"] "cerializeCompositeVec")
]
] ++
-- Generate instances of Cerialize s (Vector (Vector ... t)) up to some reasonable
-- nesting level. I(zenhack) can't figure out how to get a general case
-- Cerialize s (Vector a) => Cerialize s (Vector (Vector a)) to type check, so this
-- will have to do for now.
[ instance_ ctx ["Classes"] "Cerialize" [tuName "s", t]
[ iValue "cerialize" [] (egName ["GenHelpersPure"] "cerializeBasicVec")
]
| t <- take 6 $ drop 2 $ iterate
(\t -> TApp (tgName ["V"] "Vector") [t])
typ
] | 1,021 | firstClassInstances :: Word64 -> P.Data -> [Decl]
firstClassInstances _thisMod P.Data{ typeName, typeParams } =
let typ = typeWithParams typeName typeParams
ctx = typeParamsCerializeCtx typeParams
in
[ instance_ ctx ["Classes"] "Cerialize" [tuName "s", typ] []
, instance_ ctx ["Classes"] "Cerialize" [tuName "s", TApp (tgName ["V"] "Vector") [typ]]
[ iValue "cerialize" [] (egName ["GenHelpersPure"] "cerializeCompositeVec")
]
] ++
-- Generate instances of Cerialize s (Vector (Vector ... t)) up to some reasonable
-- nesting level. I(zenhack) can't figure out how to get a general case
-- Cerialize s (Vector a) => Cerialize s (Vector (Vector a)) to type check, so this
-- will have to do for now.
[ instance_ ctx ["Classes"] "Cerialize" [tuName "s", t]
[ iValue "cerialize" [] (egName ["GenHelpersPure"] "cerializeBasicVec")
]
| t <- take 6 $ drop 2 $ iterate
(\t -> TApp (tgName ["V"] "Vector") [t])
typ
] | 1,021 | firstClassInstances _thisMod P.Data{ typeName, typeParams } =
let typ = typeWithParams typeName typeParams
ctx = typeParamsCerializeCtx typeParams
in
[ instance_ ctx ["Classes"] "Cerialize" [tuName "s", typ] []
, instance_ ctx ["Classes"] "Cerialize" [tuName "s", TApp (tgName ["V"] "Vector") [typ]]
[ iValue "cerialize" [] (egName ["GenHelpersPure"] "cerializeCompositeVec")
]
] ++
-- Generate instances of Cerialize s (Vector (Vector ... t)) up to some reasonable
-- nesting level. I(zenhack) can't figure out how to get a general case
-- Cerialize s (Vector a) => Cerialize s (Vector (Vector a)) to type check, so this
-- will have to do for now.
[ instance_ ctx ["Classes"] "Cerialize" [tuName "s", t]
[ iValue "cerialize" [] (egName ["GenHelpersPure"] "cerializeBasicVec")
]
| t <- take 6 $ drop 2 $ iterate
(\t -> TApp (tgName ["V"] "Vector") [t])
typ
] | 971 | false | true | 2 | 16 | 252 | 277 | 143 | 134 | null | null |
zerobuzz/anchor-token-server | lib/Anchor/Tokens/Server/Store.hs | bsd-3-clause | displayToken
:: ( MonadIO m
, MonadBaseControl IO m
, MonadReader (Pool Connection) m
)
=> UserID
-> TokenID
-> m (Maybe (Maybe ClientID, Scope, Token, TokenID))
displayToken user_id token_id = do
pool <- ask
withResource pool $ \conn -> do
liftIO . debugM logName $ "Retrieving token with id " <> show token_id <> " for user " <> show user_id
tokens <- liftIO $ query conn "SELECT client_id, scope, token, token_id FROM tokens WHERE (token_id = ?) AND (user_id = ?) AND revoked is NULL" (token_id, user_id)
case tokens of
[] -> return Nothing
[x] -> return $ Just x
xs -> let msg = "Should only be able to retrieve at most one token, retrieved: " <> show xs
in liftIO (errorM logName msg) >> fail msg | 827 | displayToken
:: ( MonadIO m
, MonadBaseControl IO m
, MonadReader (Pool Connection) m
)
=> UserID
-> TokenID
-> m (Maybe (Maybe ClientID, Scope, Token, TokenID))
displayToken user_id token_id = do
pool <- ask
withResource pool $ \conn -> do
liftIO . debugM logName $ "Retrieving token with id " <> show token_id <> " for user " <> show user_id
tokens <- liftIO $ query conn "SELECT client_id, scope, token, token_id FROM tokens WHERE (token_id = ?) AND (user_id = ?) AND revoked is NULL" (token_id, user_id)
case tokens of
[] -> return Nothing
[x] -> return $ Just x
xs -> let msg = "Should only be able to retrieve at most one token, retrieved: " <> show xs
in liftIO (errorM logName msg) >> fail msg | 827 | displayToken user_id token_id = do
pool <- ask
withResource pool $ \conn -> do
liftIO . debugM logName $ "Retrieving token with id " <> show token_id <> " for user " <> show user_id
tokens <- liftIO $ query conn "SELECT client_id, scope, token, token_id FROM tokens WHERE (token_id = ?) AND (user_id = ?) AND revoked is NULL" (token_id, user_id)
case tokens of
[] -> return Nothing
[x] -> return $ Just x
xs -> let msg = "Should only be able to retrieve at most one token, retrieved: " <> show xs
in liftIO (errorM logName msg) >> fail msg | 628 | false | true | 0 | 20 | 255 | 238 | 113 | 125 | null | null |
jepugs/emul8 | src/Emul8/Font.hs | apache-2.0 | char4 = [ 0x90
, 0x90
, 0xf0
, 0x10
, 0x10
] | 84 | char4 = [ 0x90
, 0x90
, 0xf0
, 0x10
, 0x10
] | 84 | char4 = [ 0x90
, 0x90
, 0xf0
, 0x10
, 0x10
] | 84 | false | false | 0 | 5 | 52 | 21 | 13 | 8 | null | null |
keithshep/txt-sushi | Database/TxtSushi/FlatFile.hs | bsd-3-clause | {- |
Format the given table (the 2D String array) into a flat-file string using
the given 'Format'
-}
formatTable :: Format -> [[String]] -> String
formatTable _ [] = "" | 169 | formatTable :: Format -> [[String]] -> String
formatTable _ [] = "" | 67 | formatTable _ [] = "" | 21 | true | true | 0 | 9 | 30 | 39 | 19 | 20 | null | null |
amulcahy/LambdaMC | src/LambdaMC.hs | mit | onResume :: JNIEnv -> JObject -> IO ()
onResume env activity = runJNI env $ do
logd "onResume"
readTextState activity "outputText" defOutputText >>= setOutputText activity
readTextState activity "rate" defRate >>= setRate activity
readTextState activity "volatility" defVolatility >>= setVolatility activity
optxt <- readTextState activity "optionParams" defOptionParams
setOptionParams activity (read $ unpack optxt)
mctxt <- readTextState activity "mcSim" defmcSim
setMCSim activity (read $ unpack mctxt) | 523 | onResume :: JNIEnv -> JObject -> IO ()
onResume env activity = runJNI env $ do
logd "onResume"
readTextState activity "outputText" defOutputText >>= setOutputText activity
readTextState activity "rate" defRate >>= setRate activity
readTextState activity "volatility" defVolatility >>= setVolatility activity
optxt <- readTextState activity "optionParams" defOptionParams
setOptionParams activity (read $ unpack optxt)
mctxt <- readTextState activity "mcSim" defmcSim
setMCSim activity (read $ unpack mctxt) | 523 | onResume env activity = runJNI env $ do
logd "onResume"
readTextState activity "outputText" defOutputText >>= setOutputText activity
readTextState activity "rate" defRate >>= setRate activity
readTextState activity "volatility" defVolatility >>= setVolatility activity
optxt <- readTextState activity "optionParams" defOptionParams
setOptionParams activity (read $ unpack optxt)
mctxt <- readTextState activity "mcSim" defmcSim
setMCSim activity (read $ unpack mctxt) | 484 | false | true | 0 | 12 | 79 | 162 | 69 | 93 | null | null |
mlen/life | Life/Board.hs | bsd-2-clause | board :: Int -> Int -> (Int -> Int -> a) -> FocusedBoard a
board w h f = runIdentity $ boardM w h ((Identity .) . f) | 116 | board :: Int -> Int -> (Int -> Int -> a) -> FocusedBoard a
board w h f = runIdentity $ boardM w h ((Identity .) . f) | 116 | board w h f = runIdentity $ boardM w h ((Identity .) . f) | 57 | false | true | 0 | 11 | 27 | 70 | 35 | 35 | null | null |
mettekou/ghc | compiler/utils/Bag.hs | bsd-3-clause | mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m ()
mapBagM_ _ EmptyBag = return () | 89 | mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m ()
mapBagM_ _ EmptyBag = return () | 89 | mapBagM_ _ EmptyBag = return () | 38 | false | true | 0 | 9 | 27 | 54 | 25 | 29 | null | null |
mettekou/ghc | compiler/coreSyn/CoreUnfold.hs | bsd-3-clause | nonTriv :: ArgSummary -> Bool
nonTriv TrivArg = False | 54 | nonTriv :: ArgSummary -> Bool
nonTriv TrivArg = False | 54 | nonTriv TrivArg = False | 23 | false | true | 0 | 5 | 9 | 22 | 10 | 12 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M02/D09/Exercise.hs | mit | {--
What is the value of fibo really?
That's a problem, isn't it, because fibo is in exponential time if defined
doubly-recursively. But here's the thing: if you know F(n) you already know
F(n-1) ... so why recompute that subtree when you've already just computed it
So, use that knowledge. Retain it. Define a fibonacci function that returns
the fibonacci at n in linear time by retaining the previous [0..n-1] fibonacci
numbers. This is what we call dynamic programming.
--}
fibr :: [Integer] -> Integer -> Integer
fibr fibs n = undefined | 544 | fibr :: [Integer] -> Integer -> Integer
fibr fibs n = undefined | 63 | fibr fibs n = undefined | 23 | true | true | 0 | 8 | 95 | 34 | 16 | 18 | null | null |
urbanslug/ghc | testsuite/tests/simplCore/should_compile/T3831.hs | bsd-3-clause | invisibleOn :: TermStr s => Capability s
invisibleOn = tiGetOutput1 "invis" | 75 | invisibleOn :: TermStr s => Capability s
invisibleOn = tiGetOutput1 "invis" | 75 | invisibleOn = tiGetOutput1 "invis" | 34 | false | true | 0 | 7 | 10 | 30 | 12 | 18 | null | null |
alexander-at-github/eta | compiler/ETA/Core/CoreArity.hs | bsd-3-clause | manifestArity _ = 0 | 43 | manifestArity _ = 0 | 43 | manifestArity _ = 0 | 43 | false | false | 0 | 5 | 27 | 9 | 4 | 5 | null | null |
isovector/iwmag | src/Objects/WinStar.hs | bsd-3-clause | moveItOrLoseIt :: Handler ()
moveItOrLoseIt = do
(cloneLens -> ctxSelf) <- getSelfRef
goto <- use $ ctxSelf . internal . dest
tell . Endo $ setLevel goto | 159 | moveItOrLoseIt :: Handler ()
moveItOrLoseIt = do
(cloneLens -> ctxSelf) <- getSelfRef
goto <- use $ ctxSelf . internal . dest
tell . Endo $ setLevel goto | 159 | moveItOrLoseIt = do
(cloneLens -> ctxSelf) <- getSelfRef
goto <- use $ ctxSelf . internal . dest
tell . Endo $ setLevel goto | 130 | false | true | 0 | 10 | 32 | 63 | 30 | 33 | null | null |
olsner/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprInstr (MOVZxL II32 src dst) = pprFormatOpOp (sLit "mov") II32 src dst | 72 | pprInstr (MOVZxL II32 src dst) = pprFormatOpOp (sLit "mov") II32 src dst | 72 | pprInstr (MOVZxL II32 src dst) = pprFormatOpOp (sLit "mov") II32 src dst | 72 | false | false | 0 | 7 | 11 | 34 | 16 | 18 | null | null |
Mathnerd314/lamdu | test/Utils.hs | gpl-3.0 | bodyHole :: Expr.Body def expr
bodyHole = ExprLens.bodyHole # () | 64 | bodyHole :: Expr.Body def expr
bodyHole = ExprLens.bodyHole # () | 64 | bodyHole = ExprLens.bodyHole # () | 33 | false | true | 2 | 7 | 9 | 33 | 14 | 19 | null | null |
takagi/SimulationDSL | SimulationDSL/SimulationDSL/Language/Equations.hs | bsd-3-clause | equation :: Equations -> String -> Equation
equation (Equations eqs _) symbol
= case M.lookup symbol eqs of
Just x -> x
Nothing -> error "equation: symbol not found" | 180 | equation :: Equations -> String -> Equation
equation (Equations eqs _) symbol
= case M.lookup symbol eqs of
Just x -> x
Nothing -> error "equation: symbol not found" | 180 | equation (Equations eqs _) symbol
= case M.lookup symbol eqs of
Just x -> x
Nothing -> error "equation: symbol not found" | 136 | false | true | 0 | 8 | 43 | 61 | 29 | 32 | null | null |
HIPERFIT/futhark | src/Futhark/Doc/Generator.hs | isc | brackets :: Html -> Html
brackets x = "[" <> x <> "]" | 53 | brackets :: Html -> Html
brackets x = "[" <> x <> "]" | 53 | brackets x = "[" <> x <> "]" | 28 | false | true | 4 | 7 | 12 | 34 | 14 | 20 | null | null |
rgrinberg/wai | wai-app-static/WaiAppStatic/Storage/Filesystem.hs | mit | -- | Convenience wrapper for @fileHelper@.
fileHelperLR :: ETagLookup
-> FilePath -- ^ file location
-> Piece -- ^ file name
-> IO LookupResult
fileHelperLR a b c = fmap (maybe LRNotFound LRFile) $ fileHelper a b c | 253 | fileHelperLR :: ETagLookup
-> FilePath -- ^ file location
-> Piece -- ^ file name
-> IO LookupResult
fileHelperLR a b c = fmap (maybe LRNotFound LRFile) $ fileHelper a b c | 210 | fileHelperLR a b c = fmap (maybe LRNotFound LRFile) $ fileHelper a b c | 70 | true | true | 0 | 8 | 76 | 58 | 29 | 29 | null | null |
sdiehl/ghc | compiler/GHC/Runtime/Layout.hs | bsd-3-clause | fromStgWord :: StgWord -> Integer
fromStgWord (StgWord i) = toInteger i | 71 | fromStgWord :: StgWord -> Integer
fromStgWord (StgWord i) = toInteger i | 71 | fromStgWord (StgWord i) = toInteger i | 37 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
ilseman2/yaml-light | Data/Yaml/YamlLight.hs | bsd-3-clause | -- | Get the contents of a map
unMap :: YamlLight -> Maybe (Map.Map YamlLight YamlLight)
unMap (YMap m) = Just m | 116 | unMap :: YamlLight -> Maybe (Map.Map YamlLight YamlLight)
unMap (YMap m) = Just m | 81 | unMap (YMap m) = Just m | 23 | true | true | 0 | 9 | 25 | 45 | 21 | 24 | null | null |
sebastiaanvisser/salvia-sessions | src/Network/Salvia/Handler/Login.hs | bsd-3-clause | hLogin
:: forall m q p a. (PayloadM q UserDatabase m, SessionM (UserPayload p) m, HttpM Request m, MonadIO m, BodyM Request m)
=> p -> m a -> (User -> m a) -> m a
hLogin _ onFail onOk =
do ps <- hRequestParameters "utf-8"
db <- payload get :: m UserDatabase
case authenticate ps db of
Nothing -> onFail
Just user -> do let pl = Just (UserPayload user True Nothing)
withSession (setL sPayload pl)
onOk user
-- | Helper functions that performs the authentication check. | 546 | hLogin
:: forall m q p a. (PayloadM q UserDatabase m, SessionM (UserPayload p) m, HttpM Request m, MonadIO m, BodyM Request m)
=> p -> m a -> (User -> m a) -> m a
hLogin _ onFail onOk =
do ps <- hRequestParameters "utf-8"
db <- payload get :: m UserDatabase
case authenticate ps db of
Nothing -> onFail
Just user -> do let pl = Just (UserPayload user True Nothing)
withSession (setL sPayload pl)
onOk user
-- | Helper functions that performs the authentication check. | 546 | hLogin _ onFail onOk =
do ps <- hRequestParameters "utf-8"
db <- payload get :: m UserDatabase
case authenticate ps db of
Nothing -> onFail
Just user -> do let pl = Just (UserPayload user True Nothing)
withSession (setL sPayload pl)
onOk user
-- | Helper functions that performs the authentication check. | 379 | false | true | 0 | 19 | 166 | 204 | 96 | 108 | null | null |
oldmanmike/hs-minecraft-protocol | src/Data/Minecraft/Types.hs | bsd-3-clause | getWord16 :: S.Get Word16
getWord16 = undefined | 47 | getWord16 :: S.Get Word16
getWord16 = undefined | 47 | getWord16 = undefined | 21 | false | true | 0 | 7 | 6 | 22 | 9 | 13 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x1F2B' = "\x0397\x0314\x0300" | 45 | decomposeChar '\x1F2B' = "\x0397\x0314\x0300" | 45 | decomposeChar '\x1F2B' = "\x0397\x0314\x0300" | 45 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | Transforms that comprise this execution stage.
essComponentTransform :: Lens' ExecutionStageSummary [ComponentTransform]
essComponentTransform
= lens _essComponentTransform
(\ s a -> s{_essComponentTransform = a})
. _Default
. _Coerce | 259 | essComponentTransform :: Lens' ExecutionStageSummary [ComponentTransform]
essComponentTransform
= lens _essComponentTransform
(\ s a -> s{_essComponentTransform = a})
. _Default
. _Coerce | 207 | essComponentTransform
= lens _essComponentTransform
(\ s a -> s{_essComponentTransform = a})
. _Default
. _Coerce | 133 | true | true | 0 | 11 | 47 | 53 | 28 | 25 | null | null |
debug-ito/wild-bind | wild-bind-x11/src/WildBind/X11/Internal/Key.hs | bsd-3-clause | -- | Look up a modifier keymask associated to the given keysym. This
-- is necessary especially for NumLock modifier, because it is highly
-- dynamic in KeyCode realm. If no modifier is associated with the
-- 'ModifierKey', it returns 0.
--
-- c.f:
--
-- * grab_key.c of xbindkey package
-- * http://tronche.com/gui/x/xlib/input/keyboard-grabbing.html
-- * http://tronche.com/gui/x/xlib/input/keyboard-encoding.html
lookupModifierKeyMask :: Xlib.Display -> XModifierMap -> Xlib.KeySym -> IO Xlib.KeyMask
lookupModifierKeyMask disp xmmap keysym = do
keycode <- Xlib.keysymToKeycode disp keysym
return $ maybe 0 modifierToKeyMask $ listToMaybe $ mapMaybe (lookupXMod' keycode) xmmap
where
lookupXMod' key_code (xmod, codes) = if key_code `elem` codes
then Just xmod
else Nothing | 868 | lookupModifierKeyMask :: Xlib.Display -> XModifierMap -> Xlib.KeySym -> IO Xlib.KeyMask
lookupModifierKeyMask disp xmmap keysym = do
keycode <- Xlib.keysymToKeycode disp keysym
return $ maybe 0 modifierToKeyMask $ listToMaybe $ mapMaybe (lookupXMod' keycode) xmmap
where
lookupXMod' key_code (xmod, codes) = if key_code `elem` codes
then Just xmod
else Nothing | 452 | lookupModifierKeyMask disp xmmap keysym = do
keycode <- Xlib.keysymToKeycode disp keysym
return $ maybe 0 modifierToKeyMask $ listToMaybe $ mapMaybe (lookupXMod' keycode) xmmap
where
lookupXMod' key_code (xmod, codes) = if key_code `elem` codes
then Just xmod
else Nothing | 364 | true | true | 0 | 10 | 196 | 129 | 69 | 60 | null | null |
Shimuuar/protobuf | Data/Protobuf/Internal/Names.hs | bsd-3-clause | nameToId :: SomeName -> (Identifier TagType)
nameToId (MsgName n _) = n | 73 | nameToId :: SomeName -> (Identifier TagType)
nameToId (MsgName n _) = n | 73 | nameToId (MsgName n _) = n | 28 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
rahulmutt/ghcvm | compiler/Eta/Main/DriverPhases.hs | bsd-3-clause | isHaskellUserSrcFilename f = isHaskellUserSrcSuffix (drop 1 $ takeExtension f) | 78 | isHaskellUserSrcFilename f = isHaskellUserSrcSuffix (drop 1 $ takeExtension f) | 78 | isHaskellUserSrcFilename f = isHaskellUserSrcSuffix (drop 1 $ takeExtension f) | 78 | false | false | 0 | 8 | 8 | 25 | 11 | 14 | null | null |
elegios/datalang | src/Parser.hs | mit | subscript :: Parser (Expression -> Expression)
subscript = postHelp Subscript $ noNewline >> (brackets . many $
(Right <$> expression) <|> (Left <$> brOp)) | 167 | subscript :: Parser (Expression -> Expression)
subscript = postHelp Subscript $ noNewline >> (brackets . many $
(Right <$> expression) <|> (Left <$> brOp)) | 167 | subscript = postHelp Subscript $ noNewline >> (brackets . many $
(Right <$> expression) <|> (Left <$> brOp)) | 120 | false | true | 0 | 10 | 35 | 61 | 32 | 29 | null | null |
JoeyEremondi/elm-summer-opt | src/Generate/JavaScript.hs | bsd-3-clause | flattenLets :: [Canonical.Def] -> Canonical.Expr -> ([Canonical.Def], Canonical.Expr)
flattenLets defs lexpr@(A.A _ expr) =
case expr of
Let ds body -> flattenLets (defs ++ ds) body
_ -> (defs, lexpr) | 216 | flattenLets :: [Canonical.Def] -> Canonical.Expr -> ([Canonical.Def], Canonical.Expr)
flattenLets defs lexpr@(A.A _ expr) =
case expr of
Let ds body -> flattenLets (defs ++ ds) body
_ -> (defs, lexpr) | 216 | flattenLets defs lexpr@(A.A _ expr) =
case expr of
Let ds body -> flattenLets (defs ++ ds) body
_ -> (defs, lexpr) | 130 | false | true | 0 | 10 | 45 | 96 | 51 | 45 | null | null |
prashant007/AMPL | myAMPL/src/Semantics/AMPL_am.hs | mit | eval n ([],e,s) defs = (n, (s,e)) | 33 | eval n ([],e,s) defs = (n, (s,e)) | 33 | eval n ([],e,s) defs = (n, (s,e)) | 33 | false | false | 1 | 7 | 6 | 40 | 21 | 19 | null | null |
agrafix/typed-wire | test/TW/CodeGen/HaskellTest.hs | mit | test_haskellCodeGen :: IO ()
test_haskellCodeGen =
withSystemTempDirectory "haskellCodeGenX" $ \dir ->
do let srcDir = dir </> "src"
loaded <- loadModules ["samples"] [ModuleName ["Basic"]]
allModules <- assertRight loaded
checkedModules <- assertRight $ checkModules allModules
mapM_ (runner srcDir HS.makeModule HS.makeFileName) checkedModules
T.writeFile (dir </> "typed-wire-haskell-test.cabal") cabalTemplate
T.writeFile (dir </> "stack.yaml") stackTemplate
T.writeFile (srcDir </> "Main.hs") mainTemplate
let p =
(shell "stack build --pedantic")
{ cwd = Just dir
}
(_, _, _, handle) <- createProcess p
ec <- waitForProcess handle
assertEqual ExitSuccess ec
let pRun =
(shell "stack exec test")
{ cwd = Just dir
}
(_, _, _, hRun) <- createProcess pRun
ecRun <- waitForProcess hRun
assertEqual ExitSuccess ecRun | 960 | test_haskellCodeGen :: IO ()
test_haskellCodeGen =
withSystemTempDirectory "haskellCodeGenX" $ \dir ->
do let srcDir = dir </> "src"
loaded <- loadModules ["samples"] [ModuleName ["Basic"]]
allModules <- assertRight loaded
checkedModules <- assertRight $ checkModules allModules
mapM_ (runner srcDir HS.makeModule HS.makeFileName) checkedModules
T.writeFile (dir </> "typed-wire-haskell-test.cabal") cabalTemplate
T.writeFile (dir </> "stack.yaml") stackTemplate
T.writeFile (srcDir </> "Main.hs") mainTemplate
let p =
(shell "stack build --pedantic")
{ cwd = Just dir
}
(_, _, _, handle) <- createProcess p
ec <- waitForProcess handle
assertEqual ExitSuccess ec
let pRun =
(shell "stack exec test")
{ cwd = Just dir
}
(_, _, _, hRun) <- createProcess pRun
ecRun <- waitForProcess hRun
assertEqual ExitSuccess ecRun | 960 | test_haskellCodeGen =
withSystemTempDirectory "haskellCodeGenX" $ \dir ->
do let srcDir = dir </> "src"
loaded <- loadModules ["samples"] [ModuleName ["Basic"]]
allModules <- assertRight loaded
checkedModules <- assertRight $ checkModules allModules
mapM_ (runner srcDir HS.makeModule HS.makeFileName) checkedModules
T.writeFile (dir </> "typed-wire-haskell-test.cabal") cabalTemplate
T.writeFile (dir </> "stack.yaml") stackTemplate
T.writeFile (srcDir </> "Main.hs") mainTemplate
let p =
(shell "stack build --pedantic")
{ cwd = Just dir
}
(_, _, _, handle) <- createProcess p
ec <- waitForProcess handle
assertEqual ExitSuccess ec
let pRun =
(shell "stack exec test")
{ cwd = Just dir
}
(_, _, _, hRun) <- createProcess pRun
ecRun <- waitForProcess hRun
assertEqual ExitSuccess ecRun | 931 | false | true | 0 | 14 | 253 | 294 | 140 | 154 | null | null |
timrobinson/smallpt-haskell | Tim/Smallpt/Distribution.hs | bsd-3-clause | process :: MVar [a] -> (a -> IO ()) -> IO ()
process queueMVar m = loop
where loop = do queue <- takeMVar queueMVar
case queue of
x:xs -> do putMVar queueMVar xs
m x
loop
[] -> return () | 428 | process :: MVar [a] -> (a -> IO ()) -> IO ()
process queueMVar m = loop
where loop = do queue <- takeMVar queueMVar
case queue of
x:xs -> do putMVar queueMVar xs
m x
loop
[] -> return () | 428 | process queueMVar m = loop
where loop = do queue <- takeMVar queueMVar
case queue of
x:xs -> do putMVar queueMVar xs
m x
loop
[] -> return () | 383 | false | true | 0 | 13 | 282 | 117 | 52 | 65 | null | null |
vaibhav276/scheme-compiler | src/Parser.hs | mit | eval env val@(Number _) = return val | 36 | eval env val@(Number _) = return val | 36 | eval env val@(Number _) = return val | 36 | false | false | 0 | 8 | 6 | 23 | 11 | 12 | null | null |
c0c0n3/hAppYard | hxml/Test.hs | gpl-3.0 | toTree ∷ ArrowXml cat ⇒ String → cat ξ XmlTree
toTree xml = constA xml ⋙ xread | 78 | toTree ∷ ArrowXml cat ⇒ String → cat ξ XmlTree
toTree xml = constA xml ⋙ xread | 78 | toTree xml = constA xml ⋙ xread | 31 | false | true | 2 | 8 | 16 | 43 | 18 | 25 | null | null |
divarvel/hammertime | tests/Hammertime/CLI/Tests.hs | gpl-3.0 | testReportFilterProject =
let result = runCliParser ["report", "--project", "project"]
in case result of
Left (ParserFailure _ _) -> assertFailure "parse fail: report"
Right a -> a @=? (Report Day (Just "project") Nothing Nothing Simple) | 261 | testReportFilterProject =
let result = runCliParser ["report", "--project", "project"]
in case result of
Left (ParserFailure _ _) -> assertFailure "parse fail: report"
Right a -> a @=? (Report Day (Just "project") Nothing Nothing Simple) | 261 | testReportFilterProject =
let result = runCliParser ["report", "--project", "project"]
in case result of
Left (ParserFailure _ _) -> assertFailure "parse fail: report"
Right a -> a @=? (Report Day (Just "project") Nothing Nothing Simple) | 261 | false | false | 1 | 15 | 57 | 90 | 42 | 48 | null | null |
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | src/RailCompiler/Lexer.hs | mit | funcname :: IDT.Grid2D -> Either String String
funcname code
| isNothing (Map.lookup 0 code) = Prelude.Right EH.strFunctionNameMissing
| otherwise = helper (tostring 0 line)
where
line = fromJust (Map.lookup 0 code)
tostring i line
| isNothing (Map.lookup i line) = if i > Map.size line then "" else tostring (i+1) line
| otherwise = fromJust (Map.lookup i line):tostring (i+1) line
helper line
| null line || length (elemIndices '\'' line) < 2 || null fn = Prelude.Right EH.strFunctionNameMissing
| not $ null $ fn `intersect` "'{}()!" = Prelude.Right EH.strInvalidFuncName
| otherwise = Prelude.Left fn
where fn = takeWhile (/='\'') $ tail $ dropWhile (/='\'') line
-- |Get the nodes for the given function. | 758 | funcname :: IDT.Grid2D -> Either String String
funcname code
| isNothing (Map.lookup 0 code) = Prelude.Right EH.strFunctionNameMissing
| otherwise = helper (tostring 0 line)
where
line = fromJust (Map.lookup 0 code)
tostring i line
| isNothing (Map.lookup i line) = if i > Map.size line then "" else tostring (i+1) line
| otherwise = fromJust (Map.lookup i line):tostring (i+1) line
helper line
| null line || length (elemIndices '\'' line) < 2 || null fn = Prelude.Right EH.strFunctionNameMissing
| not $ null $ fn `intersect` "'{}()!" = Prelude.Right EH.strInvalidFuncName
| otherwise = Prelude.Left fn
where fn = takeWhile (/='\'') $ tail $ dropWhile (/='\'') line
-- |Get the nodes for the given function. | 757 | funcname code
| isNothing (Map.lookup 0 code) = Prelude.Right EH.strFunctionNameMissing
| otherwise = helper (tostring 0 line)
where
line = fromJust (Map.lookup 0 code)
tostring i line
| isNothing (Map.lookup i line) = if i > Map.size line then "" else tostring (i+1) line
| otherwise = fromJust (Map.lookup i line):tostring (i+1) line
helper line
| null line || length (elemIndices '\'' line) < 2 || null fn = Prelude.Right EH.strFunctionNameMissing
| not $ null $ fn `intersect` "'{}()!" = Prelude.Right EH.strInvalidFuncName
| otherwise = Prelude.Left fn
where fn = takeWhile (/='\'') $ tail $ dropWhile (/='\'') line
-- |Get the nodes for the given function. | 710 | false | true | 3 | 13 | 161 | 311 | 150 | 161 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Aeson.Types.FromJSON.hs | bsd-3-clause | withText expected _ v = typeMismatch expected v | 58 | withText expected _ v = typeMismatch expected v | 58 | withText expected _ v = typeMismatch expected v | 58 | false | false | 0 | 5 | 18 | 18 | 8 | 10 | null | null |
shlevy/ghc | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | bsd-3-clause | -- | Use with 'funD'
clause :: [PatQ] -> BodyQ -> [DecQ] -> ClauseQ
clause ps r ds = do { ps' <- sequence ps;
r' <- r;
ds' <- sequence ds;
return (Clause ps' r' ds') } | 233 | clause :: [PatQ] -> BodyQ -> [DecQ] -> ClauseQ
clause ps r ds = do { ps' <- sequence ps;
r' <- r;
ds' <- sequence ds;
return (Clause ps' r' ds') } | 212 | clause ps r ds = do { ps' <- sequence ps;
r' <- r;
ds' <- sequence ds;
return (Clause ps' r' ds') } | 165 | true | true | 0 | 10 | 103 | 91 | 44 | 47 | null | null |
xmonad/xmonad-contrib | XMonad/Util/Stack.hs | bsd-3-clause | swapMasterZ (Just (W.Stack f up down)) = Just $ W.Stack f [] (reverse up ++ down) | 81 | swapMasterZ (Just (W.Stack f up down)) = Just $ W.Stack f [] (reverse up ++ down) | 81 | swapMasterZ (Just (W.Stack f up down)) = Just $ W.Stack f [] (reverse up ++ down) | 81 | false | false | 0 | 10 | 15 | 52 | 25 | 27 | null | null |
dfaligertwood/pandoc-filters | pandoc-cv.hs | bsd-3-clause | cvList (Just "latex") (RawBlock "html" "<!-- break -->")
= return
$ latexBlock $ unlines
[ "\\ifminipageopen"
, "\\end{minipage}"
, "\\fi"
, "\\minipageopenfalse"
] | 257 | cvList (Just "latex") (RawBlock "html" "<!-- break -->")
= return
$ latexBlock $ unlines
[ "\\ifminipageopen"
, "\\end{minipage}"
, "\\fi"
, "\\minipageopenfalse"
] | 257 | cvList (Just "latex") (RawBlock "html" "<!-- break -->")
= return
$ latexBlock $ unlines
[ "\\ifminipageopen"
, "\\end{minipage}"
, "\\fi"
, "\\minipageopenfalse"
] | 257 | false | false | 3 | 7 | 115 | 53 | 25 | 28 | null | null |
tjakway/ghcjvm | compiler/simplCore/SimplUtils.hs | bsd-3-clause | countArgs :: SimplCont -> Int
-- Count all arguments, including types, coercions, and other values
countArgs (ApplyToTy { sc_cont = cont }) = 1 + countArgs cont | 161 | countArgs :: SimplCont -> Int
countArgs (ApplyToTy { sc_cont = cont }) = 1 + countArgs cont | 92 | countArgs (ApplyToTy { sc_cont = cont }) = 1 + countArgs cont | 62 | true | true | 0 | 9 | 27 | 38 | 20 | 18 | null | null |
ghc-android/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | -- Float ops
translateOp _ FloatEqOp = Just (MO_F_Eq W32) | 67 | translateOp _ FloatEqOp = Just (MO_F_Eq W32) | 53 | translateOp _ FloatEqOp = Just (MO_F_Eq W32) | 53 | true | false | 0 | 7 | 19 | 21 | 10 | 11 | null | null |
mseri/fbmessenger-api-hs | src/Web/FBMessenger/API/Bot/Responses.hs | bsd-3-clause | extractSendError _ = Nothing | 28 | extractSendError _ = Nothing | 28 | extractSendError _ = Nothing | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
tkasu/haskellbook-adventure | app/Chap4.hs | bsd-3-clause | -- no errors
mistake3 = (1 * 2) > 5 | 35 | mistake3 = (1 * 2) > 5 | 22 | mistake3 = (1 * 2) > 5 | 22 | true | false | 3 | 6 | 9 | 23 | 10 | 13 | null | null |
andbroby/Harlequin | src/Main.hs | gpl-2.0 | eval env (Atom id) = getVar env id | 34 | eval env (Atom id) = getVar env id | 34 | eval env (Atom id) = getVar env id | 34 | false | false | 0 | 6 | 7 | 24 | 10 | 14 | null | null |
siliconbrain/khaland | src/Time.hs | bsd-3-clause | toSeconds :: (RealFrac a) => Time a -> a
toSeconds (Seconds t) = t | 66 | toSeconds :: (RealFrac a) => Time a -> a
toSeconds (Seconds t) = t | 66 | toSeconds (Seconds t) = t | 25 | false | true | 0 | 7 | 13 | 40 | 19 | 21 | null | null |
Copilot-Language/sbv-for-copilot | Data/SBV/BitVectors/Rounding.hs | bsd-3-clause | lift2Rm :: (SymWord a, Floating a) => String -> SRoundingMode -> SBV a -> SBV a -> SBV a
lift2Rm w m a b = SBV $ SVal k $ Right $ cache r
where k = kindOf a
r st = do swm <- sbvToSW st m
swa <- sbvToSW st a
swb <- sbvToSW st b
newExpr st k (SBVApp (FPRound w) [swm, swa, swb])
-- | Lift a 3 arg floating point UOP | 378 | lift2Rm :: (SymWord a, Floating a) => String -> SRoundingMode -> SBV a -> SBV a -> SBV a
lift2Rm w m a b = SBV $ SVal k $ Right $ cache r
where k = kindOf a
r st = do swm <- sbvToSW st m
swa <- sbvToSW st a
swb <- sbvToSW st b
newExpr st k (SBVApp (FPRound w) [swm, swa, swb])
-- | Lift a 3 arg floating point UOP | 378 | lift2Rm w m a b = SBV $ SVal k $ Right $ cache r
where k = kindOf a
r st = do swm <- sbvToSW st m
swa <- sbvToSW st a
swb <- sbvToSW st b
newExpr st k (SBVApp (FPRound w) [swm, swa, swb])
-- | Lift a 3 arg floating point UOP | 289 | false | true | 4 | 12 | 140 | 179 | 80 | 99 | null | null |
BartAdv/Idris-dev | src/Idris/Core/Unify.hs | bsd-3-clause | -- | Smart constructor for unification errors that takes into account the FailContext
cantUnify :: [FailContext] -> Bool -> (t, Maybe Provenance) -> (t, Maybe Provenance) -> (Err' t) -> [(Name, t)] -> Int -> Err' t
cantUnify [] r t1 t2 e ctxt i = CantUnify r t1 t2 e ctxt i | 273 | cantUnify :: [FailContext] -> Bool -> (t, Maybe Provenance) -> (t, Maybe Provenance) -> (Err' t) -> [(Name, t)] -> Int -> Err' t
cantUnify [] r t1 t2 e ctxt i = CantUnify r t1 t2 e ctxt i | 187 | cantUnify [] r t1 t2 e ctxt i = CantUnify r t1 t2 e ctxt i | 58 | true | true | 0 | 12 | 52 | 109 | 57 | 52 | null | null |
fredmorcos/attic | snippets/haskell/bools.hs | isc | orr (x:xs) = if x == True then
True
else
orr xs | 92 | orr (x:xs) = if x == True then
True
else
orr xs | 92 | orr (x:xs) = if x == True then
True
else
orr xs | 92 | false | false | 0 | 6 | 56 | 32 | 16 | 16 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Patch.hs | mpl-2.0 | -- | OAuth access token.
adsdAccessToken :: Lens' AdsPatch (Maybe Text)
adsdAccessToken
= lens _adsdAccessToken
(\ s a -> s{_adsdAccessToken = a}) | 154 | adsdAccessToken :: Lens' AdsPatch (Maybe Text)
adsdAccessToken
= lens _adsdAccessToken
(\ s a -> s{_adsdAccessToken = a}) | 129 | adsdAccessToken
= lens _adsdAccessToken
(\ s a -> s{_adsdAccessToken = a}) | 82 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
UltimatePea/UniversalLanguageInterface | test/integrationTestULI/src/Lib.hs | bsd-2-clause | assert :: (Eq a, Show a) => a -> a -> IO ()
assert a b
| a == b = return ()
| otherwise = error $ "Error, " ++ show a ++ " is not equal to " ++ show b | 159 | assert :: (Eq a, Show a) => a -> a -> IO ()
assert a b
| a == b = return ()
| otherwise = error $ "Error, " ++ show a ++ " is not equal to " ++ show b | 159 | assert a b
| a == b = return ()
| otherwise = error $ "Error, " ++ show a ++ " is not equal to " ++ show b | 115 | false | true | 1 | 9 | 51 | 88 | 42 | 46 | null | null |
amccausl/Swish | Swish/HaskellRDF/VarBindingTest.hs | lgpl-2.1 | testFindComp23 = testEqv "testFindComp23" compvocab $ vbmVocab (head compad) | 76 | testFindComp23 = testEqv "testFindComp23" compvocab $ vbmVocab (head compad) | 76 | testFindComp23 = testEqv "testFindComp23" compvocab $ vbmVocab (head compad) | 76 | false | false | 0 | 8 | 8 | 24 | 11 | 13 | null | null |
andorp/bead | src/Bead/Domain/Entities.hs | bsd-3-clause | withUser = flip userCata | 24 | withUser = flip userCata | 24 | withUser = flip userCata | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
hslua/hslua-aeson | src/HsLua/Aeson.hs | mit | isNull :: LuaError e => StackIndex -> LuaE e Bool
isNull idx = do
idx' <- absindex idx
pushNull
rawequal idx' top <* pop 1
-- | Push a vector onto the stack. | 164 | isNull :: LuaError e => StackIndex -> LuaE e Bool
isNull idx = do
idx' <- absindex idx
pushNull
rawequal idx' top <* pop 1
-- | Push a vector onto the stack. | 164 | isNull idx = do
idx' <- absindex idx
pushNull
rawequal idx' top <* pop 1
-- | Push a vector onto the stack. | 114 | false | true | 0 | 8 | 39 | 59 | 26 | 33 | null | null |
svanderbleek/elm-bot | src/Slash.hs | bsd-3-clause | mkCommand :: [Param] -> Command
mkCommand params =
Command $ S.unpack (param ("text","") params) | 98 | mkCommand :: [Param] -> Command
mkCommand params =
Command $ S.unpack (param ("text","") params) | 98 | mkCommand params =
Command $ S.unpack (param ("text","") params) | 66 | false | true | 0 | 9 | 15 | 44 | 23 | 21 | null | null |
IreneKnapp/Faction | faction/Distribution/Client/Init.hs | bsd-3-clause | writeCabalFile :: InitFlags -> IO Bool
writeCabalFile flags@(InitFlags{packageName = NoFlag}) = do
message flags "Error: no package name provided."
return False | 164 | writeCabalFile :: InitFlags -> IO Bool
writeCabalFile flags@(InitFlags{packageName = NoFlag}) = do
message flags "Error: no package name provided."
return False | 164 | writeCabalFile flags@(InitFlags{packageName = NoFlag}) = do
message flags "Error: no package name provided."
return False | 125 | false | true | 0 | 9 | 24 | 55 | 25 | 30 | null | null |
rvion/lamdu | Lamdu/Sugar/Convert/Input.hs | gpl-3.0 | mkPayload ::
a -> Infer.Payload ->
Map ScopeId (EvalResult ()) -> Map ScopeId [(ScopeId, EvalResult ())] ->
ExprIRef.ValIProperty m -> Payload m a
mkPayload _userData _inferred _evalResults _evalAppliesOfLam stored =
Payload{..}
where
_guid = IRef.guid $ ExprIRef.unValI $ Property.value stored
_entityId = EntityId.ofValI $ Property.value stored
_mStored = Just stored | 413 | mkPayload ::
a -> Infer.Payload ->
Map ScopeId (EvalResult ()) -> Map ScopeId [(ScopeId, EvalResult ())] ->
ExprIRef.ValIProperty m -> Payload m a
mkPayload _userData _inferred _evalResults _evalAppliesOfLam stored =
Payload{..}
where
_guid = IRef.guid $ ExprIRef.unValI $ Property.value stored
_entityId = EntityId.ofValI $ Property.value stored
_mStored = Just stored | 413 | mkPayload _userData _inferred _evalResults _evalAppliesOfLam stored =
Payload{..}
where
_guid = IRef.guid $ ExprIRef.unValI $ Property.value stored
_entityId = EntityId.ofValI $ Property.value stored
_mStored = Just stored | 254 | false | true | 5 | 14 | 93 | 159 | 71 | 88 | null | null |
spechub/Hets | Driver/ReadLibDefn.hs | gpl-2.0 | guessInput :: MonadIO m => HetcatsOpts -> Maybe String -> FilePath -> String
-> m InType
guessInput opts mr file input =
let fty1 = guess file (intype opts)
fty2 = maybe GuessIn findFiletype mr
fty = joinFileTypes fty1 fty2
in if elem fty $ GuessIn : DgXml : owlXmlTypes then
case guessXmlContent (fty == DgXml) input of
Left ty -> fail ty
Right ty -> case ty of
DgXml -> fail "unexpected DGraph xml"
_ -> return $ joinFileTypes fty ty
else return fty | 495 | guessInput :: MonadIO m => HetcatsOpts -> Maybe String -> FilePath -> String
-> m InType
guessInput opts mr file input =
let fty1 = guess file (intype opts)
fty2 = maybe GuessIn findFiletype mr
fty = joinFileTypes fty1 fty2
in if elem fty $ GuessIn : DgXml : owlXmlTypes then
case guessXmlContent (fty == DgXml) input of
Left ty -> fail ty
Right ty -> case ty of
DgXml -> fail "unexpected DGraph xml"
_ -> return $ joinFileTypes fty ty
else return fty | 495 | guessInput opts mr file input =
let fty1 = guess file (intype opts)
fty2 = maybe GuessIn findFiletype mr
fty = joinFileTypes fty1 fty2
in if elem fty $ GuessIn : DgXml : owlXmlTypes then
case guessXmlContent (fty == DgXml) input of
Left ty -> fail ty
Right ty -> case ty of
DgXml -> fail "unexpected DGraph xml"
_ -> return $ joinFileTypes fty ty
else return fty | 404 | false | true | 0 | 15 | 128 | 185 | 87 | 98 | null | null |
keithodulaigh/Hets | HasCASL/Sublogic.hs | gpl-2.0 | sublogic_max :: Sublogic -> Sublogic -> Sublogic
sublogic_max = sublogic_join max max max | 89 | sublogic_max :: Sublogic -> Sublogic -> Sublogic
sublogic_max = sublogic_join max max max | 89 | sublogic_max = sublogic_join max max max | 40 | false | true | 0 | 6 | 12 | 26 | 13 | 13 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo WriteOffAddrOp_Int64 = mkGenPrimOp (fsLit "writeInt64OffAddr#") [deltaTyVar] [addrPrimTy, intPrimTy, int64PrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) | 172 | primOpInfo WriteOffAddrOp_Int64 = mkGenPrimOp (fsLit "writeInt64OffAddr#") [deltaTyVar] [addrPrimTy, intPrimTy, int64PrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) | 172 | primOpInfo WriteOffAddrOp_Int64 = mkGenPrimOp (fsLit "writeInt64OffAddr#") [deltaTyVar] [addrPrimTy, intPrimTy, int64PrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) | 172 | false | false | 0 | 7 | 14 | 48 | 25 | 23 | null | null |
nfjinjing/hcheat | src/Web/HCheat.hs | bsd-3-clause | lorem = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | 456 | lorem = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | 456 | lorem = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | 456 | false | false | 0 | 4 | 70 | 6 | 3 | 3 | null | null |
ajtulloch/haskell-ml | MachineLearning/Protobufs/LossFunction.hs | mit | toMaybe'Enum 3 = Prelude'.Just HUBER | 36 | toMaybe'Enum 3 = Prelude'.Just HUBER | 36 | toMaybe'Enum 3 = Prelude'.Just HUBER | 36 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/Get.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
apgUploadType :: Lens' AccountPermissionsGet (Maybe Text)
apgUploadType
= lens _apgUploadType
(\ s a -> s{_apgUploadType = a}) | 205 | apgUploadType :: Lens' AccountPermissionsGet (Maybe Text)
apgUploadType
= lens _apgUploadType
(\ s a -> s{_apgUploadType = a}) | 134 | apgUploadType
= lens _apgUploadType
(\ s a -> s{_apgUploadType = a}) | 76 | true | true | 1 | 9 | 34 | 52 | 25 | 27 | null | null |
Slowki/hgccjit | src/Compiler/GCC/JIT/Monad/Type.hs | mit | -- | gcc_jit_context_get_int_type
getIntType :: Int -- ^ Size
-> Bool -- ^ Is signed
-> JITState s JITType
getIntType = inContext2 contextGetIntType | 170 | getIntType :: Int -- ^ Size
-> Bool -- ^ Is signed
-> JITState s JITType
getIntType = inContext2 contextGetIntType | 136 | getIntType = inContext2 contextGetIntType | 41 | true | true | 0 | 8 | 44 | 36 | 17 | 19 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.