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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typelead/epm | epm/Distribution/Client/Setup.hs | bsd-3-clause | indentParagraph :: String -> String
indentParagraph = unlines
. map ((" "++).unwords)
. wrapLine 77
. words | 156 | indentParagraph :: String -> String
indentParagraph = unlines
. map ((" "++).unwords)
. wrapLine 77
. words | 156 | indentParagraph = unlines
. map ((" "++).unwords)
. wrapLine 77
. words | 120 | false | true | 0 | 11 | 65 | 42 | 22 | 20 | null | null |
phaazon/vector | Data/Vector/Primitive.hs | bsd-3-clause | backpermute = G.backpermute | 27 | backpermute = G.backpermute | 27 | backpermute = G.backpermute | 27 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
smwhr/1HAD | exercises/HAD/Y2014/M02/D28/Exercise.hs | mit | -- | use elements of the first lists to zip elements
-- of the second and third lists
--
-- Examples
-- >>> zipBinary [(+), (*), (*)] [2,2,2] [4,4,4]
-- [6,8,8]
-- >>> zipBinary [(+)] [2,2,2] [4,4,4]
-- [6]
-- >>> zipBinary (cycle [(+), (*)]) [1 .. 4] [2..5]
-- [3,6,7,20]
zipBinary :: [a->b->c] -> [a] -> [b] -> [c]
zip... | 355 | zipBinary :: [a->b->c] -> [a] -> [b] -> [c]
zipBinary = zipWith3 (\f x y -> f x y) | 82 | zipBinary = zipWith3 (\f x y -> f x y) | 38 | true | true | 0 | 8 | 69 | 73 | 44 | 29 | null | null |
tulcod/megaparsec | Text/Megaparsec/Prim.hs | bsd-2-clause | parserFail :: String -> ParsecT s u m a
parserFail msg = ParsecT $ \s _ _ _ eerr ->
eerr $ newErrorMessage (Message msg) (statePos s) | 135 | parserFail :: String -> ParsecT s u m a
parserFail msg = ParsecT $ \s _ _ _ eerr ->
eerr $ newErrorMessage (Message msg) (statePos s) | 135 | parserFail msg = ParsecT $ \s _ _ _ eerr ->
eerr $ newErrorMessage (Message msg) (statePos s) | 95 | false | true | 2 | 7 | 28 | 70 | 33 | 37 | null | null |
snoyberg/ghc | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | orphNamesOfCos :: [Coercion] -> NameSet
orphNamesOfCos = orphNamesOfThings orphNamesOfCo | 88 | orphNamesOfCos :: [Coercion] -> NameSet
orphNamesOfCos = orphNamesOfThings orphNamesOfCo | 88 | orphNamesOfCos = orphNamesOfThings orphNamesOfCo | 48 | false | true | 0 | 6 | 8 | 21 | 11 | 10 | null | null |
schernichkin/BSPM | graphomania/src/Data/Graph/Interactive.hs | bsd-3-clause | -- TODO: возможно имеет смысл использовать тайпклассы, чтобы уменьшить кол-во
-- имён (правда тогда придётся указывать типы)
readShumov :: FilePath -> IO Shumov
readShumov = SH.readFile | 186 | readShumov :: FilePath -> IO Shumov
readShumov = SH.readFile | 60 | readShumov = SH.readFile | 24 | true | true | 0 | 6 | 26 | 22 | 12 | 10 | null | null |
ckaestne/CIDE | other/CaseStudies/Arith/orig_armin/all/CLI_linux.hs | gpl-3.0 | identifier = PT.identifier lexer | 32 | identifier = PT.identifier lexer | 32 | identifier = PT.identifier lexer | 32 | false | false | 1 | 6 | 3 | 14 | 5 | 9 | null | null |
johntyree/ghc-mod | GHCApi.hs | bsd-3-clause | ----------------------------------------------------------------
withGHC :: Alternative m => Ghc (m a) -> IO (m a)
withGHC body = ghandle ignore $ runGhc (Just libdir) $ do
dflags <- getSessionDynFlags
defaultCleanupHandler dflags body
where
ignore :: Alternative m => SomeException -> IO (m a)
ignore... | 479 | withGHC :: Alternative m => Ghc (m a) -> IO (m a)
withGHC body = ghandle ignore $ runGhc (Just libdir) $ do
dflags <- getSessionDynFlags
defaultCleanupHandler dflags body
where
ignore :: Alternative m => SomeException -> IO (m a)
ignore e = do
hPutStr stderr "Dummy:0:0:Error:"
hPrint s... | 413 | withGHC body = ghandle ignore $ runGhc (Just libdir) $ do
dflags <- getSessionDynFlags
defaultCleanupHandler dflags body
where
ignore :: Alternative m => SomeException -> IO (m a)
ignore e = do
hPutStr stderr "Dummy:0:0:Error:"
hPrint stderr e
exitSuccess
---------------------... | 363 | true | true | 0 | 10 | 96 | 144 | 63 | 81 | null | null |
wuzzeb/yesod | yesod-bin/Devel.hs | mit | lockFile :: FilePath
lockFile = "yesod-devel/devel-terminate" | 62 | lockFile :: FilePath
lockFile = "yesod-devel/devel-terminate" | 62 | lockFile = "yesod-devel/devel-terminate" | 41 | false | true | 0 | 4 | 6 | 11 | 6 | 5 | null | null |
shayan-najd/QFeldspar | QFeldspar/Nat/ADT.hs | gpl-3.0 | add :: Nat -> Nat -> Nat
add Zro m = m | 42 | add :: Nat -> Nat -> Nat
add Zro m = m | 42 | add Zro m = m | 17 | false | true | 0 | 6 | 15 | 24 | 12 | 12 | null | null |
FranklinChen/twenty-four-days2015-of-hackage | src/PCREHeavyExample.hs | bsd-3-clause | reportOnInfo (Just (Audio path)) = printf "audio at %s\n" path | 62 | reportOnInfo (Just (Audio path)) = printf "audio at %s\n" path | 62 | reportOnInfo (Just (Audio path)) = printf "audio at %s\n" path | 62 | false | false | 0 | 9 | 9 | 26 | 12 | 14 | null | null |
robx/puzzle-draw | src/Draw/PuzzleTypes.hs | mit | skyscrapers ::
Backend' b =>
Drawers b
( OutsideClues C (Maybe Int),
Maybe String,
Maybe (Grid C (Maybe Int))
)
(Grid C (Maybe Int))
skyscrapers =
Drawers
(g <> h <> n)
(g . fst <> placeGrid . fmap int . clues . snd)
where
g (oc, _, _) = (placeOutside . fmap (fmap int) <> gri... | 577 | skyscrapers ::
Backend' b =>
Drawers b
( OutsideClues C (Maybe Int),
Maybe String,
Maybe (Grid C (Maybe Int))
)
(Grid C (Maybe Int))
skyscrapers =
Drawers
(g <> h <> n)
(g . fst <> placeGrid . fmap int . clues . snd)
where
g (oc, _, _) = (placeOutside . fmap (fmap int) <> gri... | 577 | skyscrapers =
Drawers
(g <> h <> n)
(g . fst <> placeGrid . fmap int . clues . snd)
where
g (oc, _, _) = (placeOutside . fmap (fmap int) <> grid gDefault . Data.outsideGrid) $ oc
h (_, _, cs) = case cs of
Just cs' -> placeGrid . fmap int . clues $ cs'
Nothing -> mempty
n (oc, ms, _) ... | 416 | false | true | 2 | 14 | 178 | 284 | 142 | 142 | null | null |
shlevy/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprInstr g@(GDIV _ src1 src2 dst)
| src1 == dst
= pprG g (text "\t#GDIV-xxxcase1" $$
hcat [gtab, gpush src2 0,
text " ; fdivrp %st(0),", greg src1 1])
| src2 == dst
= pprG g (text "\t#GDIV-xxxcase2" $$
hcat [gtab, gpush src1 0,
text " ; fdivp %... | 500 | pprInstr g@(GDIV _ src1 src2 dst)
| src1 == dst
= pprG g (text "\t#GDIV-xxxcase1" $$
hcat [gtab, gpush src2 0,
text " ; fdivrp %st(0),", greg src1 1])
| src2 == dst
= pprG g (text "\t#GDIV-xxxcase2" $$
hcat [gtab, gpush src1 0,
text " ; fdivp %... | 500 | pprInstr g@(GDIV _ src1 src2 dst)
| src1 == dst
= pprG g (text "\t#GDIV-xxxcase1" $$
hcat [gtab, gpush src2 0,
text " ; fdivrp %st(0),", greg src1 1])
| src2 == dst
= pprG g (text "\t#GDIV-xxxcase2" $$
hcat [gtab, gpush src1 0,
text " ; fdivp %... | 500 | false | false | 0 | 9 | 195 | 208 | 98 | 110 | null | null |
ssaavedra/liquidhaskell | benchmarks/containers-0.5.0.0/Data/Map/Base.hs | bsd-3-clause | -- | /O(n*log n)/.
-- @'mapKeys' f s@ is the map obtained by applying @f@ to each key of @s@.
--
-- The size of the result may be smaller if @f@ maps two or more distinct
-- keys to the same new key. In this case the value at the greatest of the
-- original keys is retained.
--
-- > mapKeys (+ 1) (fromList [(5,"a"), (... | 755 | mapKeys :: Ord k2 => (k1->k2) -> Map k1 a -> Map k2 a
mapKeys f = fromList . foldrWithKey (\k x xs -> (f k, x) : xs) [] | 119 | mapKeys f = fromList . foldrWithKey (\k x xs -> (f k, x) : xs) [] | 65 | true | true | 1 | 10 | 178 | 99 | 53 | 46 | null | null |
rueshyna/gogol | gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Register.hs | mpl-2.0 | -- | OAuth bearer token.
brBearerToken :: Lens' BeaconsRegister (Maybe Text)
brBearerToken
= lens _brBearerToken
(\ s a -> s{_brBearerToken = a}) | 153 | brBearerToken :: Lens' BeaconsRegister (Maybe Text)
brBearerToken
= lens _brBearerToken
(\ s a -> s{_brBearerToken = a}) | 128 | brBearerToken
= lens _brBearerToken
(\ s a -> s{_brBearerToken = a}) | 76 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
michalkonecny/polypaver | examples/haskell/mini.hs | bsd-3-clause | exp_shift =
Problem box conjecture
where
box = [(0, (-1,1), False)]
x = termVar 0 "x"
conjecture = exp x |<=| exp (x+0.0001) | 146 | exp_shift =
Problem box conjecture
where
box = [(0, (-1,1), False)]
x = termVar 0 "x"
conjecture = exp x |<=| exp (x+0.0001) | 146 | exp_shift =
Problem box conjecture
where
box = [(0, (-1,1), False)]
x = termVar 0 "x"
conjecture = exp x |<=| exp (x+0.0001) | 146 | false | false | 0 | 8 | 44 | 71 | 38 | 33 | null | null |
juhp/stack | src/Stack/Runners.hs | bsd-3-clause | -- | Ensure that no project settings are used when running 'withConfig'.
withGlobalProject :: RIO Runner a -> RIO Runner a
withGlobalProject inner = do
oldSYL <- view stackYamlLocL
case oldSYL of
SYLDefault -> local (set stackYamlLocL SYLGlobalProject) inner
_ -> throwString "Cannot use this command with op... | 526 | withGlobalProject :: RIO Runner a -> RIO Runner a
withGlobalProject inner = do
oldSYL <- view stackYamlLocL
case oldSYL of
SYLDefault -> local (set stackYamlLocL SYLGlobalProject) inner
_ -> throwString "Cannot use this command with options which override the stack.yaml location"
-- | Helper for 'withEnvCo... | 453 | withGlobalProject inner = do
oldSYL <- view stackYamlLocL
case oldSYL of
SYLDefault -> local (set stackYamlLocL SYLGlobalProject) inner
_ -> throwString "Cannot use this command with options which override the stack.yaml location"
-- | Helper for 'withEnvConfig' which passes in some default arguments:
--
-... | 403 | true | true | 0 | 12 | 93 | 79 | 39 | 40 | null | null |
capn-freako/Haskell_Misc | Typeclassopedia/ex_3.2.3.hs | bsd-3-clause | prop_itree_test testVal = fmap' id testVal == testVal -- "id testVal" was producing an annoying error.
where types = testVal :: ITree Int | 142 | prop_itree_test testVal = fmap' id testVal == testVal -- "id testVal" was producing an annoying error.
where types = testVal :: ITree Int | 142 | prop_itree_test testVal = fmap' id testVal == testVal -- "id testVal" was producing an annoying error.
where types = testVal :: ITree Int | 142 | false | false | 3 | 6 | 27 | 41 | 16 | 25 | null | null |
ibotty/log-effect | src/Control/Eff/Log.hs | mit | filterLog' :: (Typeable l, Member (Log l) r)
=> (l -> Bool) -> proxy l -> Eff r a -> Eff r a
filterLog' predicate _ = filterLog predicate | 139 | filterLog' :: (Typeable l, Member (Log l) r)
=> (l -> Bool) -> proxy l -> Eff r a -> Eff r a
filterLog' predicate _ = filterLog predicate | 139 | filterLog' predicate _ = filterLog predicate | 44 | false | true | 0 | 9 | 30 | 74 | 36 | 38 | null | null |
urbanslug/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | occAnalRec :: SCC (Node Details)
-> (UsageDetails, [CoreBind])
-> (UsageDetails, [CoreBind])
-- The NonRec case is just like a Let (NonRec ...) above
occAnalRec (AcyclicSCC (ND { nd_bndr = bndr, nd_rhs = rhs, nd_uds = rhs_uds}, _, _))
(body_uds, binds)
| not (bndr `usedIn` bo... | 658 | occAnalRec :: SCC (Node Details)
-> (UsageDetails, [CoreBind])
-> (UsageDetails, [CoreBind])
occAnalRec (AcyclicSCC (ND { nd_bndr = bndr, nd_rhs = rhs, nd_uds = rhs_uds}, _, _))
(body_uds, binds)
| not (bndr `usedIn` body_uds)
= (body_uds, binds) -- See Note [Dead code]
... | 592 | occAnalRec (AcyclicSCC (ND { nd_bndr = bndr, nd_rhs = rhs, nd_uds = rhs_uds}, _, _))
(body_uds, binds)
| not (bndr `usedIn` body_uds)
= (body_uds, binds) -- See Note [Dead code]
| otherwise -- It's mentioned in the body
= (body_uds' +++ rhs_uds,
NonRec tagged_bndr rh... | 477 | true | true | 3 | 10 | 196 | 178 | 97 | 81 | null | null |
twittner/zeromq-haskell | src/System/ZMQ4.hs | mit | -- | Starts built-in 0MQ proxy
-- (cf. <http://api.zeromq.org/4-0:zmq-proxy zmq_proxy>)
--
-- Proxy connects front to back socket
--
-- Before calling proxy all sockets should be bound
--
-- If the capture socket is not Nothing, the proxy shall send all
-- messages, received on both frontend and backend, to the captur... | 731 | proxy :: Socket a -> Socket b -> Maybe (Socket c) -> IO ()
proxy front back capture =
onSocket "proxy-front" front $ \f ->
onSocket "proxy-back" back $ \b ->
throwIfMinus1Retry_ "c_zmq_proxy" $ c_zmq_proxy f b c
where
c = maybe nullPtr (_socket . _socketRepr) capture
-- | Generate a new curve k... | 401 | proxy front back capture =
onSocket "proxy-front" front $ \f ->
onSocket "proxy-back" back $ \b ->
throwIfMinus1Retry_ "c_zmq_proxy" $ c_zmq_proxy f b c
where
c = maybe nullPtr (_socket . _socketRepr) capture
-- | Generate a new curve key pair.
-- (cf. <http://api.zeromq.org/4-0:zmq-curve-keypa... | 342 | true | true | 1 | 11 | 138 | 136 | 66 | 70 | null | null |
piyush-kurur/yesod | yesod/main.hs | mit | keterOptions :: Parser Command
keterOptions = Keter <$> switch ( long "nobuild" <> short 'n' <> help "Skip rebuilding" ) | 120 | keterOptions :: Parser Command
keterOptions = Keter <$> switch ( long "nobuild" <> short 'n' <> help "Skip rebuilding" ) | 120 | keterOptions = Keter <$> switch ( long "nobuild" <> short 'n' <> help "Skip rebuilding" ) | 89 | false | true | 0 | 10 | 19 | 41 | 19 | 22 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | attrsToHtml :: WriterOptions -> Attr -> [Attribute]
attrsToHtml opts (id',classes',keyvals) =
[prefixedId opts id' | not (null id')] ++
[A.class_ (toValue $ unwords classes') | not (null classes')] ++
map (\(x,y) -> customAttribute (fromString x) (toValue y)) keyvals | 273 | attrsToHtml :: WriterOptions -> Attr -> [Attribute]
attrsToHtml opts (id',classes',keyvals) =
[prefixedId opts id' | not (null id')] ++
[A.class_ (toValue $ unwords classes') | not (null classes')] ++
map (\(x,y) -> customAttribute (fromString x) (toValue y)) keyvals | 273 | attrsToHtml opts (id',classes',keyvals) =
[prefixedId opts id' | not (null id')] ++
[A.class_ (toValue $ unwords classes') | not (null classes')] ++
map (\(x,y) -> customAttribute (fromString x) (toValue y)) keyvals | 221 | false | true | 0 | 11 | 43 | 133 | 68 | 65 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxFONTENCODING_CP12_MAX :: Int
wxFONTENCODING_CP12_MAX = 34 | 59 | wxFONTENCODING_CP12_MAX :: Int
wxFONTENCODING_CP12_MAX = 34 | 59 | wxFONTENCODING_CP12_MAX = 34 | 28 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | levelElemToLevel :: NameSpaces -> Element -> Maybe Level
levelElemToLevel ns element |
qName (elName element) == "lvl" &&
qURI (elName element) == (lookup "w" ns) = do
ilvl <- findAttr (QName "ilvl" (lookup "w" ns) (Just "w")) element
fmt <- findChild (QName "numFmt" (lookup "w" ns) (Just "w")) elem... | 806 | levelElemToLevel :: NameSpaces -> Element -> Maybe Level
levelElemToLevel ns element |
qName (elName element) == "lvl" &&
qURI (elName element) == (lookup "w" ns) = do
ilvl <- findAttr (QName "ilvl" (lookup "w" ns) (Just "w")) element
fmt <- findChild (QName "numFmt" (lookup "w" ns) (Just "w")) elem... | 806 | levelElemToLevel ns element |
qName (elName element) == "lvl" &&
qURI (elName element) == (lookup "w" ns) = do
ilvl <- findAttr (QName "ilvl" (lookup "w" ns) (Just "w")) element
fmt <- findChild (QName "numFmt" (lookup "w" ns) (Just "w")) element
>>= findAttr (QName "val" (lookup "w" ns... | 749 | false | true | 0 | 19 | 214 | 369 | 180 | 189 | null | null |
bredelings/BAli-Phy | tests/prob_prog/examples.2/branching/Main.hs | gpl-2.0 | fib n = fib (n-2) + fib (n-1) | 29 | fib n = fib (n-2) + fib (n-1) | 29 | fib n = fib (n-2) + fib (n-1) | 29 | false | false | 0 | 8 | 7 | 33 | 16 | 17 | null | null |
thomie/cabal | cabal-install/Distribution/Client/Utils.hs | bsd-3-clause | makeRelativeToCwd :: FilePath -> IO FilePath
makeRelativeToCwd path =
makeRelativeCanonical <$> canonicalizePath path <*> getCurrentDirectory | 145 | makeRelativeToCwd :: FilePath -> IO FilePath
makeRelativeToCwd path =
makeRelativeCanonical <$> canonicalizePath path <*> getCurrentDirectory | 145 | makeRelativeToCwd path =
makeRelativeCanonical <$> canonicalizePath path <*> getCurrentDirectory | 100 | false | true | 2 | 7 | 18 | 38 | 16 | 22 | null | null |
tjakway/ghcjvm | compiler/utils/FastString.hs | bsd-3-clause | nullFS :: FastString -> Bool
nullFS f = BS.null (fs_bs f) | 57 | nullFS :: FastString -> Bool
nullFS f = BS.null (fs_bs f) | 57 | nullFS f = BS.null (fs_bs f) | 28 | false | true | 0 | 7 | 10 | 29 | 14 | 15 | null | null |
mietek/stack | src/Stack/Package.hs | bsd-3-clause | buildFiles :: (MonadLogger m,MonadIO m,MonadThrow m,MonadReader (Path Abs File) m)
=> Path Abs Dir -> BuildInfo -> m [Path Abs File]
buildFiles dir build = do
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
other <- resolveFiles
(dirs ++ [dir])
(map Left (other... | 556 | buildFiles :: (MonadLogger m,MonadIO m,MonadThrow m,MonadReader (Path Abs File) m)
=> Path Abs Dir -> BuildInfo -> m [Path Abs File]
buildFiles dir build = do
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
other <- resolveFiles
(dirs ++ [dir])
(map Left (other... | 556 | buildFiles dir build = do
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
other <- resolveFiles
(dirs ++ [dir])
(map Left (otherModules build))
haskellFileExts
cSources' <- mapMaybeM resolveFileOrWarn (cSources build)
return (other ++ cSources')
-... | 412 | false | true | 0 | 13 | 142 | 171 | 82 | 89 | null | null |
olorin/amazonka | gen/src/Gen/Text.hs | mpl-2.0 | replaceAll :: Text -> [(Regex, Replace)] -> Text
replaceAll = Fold.foldl' (flip (uncurry RE.replaceAll)) | 104 | replaceAll :: Text -> [(Regex, Replace)] -> Text
replaceAll = Fold.foldl' (flip (uncurry RE.replaceAll)) | 104 | replaceAll = Fold.foldl' (flip (uncurry RE.replaceAll)) | 55 | false | true | 0 | 10 | 13 | 47 | 25 | 22 | null | null |
r-peck/Rome | tests/Tests.hs | mit | nonEmptyString :: Gen String
nonEmptyString = listOf1 arbitrary | 63 | nonEmptyString :: Gen String
nonEmptyString = listOf1 arbitrary | 63 | nonEmptyString = listOf1 arbitrary | 34 | false | true | 0 | 6 | 7 | 23 | 9 | 14 | null | null |
owickstrom/owickstrom.github.io | diagrams/src/TimelineDiagrams.hs | mit | renderParallel settings id' parallel =
boxedTracks # leftAlignedLabelAbove settings lblText
where
tracks = renderTracks settings id' (videoTrack parallel) (audioTrack parallel)
bgBox = boundingRect tracks # lc parallelLc # bg parallelBg # lwG 0.2
boxedTracks = (tracks <> bgBox) # center # named id'
lblText =... | 387 | renderParallel settings id' parallel =
boxedTracks # leftAlignedLabelAbove settings lblText
where
tracks = renderTracks settings id' (videoTrack parallel) (audioTrack parallel)
bgBox = boundingRect tracks # lc parallelLc # bg parallelBg # lwG 0.2
boxedTracks = (tracks <> bgBox) # center # named id'
lblText =... | 387 | renderParallel settings id' parallel =
boxedTracks # leftAlignedLabelAbove settings lblText
where
tracks = renderTracks settings id' (videoTrack parallel) (audioTrack parallel)
bgBox = boundingRect tracks # lc parallelLc # bg parallelBg # lwG 0.2
boxedTracks = (tracks <> bgBox) # center # named id'
lblText =... | 387 | false | false | 1 | 8 | 63 | 132 | 62 | 70 | null | null |
rueshyna/gogol | gogol-games/gen/Network/Google/Games/Types/Product.hs | mpl-2.0 | -- | The old match that the rematch was created from; will be updated such
-- that the rematchId field will point at the new match.
tPreviousMatch :: Lens' TurnBasedMatchRematch (Maybe TurnBasedMatch)
tPreviousMatch
= lens _tPreviousMatch
(\ s a -> s{_tPreviousMatch = a}) | 280 | tPreviousMatch :: Lens' TurnBasedMatchRematch (Maybe TurnBasedMatch)
tPreviousMatch
= lens _tPreviousMatch
(\ s a -> s{_tPreviousMatch = a}) | 148 | tPreviousMatch
= lens _tPreviousMatch
(\ s a -> s{_tPreviousMatch = a}) | 79 | true | true | 0 | 9 | 50 | 49 | 26 | 23 | null | null |
abhishekkr/tutorials_as_code | talks-articles/languages-n-runtimes/haskell/PhilipWadler-UniversityOfEdinburgh-2011/lecture18.example01.hs | mit | apply :: Parser a -> String -> [(a, String)]
-- apply (Parser f) s = f s
apply (Parser f) = f | 93 | apply :: Parser a -> String -> [(a, String)]
apply (Parser f) = f | 65 | apply (Parser f) = f | 20 | true | true | 0 | 10 | 21 | 47 | 23 | 24 | null | null |
rainbowbismuth/go-analyze | src/Go/Lexer.hs | gpl-3.0 | unicodeValue :: Parser Char
unicodeValue = littleUValue
<|> bigUValue
<|> escapedChar
<|> PC.anyChar | 133 | unicodeValue :: Parser Char
unicodeValue = littleUValue
<|> bigUValue
<|> escapedChar
<|> PC.anyChar | 133 | unicodeValue = littleUValue
<|> bigUValue
<|> escapedChar
<|> PC.anyChar | 105 | false | true | 0 | 7 | 45 | 28 | 14 | 14 | null | null |
HIPERFIT/futhark | src/Futhark/IR/Primitive.hs | isc | mad_hi16 :: IntValue -> IntValue -> Int16 -> Int16
mad_hi16 a b c = mul_hi16 a b + c | 84 | mad_hi16 :: IntValue -> IntValue -> Int16 -> Int16
mad_hi16 a b c = mul_hi16 a b + c | 84 | mad_hi16 a b c = mul_hi16 a b + c | 33 | false | true | 0 | 9 | 18 | 46 | 20 | 26 | null | null |
picca/hkl | contrib/haskell/src/Hkl/XRD.hs | gpl-3.0 | getMEdf :: FilePath -> IO (MyMatrix Double)
getMEdf f = do
edf <- edfFromFile f
let mnes = map Text.pack ["_mu", "_keta", "_kap", "_kphi", "nu", "del"]
let source = Source (edf'Lambda edf)
let positions = fromList $ map (extract edf) mnes
let geometry = Geometry K6c source positions Nothing
let detector = ... | 520 | getMEdf :: FilePath -> IO (MyMatrix Double)
getMEdf f = do
edf <- edfFromFile f
let mnes = map Text.pack ["_mu", "_keta", "_kap", "_kphi", "nu", "del"]
let source = Source (edf'Lambda edf)
let positions = fromList $ map (extract edf) mnes
let geometry = Geometry K6c source positions Nothing
let detector = ... | 520 | getMEdf f = do
edf <- edfFromFile f
let mnes = map Text.pack ["_mu", "_keta", "_kap", "_kphi", "nu", "del"]
let source = Source (edf'Lambda edf)
let positions = fromList $ map (extract edf) mnes
let geometry = Geometry K6c source positions Nothing
let detector = ZeroD
m <- geometryDetectorRotationGet geo... | 476 | false | true | 0 | 13 | 114 | 222 | 103 | 119 | null | null |
svenssonjoel/ObsidianGFX | Obsidian/CodeGen/CompileIM.hs | bsd-3-clause | compileType (Word32) = [cty| typename uint32_t |] | 49 | compileType (Word32) = [cty| typename uint32_t |] | 49 | compileType (Word32) = [cty| typename uint32_t |] | 49 | false | false | 0 | 6 | 6 | 16 | 10 | 6 | null | null |
ariep/psqueues | src/Data/OrdPSQ/Internal.hs | bsd-3-clause | rdoubleRight
:: (Ord k, Ord p)
=> k -> p -> v -> LTree k p v -> k -> LTree k p v -> LTree k p v
rdoubleRight k1 p1 v1 (LLoser _ (E k2 p2 v2) t1 m1 t2) m2 t3 =
rsingleRight k1 p1 v1 (lsingleLeft k2 p2 v2 t1 m1 t2) m2 t3 | 230 | rdoubleRight
:: (Ord k, Ord p)
=> k -> p -> v -> LTree k p v -> k -> LTree k p v -> LTree k p v
rdoubleRight k1 p1 v1 (LLoser _ (E k2 p2 v2) t1 m1 t2) m2 t3 =
rsingleRight k1 p1 v1 (lsingleLeft k2 p2 v2 t1 m1 t2) m2 t3 | 230 | rdoubleRight k1 p1 v1 (LLoser _ (E k2 p2 v2) t1 m1 t2) m2 t3 =
rsingleRight k1 p1 v1 (lsingleLeft k2 p2 v2 t1 m1 t2) m2 t3 | 126 | false | true | 0 | 12 | 69 | 140 | 68 | 72 | null | null |
sashabu/libcspm | src/CSPM/Evaluator/Monad.hs | bsd-3-clause | addScopeAndBind [] prog = prog | 30 | addScopeAndBind [] prog = prog | 30 | addScopeAndBind [] prog = prog | 30 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
ducis/haAni | hs/common/Graphics/UI/GLUT/Raw/Tokens.hs | gpl-2.0 | glut_LUMINANCE :: CUInt
glut_LUMINANCE = 0x0200 | 47 | glut_LUMINANCE :: CUInt
glut_LUMINANCE = 0x0200 | 47 | glut_LUMINANCE = 0x0200 | 23 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
rueshyna/gogol | gogol-games/gen/Network/Google/Games/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'PlayerScoreSubmissionList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psslKind'
--
-- * 'psslScores'
playerScoreSubmissionList
:: PlayerScoreSubmissionList
playerScoreSubmissionList =
PlayerScoreS... | 420 | playerScoreSubmissionList
:: PlayerScoreSubmissionList
playerScoreSubmissionList =
PlayerScoreSubmissionList'
{ _psslKind = "games#playerScoreSubmissionList"
, _psslScores = Nothing
} | 203 | playerScoreSubmissionList =
PlayerScoreSubmissionList'
{ _psslKind = "games#playerScoreSubmissionList"
, _psslScores = Nothing
} | 144 | true | true | 1 | 7 | 72 | 39 | 23 | 16 | null | null |
haskell-works/kafka-client | tests-it/Kafka/IntegrationSpec.hs | mit | sendMessages :: [ProducerRecord] -> KafkaProducer -> IO (Either KafkaError ())
sendMessages msgs prod =
Right <$> (forM_ msgs (produceMessage prod) >> flushProducer prod) | 172 | sendMessages :: [ProducerRecord] -> KafkaProducer -> IO (Either KafkaError ())
sendMessages msgs prod =
Right <$> (forM_ msgs (produceMessage prod) >> flushProducer prod) | 172 | sendMessages msgs prod =
Right <$> (forM_ msgs (produceMessage prod) >> flushProducer prod) | 93 | false | true | 0 | 10 | 24 | 65 | 32 | 33 | null | null |
filib/ruby-marshal | src/Data/Ruby/Marshal/Encoding.hs | mit | toEnc "macTurkish" = MacTurkish | 47 | toEnc "macTurkish" = MacTurkish | 47 | toEnc "macTurkish" = MacTurkish | 47 | false | false | 0 | 5 | 19 | 9 | 4 | 5 | null | null |
diagrams/diagrams-contrib | src/Diagrams/TwoD/Grid.hs | bsd-3-clause | -- | Create a n by m grid. Diagrams can be placed on either the grid
-- points themselves or on points half way between grid points. The
-- latter includes points a half grid length outside of the grid
-- itself.
gridWithHalves' :: (Renderable (Path V2 n) b, TypeableFloat n)
=> GridOpts n -> Int -> Int ... | 1,811 | gridWithHalves' :: (Renderable (Path V2 n) b, TypeableFloat n)
=> GridOpts n -> Int -> Int -> QDiagram b V2 n Any
gridWithHalves' opts n m =
(mconcat lineXs # translate (r2 (llx, lly))) <>
(mconcat lineYs # translate (r2 (llx, lly))) <>
(intersections # translate (r2 (llx - delta2X, luy + delta2Y)... | 1,598 | gridWithHalves' opts n m =
(mconcat lineXs # translate (r2 (llx, lly))) <>
(mconcat lineYs # translate (r2 (llx, lly))) <>
(intersections # translate (r2 (llx - delta2X, luy + delta2Y)))
where
llx :& lly = coords (opts^.gridLL)
lrx :& _ = coords (opts^.gridLR)
_ :& luy = coords (opts^.gridUL... | 1,468 | true | true | 0 | 12 | 572 | 690 | 362 | 328 | null | null |
fabioyamate/programming-in-haskell | ch05/caesar.hs | mit | main = do
print $ map let2int ['a'..'z']
print $ map int2let [0..25]
print $ map (shift (-3)) ['a'..'z']
print $ decode 3 $ encode 3 "haskell is fun"
print $ crack (encode 5 "hello world this is fun") | 220 | main = do
print $ map let2int ['a'..'z']
print $ map int2let [0..25]
print $ map (shift (-3)) ['a'..'z']
print $ decode 3 $ encode 3 "haskell is fun"
print $ crack (encode 5 "hello world this is fun") | 220 | main = do
print $ map let2int ['a'..'z']
print $ map int2let [0..25]
print $ map (shift (-3)) ['a'..'z']
print $ decode 3 $ encode 3 "haskell is fun"
print $ crack (encode 5 "hello world this is fun") | 220 | false | false | 1 | 13 | 58 | 109 | 49 | 60 | null | null |
Bodigrim/katas | src/haskell/4-Roman-Numerals-Decoder.hs | bsd-2-clause | solution ('C':'D':xs) = 400 + solution xs | 41 | solution ('C':'D':xs) = 400 + solution xs | 41 | solution ('C':'D':xs) = 400 + solution xs | 41 | false | false | 0 | 8 | 6 | 27 | 13 | 14 | null | null |
np/ling | Ling/Session/Core.hs | bsd-3-clause | wrapSessions :: Sessions -> Session
wrapSessions (Sessions [sr]) | Just s <- sr ^? _OneS = s | 92 | wrapSessions :: Sessions -> Session
wrapSessions (Sessions [sr]) | Just s <- sr ^? _OneS = s | 92 | wrapSessions (Sessions [sr]) | Just s <- sr ^? _OneS = s | 56 | false | true | 0 | 10 | 16 | 50 | 22 | 28 | null | null |
jdevelop/lj2rss | LJRSS/LJConfig.hs | bsd-3-clause | readConfig :: IO TLJConfig
readConfig = do
fileNameFromDir <- getConfigFileName
go fileNameFromDir =<< doesFileExist fileNameFromDir
where
go fileNameFromDir haveFile = if not haveFile
then
fail $ "Can not read config file " ++ fileNameFromDir
else
liftM read $ readF... | 339 | readConfig :: IO TLJConfig
readConfig = do
fileNameFromDir <- getConfigFileName
go fileNameFromDir =<< doesFileExist fileNameFromDir
where
go fileNameFromDir haveFile = if not haveFile
then
fail $ "Can not read config file " ++ fileNameFromDir
else
liftM read $ readF... | 339 | readConfig = do
fileNameFromDir <- getConfigFileName
go fileNameFromDir =<< doesFileExist fileNameFromDir
where
go fileNameFromDir haveFile = if not haveFile
then
fail $ "Can not read config file " ++ fileNameFromDir
else
liftM read $ readFile fileNameFromDir | 312 | false | true | 0 | 8 | 92 | 75 | 35 | 40 | null | null |
mikusp/accelerate-cuda | Data/Array/Accelerate/CUDA/Foreign/Export.hs | bsd-3-clause | -- |Given a handle and an Accelerate function, generate an exportable version.
buildExported :: forall a b. (Arrays a, Arrays b) => AccHandle -> (Acc a -> Acc b) -> IO (StablePtr Afun)
buildExported hndl f = ef
where
ef :: IO (StablePtr Afun)
ef = do
ctx <- deRefStablePtr hndl
newStablePtr (Afun (... | 414 | buildExported :: forall a b. (Arrays a, Arrays b) => AccHandle -> (Acc a -> Acc b) -> IO (StablePtr Afun)
buildExported hndl f = ef
where
ef :: IO (StablePtr Afun)
ef = do
ctx <- deRefStablePtr hndl
newStablePtr (Afun (run1With ctx f) (undefined :: a) (undefined :: b))
-- Utility functions
-- ---... | 335 | buildExported hndl f = ef
where
ef :: IO (StablePtr Afun)
ef = do
ctx <- deRefStablePtr hndl
newStablePtr (Afun (run1With ctx f) (undefined :: a) (undefined :: b))
-- Utility functions
-- ------------------ | 229 | true | true | 2 | 12 | 89 | 149 | 72 | 77 | null | null |
mgax/beancount | lib/haskell/LedgerParser.hs | gpl-2.0 | date :: Parser Date
date = do count 4 digit
dateSep
count 2 digit
dateSep
count 2 digit
return "date" | 151 | date :: Parser Date
date = do count 4 digit
dateSep
count 2 digit
dateSep
count 2 digit
return "date" | 151 | date = do count 4 digit
dateSep
count 2 digit
dateSep
count 2 digit
return "date" | 131 | false | true | 1 | 8 | 69 | 54 | 20 | 34 | null | null |
themoritz/cabal | cabal-testsuite/PackageTests/BuildTargets/UseLocalPackage/use-local-version-of-package.test.hs | bsd-3-clause | -- Test that "cabal new-build pkg" builds the local pkg-1.0, which has an exe
-- that prints a unique message. It should not build 1.0 or 2.0 from the
-- repository.
main = cabalTest $ withRepo "repo" $ do
cabal "new-build" ["pkg"]
withPlan $ do
r <- runPlanExe' "pkg" "my-exe" []
assertOutputContains "local... | 570 | main = cabalTest $ withRepo "repo" $ do
cabal "new-build" ["pkg"]
withPlan $ do
r <- runPlanExe' "pkg" "my-exe" []
assertOutputContains "local pkg-1.0" r
-- cabal shouldn't build a package from the repo, even when given a constraint
-- that only matches a non-local package.
r <- fails $ cabal' "new-b... | 404 | main = cabalTest $ withRepo "repo" $ do
cabal "new-build" ["pkg"]
withPlan $ do
r <- runPlanExe' "pkg" "my-exe" []
assertOutputContains "local pkg-1.0" r
-- cabal shouldn't build a package from the repo, even when given a constraint
-- that only matches a non-local package.
r <- fails $ cabal' "new-b... | 404 | true | false | 3 | 14 | 108 | 99 | 45 | 54 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res WriteOffAddrOp_Int32 args = doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args | 118 | emitPrimOp dflags res WriteOffAddrOp_Int32 args = doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args | 118 | emitPrimOp dflags res WriteOffAddrOp_Int32 args = doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args | 118 | false | false | 0 | 9 | 23 | 36 | 17 | 19 | null | null |
jozefg/hasquito | test/TypeCheck.hs | mit | application :: [Def]
application = [ Def (TArr a (TArr b a)) (Name "const") (Lam [] x (Lam [] y (Var x)))
, Def (TArr a a) (Name "ident") (Lam [] x (Var x))
, Def TNum (Name "app1") (App (Var (Name "ident")) (Num 1))
, Def TNum (Name "app... | 374 | application :: [Def]
application = [ Def (TArr a (TArr b a)) (Name "const") (Lam [] x (Lam [] y (Var x)))
, Def (TArr a a) (Name "ident") (Lam [] x (Var x))
, Def TNum (Name "app1") (App (Var (Name "ident")) (Num 1))
, Def TNum (Name "app... | 374 | application = [ Def (TArr a (TArr b a)) (Name "const") (Lam [] x (Lam [] y (Var x)))
, Def (TArr a a) (Name "ident") (Lam [] x (Var x))
, Def TNum (Name "app1") (App (Var (Name "ident")) (Num 1))
, Def TNum (Name "app2") (App (App (Var (... | 353 | false | true | 0 | 14 | 141 | 216 | 109 | 107 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/Win32/Graphics/Win32/GDI/Graphics2D.hs | bsd-3-clause | pie :: HDC -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
pie dc left top right bottom x1 y1 x2 y2 =
failIfFalse_ "Pie" $ c_Pie dc left top right bottom x1 y1 x2 y2 | 200 | pie :: HDC -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
pie dc left top right bottom x1 y1 x2 y2 =
failIfFalse_ "Pie" $ c_Pie dc left top right bottom x1 y1 x2 y2 | 200 | pie dc left top right bottom x1 y1 x2 y2 =
failIfFalse_ "Pie" $ c_Pie dc left top right bottom x1 y1 x2 y2 | 108 | false | true | 2 | 16 | 47 | 102 | 48 | 54 | null | null |
laser/cis-194-spring-2017 | src/Homework/Week07/Editor.hs | mit | inBuffer :: Buffer b => Int -> Editor b Bool
inBuffer n = do
nl <- onBuffer numLines
return (n >= 0 && n < nl) | 114 | inBuffer :: Buffer b => Int -> Editor b Bool
inBuffer n = do
nl <- onBuffer numLines
return (n >= 0 && n < nl) | 114 | inBuffer n = do
nl <- onBuffer numLines
return (n >= 0 && n < nl) | 69 | false | true | 0 | 11 | 29 | 61 | 28 | 33 | null | null |
pasberth/binal1 | Language/Binal/Generator/Simple.hs | mit | generateExpr (TyList (TyLit (SymLit "num.add") _ _:x:y:[]) _ _) = do
BinaryJSAST "+" <$> generateExpr x <*> generateExpr y | 124 | generateExpr (TyList (TyLit (SymLit "num.add") _ _:x:y:[]) _ _) = do
BinaryJSAST "+" <$> generateExpr x <*> generateExpr y | 124 | generateExpr (TyList (TyLit (SymLit "num.add") _ _:x:y:[]) _ _) = do
BinaryJSAST "+" <$> generateExpr x <*> generateExpr y | 124 | false | false | 0 | 12 | 20 | 69 | 32 | 37 | null | null |
jasonzoladz/persistent | persistent-sqlite/Database/Sqlite.hs | mit | bindDouble :: Statement -> Int -> Double -> IO ()
bindDouble statement parameterIndex datum = do
error <- bindDoubleError statement parameterIndex datum
case error of
ErrorOK -> return ()
_ -> sqlError Nothing "bind double" error | 241 | bindDouble :: Statement -> Int -> Double -> IO ()
bindDouble statement parameterIndex datum = do
error <- bindDoubleError statement parameterIndex datum
case error of
ErrorOK -> return ()
_ -> sqlError Nothing "bind double" error | 241 | bindDouble statement parameterIndex datum = do
error <- bindDoubleError statement parameterIndex datum
case error of
ErrorOK -> return ()
_ -> sqlError Nothing "bind double" error | 191 | false | true | 0 | 11 | 47 | 80 | 37 | 43 | null | null |
CarloMicieli/fun-with-haskell | src/craft3e/Chapter03.hs | apache-2.0 | -- |The NOT operator
not' :: Bool -> Bool
not' True = False | 60 | not' :: Bool -> Bool
not' True = False | 39 | not' True = False | 18 | true | true | 0 | 7 | 13 | 25 | 11 | 14 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeVolumes.hs | mpl-2.0 | dv2DryRun :: Lens' DescribeVolumes (Maybe Bool)
dv2DryRun = lens _dv2DryRun (\s a -> s { _dv2DryRun = a }) | 106 | dv2DryRun :: Lens' DescribeVolumes (Maybe Bool)
dv2DryRun = lens _dv2DryRun (\s a -> s { _dv2DryRun = a }) | 106 | dv2DryRun = lens _dv2DryRun (\s a -> s { _dv2DryRun = a }) | 58 | false | true | 0 | 9 | 18 | 45 | 24 | 21 | null | null |
BakerSmithA/Turing | src/Syntax/Tree.hs | bsd-3-clause | -- Returns the type of an argument to a function invocation.
argType :: FuncDeclArg -> DataType
argType = snd | 109 | argType :: FuncDeclArg -> DataType
argType = snd | 48 | argType = snd | 13 | true | true | 0 | 5 | 18 | 16 | 9 | 7 | null | null |
jsavatgy/tau-city | tau-html-img-opts.hs | gpl-2.0 | addImgTag opts = map (mpimg opts) | 33 | addImgTag opts = map (mpimg opts) | 33 | addImgTag opts = map (mpimg opts) | 33 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
dwnusbaum/log | Main.hs | bsd-2-clause | helpJournal "help" = putStrLn
"Syntax: journal help <command>\n\
\Action: Display specific help message for the given command." | 135 | helpJournal "help" = putStrLn
"Syntax: journal help <command>\n\
\Action: Display specific help message for the given command." | 135 | helpJournal "help" = putStrLn
"Syntax: journal help <command>\n\
\Action: Display specific help message for the given command." | 135 | false | false | 1 | 5 | 24 | 16 | 5 | 11 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/TypeCheck/Types.hs | bsd-3-clause | shortT = TcPrimT (ShortT defaultPos) | 40 | shortT = TcPrimT (ShortT defaultPos) | 40 | shortT = TcPrimT (ShortT defaultPos) | 40 | false | false | 0 | 7 | 8 | 15 | 7 | 8 | null | null |
icyfork/shellcheck | ShellCheck/AST.hs | gpl-3.0 | getId t = case t of
T_AND_IF id -> id
T_OR_IF id -> id
T_DSEMI id -> id
T_Semi id -> id
T_DLESS id -> id
T_DGREAT id -> id
T_LESSAND id -> id
T_GREATAND id -> id
T_LESSGREAT id -> id
T_DLESSDASH id -> id
T_CLOBBER id -> i... | 2,864 | getId t = case t of
T_AND_IF id -> id
T_OR_IF id -> id
T_DSEMI id -> id
T_Semi id -> id
T_DLESS id -> id
T_DGREAT id -> id
T_LESSAND id -> id
T_GREATAND id -> id
T_LESSGREAT id -> id
T_DLESSDASH id -> id
T_CLOBBER id -> i... | 2,864 | getId t = case t of
T_AND_IF id -> id
T_OR_IF id -> id
T_DSEMI id -> id
T_Semi id -> id
T_DLESS id -> id
T_DGREAT id -> id
T_LESSAND id -> id
T_GREATAND id -> id
T_LESSGREAT id -> id
T_DLESSDASH id -> id
T_CLOBBER id -> i... | 2,864 | false | false | 0 | 8 | 1,296 | 1,061 | 484 | 577 | null | null |
thoughtpolice/haskell-donate | backend/Main.hs | mit | -- | Health check endpoint API implementation. When queried, responds based on
-- the health of the application. A 200 response indicates the application is
-- healthy.
health :: Server HealthAPI
health = logM (Stdout "INFO: health check ping received") >> return NoContent | 273 | health :: Server HealthAPI
health = logM (Stdout "INFO: health check ping received") >> return NoContent | 104 | health = logM (Stdout "INFO: health check ping received") >> return NoContent | 77 | true | true | 0 | 7 | 42 | 38 | 18 | 20 | null | null |
trskop/cabal | Cabal/Distribution/PackageDescription.hs | bsd-3-clause | knownTestTypes :: [TestType]
knownTestTypes = [ TestTypeExe (Version [1,0] [])
, TestTypeLib (Version [0,9] []) ] | 130 | knownTestTypes :: [TestType]
knownTestTypes = [ TestTypeExe (Version [1,0] [])
, TestTypeLib (Version [0,9] []) ] | 130 | knownTestTypes = [ TestTypeExe (Version [1,0] [])
, TestTypeLib (Version [0,9] []) ] | 101 | false | true | 0 | 10 | 32 | 65 | 33 | 32 | null | null |
magicant/flesh | src/Flesh/Language/Parser/Syntax.hs | gpl-2.0 | dollarExpansion :: MonadParser m => m (Positioned DoubleQuoteUnit)
dollarExpansion = do
~(p, _) <- char '$'
dqu <- dollarExpansionTail
return (p, dqu)
-- | Parses a character contained in a backquote command substitution.
--
-- The argument predicate defines if a character can be backslash-escaped. | 306 | dollarExpansion :: MonadParser m => m (Positioned DoubleQuoteUnit)
dollarExpansion = do
~(p, _) <- char '$'
dqu <- dollarExpansionTail
return (p, dqu)
-- | Parses a character contained in a backquote command substitution.
--
-- The argument predicate defines if a character can be backslash-escaped. | 306 | dollarExpansion = do
~(p, _) <- char '$'
dqu <- dollarExpansionTail
return (p, dqu)
-- | Parses a character contained in a backquote command substitution.
--
-- The argument predicate defines if a character can be backslash-escaped. | 239 | false | true | 0 | 10 | 51 | 72 | 34 | 38 | null | null |
brendanhay/gogol | gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs | mpl-2.0 | -- | An event color definition.
ceAddtional :: Lens' ColorsEvent (HashMap Text ColorDefinition)
ceAddtional
= lens _ceAddtional (\ s a -> s{_ceAddtional = a}) .
_Coerce | 176 | ceAddtional :: Lens' ColorsEvent (HashMap Text ColorDefinition)
ceAddtional
= lens _ceAddtional (\ s a -> s{_ceAddtional = a}) .
_Coerce | 144 | ceAddtional
= lens _ceAddtional (\ s a -> s{_ceAddtional = a}) .
_Coerce | 80 | true | true | 1 | 10 | 33 | 57 | 28 | 29 | null | null |
rahulmutt/ghcvm | compiler/Eta/CodeGen/Prim.hs | bsd-3-clause | intCompOp :: (Code -> Code -> Code) -> [Code] -> Code
intCompOp op args = flip normalOp args $ op (iconst jint 1) (iconst jint 0) | 129 | intCompOp :: (Code -> Code -> Code) -> [Code] -> Code
intCompOp op args = flip normalOp args $ op (iconst jint 1) (iconst jint 0) | 129 | intCompOp op args = flip normalOp args $ op (iconst jint 1) (iconst jint 0) | 75 | false | true | 0 | 8 | 25 | 68 | 34 | 34 | null | null |
Nishant9/hScraper | tests/debug.hs | bsd-3-clause | getFromFile :: String -> IO HTMLTree
getFromFile str = getParsedHTML <$> parseHtml <$> (openFile str ReadMode >>= TIO.hGetContents) | 132 | getFromFile :: String -> IO HTMLTree
getFromFile str = getParsedHTML <$> parseHtml <$> (openFile str ReadMode >>= TIO.hGetContents) | 132 | getFromFile str = getParsedHTML <$> parseHtml <$> (openFile str ReadMode >>= TIO.hGetContents) | 95 | false | true | 0 | 8 | 18 | 43 | 21 | 22 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F28.hs | bsd-3-clause | -- glUniformMatrix4x2fv --------------------------------------------------------
-- | Manual pages for <https://www.opengl.org/sdk/docs/man2/xhtml/glUniform.xml OpenGL 2.x> or <https://www.opengl.org/sdk/docs/man3/xhtml/glUniform.xml OpenGL 3.x> or <https://www.opengl.org/sdk/docs/man4/html/glUniform.xhtml OpenGL 4.x>... | 674 | glUniformMatrix4x2fv
:: MonadIO m
=> GLint -- ^ @location@.
-> GLsizei -- ^ @count@.
-> GLboolean -- ^ @transpose@ of type [Boolean](Graphics-GL-Groups.html#Boolean).
-> Ptr GLfloat -- ^ @value@ pointing to @count*8@ elements of type @GLfloat@.
-> m ()
glUniformMatrix4x2fv v1 v2 v3 v4 = liftIO $ dyn868 ptr_... | 352 | glUniformMatrix4x2fv v1 v2 v3 v4 = liftIO $ dyn868 ptr_glUniformMatrix4x2fv v1 v2 v3 v4 | 87 | true | true | 0 | 12 | 83 | 76 | 38 | 38 | null | null |
ThoughtLeadr/Riak-Haskell-HTTP-Client | src/Network/Riak/HTTP/Internal.hs | bsd-3-clause | -- | Try a list of clients and find the first one that succeeds
tryClients :: [Client] -> (Client -> IO (Either String a))
-> IO (Either String a)
tryClients clients f = tryClients' clients (Left "Client list is empty")
where
tryClients' [] lastError = return lastError
tryClients' (c:cs) ... | 464 | tryClients :: [Client] -> (Client -> IO (Either String a))
-> IO (Either String a)
tryClients clients f = tryClients' clients (Left "Client list is empty")
where
tryClients' [] lastError = return lastError
tryClients' (c:cs) lastError = do
x <- f c
case x of
... | 400 | tryClients clients f = tryClients' clients (Left "Client list is empty")
where
tryClients' [] lastError = return lastError
tryClients' (c:cs) lastError = do
x <- f c
case x of
l@(Left _) -> tryClients' cs l
r@(Right _) -> return r | 306 | true | true | 1 | 13 | 156 | 157 | 77 | 80 | null | null |
cartazio/omega | mosaic/trainer.hs | bsd-3-clause | correct n q t x = do putStrLn $ "Das ist keine Zahl: \"" ++ x ++ "\""
--putStrLn $ "Was ist " ++ show a ++ " " ++ op ++ " " ++ show b ++ " ?"
q
getLine >>= correct n q t | 232 | correct n q t x = do putStrLn $ "Das ist keine Zahl: \"" ++ x ++ "\""
--putStrLn $ "Was ist " ++ show a ++ " " ++ op ++ " " ++ show b ++ " ?"
q
getLine >>= correct n q t | 232 | correct n q t x = do putStrLn $ "Das ist keine Zahl: \"" ++ x ++ "\""
--putStrLn $ "Was ist " ++ show a ++ " " ++ op ++ " " ++ show b ++ " ?"
q
getLine >>= correct n q t | 232 | false | false | 1 | 10 | 109 | 55 | 22 | 33 | null | null |
adamse/hindent | src/HIndent/Pretty.hs | bsd-3-clause | -- | Maybe render a class context.
maybeCtx :: MonadState (PrintState s) m => Maybe (Context NodeInfo) -> m ()
maybeCtx =
maybe (return ())
(\p ->
pretty p >>
write " => ") | 204 | maybeCtx :: MonadState (PrintState s) m => Maybe (Context NodeInfo) -> m ()
maybeCtx =
maybe (return ())
(\p ->
pretty p >>
write " => ") | 169 | maybeCtx =
maybe (return ())
(\p ->
pretty p >>
write " => ") | 93 | true | true | 0 | 9 | 65 | 76 | 37 | 39 | null | null |
yoo-e/yesod-helpers | Yesod/Helpers/Logger.hs | bsd-3-clause | withSiteLogFuncInHandlerT :: (LoggingTRunner site, Monad m) =>
HandlerT site m a
-> HandlerT site m a
withSiteLogFuncInHandlerT h = do
foundation <- ask
runLoggingTWith foundation $ LoggingT $ \log_func ->
withLogFuncInHandlerT log_func h | 262 | withSiteLogFuncInHandlerT :: (LoggingTRunner site, Monad m) =>
HandlerT site m a
-> HandlerT site m a
withSiteLogFuncInHandlerT h = do
foundation <- ask
runLoggingTWith foundation $ LoggingT $ \log_func ->
withLogFuncInHandlerT log_func h | 262 | withSiteLogFuncInHandlerT h = do
foundation <- ask
runLoggingTWith foundation $ LoggingT $ \log_func ->
withLogFuncInHandlerT log_func h | 152 | false | true | 0 | 9 | 56 | 79 | 37 | 42 | null | null |
gbwey/persistent | persistent-template/Database/Persist/TH.hs | mit | lensPTH :: (s -> a) -> (s -> b -> t) -> Lens s t a b
lensPTH sa sbt afb s = fmap (sbt s) (afb $ sa s) | 101 | lensPTH :: (s -> a) -> (s -> b -> t) -> Lens s t a b
lensPTH sa sbt afb s = fmap (sbt s) (afb $ sa s) | 101 | lensPTH sa sbt afb s = fmap (sbt s) (afb $ sa s) | 48 | false | true | 0 | 9 | 29 | 76 | 38 | 38 | null | null |
tjakway/ghcjvm | compiler/prelude/THNames.hs | bsd-3-clause | -- data SourceUnpackedness = ...
noSourceUnpackednessKey, sourceNoUnpackKey, sourceUnpackKey :: Unique
noSourceUnpackednessKey = mkPreludeMiscIdUnique 361 | 154 | noSourceUnpackednessKey, sourceNoUnpackKey, sourceUnpackKey :: Unique
noSourceUnpackednessKey = mkPreludeMiscIdUnique 361 | 121 | noSourceUnpackednessKey = mkPreludeMiscIdUnique 361 | 51 | true | true | 0 | 5 | 13 | 19 | 12 | 7 | null | null |
ajnsit/snap-routes | src/Routes/Overlap.hs | mit | hasSuffix :: ResourceTree t -> Bool
hasSuffix (ResourceLeaf r) =
case resourceDispatch r of
Subsite{} -> True
Methods Just{} _ -> True
Methods Nothing _ -> False | 189 | hasSuffix :: ResourceTree t -> Bool
hasSuffix (ResourceLeaf r) =
case resourceDispatch r of
Subsite{} -> True
Methods Just{} _ -> True
Methods Nothing _ -> False | 189 | hasSuffix (ResourceLeaf r) =
case resourceDispatch r of
Subsite{} -> True
Methods Just{} _ -> True
Methods Nothing _ -> False | 153 | false | true | 0 | 9 | 54 | 70 | 33 | 37 | null | null |
sos22/himap | Deliver.hs | gpl-3.0 | addMessageToPool :: [(String, DS.SQLData)] -> Journal -> DS.Database -> Email -> IO (String, MsgUid)
addMessageToPool attribs journal database email =
do existing <- dupeCheck attribs database email
case existing of
Just x ->
do r <- withStatement database (DT.pack "SELECT Location FROM Messages ... | 1,738 | addMessageToPool :: [(String, DS.SQLData)] -> Journal -> DS.Database -> Email -> IO (String, MsgUid)
addMessageToPool attribs journal database email =
do existing <- dupeCheck attribs database email
case existing of
Just x ->
do r <- withStatement database (DT.pack "SELECT Location FROM Messages ... | 1,738 | addMessageToPool attribs journal database email =
do existing <- dupeCheck attribs database email
case existing of
Just x ->
do r <- withStatement database (DT.pack "SELECT Location FROM Messages WHERE MessageId = ?") $ \stmt ->
do DS.bind stmt [x]
r <- DS.step stmt... | 1,637 | false | true | 0 | 30 | 642 | 499 | 235 | 264 | null | null |
AndreasVoellmy/nettle-openflow | src/Network/Data/OpenFlow/Match.hs | bsd-3-clause | -- |A match that matches every packet.
matchAny :: Match
matchAny = Match Nothing matchAnyHeader matchAnyBody | 109 | matchAny :: Match
matchAny = Match Nothing matchAnyHeader matchAnyBody | 70 | matchAny = Match Nothing matchAnyHeader matchAnyBody | 52 | true | true | 0 | 5 | 15 | 19 | 10 | 9 | null | null |
Chatanga/kage | src/Graphics/Color.hs | mit | red = mkColor 255 0 0 | 21 | red = mkColor 255 0 0 | 21 | red = mkColor 255 0 0 | 21 | false | false | 1 | 5 | 5 | 16 | 6 | 10 | null | null |
agbell/Rajesh | main.hs | mit | lookupMorse n | even n = lookupMorse (div n 2)
| otherwise = 1 - lookupMorse (div (n-1) 2) | 115 | lookupMorse n | even n = lookupMorse (div n 2)
| otherwise = 1 - lookupMorse (div (n-1) 2) | 115 | lookupMorse n | even n = lookupMorse (div n 2)
| otherwise = 1 - lookupMorse (div (n-1) 2) | 115 | false | false | 0 | 11 | 43 | 60 | 27 | 33 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/Show.hs | bsd-3-clause | showList__ :: (a -> ShowS) -> [a] -> ShowS
showList__ _ [] s = "[]" ++ s | 81 | showList__ :: (a -> ShowS) -> [a] -> ShowS
showList__ _ [] s = "[]" ++ s | 81 | showList__ _ [] s = "[]" ++ s | 37 | false | true | 0 | 7 | 25 | 42 | 22 | 20 | null | null |
abhin4v/hask-irc | hask-irc-handlers/Network/IRC/Handlers/Auth.hs | apache-2.0 | stopAuth :: MonadMsgHandler m => IORef (AcidState Auth) -> m ()
stopAuth state = io $ do
acid <- readIORef state
createArchive acid
createCheckpointAndClose acid | 167 | stopAuth :: MonadMsgHandler m => IORef (AcidState Auth) -> m ()
stopAuth state = io $ do
acid <- readIORef state
createArchive acid
createCheckpointAndClose acid | 167 | stopAuth state = io $ do
acid <- readIORef state
createArchive acid
createCheckpointAndClose acid | 103 | false | true | 0 | 9 | 30 | 65 | 28 | 37 | null | null |
mainland/dph | dph-prim-par/Data/Array/Parallel/Unlifted.hs | bsd-3-clause | fsts = Seq.fsts | 18 | fsts = Seq.fsts | 18 | fsts = Seq.fsts | 18 | false | false | 0 | 5 | 5 | 8 | 4 | 4 | null | null |
merc1031/haskell-sonos-http-api | src/Sonos/Commands.hs | bsd-3-clause | hostFmt = sformat ("http://" % stext % stext) | 45 | hostFmt = sformat ("http://" % stext % stext) | 45 | hostFmt = sformat ("http://" % stext % stext) | 45 | false | false | 1 | 8 | 7 | 23 | 10 | 13 | null | null |
andrewthad/yesod-crud-persist | src/Yesod/Crud.hs | mit | closureRootNodes :: (MonadIO m, SqlClosure a c) => SqlPersistT m [Entity a]
closureRootNodes = error "Write this" | 113 | closureRootNodes :: (MonadIO m, SqlClosure a c) => SqlPersistT m [Entity a]
closureRootNodes = error "Write this" | 113 | closureRootNodes = error "Write this" | 37 | false | true | 0 | 8 | 16 | 42 | 21 | 21 | null | null |
Gabriel439/Haskell-Dhall-Library | dhall/src/Dhall/Parser/Token.hs | bsd-3-clause | -- | Parse the @[@] symbol
_openBracket :: Parser ()
_openBracket = reservedChar '[' | 84 | _openBracket :: Parser ()
_openBracket = reservedChar '[' | 57 | _openBracket = reservedChar '[' | 31 | true | true | 1 | 6 | 13 | 23 | 10 | 13 | null | null |
wavewave/qft | old/lib/trash/Permute.hs | gpl-3.0 | guardEither _ True = Right () | 29 | guardEither _ True = Right () | 29 | guardEither _ True = Right () | 29 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
HIPERFIT/hopencl | tests/unit/HOpenCL/Kernel_Test.hs | bsd-3-clause | testKernelProps = buildTest $ do
platforms <- getPlatformIDs
devices <- mapM (getDeviceIDs [DeviceTypeAll]) platforms
let pds = zip (map ContextPlatform platforms) devices
cs <- forM pds $ \(p, ds) -> createContext ds [p] NoContextCallback
programs <- forM cs (`createProgram` program)
let progdevs = [(p,ds)... | 1,337 | testKernelProps = buildTest $ do
platforms <- getPlatformIDs
devices <- mapM (getDeviceIDs [DeviceTypeAll]) platforms
let pds = zip (map ContextPlatform platforms) devices
cs <- forM pds $ \(p, ds) -> createContext ds [p] NoContextCallback
programs <- forM cs (`createProgram` program)
let progdevs = [(p,ds)... | 1,337 | testKernelProps = buildTest $ do
platforms <- getPlatformIDs
devices <- mapM (getDeviceIDs [DeviceTypeAll]) platforms
let pds = zip (map ContextPlatform platforms) devices
cs <- forM pds $ \(p, ds) -> createContext ds [p] NoContextCallback
programs <- forM cs (`createProgram` program)
let progdevs = [(p,ds)... | 1,337 | false | false | 0 | 15 | 233 | 390 | 191 | 199 | null | null |
urbanslug/ghc | testsuite/tests/safeHaskell/check/Check07_A.hs | bsd-3-clause | a :: a -> a
a n = n | 19 | a :: a -> a
a n = n | 19 | a n = n | 7 | false | true | 0 | 5 | 8 | 22 | 10 | 12 | null | null |
sramekj/lunchvote | Application.hs | mit | shutdownApp :: App -> IO ()
shutdownApp _ = return () | 53 | shutdownApp :: App -> IO ()
shutdownApp _ = return () | 53 | shutdownApp _ = return () | 25 | false | true | 0 | 7 | 10 | 28 | 13 | 15 | null | null |
AKST/jsgen | src/Language/JSGen/Emit.hs | mit | sepby :: JSEmit () -> (a -> JSEmit ()) -> [a] -> JSEmit ()
sepby seperator each = iter
where
iter = \case
[] -> return ()
last:[] -> void (each last)
head:rest -> do
each head
seperator
iter rest | 240 | sepby :: JSEmit () -> (a -> JSEmit ()) -> [a] -> JSEmit ()
sepby seperator each = iter
where
iter = \case
[] -> return ()
last:[] -> void (each last)
head:rest -> do
each head
seperator
iter rest | 240 | sepby seperator each = iter
where
iter = \case
[] -> return ()
last:[] -> void (each last)
head:rest -> do
each head
seperator
iter rest | 181 | false | true | 0 | 10 | 84 | 122 | 57 | 65 | null | null |
jdreaver/iris | src/Iris/Visuals/Mesh.hs | mit | fsSource mc = BS.intercalate "\n"
[
colorFragmentLine mc
, "void main(void) { "
, " gl_FragColor = vec4(f_color.xyz, 1.0);"
, "}"
] | 220 | fsSource mc = BS.intercalate "\n"
[
colorFragmentLine mc
, "void main(void) { "
, " gl_FragColor = vec4(f_color.xyz, 1.0);"
, "}"
] | 220 | fsSource mc = BS.intercalate "\n"
[
colorFragmentLine mc
, "void main(void) { "
, " gl_FragColor = vec4(f_color.xyz, 1.0);"
, "}"
] | 220 | false | false | 0 | 7 | 110 | 31 | 16 | 15 | null | null |
alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/YarnProtos/LogAggregationStatusProto.hs | mit | toMaybe'Enum 6 = Prelude'.Just LOG_TIME_OUT | 43 | toMaybe'Enum 6 = Prelude'.Just LOG_TIME_OUT | 43 | toMaybe'Enum 6 = Prelude'.Just LOG_TIME_OUT | 43 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
ejlilley/AbstractMusic | LilyConvert.hs | gpl-3.0 | lilyExpr (Trans (LilyTranspose (n,o) (n',o') e)) = let p = lilyPitch (n,o)
p' = lilyPitch (n',o')
i = p' .-. p
in mapPhrase (apTran i) $ lilyExpr e | 308 | lilyExpr (Trans (LilyTranspose (n,o) (n',o') e)) = let p = lilyPitch (n,o)
p' = lilyPitch (n',o')
i = p' .-. p
in mapPhrase (apTran i) $ lilyExpr e | 308 | lilyExpr (Trans (LilyTranspose (n,o) (n',o') e)) = let p = lilyPitch (n,o)
p' = lilyPitch (n',o')
i = p' .-. p
in mapPhrase (apTran i) $ lilyExpr e | 308 | false | false | 0 | 10 | 188 | 96 | 50 | 46 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Menu.hs | mit | menuShowPopup :: (Parent Menu a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to Menu or ascentor
-> Bool -- ^ enable
-> m ()
menuShowPopup p v = liftIO $ do
let ptr = parentPointer p
v' = fromBool v
[C.exp| void {$(Menu* ptr)->ShowPopup($(int v') != 0)} |]
-- | Set accelerator key (set zero key code ... | 381 | menuShowPopup :: (Parent Menu a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to Menu or ascentor
-> Bool -- ^ enable
-> m ()
menuShowPopup p v = liftIO $ do
let ptr = parentPointer p
v' = fromBool v
[C.exp| void {$(Menu* ptr)->ShowPopup($(int v') != 0)} |]
-- | Set accelerator key (set zero key code ... | 381 | menuShowPopup p v = liftIO $ do
let ptr = parentPointer p
v' = fromBool v
[C.exp| void {$(Menu* ptr)->ShowPopup($(int v') != 0)} |]
-- | Set accelerator key (set zero key code to disable.)
-- void SetAccelerator(int key, int qualifiers); | 248 | false | true | 0 | 11 | 84 | 92 | 48 | 44 | null | null |
donatello/minio-hs | src/Network/Minio/S3API.hs | apache-2.0 | headObject :: Bucket -> Object -> Minio ObjectInfo
headObject bucket object = do
resp <- executeRequest $ def { riMethod = HT.methodHead
, riBucket = Just bucket
, riObject = Just object
}
let
headers = NC.responseHead... | 617 | headObject :: Bucket -> Object -> Minio ObjectInfo
headObject bucket object = do
resp <- executeRequest $ def { riMethod = HT.methodHead
, riBucket = Just bucket
, riObject = Just object
}
let
headers = NC.responseHead... | 617 | headObject bucket object = do
resp <- executeRequest $ def { riMethod = HT.methodHead
, riBucket = Just bucket
, riObject = Just object
}
let
headers = NC.responseHeaders resp
modTime = getLastModifiedHeader header... | 566 | false | true | 0 | 14 | 199 | 147 | 71 | 76 | null | null |
SantiMunin/harmony | src/Generation/OutputGenerator.hs | gpl-3.0 | dirName :: FilePath -> FilePath
dirName file = let indices = elemIndices '/' file
in if null indices then "." else take (last indices + 1) file | 158 | dirName :: FilePath -> FilePath
dirName file = let indices = elemIndices '/' file
in if null indices then "." else take (last indices + 1) file | 158 | dirName file = let indices = elemIndices '/' file
in if null indices then "." else take (last indices + 1) file | 126 | false | true | 0 | 11 | 41 | 60 | 29 | 31 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.