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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
andrewpetrovic/pandoc | src/Text/Pandoc/Readers/Org.hs | gpl-2.0 | emphasisEnd :: Char -> OrgParser Char
emphasisEnd c = try $ do
guard =<< notAfterForbiddenBorderChar
char c
eof <|> () <$ lookAhead acceptablePostChars
updateLastStrPos
popInlineCharStack
return c
where acceptablePostChars =
surroundingEmphasisChar >>= \x -> oneOf (x ++ emphasisPostChars) | 313 | emphasisEnd :: Char -> OrgParser Char
emphasisEnd c = try $ do
guard =<< notAfterForbiddenBorderChar
char c
eof <|> () <$ lookAhead acceptablePostChars
updateLastStrPos
popInlineCharStack
return c
where acceptablePostChars =
surroundingEmphasisChar >>= \x -> oneOf (x ++ emphasisPostChars) | 313 | emphasisEnd c = try $ do
guard =<< notAfterForbiddenBorderChar
char c
eof <|> () <$ lookAhead acceptablePostChars
updateLastStrPos
popInlineCharStack
return c
where acceptablePostChars =
surroundingEmphasisChar >>= \x -> oneOf (x ++ emphasisPostChars) | 275 | false | true | 0 | 10 | 61 | 93 | 42 | 51 | null | null |
tkonolige/inline-julia | src/Language/Julia/Inline/Marshal.hs | bsd-3-clause | jlString :: JLVal -> IO String
jlString v = withJLVal v $ do
p <- [julia| Base.unsafe_convert(Cstring, $(jl v)) |] >>= jlVoidPtr
peekCString $ castPtr p | 156 | jlString :: JLVal -> IO String
jlString v = withJLVal v $ do
p <- [julia| Base.unsafe_convert(Cstring, $(jl v)) |] >>= jlVoidPtr
peekCString $ castPtr p | 156 | jlString v = withJLVal v $ do
p <- [julia| Base.unsafe_convert(Cstring, $(jl v)) |] >>= jlVoidPtr
peekCString $ castPtr p | 125 | false | true | 0 | 10 | 29 | 58 | 27 | 31 | null | null |
kishoredbn/barrelfish | tools/sockeye/v1/SockeyeParser.hs | mit | address = choice [address, param]
where
address = do
addr <- addressLiteral
return $ AST.LiteralAddress addr
param = do
name <- parameterName
return $ AST.ParamAddress name | 240 | address = choice [address, param]
where
address = do
addr <- addressLiteral
return $ AST.LiteralAddress addr
param = do
name <- parameterName
return $ AST.ParamAddress name | 240 | address = choice [address, param]
where
address = do
addr <- addressLiteral
return $ AST.LiteralAddress addr
param = do
name <- parameterName
return $ AST.ParamAddress name | 240 | false | false | 0 | 11 | 93 | 65 | 31 | 34 | null | null |
heades/Agda-LLS | Source/ALL/Main.hs | bsd-3-clause | -- case getQDef elem of
-- Right (a, t) -> "let "++(n2s a)++" = "++(runPrettyCTerm t)
-- Left (a, ty ) -> (n2s a)++" : "++(runPrettyType ty)
getFV :: CTerm -> [CVnm]
getFV t = fv t :: [CVnm] | 230 | getFV :: CTerm -> [CVnm]
getFV t = fv t :: [CVnm] | 49 | getFV t = fv t :: [CVnm] | 24 | true | true | 1 | 8 | 78 | 40 | 20 | 20 | null | null |
ghc-android/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | joinMIdKey, apAClassOpKey, pureAClassOpKey, alternativeClassKey :: Unique
joinMIdKey = mkPreludeMiscIdUnique 750 | 121 | joinMIdKey, apAClassOpKey, pureAClassOpKey, alternativeClassKey :: Unique
joinMIdKey = mkPreludeMiscIdUnique 750 | 121 | joinMIdKey = mkPreludeMiscIdUnique 750 | 47 | false | true | 0 | 5 | 18 | 20 | 13 | 7 | null | null |
ghorn/dynobud | dynobud/tests/Qps/Lp.hs | lgpl-3.0 | justs :: (a, a) -> (Maybe a, Maybe a)
justs (x,y) = (Just x, Just y) | 68 | justs :: (a, a) -> (Maybe a, Maybe a)
justs (x,y) = (Just x, Just y) | 68 | justs (x,y) = (Just x, Just y) | 30 | false | true | 0 | 9 | 15 | 60 | 30 | 30 | null | null |
mightybyte/reflex | src/Reflex/Spider/Internal.hs | bsd-3-clause | newEventWithTriggerIO f= do
occRef <- newIORef Nothing
subscribedRef <- newIORef Nothing
let !r = Root
{ rootOccurrence = occRef
, rootSubscribed = subscribedRef
, rootInit = f
}
return $ SpiderEvent $ EventRoot r | 253 | newEventWithTriggerIO f= do
occRef <- newIORef Nothing
subscribedRef <- newIORef Nothing
let !r = Root
{ rootOccurrence = occRef
, rootSubscribed = subscribedRef
, rootInit = f
}
return $ SpiderEvent $ EventRoot r | 253 | newEventWithTriggerIO f= do
occRef <- newIORef Nothing
subscribedRef <- newIORef Nothing
let !r = Root
{ rootOccurrence = occRef
, rootSubscribed = subscribedRef
, rootInit = f
}
return $ SpiderEvent $ EventRoot r | 253 | false | false | 0 | 11 | 73 | 74 | 35 | 39 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 3798 = 3797 | 11 | 3798 = 3797 | 11 | 3798 = 3797 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
pxqr/intset | src/Data/IntervalSet/Internal.hs | bsd-3-clause | difference t1@(Tip p1 _) (Fin p2 m2 ) --
| nomatch p1 p2 (finMask m2) = t1 --
| otherwise = Nil | 130 | difference t1@(Tip p1 _) (Fin p2 m2 ) --
| nomatch p1 p2 (finMask m2) = t1 --
| otherwise = Nil | 130 | difference t1@(Tip p1 _) (Fin p2 m2 ) --
| nomatch p1 p2 (finMask m2) = t1 --
| otherwise = Nil | 130 | false | false | 1 | 10 | 56 | 59 | 29 | 30 | null | null |
nushio3/ghc | compiler/stgSyn/StgLint.hs | bsd-3-clause | lintStgRhs (StgRhsCon _ con args) = runMaybeT $ do
arg_tys <- mapM (MaybeT . lintStgArg) args
MaybeT $ checkFunApp con_ty arg_tys (mkRhsConMsg con_ty arg_tys)
where
con_ty = dataConRepType con | 206 | lintStgRhs (StgRhsCon _ con args) = runMaybeT $ do
arg_tys <- mapM (MaybeT . lintStgArg) args
MaybeT $ checkFunApp con_ty arg_tys (mkRhsConMsg con_ty arg_tys)
where
con_ty = dataConRepType con | 206 | lintStgRhs (StgRhsCon _ con args) = runMaybeT $ do
arg_tys <- mapM (MaybeT . lintStgArg) args
MaybeT $ checkFunApp con_ty arg_tys (mkRhsConMsg con_ty arg_tys)
where
con_ty = dataConRepType con | 206 | false | false | 1 | 11 | 42 | 80 | 35 | 45 | null | null |
music-suite/music-preludes | examples/streams.hs | bsd-3-clause | seq2 = scat $ take len $ fmap return $ fmap (`mod` 6) $ Data.Foldable.toList $ extendSequence [2,1,1,2,2,1] | 107 | seq2 = scat $ take len $ fmap return $ fmap (`mod` 6) $ Data.Foldable.toList $ extendSequence [2,1,1,2,2,1] | 107 | seq2 = scat $ take len $ fmap return $ fmap (`mod` 6) $ Data.Foldable.toList $ extendSequence [2,1,1,2,2,1] | 107 | false | false | 0 | 10 | 17 | 65 | 36 | 29 | null | null |
alistair/omnisharp-hs | src/Omnisharp/Neovim/Plugin.hs | bsd-3-clause | plugin :: Neovim (StartupConfig NeovimConfig) () NeovimPlugin
plugin = wrapPlugin Plugin
{ exports = []
, statefulExports =
[ ((), Nothing,
[
$(command "OmnisharpStartServer" 'startServerPlugin) [CmdSync Sync],
$(command "OmnisharpStopServer" 'stopServerPlugin) [CmdSync... | 584 | plugin :: Neovim (StartupConfig NeovimConfig) () NeovimPlugin
plugin = wrapPlugin Plugin
{ exports = []
, statefulExports =
[ ((), Nothing,
[
$(command "OmnisharpStartServer" 'startServerPlugin) [CmdSync Sync],
$(command "OmnisharpStopServer" 'stopServerPlugin) [CmdSync... | 584 | plugin = wrapPlugin Plugin
{ exports = []
, statefulExports =
[ ((), Nothing,
[
$(command "OmnisharpStartServer" 'startServerPlugin) [CmdSync Sync],
$(command "OmnisharpStopServer" 'stopServerPlugin) [CmdSync Sync],
$(function "OmnisharpGetStatus" 'getStatusPl... | 522 | false | true | 2 | 14 | 147 | 174 | 86 | 88 | null | null |
cdornan/idiot | Text/RE/LineNo.hs | bsd-3-clause | getLineNo :: LineNo -> Int
getLineNo = (+1) . getZeroBasedLineNo | 64 | getLineNo :: LineNo -> Int
getLineNo = (+1) . getZeroBasedLineNo | 64 | getLineNo = (+1) . getZeroBasedLineNo | 37 | false | true | 0 | 6 | 9 | 23 | 13 | 10 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Attoparsec.Time.hs | bsd-3-clause | -- | Parse a date of the form @[+,-]YYYY-MM-DD@.
day :: Parser Day
day = do
absOrNeg <- negate <$ char '-' <|> id <$ char '+' <|> pure id
y <- decimal <* char '-'
m <- twoDigits <* char '-'
d <- twoDigits
maybe (fail "invalid date") return (fromGregorianValid (absOrNeg y) m d)
-- | Parse a two-digit integer ... | 346 | day :: Parser Day
day = do
absOrNeg <- negate <$ char '-' <|> id <$ char '+' <|> pure id
y <- decimal <* char '-'
m <- twoDigits <* char '-'
d <- twoDigits
maybe (fail "invalid date") return (fromGregorianValid (absOrNeg y) m d)
-- | Parse a two-digit integer (e.g. day of month, hour). | 297 | day = do
absOrNeg <- negate <$ char '-' <|> id <$ char '+' <|> pure id
y <- decimal <* char '-'
m <- twoDigits <* char '-'
d <- twoDigits
maybe (fail "invalid date") return (fromGregorianValid (absOrNeg y) m d)
-- | Parse a two-digit integer (e.g. day of month, hour). | 279 | true | true | 0 | 13 | 76 | 121 | 54 | 67 | null | null |
glguy/ssh-hans | src/Network/SSH/Connection.hs | bsd-3-clause | connectionGetChannelTVar :: ChannelId -> Connection (TVar SshChannel)
connectionGetChannelTVar c = do
(_, _, state) <- Connection ask
-- We only want to "lock" the single, requested channel, so we read
-- the channels in a separate transaction.
channels <- liftIO . atomically $ readTVar (sshChannels state)
... | 597 | connectionGetChannelTVar :: ChannelId -> Connection (TVar SshChannel)
connectionGetChannelTVar c = do
(_, _, state) <- Connection ask
-- We only want to "lock" the single, requested channel, so we read
-- the channels in a separate transaction.
channels <- liftIO . atomically $ readTVar (sshChannels state)
... | 597 | connectionGetChannelTVar c = do
(_, _, state) <- Connection ask
-- We only want to "lock" the single, requested channel, so we read
-- the channels in a separate transaction.
channels <- liftIO . atomically $ readTVar (sshChannels state)
case Map.lookup c channels of
Nothing -> do
connectionSend... | 527 | false | true | 0 | 15 | 120 | 144 | 67 | 77 | null | null |
mydaum/cabal | Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | emptyTestStanza :: TestSuiteStanza
emptyTestStanza = TestSuiteStanza Nothing Nothing Nothing mempty | 99 | emptyTestStanza :: TestSuiteStanza
emptyTestStanza = TestSuiteStanza Nothing Nothing Nothing mempty | 99 | emptyTestStanza = TestSuiteStanza Nothing Nothing Nothing mempty | 64 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
diffusionkinetics/open | dampf/lib/Dampf.hs | mit | dump :: (MonadIO m) => DampfT m ()
dump = do
a <- view app
c <- view config
liftIO $ do
putStrLn $ pShowDampfApp a
putStrLn $ pShowDampfConfig c | 173 | dump :: (MonadIO m) => DampfT m ()
dump = do
a <- view app
c <- view config
liftIO $ do
putStrLn $ pShowDampfApp a
putStrLn $ pShowDampfConfig c | 173 | dump = do
a <- view app
c <- view config
liftIO $ do
putStrLn $ pShowDampfApp a
putStrLn $ pShowDampfConfig c | 138 | false | true | 0 | 12 | 58 | 80 | 34 | 46 | null | null |
bjpop/berp | libs/src/Berp/Base/HashSet.hs | bsd-3-clause | delete :: Object -> HashSet -> Eval ()
delete element hashSet = do
table <- readIORef hashSet
hashValue <- hashObject element
case IntMap.lookup hashValue table of
Nothing -> return ()
Just matches -> do
newMatches <- linearFilter element matches
let newTable = IntMap.adjust (cons... | 386 | delete :: Object -> HashSet -> Eval ()
delete element hashSet = do
table <- readIORef hashSet
hashValue <- hashObject element
case IntMap.lookup hashValue table of
Nothing -> return ()
Just matches -> do
newMatches <- linearFilter element matches
let newTable = IntMap.adjust (cons... | 386 | delete element hashSet = do
table <- readIORef hashSet
hashValue <- hashObject element
case IntMap.lookup hashValue table of
Nothing -> return ()
Just matches -> do
newMatches <- linearFilter element matches
let newTable = IntMap.adjust (const newMatches) hashValue table
... | 347 | false | true | 0 | 17 | 97 | 127 | 56 | 71 | null | null |
urbanslug/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | -- | Retrieves the template of an unfolding if possible
-- maybeUnfoldingTemplate is used mainly wnen specialising, and we do
-- want to specialise DFuns, so it's important to return a template
-- for DFunUnfoldings
maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
maybeUnfoldingTemplate (CoreUnfolding { uf_tmpl = ... | 341 | maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
maybeUnfoldingTemplate (CoreUnfolding { uf_tmpl = expr })
= Just expr | 125 | maybeUnfoldingTemplate (CoreUnfolding { uf_tmpl = expr })
= Just expr | 71 | true | true | 3 | 7 | 52 | 46 | 23 | 23 | null | null |
rodrigosetti/stackage | stackage-upload.hs | mit | mkIndex :: String -> [String] -> String
mkIndex snapid dirs = concat
[ "<!DOCTYPE html>\n<html lang='en'><head><title>Haddocks index</title>"
, "<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'>"
, "<link rel='stylesheet' href='style.css'>"
, "<link rel... | 752 | mkIndex :: String -> [String] -> String
mkIndex snapid dirs = concat
[ "<!DOCTYPE html>\n<html lang='en'><head><title>Haddocks index</title>"
, "<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'>"
, "<link rel='stylesheet' href='style.css'>"
, "<link rel... | 752 | mkIndex snapid dirs = concat
[ "<!DOCTYPE html>\n<html lang='en'><head><title>Haddocks index</title>"
, "<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'>"
, "<link rel='stylesheet' href='style.css'>"
, "<link rel='shortcut icon' href='http://www.stacka... | 712 | false | true | 0 | 7 | 117 | 79 | 44 | 35 | null | null |
ddssff/lens | experimental/Control/Lens/Internal/Jacket.hs | bsd-3-clause | fromLeft (Left b) = b | 21 | fromLeft (Left b) = b | 21 | fromLeft (Left b) = b | 21 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
olsner/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprSkolInfo DataSkol = text "a data type declaration" | 62 | pprSkolInfo DataSkol = text "a data type declaration" | 62 | pprSkolInfo DataSkol = text "a data type declaration" | 62 | false | false | 0 | 5 | 16 | 13 | 5 | 8 | null | null |
alexander-at-github/eta | libraries/base/GHC/List.hs | bsd-3-clause | filter :: (a -> Bool) -> [a] -> [a]
filter _pred [] = [] | 59 | filter :: (a -> Bool) -> [a] -> [a]
filter _pred [] = [] | 59 | filter _pred [] = [] | 23 | false | true | 0 | 7 | 16 | 41 | 22 | 19 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Core.hs | bsd-2-clause | qCastList_QChar x = qcl_QChar [] x | 34 | qCastList_QChar x = qcl_QChar [] x | 34 | qCastList_QChar x = qcl_QChar [] x | 34 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
Kheldar/hw-koans | koan/Koan/Maybe.hs | bsd-3-clause | computeSumInDo :: Maybe Int -> Maybe Int -> Maybe Int
computeSumInDo getIntA getIntB = do
_ <- getIntA
_ <- getIntB
return (error "TODO: Implement rest of computeSum") | 173 | computeSumInDo :: Maybe Int -> Maybe Int -> Maybe Int
computeSumInDo getIntA getIntB = do
_ <- getIntA
_ <- getIntB
return (error "TODO: Implement rest of computeSum") | 173 | computeSumInDo getIntA getIntB = do
_ <- getIntA
_ <- getIntB
return (error "TODO: Implement rest of computeSum") | 119 | false | true | 0 | 9 | 33 | 59 | 26 | 33 | null | null |
tek/proteome | packages/test/test/Proteome/Test/FilenameTest.hs | mit | test_moveRelDir :: UnitTest
test_moveRelDir =
tmuxTest moveRelDirTest | 71 | test_moveRelDir :: UnitTest
test_moveRelDir =
tmuxTest moveRelDirTest | 71 | test_moveRelDir =
tmuxTest moveRelDirTest | 43 | false | true | 0 | 5 | 8 | 14 | 7 | 7 | null | null |
brendanhay/gogol | gogol-toolresults/gen/Network/Google/ToolResults/Types/Product.hs | mpl-2.0 | -- | Optional debugging insights for non-SDK API violations.
nsaInsights :: Lens' NonSdkAPI [NonSdkAPIInsight]
nsaInsights
= lens _nsaInsights (\ s a -> s{_nsaInsights = a}) .
_Default
. _Coerce | 208 | nsaInsights :: Lens' NonSdkAPI [NonSdkAPIInsight]
nsaInsights
= lens _nsaInsights (\ s a -> s{_nsaInsights = a}) .
_Default
. _Coerce | 147 | nsaInsights
= lens _nsaInsights (\ s a -> s{_nsaInsights = a}) .
_Default
. _Coerce | 97 | true | true | 2 | 9 | 42 | 58 | 28 | 30 | null | null |
PeterCxy/peterbot-haskell | src/Calc.hs | mit | binaryOperators :: [String]
binaryOperators = ["=", "+", "-", "*", "/", "^"] | 76 | binaryOperators :: [String]
binaryOperators = ["=", "+", "-", "*", "/", "^"] | 76 | binaryOperators = ["=", "+", "-", "*", "/", "^"] | 48 | false | true | 0 | 5 | 10 | 32 | 20 | 12 | null | null |
brendanhay/gogol | gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyAckDeadline.hs | mpl-2.0 | -- | Required. The name of the subscription. Format is
-- \`projects\/{project}\/subscriptions\/{sub}\`.
psmadSubscription :: Lens' ProjectsSubscriptionsModifyAckDeadline Text
psmadSubscription
= lens _psmadSubscription
(\ s a -> s{_psmadSubscription = a}) | 264 | psmadSubscription :: Lens' ProjectsSubscriptionsModifyAckDeadline Text
psmadSubscription
= lens _psmadSubscription
(\ s a -> s{_psmadSubscription = a}) | 159 | psmadSubscription
= lens _psmadSubscription
(\ s a -> s{_psmadSubscription = a}) | 88 | true | true | 0 | 8 | 35 | 44 | 23 | 21 | null | null |
deadfoxygrandpa/Elm | compiler/Parse/Helpers.hs | bsd-3-clause | rLabel :: IParser String
rLabel = lowVar | 40 | rLabel :: IParser String
rLabel = lowVar | 40 | rLabel = lowVar | 15 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles | IO/app/VigenereCipherArgs.hs | gpl-3.0 | programInfo :: ParserInfo Args
programInfo = info (programArgs <**> helper)
( fullDesc
<> progDesc "Encrypt or decrypt text with Vigenere Cipher." ) | 157 | programInfo :: ParserInfo Args
programInfo = info (programArgs <**> helper)
( fullDesc
<> progDesc "Encrypt or decrypt text with Vigenere Cipher." ) | 157 | programInfo = info (programArgs <**> helper)
( fullDesc
<> progDesc "Encrypt or decrypt text with Vigenere Cipher." ) | 126 | false | true | 0 | 7 | 30 | 37 | 18 | 19 | null | null |
mcmaniac/bindrop | src/HTML/Frames.hs | apache-2.0 | mainHeader :: Html
mainHeader = do
H.h1 $ do
"bindrop "
H.span $ ":: AcidState UploadDB"
H.p ! A.id "info" $ "a haskell happstack file hosting service" | 173 | mainHeader :: Html
mainHeader = do
H.h1 $ do
"bindrop "
H.span $ ":: AcidState UploadDB"
H.p ! A.id "info" $ "a haskell happstack file hosting service" | 173 | mainHeader = do
H.h1 $ do
"bindrop "
H.span $ ":: AcidState UploadDB"
H.p ! A.id "info" $ "a haskell happstack file hosting service" | 154 | false | true | 0 | 13 | 48 | 50 | 23 | 27 | null | null |
jeremyjh/distributed-process-lifted | src/Control/Distributed/Process/Lifted.hs | bsd-3-clause | -- | Generalized version of 'Base.linkNode'
linkNode :: MonadProcess m => NodeId -> m ()
linkNode = liftP . Base.linkNode | 121 | linkNode :: MonadProcess m => NodeId -> m ()
linkNode = liftP . Base.linkNode | 77 | linkNode = liftP . Base.linkNode | 32 | true | true | 1 | 9 | 19 | 41 | 18 | 23 | null | null |
diegospd/pol | src/StartApp.hs | gpl-3.0 | handleEv _conf st (VtyEvent (EvKey (KChar 'd') [MCtrl] )) = continue' st $ dropCurrent st | 89 | handleEv _conf st (VtyEvent (EvKey (KChar 'd') [MCtrl] )) = continue' st $ dropCurrent st | 89 | handleEv _conf st (VtyEvent (EvKey (KChar 'd') [MCtrl] )) = continue' st $ dropCurrent st | 89 | false | false | 0 | 10 | 14 | 49 | 22 | 27 | null | null |
jsavatgy/hatupist | code/settingsDialog.hs | gpl-2.0 | difs speds =
if null speds
then (0.0, 0)
else (secondsFrom (fst start) (fst end), (snd end) - (snd start))
where
start = last speds
end = head speds | 173 | difs speds =
if null speds
then (0.0, 0)
else (secondsFrom (fst start) (fst end), (snd end) - (snd start))
where
start = last speds
end = head speds | 173 | difs speds =
if null speds
then (0.0, 0)
else (secondsFrom (fst start) (fst end), (snd end) - (snd start))
where
start = last speds
end = head speds | 173 | false | false | 3 | 9 | 53 | 94 | 43 | 51 | null | null |
meiersi/bytestring-builder | Data/ByteString/Lazy/Builder/BasicEncoding/Internal/UncheckedShifts.hs | bsd-3-clause | shiftr_w16 (W16# w) (I# i) = W16# (w `uncheckedShiftRL#` i) | 61 | shiftr_w16 (W16# w) (I# i) = W16# (w `uncheckedShiftRL#` i) | 61 | shiftr_w16 (W16# w) (I# i) = W16# (w `uncheckedShiftRL#` i) | 61 | false | false | 0 | 7 | 11 | 35 | 18 | 17 | null | null |
li-zhirui/EoplLangs | src/ThreadsLang/Data.hs | bsd-3-clause | unpackExprRef :: Unpacker Ref
unpackExprRef (ExprRef ref) = return ref | 70 | unpackExprRef :: Unpacker Ref
unpackExprRef (ExprRef ref) = return ref | 70 | unpackExprRef (ExprRef ref) = return ref | 40 | false | true | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
lukexi/ghc | compiler/main/DynFlags.hs | bsd-3-clause | tmpDir :: DynFlags -> String
tmpDir dflags = sTmpDir (settings dflags) | 85 | tmpDir :: DynFlags -> String
tmpDir dflags = sTmpDir (settings dflags) | 85 | tmpDir dflags = sTmpDir (settings dflags) | 41 | false | true | 0 | 7 | 25 | 27 | 13 | 14 | null | null |
wxwxwwxxx/ghc | testsuite/tests/module/mod180.hs | bsd-3-clause | z :: T
z = x | 12 | z :: T
z = x | 12 | z = x | 5 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
travitch/iiglue | tools/GObjectComparison.hs | bsd-3-clause | checkAllocator _ ff _ =
error ("Multiple return values for function " ++ foreignFunctionName ff) | 98 | checkAllocator _ ff _ =
error ("Multiple return values for function " ++ foreignFunctionName ff) | 98 | checkAllocator _ ff _ =
error ("Multiple return values for function " ++ foreignFunctionName ff) | 98 | false | false | 0 | 8 | 16 | 26 | 12 | 14 | null | null |
TomMD/cryptol | docs/ProgrammingCryptol/tools/compileProgrammingCryptol.hs | bsd-3-clause | main :: IO ()
main = do hSetBuffering stdin NoBuffering
hSetBuffering stdout NoBuffering
hSetEcho stdout False
safeSys $ setCurrentDirectory topDir
let ?curId = 0 in prompt True | 217 | main :: IO ()
main = do hSetBuffering stdin NoBuffering
hSetBuffering stdout NoBuffering
hSetEcho stdout False
safeSys $ setCurrentDirectory topDir
let ?curId = 0 in prompt True | 217 | main = do hSetBuffering stdin NoBuffering
hSetBuffering stdout NoBuffering
hSetEcho stdout False
safeSys $ setCurrentDirectory topDir
let ?curId = 0 in prompt True | 203 | false | true | 0 | 10 | 66 | 67 | 28 | 39 | null | null |
quchen/stg | test/Testsuite/Test/Prelude/List.hs | bsd-3-clause | testFoldr, testFoldl, testFoldl' :: TestTree
testFoldr = foldSumTemplate
"foldr"
foldr
(Stg.foldr <> [stg| fold = \ -> foldr |])
(const False) | 159 | testFoldr, testFoldl, testFoldl' :: TestTree
testFoldr = foldSumTemplate
"foldr"
foldr
(Stg.foldr <> [stg| fold = \ -> foldr |])
(const False) | 159 | testFoldr = foldSumTemplate
"foldr"
foldr
(Stg.foldr <> [stg| fold = \ -> foldr |])
(const False) | 114 | false | true | 0 | 8 | 37 | 43 | 26 | 17 | null | null |
ocus/TinyASM_Haskell | library/TinyASM/VM.hs | bsd-3-clause | executeByteCode bc@(BC3 0x0b address value) (sp, mem, scr) = Just (Just (nextPointer sp bc), updateList address ((mem !! address) + value) mem, scr) | 162 | executeByteCode bc@(BC3 0x0b address value) (sp, mem, scr) = Just (Just (nextPointer sp bc), updateList address ((mem !! address) + value) mem, scr) | 162 | executeByteCode bc@(BC3 0x0b address value) (sp, mem, scr) = Just (Just (nextPointer sp bc), updateList address ((mem !! address) + value) mem, scr) | 162 | false | false | 0 | 11 | 36 | 77 | 41 | 36 | null | null |
markus-git/co-feldspar | src/Feldspar/Software/Verify/Command.hs | bsd-3-clause | discoverInvariant ::
Maybe [[SomeLiteral]] ->
V.Verify () ->
V.Verify (
V.Verify ()
, Maybe [[SomeLiteral]]
, V.Verify ()
)
discoverInvariant minv body = do
(frame, hints) <- findFrameAndHints
(_, _, mode) <- S.ask
case minv of
Nothing | mode P./= V.Execute ->
do ctx <- S.get
... | 6,557 | discoverInvariant ::
Maybe [[SomeLiteral]] ->
V.Verify () ->
V.Verify (
V.Verify ()
, Maybe [[SomeLiteral]]
, V.Verify ()
)
discoverInvariant minv body = do
(frame, hints) <- findFrameAndHints
(_, _, mode) <- S.ask
case minv of
Nothing | mode P./= V.Execute ->
do ctx <- S.get
... | 6,557 | discoverInvariant minv body = do
(frame, hints) <- findFrameAndHints
(_, _, mode) <- S.ask
case minv of
Nothing | mode P./= V.Execute ->
do ctx <- S.get
abs <- abstract ctx frame hints
refine frame hints abs
_ ->
do let
ass = assumeLiterals frame (fromMaybe [] mi... | 6,409 | false | true | 9 | 20 | 1,863 | 1,638 | 808 | 830 | null | null |
input-output-hk/rscoin-haskell | src/RSCoin/Bank/AcidState.hs | gpl-3.0 | getStorage :: Query BS.Storage BS.Storage
getStorage = ask | 58 | getStorage :: Query BS.Storage BS.Storage
getStorage = ask | 58 | getStorage = ask | 16 | false | true | 0 | 6 | 7 | 20 | 10 | 10 | null | null |
reuk/rayverb | src/Speaker.hs | gpl-2.0 | polarToCartesian :: Flt -> Flt -> Vec
polarToCartesian inc azi =
Vec3 (sin inc * cos azi)
(cos inc)
(sin inc * sin azi) | 151 | polarToCartesian :: Flt -> Flt -> Vec
polarToCartesian inc azi =
Vec3 (sin inc * cos azi)
(cos inc)
(sin inc * sin azi) | 151 | polarToCartesian inc azi =
Vec3 (sin inc * cos azi)
(cos inc)
(sin inc * sin azi) | 113 | false | true | 0 | 8 | 55 | 63 | 30 | 33 | null | null |
0xfaded/websockets | src/Network/WebSockets.hs | bsd-3-clause | -- This doesn't work this way any more. As the Protocol first has to be
-- determined by the request, we can't provide this as a WebSockets action. See
-- the various flavours of runWebSockets.
-- | Receive an application message. Automatically respond to control messages.
receiveDataMessage :: I.Protocol p => I.WebSo... | 1,153 | receiveDataMessage :: I.Protocol p => I.WebSockets p (I.DataMessage p)
receiveDataMessage = do
m <- I.receive
case m of
(I.DataMessage am) -> return am
(I.ControlMessage cm) -> case cm of
I.Close _ -> I.throwWsError I.ConnectionClosed
I.Pong _ -> do
optio... | 878 | receiveDataMessage = do
m <- I.receive
case m of
(I.DataMessage am) -> return am
(I.ControlMessage cm) -> case cm of
I.Close _ -> I.throwWsError I.ConnectionClosed
I.Pong _ -> do
options <- I.getOptions
liftIO $ I.onPong options
... | 807 | true | true | 0 | 17 | 363 | 176 | 85 | 91 | null | null |
brendanhay/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The result of creating a Google Sheets chart.
rCreateSheetsChart :: Lens' Response (Maybe CreateSheetsChartResponse)
rCreateSheetsChart
= lens _rCreateSheetsChart
(\ s a -> s{_rCreateSheetsChart = a}) | 213 | rCreateSheetsChart :: Lens' Response (Maybe CreateSheetsChartResponse)
rCreateSheetsChart
= lens _rCreateSheetsChart
(\ s a -> s{_rCreateSheetsChart = a}) | 162 | rCreateSheetsChart
= lens _rCreateSheetsChart
(\ s a -> s{_rCreateSheetsChart = a}) | 91 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
agremm/Seismic | accelerate/cpu_up/Seismic.hs | gpl-3.0 | genPPF 0 _ = undefined | 22 | genPPF 0 _ = undefined | 22 | genPPF 0 _ = undefined | 22 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
avieth/diplomacy | Diplomacy/Province.hs | bsd-3-clause | country Galicia = Just Austria | 30 | country Galicia = Just Austria | 30 | country Galicia = Just Austria | 30 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
reflex-frp/reflex-dom | reflex-dom-core/test/hydration.hs | bsd-3-clause | -- | TODO: do something about JSExceptions not causing tests to fail
testWidgetDebug
:: Bool
-> Bool
-> WD ()
-- ^ Webdriver commands to run before the JS runs (i.e. on the statically rendered page)
-> WD b
-- ^ Webdriver commands to run after hydration switchover
-> (forall m js. TestWidget (SpiderTimeli... | 527 | testWidgetDebug
:: Bool
-> Bool
-> WD ()
-- ^ Webdriver commands to run before the JS runs (i.e. on the statically rendered page)
-> WD b
-- ^ Webdriver commands to run after hydration switchover
-> (forall m js. TestWidget (SpiderTimeline Global) m => m ())
-- ^ Widget we are testing
-> WD b
testWidg... | 458 | testWidgetDebug hardFailure withDebugging beforeJS afterSwitchover =
testWidgetDebug' hardFailure withDebugging beforeJS (const afterSwitchover) | 146 | true | true | 0 | 16 | 99 | 103 | 51 | 52 | null | null |
jfischoff/simple-poly | src/Language/SimplePoly/Types.hs | bsd-3-clause | annotation :: Getter (AnnotatedExpr a) a
annotation f = \case
AEAbs x y z -> (\a -> AEAbs a y z) <$> f x
AEAp x y z -> (\a -> AEAp a y z) <$> f x
AEVar x y -> (\a -> AEVar a y) <$> f x
AELit x y -> (\a -> AELit a y) <$> f x | 245 | annotation :: Getter (AnnotatedExpr a) a
annotation f = \case
AEAbs x y z -> (\a -> AEAbs a y z) <$> f x
AEAp x y z -> (\a -> AEAp a y z) <$> f x
AEVar x y -> (\a -> AEVar a y) <$> f x
AELit x y -> (\a -> AELit a y) <$> f x | 245 | annotation f = \case
AEAbs x y z -> (\a -> AEAbs a y z) <$> f x
AEAp x y z -> (\a -> AEAp a y z) <$> f x
AEVar x y -> (\a -> AEVar a y) <$> f x
AELit x y -> (\a -> AELit a y) <$> f x | 204 | false | true | 7 | 10 | 83 | 146 | 74 | 72 | null | null |
uuhan/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | -- | Create a reflected TT term, but leave refs to the provided name intact
reflectTTQuote :: [Name] -> Term -> Raw
reflectTTQuote unq (P nt n t)
| n `elem` unq = Var n
| otherwise = reflCall "P" [reflectNameType nt, reflectName n, reflectTTQuote unq t] | 257 | reflectTTQuote :: [Name] -> Term -> Raw
reflectTTQuote unq (P nt n t)
| n `elem` unq = Var n
| otherwise = reflCall "P" [reflectNameType nt, reflectName n, reflectTTQuote unq t] | 181 | reflectTTQuote unq (P nt n t)
| n `elem` unq = Var n
| otherwise = reflCall "P" [reflectNameType nt, reflectName n, reflectTTQuote unq t] | 141 | true | true | 1 | 8 | 50 | 85 | 43 | 42 | null | null |
bitemyapp/ganeti | src/Ganeti/HTools/Loader.hs | bsd-2-clause | -- | Update instance with exclusion tags list.
updateExclTags :: [String] -> Instance.Instance -> Instance.Instance
updateExclTags tl inst =
let allTags = Instance.allTags inst
exclTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags
in inst { Instance.exclTags = exclTags } | 289 | updateExclTags :: [String] -> Instance.Instance -> Instance.Instance
updateExclTags tl inst =
let allTags = Instance.allTags inst
exclTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags
in inst { Instance.exclTags = exclTags } | 242 | updateExclTags tl inst =
let allTags = Instance.allTags inst
exclTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags
in inst { Instance.exclTags = exclTags } | 173 | true | true | 0 | 13 | 50 | 87 | 47 | 40 | null | null |
mainland/dph | dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/UPSSegd.hs | bsd-3-clause | here :: String -> String
here s = "Data.Array.Parallel.Unlifted.Parallel.UPSSegd." ++ s | 87 | here :: String -> String
here s = "Data.Array.Parallel.Unlifted.Parallel.UPSSegd." ++ s | 87 | here s = "Data.Array.Parallel.Unlifted.Parallel.UPSSegd." ++ s | 62 | false | true | 0 | 5 | 10 | 22 | 11 | 11 | null | null |
flowbox-public/imagemagick | Graphics/ImageMagick/MagickWand/Utils.hs | apache-2.0 | withException :: (MonadResource m, ExceptionCarrier a) => a -> IO (MagickBooleanType, b) -> m b
withException a f = liftIO $ do
(r,b) <- f
unless (r==mTrue) $ getException a >>= throw
return b
| 199 | withException :: (MonadResource m, ExceptionCarrier a) => a -> IO (MagickBooleanType, b) -> m b
withException a f = liftIO $ do
(r,b) <- f
unless (r==mTrue) $ getException a >>= throw
return b
| 199 | withException a f = liftIO $ do
(r,b) <- f
unless (r==mTrue) $ getException a >>= throw
return b
| 103 | false | true | 0 | 12 | 40 | 98 | 48 | 50 | null | null |
vikraman/ghc | compiler/basicTypes/VarSet.hs | bsd-3-clause | intersectVarSet = intersectUniqSets | 35 | intersectVarSet = intersectUniqSets | 35 | intersectVarSet = intersectUniqSets | 35 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
zudov/purescript-inspection | worker/Compiler.hs | bsd-3-clause | runBuild :: FilePath
-> Psc
-> String -- ^ purescript sources glob
-> String -- ^ ffi sources glob
-> IO AddBuildResultBody
runBuild dir (Psc tag psc) sources ffiSources = do
putStrLn (" Compiling")
(exitcode, stdout, stderr) <- readProcessWithExitCode psc args ""
let buildRes... | 1,112 | runBuild :: FilePath
-> Psc
-> String -- ^ purescript sources glob
-> String -- ^ ffi sources glob
-> IO AddBuildResultBody
runBuild dir (Psc tag psc) sources ffiSources = do
putStrLn (" Compiling")
(exitcode, stdout, stderr) <- readProcessWithExitCode psc args ""
let buildRes... | 1,112 | runBuild dir (Psc tag psc) sources ffiSources = do
putStrLn (" Compiling")
(exitcode, stdout, stderr) <- readProcessWithExitCode psc args ""
let buildResult = case exitcode of
ExitSuccess
| "Warning found:" `Text.isInfixOf` Text.pack stderr -> Warnings
| otherwise -> Success
E... | 952 | false | true | 0 | 24 | 336 | 344 | 174 | 170 | null | null |
urbanslug/ghc | compiler/deSugar/Check.hs | bsd-3-clause | tidy_eqn :: EquationInfo -> EquationInfo
tidy_eqn eqn = eqn { eqn_pats = map tidy_pat (eqn_pats eqn),
eqn_rhs = tidy_rhs (eqn_rhs eqn) }
where
-- Horrible hack. The tidy_pat stuff converts "might-fail" patterns to
-- WildPats which of course loses the info that they can fail to ... | 585 | tidy_eqn :: EquationInfo -> EquationInfo
tidy_eqn eqn = eqn { eqn_pats = map tidy_pat (eqn_pats eqn),
eqn_rhs = tidy_rhs (eqn_rhs eqn) }
where
-- Horrible hack. The tidy_pat stuff converts "might-fail" patterns to
-- WildPats which of course loses the info that they can fail to ... | 585 | tidy_eqn eqn = eqn { eqn_pats = map tidy_pat (eqn_pats eqn),
eqn_rhs = tidy_rhs (eqn_rhs eqn) }
where
-- Horrible hack. The tidy_pat stuff converts "might-fail" patterns to
-- WildPats which of course loses the info that they can fail to match.
-- So we stick in a CanFai... | 544 | false | true | 1 | 10 | 173 | 118 | 57 | 61 | null | null |
cchens/courseography | hs/Svg/Parser.hs | gpl-3.0 | contentAttrs _ = [] | 19 | contentAttrs _ = [] | 19 | contentAttrs _ = [] | 19 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
urbanslug/ghc | testsuite/tests/simplCore/should_run/T9390.hs | bsd-3-clause | inlineWriteB :: MutableArray# RealWorld Char -> ()
inlineWriteB arr# =
case f realWorld# of
(# _, x #) -> x
where
IO f = writeB arr# | 150 | inlineWriteB :: MutableArray# RealWorld Char -> ()
inlineWriteB arr# =
case f realWorld# of
(# _, x #) -> x
where
IO f = writeB arr# | 150 | inlineWriteB arr# =
case f realWorld# of
(# _, x #) -> x
where
IO f = writeB arr# | 99 | false | true | 1 | 8 | 43 | 66 | 28 | 38 | null | null |
paradigmsort/ASN1_Happy_LALR1 | BasicTypes.hs | mit | toBit :: Char -> Maybe Bit
toBit = (flip Data.Map.lookup) (Data.Map.fromList [('0', B0), ('1', B1)]) | 101 | toBit :: Char -> Maybe Bit
toBit = (flip Data.Map.lookup) (Data.Map.fromList [('0', B0), ('1', B1)]) | 100 | toBit = (flip Data.Map.lookup) (Data.Map.fromList [('0', B0), ('1', B1)]) | 73 | false | true | 0 | 9 | 15 | 57 | 32 | 25 | null | null |
koterpillar/tianbar | src/System/Tianbar/Plugin/DBus.hs | mit | busClient :: Getter Bus Client
busClient inj (Bus c s) = flip Bus s <$> inj c | 77 | busClient :: Getter Bus Client
busClient inj (Bus c s) = flip Bus s <$> inj c | 77 | busClient inj (Bus c s) = flip Bus s <$> inj c | 46 | false | true | 1 | 6 | 16 | 47 | 19 | 28 | null | null |
brendanhay/gogol | gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Snapshots/List.hs | mpl-2.0 | -- | JSONP
pslsCallback :: Lens' ProjectsSnapshotsList (Maybe Text)
pslsCallback
= lens _pslsCallback (\ s a -> s{_pslsCallback = a}) | 135 | pslsCallback :: Lens' ProjectsSnapshotsList (Maybe Text)
pslsCallback
= lens _pslsCallback (\ s a -> s{_pslsCallback = a}) | 124 | pslsCallback
= lens _pslsCallback (\ s a -> s{_pslsCallback = a}) | 67 | true | true | 1 | 9 | 21 | 50 | 25 | 25 | null | null |
snoyberg/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprPat _ (RecP nm fs)
= parens $ ppr nm
<+> braces (sep $ punctuate comma $
map (\(s,p) -> ppr s <+> equals <+> ppr p) fs) | 163 | pprPat _ (RecP nm fs)
= parens $ ppr nm
<+> braces (sep $ punctuate comma $
map (\(s,p) -> ppr s <+> equals <+> ppr p) fs) | 163 | pprPat _ (RecP nm fs)
= parens $ ppr nm
<+> braces (sep $ punctuate comma $
map (\(s,p) -> ppr s <+> equals <+> ppr p) fs) | 163 | false | false | 0 | 14 | 68 | 80 | 39 | 41 | null | null |
jwiegley/ghc-release | libraries/transformers/Control/Monad/Trans/RWS/Lazy.hs | gpl-3.0 | -- | @'withRWST' f m@ executes action @m@ with an initial environment
-- and state modified by applying @f@.
--
-- * @'runRWST' ('withRWST' f m) r s = 'uncurry' ('runRWST' m) (f r s)@
withRWST :: (r' -> s -> (r, s)) -> RWST r w s m a -> RWST r' w s m a
withRWST f m = RWST $ \r s -> uncurry (runRWST m) (f r s) | 310 | withRWST :: (r' -> s -> (r, s)) -> RWST r w s m a -> RWST r' w s m a
withRWST f m = RWST $ \r s -> uncurry (runRWST m) (f r s) | 126 | withRWST f m = RWST $ \r s -> uncurry (runRWST m) (f r s) | 57 | true | true | 0 | 9 | 71 | 97 | 51 | 46 | null | null |
nevrenato/Hets_Fork | HasCASL/Subst.hs | gpl-2.0 | removeListT :: STLike a => Subst -> [a] -> Subst
removeListT s l = foldl removeT s l | 84 | removeListT :: STLike a => Subst -> [a] -> Subst
removeListT s l = foldl removeT s l | 84 | removeListT s l = foldl removeT s l | 35 | false | true | 0 | 9 | 17 | 47 | 21 | 26 | null | null |
b1g3ar5/Spreadsheet | Cat.hs | mit | cojoin:: Comonad w => w a -> w (w a)
cojoin = duplicate | 55 | cojoin:: Comonad w => w a -> w (w a)
cojoin = duplicate | 55 | cojoin = duplicate | 18 | false | true | 0 | 10 | 12 | 41 | 17 | 24 | null | null |
tpsinnem/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LXOr ITChar) [l, r] = doOp v (LXOr ITNative) [l, r] | 59 | doOp v (LXOr ITChar) [l, r] = doOp v (LXOr ITNative) [l, r] | 59 | doOp v (LXOr ITChar) [l, r] = doOp v (LXOr ITNative) [l, r] | 59 | false | false | 0 | 7 | 12 | 47 | 23 | 24 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/streaming/pipes/src/FunctorOriented.hs | unlicense | tip :: Tre a
tip = Fix TipF | 36 | tip :: Tre a
tip = Fix TipF | 36 | tip = Fix TipF | 19 | false | true | 0 | 6 | 16 | 23 | 9 | 14 | null | null |
christiaanb/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | mkOtherCon :: [AltCon] -> Unfolding
mkOtherCon = OtherCon | 57 | mkOtherCon :: [AltCon] -> Unfolding
mkOtherCon = OtherCon | 57 | mkOtherCon = OtherCon | 21 | false | true | 0 | 7 | 7 | 25 | 11 | 14 | null | null |
martinra/hflint | src/HFlint/FMPZPoly/Base.hs | gpl-3.0 | --------------------------------------------------------------------------------
-- composition
--------------------------------------------------------------------------------
compose :: FMPZPoly -> FMPZPoly -> FMPZPoly
compose = lift2Flint_ fmpz_poly_compose | 261 | compose :: FMPZPoly -> FMPZPoly -> FMPZPoly
compose = lift2Flint_ fmpz_poly_compose | 83 | compose = lift2Flint_ fmpz_poly_compose | 39 | true | true | 0 | 6 | 15 | 25 | 14 | 11 | null | null |
sleepomeno/TForth | src/TF/Parsers/ControlStructures.hs | apache-2.0 | parseBeginUntil :: ExpressionsM Expr
parseBeginUntil = do
parseWordBegin
loopBody <- manyWordsTill "until"
return $ ControlExpr $ BeginUntil loopBody | 155 | parseBeginUntil :: ExpressionsM Expr
parseBeginUntil = do
parseWordBegin
loopBody <- manyWordsTill "until"
return $ ControlExpr $ BeginUntil loopBody | 155 | parseBeginUntil = do
parseWordBegin
loopBody <- manyWordsTill "until"
return $ ControlExpr $ BeginUntil loopBody | 118 | false | true | 0 | 8 | 23 | 41 | 18 | 23 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/Data/HashTable.hs | bsd-3-clause | recordNew :: IO ()
recordNew = instrument rec
where rec hd@HD{ tables=t, totBuckets=b } =
hd{ tables=t+1, totBuckets=b+fromIntegral tABLE_MIN } | 160 | recordNew :: IO ()
recordNew = instrument rec
where rec hd@HD{ tables=t, totBuckets=b } =
hd{ tables=t+1, totBuckets=b+fromIntegral tABLE_MIN } | 160 | recordNew = instrument rec
where rec hd@HD{ tables=t, totBuckets=b } =
hd{ tables=t+1, totBuckets=b+fromIntegral tABLE_MIN } | 141 | false | true | 0 | 9 | 36 | 72 | 39 | 33 | null | null |
shlevy/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | -- An origin is visible if the place where the constraint arises is manifest
-- in user code. Currently, all origins are visible except for invisible
-- TypeEqOrigins. This is used when choosing which error of
-- several to report
isVisibleOrigin :: CtOrigin -> Bool
isVisibleOrigin (TypeEqOrigin { uo_visible = vis }) =... | 324 | isVisibleOrigin :: CtOrigin -> Bool
isVisibleOrigin (TypeEqOrigin { uo_visible = vis }) = vis | 93 | isVisibleOrigin (TypeEqOrigin { uo_visible = vis }) = vis | 57 | true | true | 3 | 7 | 53 | 42 | 21 | 21 | null | null |
kairne/repa-lts | Data/Rope/Operators/Reduction.hs | bsd-3-clause | reduceCtxLength :: ReduceCtx a -> Int
reduceCtxLength RCTop = 0 | 63 | reduceCtxLength :: ReduceCtx a -> Int
reduceCtxLength RCTop = 0 | 63 | reduceCtxLength RCTop = 0 | 25 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
olorin/amazonka | amazonka-s3/test/Test/AWS/Gen/S3.hs | mpl-2.0 | testPutBucketWebsite :: PutBucketWebsite -> TestTree
testPutBucketWebsite = req
"PutBucketWebsite"
"fixture/PutBucketWebsite.yaml" | 138 | testPutBucketWebsite :: PutBucketWebsite -> TestTree
testPutBucketWebsite = req
"PutBucketWebsite"
"fixture/PutBucketWebsite.yaml" | 138 | testPutBucketWebsite = req
"PutBucketWebsite"
"fixture/PutBucketWebsite.yaml" | 85 | false | true | 0 | 5 | 17 | 21 | 10 | 11 | null | null |
tonilopezmr/Learning-Haskell | Exercises/2/Exercise_15.hs | apache-2.0 | numleaves (Leaf x) = 1 | 26 | numleaves (Leaf x) = 1 | 26 | numleaves (Leaf x) = 1 | 26 | false | false | 0 | 7 | 8 | 15 | 7 | 8 | null | null |
dvcolgan/LanguageSurvey | programs/Main.hs | mit | findScore :: [Int] -> (Int, [Int])
findScore dice =
remove1s5s . (removeNOfAKind 3) . (removeNOfAKind 4) . (removeNOfAKind 5) . remove222 . remove33 . remove42 . removeStraight . (removeNOfAKind 6) $ (0, sortByFrequency dice) | 229 | findScore :: [Int] -> (Int, [Int])
findScore dice =
remove1s5s . (removeNOfAKind 3) . (removeNOfAKind 4) . (removeNOfAKind 5) . remove222 . remove33 . remove42 . removeStraight . (removeNOfAKind 6) $ (0, sortByFrequency dice) | 229 | findScore dice =
remove1s5s . (removeNOfAKind 3) . (removeNOfAKind 4) . (removeNOfAKind 5) . remove222 . remove33 . remove42 . removeStraight . (removeNOfAKind 6) $ (0, sortByFrequency dice) | 194 | false | true | 0 | 15 | 37 | 99 | 52 | 47 | null | null |
ekmett/ermine | opt/no-ekg/Ermine/Monitor.hs | bsd-2-clause | -- | create a counter
counterM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Counter
counterM = return . Counter | 125 | counterM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Counter
counterM = return . Counter | 103 | counterM = return . Counter | 27 | true | true | 0 | 7 | 23 | 46 | 24 | 22 | null | null |
chrisdone/renoise | src/Renoise.hs | bsd-3-clause | -- | Set track X's post FX volume in dB [-200 - 3]. Values outside
-- of this range are truncated.
setTrackPostFxVolumeDb :: Int32 -> Int32 -> Message
setTrackPostFxVolumeDb t i =
(message ("/renoise/song/track/" ++ show (t::Int32) ++ "/postfx_volume_db")
[Int32 i]) | 279 | setTrackPostFxVolumeDb :: Int32 -> Int32 -> Message
setTrackPostFxVolumeDb t i =
(message ("/renoise/song/track/" ++ show (t::Int32) ++ "/postfx_volume_db")
[Int32 i]) | 180 | setTrackPostFxVolumeDb t i =
(message ("/renoise/song/track/" ++ show (t::Int32) ++ "/postfx_volume_db")
[Int32 i]) | 128 | true | true | 0 | 11 | 53 | 60 | 32 | 28 | null | null |
imalsogreg/hackage-matrix-builder | src/Paths.hs | gpl-3.0 | removeFileP :: Path a File -> IO ()
removeFileP = removeFile . toFilePath | 73 | removeFileP :: Path a File -> IO ()
removeFileP = removeFile . toFilePath | 73 | removeFileP = removeFile . toFilePath | 37 | false | true | 0 | 7 | 12 | 29 | 14 | 15 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/Key.hs | bsd-3-clause | leftButtonReleaseKM :: KM
leftButtonReleaseKM = KM NoModifier LeftButtonRelease | 79 | leftButtonReleaseKM :: KM
leftButtonReleaseKM = KM NoModifier LeftButtonRelease | 79 | leftButtonReleaseKM = KM NoModifier LeftButtonRelease | 53 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
jdreaver/eventful | eventful-core/src/Eventful/ProjectionCache/Types.hs | mit | updateGlobalProjectionCache
:: (Monad m)
=> GlobalEventStoreReader m event
-> GlobalStreamProjectionCache key state m
-> GlobalStreamProjection state event
-> key
-> m ()
updateGlobalProjectionCache reader cache projection key = do
StreamProjection{..} <- getLatestGlobalProjectionWithCache reader cache pr... | 415 | updateGlobalProjectionCache
:: (Monad m)
=> GlobalEventStoreReader m event
-> GlobalStreamProjectionCache key state m
-> GlobalStreamProjection state event
-> key
-> m ()
updateGlobalProjectionCache reader cache projection key = do
StreamProjection{..} <- getLatestGlobalProjectionWithCache reader cache pr... | 415 | updateGlobalProjectionCache reader cache projection key = do
StreamProjection{..} <- getLatestGlobalProjectionWithCache reader cache projection key
storeProjectionSnapshot cache key streamProjectionPosition streamProjectionState | 232 | false | true | 0 | 12 | 56 | 106 | 48 | 58 | null | null |
vikraman/ghc | libraries/base/GHC/List.hs | bsd-3-clause | scanl1 _ [] = [] | 29 | scanl1 _ [] = [] | 29 | scanl1 _ [] = [] | 29 | false | false | 1 | 6 | 17 | 18 | 7 | 11 | null | null |
davmre/matrizer | src/Matrizer/Analysis.hs | gpl-2.0 | scalarprodSizeCheck r1 c1 r2 c2 = (r1==1 && c1==1) | 50 | scalarprodSizeCheck r1 c1 r2 c2 = (r1==1 && c1==1) | 50 | scalarprodSizeCheck r1 c1 r2 c2 = (r1==1 && c1==1) | 50 | false | false | 0 | 8 | 8 | 30 | 15 | 15 | null | null |
modeswitch/barrelfish | tools/mackerel/ShiftDriver.hs | mit | register_shadow_ref :: RT.Rec -> C.Expr
register_shadow_ref r =
let deref = C.DerefField (C.Variable cv_dev) (device_shadow_field_name r)
in
if RT.is_array r then
C.SubscriptOf deref (C.Variable cv_i)
else
deref | 252 | register_shadow_ref :: RT.Rec -> C.Expr
register_shadow_ref r =
let deref = C.DerefField (C.Variable cv_dev) (device_shadow_field_name r)
in
if RT.is_array r then
C.SubscriptOf deref (C.Variable cv_i)
else
deref | 252 | register_shadow_ref r =
let deref = C.DerefField (C.Variable cv_dev) (device_shadow_field_name r)
in
if RT.is_array r then
C.SubscriptOf deref (C.Variable cv_i)
else
deref | 212 | false | true | 0 | 12 | 67 | 82 | 40 | 42 | null | null |
andreasabel/helf | src/PrettyM.hs | mit | colon = text ":" | 21 | colon = text ":" | 21 | colon = text ":" | 21 | false | false | 1 | 5 | 8 | 13 | 4 | 9 | null | null |
phadej/pretty-show | Text/Show/Pretty.hs | mit | -- | Convert a generic value into a pretty 'String', if possible.
ppShow :: Show a => a -> String
ppShow = show . ppDoc | 119 | ppShow :: Show a => a -> String
ppShow = show . ppDoc | 53 | ppShow = show . ppDoc | 21 | true | true | 0 | 6 | 24 | 27 | 14 | 13 | null | null |
asm-products/ccar-websockets | CCAR/Model/Maturity.hs | agpl-3.0 | mult a b = handleInvalidMaturity mult (a,b) | 47 | mult a b = handleInvalidMaturity mult (a,b) | 47 | mult a b = handleInvalidMaturity mult (a,b) | 47 | false | false | 0 | 6 | 10 | 23 | 11 | 12 | null | null |
VictorDenisov/jdi | src/Language/Java/Jdi/Location.hs | gpl-2.0 | sourceName :: (Error e , MonadIO m, MonadError e m)
=> Location -> VirtualMachine m String
sourceName = locationSourceName | 133 | sourceName :: (Error e , MonadIO m, MonadError e m)
=> Location -> VirtualMachine m String
sourceName = locationSourceName | 133 | sourceName = locationSourceName | 31 | false | true | 0 | 7 | 29 | 43 | 22 | 21 | null | null |
esmolanka/sexp-grammar | sexp-grammar/src/Language/SexpGrammar/Base.hs | bsd-3-clause | -- | Property by a key grammar. Infix version of 'key'.
(.:)
:: Text
-> (forall t. Grammar Position (Sexp :- t) (a :- t))
-> Grammar Position (PropertyList :- t) (PropertyList :- a :- t)
(.:) = key | 203 | (.:)
:: Text
-> (forall t. Grammar Position (Sexp :- t) (a :- t))
-> Grammar Position (PropertyList :- t) (PropertyList :- a :- t)
(.:) = key | 147 | (.:) = key | 10 | true | true | 0 | 12 | 44 | 84 | 45 | 39 | null | null |
IUdalov/crossword-sketch | src/Dictionary.hs | gpl-3.0 | getByPattern :: Dictionary -> String -> [String]
getByPattern dict pattern = filter (matchWord pattern) (dict `ind` pos)
where pos = length pattern | 151 | getByPattern :: Dictionary -> String -> [String]
getByPattern dict pattern = filter (matchWord pattern) (dict `ind` pos)
where pos = length pattern | 151 | getByPattern dict pattern = filter (matchWord pattern) (dict `ind` pos)
where pos = length pattern | 102 | false | true | 0 | 7 | 25 | 57 | 30 | 27 | null | null |
brendanhay/gogol | gogol-vision/gen/Network/Google/Vision/Types/Product.hs | mpl-2.0 | -- | The Product.
rProduct :: Lens' Result (Maybe Product)
rProduct = lens _rProduct (\ s a -> s{_rProduct = a}) | 112 | rProduct :: Lens' Result (Maybe Product)
rProduct = lens _rProduct (\ s a -> s{_rProduct = a}) | 94 | rProduct = lens _rProduct (\ s a -> s{_rProduct = a}) | 53 | true | true | 1 | 9 | 20 | 51 | 25 | 26 | null | null |
ian-ross/language-c | src/Language/C/Analysis/TravMonad.hs | bsd-3-clause | enterFunctionScope :: (MonadSymtab m) => m ()
enterFunctionScope = updDefTable (ST.enterFunctionScope) | 102 | enterFunctionScope :: (MonadSymtab m) => m ()
enterFunctionScope = updDefTable (ST.enterFunctionScope) | 102 | enterFunctionScope = updDefTable (ST.enterFunctionScope) | 56 | false | true | 0 | 8 | 10 | 39 | 18 | 21 | null | null |
drpowell/XMPP | Network/XMPP/Stanzas.hs | bsd-3-clause | --- Presence
-- |Send ordinary online presence.
sendPresence :: Maybe (Text, [Text]) -> Maybe Integer -> XMPP ()
sendPresence status priority =
sendStanza $ XML "presence" [] (status'++priority')
where
priority' = maybe [] (\p -> [XML "priority" [] [CData $ T.pack $ show p]]) priority
status' = case stat... | 541 | sendPresence :: Maybe (Text, [Text]) -> Maybe Integer -> XMPP ()
sendPresence status priority =
sendStanza $ XML "presence" [] (status'++priority')
where
priority' = maybe [] (\p -> [XML "priority" [] [CData $ T.pack $ show p]]) priority
status' = case status of
Just (sh, ss) -> (XML "show" [] [CD... | 492 | sendPresence status priority =
sendStanza $ XML "presence" [] (status'++priority')
where
priority' = maybe [] (\p -> [XML "priority" [] [CData $ T.pack $ show p]]) priority
status' = case status of
Just (sh, ss) -> (XML "show" [] [CData sh]):(statuses ss)
_ -> []
statuses =... | 427 | true | true | 5 | 13 | 130 | 229 | 111 | 118 | null | null |
matt-keibler/monte-carlo-pi | monte-carlo-pi-hs/app/Main.hs | gpl-3.0 | createPNG :: StdGen -> Font -> Image PixelRGBA8
createPNG gen font = renderDrawing imageDiameter imageDiameter white $ do
withColor blue $ mapM_ fill $ inPoints points
withColor red $ mapM_ fill $ outPoints points
withColor black $ mapM_ (stroke 4 JoinRound (CapRound, CapRound)) [circle (V2 imageRadius imageRadiu... | 957 | createPNG :: StdGen -> Font -> Image PixelRGBA8
createPNG gen font = renderDrawing imageDiameter imageDiameter white $ do
withColor blue $ mapM_ fill $ inPoints points
withColor red $ mapM_ fill $ outPoints points
withColor black $ mapM_ (stroke 4 JoinRound (CapRound, CapRound)) [circle (V2 imageRadius imageRadiu... | 957 | createPNG gen font = renderDrawing imageDiameter imageDiameter white $ do
withColor blue $ mapM_ fill $ inPoints points
withColor red $ mapM_ fill $ outPoints points
withColor black $ mapM_ (stroke 4 JoinRound (CapRound, CapRound)) [circle (V2 imageRadius imageRadius) imageRadius,
... | 909 | false | true | 8 | 14 | 316 | 347 | 149 | 198 | null | null |
rolph-recto/liquid-fixpoint | src/Language/Fixpoint/SortCheck.hs | bsd-3-clause | errCast e t' t = printf "Cannot cast %s of sort %s to incompatible sort %s"
(showpp e) (showpp t') (showpp t) | 140 | errCast e t' t = printf "Cannot cast %s of sort %s to incompatible sort %s"
(showpp e) (showpp t') (showpp t) | 140 | errCast e t' t = printf "Cannot cast %s of sort %s to incompatible sort %s"
(showpp e) (showpp t') (showpp t) | 140 | false | false | 1 | 7 | 52 | 45 | 19 | 26 | null | null |
tomjaguarpaw/postgresql-simple | src/Database/PostgreSQL/Simple/Vector/Unboxed.hs | bsd-3-clause | -- | A version of 'returning' taking parser as argument
returningWith :: (ToRow q, VU.Unbox r) => RowParser r -> Connection -> Query -> [q] -> IO (VU.Vector r)
returningWith _ _ _ [] = return VU.empty | 200 | returningWith :: (ToRow q, VU.Unbox r) => RowParser r -> Connection -> Query -> [q] -> IO (VU.Vector r)
returningWith _ _ _ [] = return VU.empty | 144 | returningWith _ _ _ [] = return VU.empty | 40 | true | true | 0 | 14 | 36 | 82 | 40 | 42 | null | null |
prashant007/AMPL | myAMPL/src/test_del/AMPL_am.hs | mit | put_ch:: Int -> POLARITY -> VAL -> CHM -> CHM
put_ch ch pol val (names, chs) = (names, putch ch pol (Q_PUT val Q_EMPTY) chs) | 125 | put_ch:: Int -> POLARITY -> VAL -> CHM -> CHM
put_ch ch pol val (names, chs) = (names, putch ch pol (Q_PUT val Q_EMPTY) chs) | 125 | put_ch ch pol val (names, chs) = (names, putch ch pol (Q_PUT val Q_EMPTY) chs) | 78 | false | true | 0 | 8 | 25 | 65 | 34 | 31 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.