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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
expipiplus1/vulkan | src/Vulkan/Core10/Pass.hs | bsd-3-clause | -- | vkGetRenderAreaGranularity - Returns the granularity for optimal render
-- area
--
-- = Description
--
-- The conditions leading to an optimal @renderArea@ are:
--
-- - the @offset.x@ member in @renderArea@ is a multiple of the @width@
-- member of the returned 'Vulkan.Core10.FundamentalTypes.Extent2D'
-- ... | 19,155 | getRenderAreaGranularity :: forall io
. (MonadIO io)
=> -- | @device@ is the logical device that owns the render pass.
Device
-> -- | @renderPass@ is a handle to a render pass.
RenderPass
... | 16,783 | getRenderAreaGranularity device renderPass = liftIO . evalContT $ do
let vkGetRenderAreaGranularityPtr = pVkGetRenderAreaGranularity (case device of Device{deviceCmds} -> deviceCmds)
lift $ unless (vkGetRenderAreaGranularityPtr /= nullFunPtr) $
throwIO $ IOError Nothing InvalidArgument "" "The function pointer ... | 16,401 | true | true | 0 | 17 | 2,697 | 573 | 459 | 114 | null | null |
ihc/futhark | src/Futhark/Analysis/Metrics.hs | isc | primOpMetrics Concat{} = seen "Concat" | 38 | primOpMetrics Concat{} = seen "Concat" | 38 | primOpMetrics Concat{} = seen "Concat" | 38 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
mdsteele/fallback | src/Fallback/State/Item.hs | gpl-3.0 | armorName BrawlersTunic = "Brawler's Tunic" | 43 | armorName BrawlersTunic = "Brawler's Tunic" | 43 | armorName BrawlersTunic = "Brawler's Tunic" | 43 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
ianthehenry/basilica | Database/Posts.hs | mit | getPost :: Int -> DatabaseM (Maybe ResolvedPost)
getPost = getPostByKey . fromInt | 81 | getPost :: Int -> DatabaseM (Maybe ResolvedPost)
getPost = getPostByKey . fromInt | 81 | getPost = getPostByKey . fromInt | 32 | false | true | 1 | 9 | 11 | 35 | 15 | 20 | null | null |
asilvestre/haskell-neo4j-rest-client | tests/IntegrationTests.hs | mit | case_getNodeUnexistingProperty :: Assertion
case_getNodeUnexistingProperty = withAuthConnection host port creds $ do
n <- createNode someProperties
prop <- getProperty n "noproperty"
neo4jEqual Nothing prop
deleteNode n
-- | Get a property from an unexisting node | 280 | case_getNodeUnexistingProperty :: Assertion
case_getNodeUnexistingProperty = withAuthConnection host port creds $ do
n <- createNode someProperties
prop <- getProperty n "noproperty"
neo4jEqual Nothing prop
deleteNode n
-- | Get a property from an unexisting node | 280 | case_getNodeUnexistingProperty = withAuthConnection host port creds $ do
n <- createNode someProperties
prop <- getProperty n "noproperty"
neo4jEqual Nothing prop
deleteNode n
-- | Get a property from an unexisting node | 236 | false | true | 0 | 9 | 50 | 59 | 26 | 33 | null | null |
micxjo/regex-ast | src/Text/Regex/AST.hs | bsd-3-clause | builder (Group sub Nothing) =
singleton '(' <> builder sub <> singleton ')' | 77 | builder (Group sub Nothing) =
singleton '(' <> builder sub <> singleton ')' | 77 | builder (Group sub Nothing) =
singleton '(' <> builder sub <> singleton ')' | 77 | false | false | 0 | 7 | 14 | 34 | 15 | 19 | null | null |
sgf-dma/hs-sgf-lib | src/Sgf/List.hs | bsd-3-clause | indsByElems1 :: (a -> a -> Bool)
-> [a] -- Elements, which indexes i'm searching for.
-> [a] -- List, where i'm searching for.
-> [Index]
indsByElems1 eq ks = fst . flip runBState (indBase, ks) . indsByElemsM1 eq | 252 | indsByElems1 :: (a -> a -> Bool)
-> [a] -- Elements, which indexes i'm searching for.
-> [a] -- List, where i'm searching for.
-> [Index]
indsByElems1 eq ks = fst . flip runBState (indBase, ks) . indsByElemsM1 eq | 252 | indsByElems1 eq ks = fst . flip runBState (indBase, ks) . indsByElemsM1 eq | 76 | false | true | 0 | 8 | 78 | 72 | 39 | 33 | null | null |
dgonyeo/lambdollars | Utils/Protobuf.hs | mit | serLdapUser :: LdapUser -> Text
serLdapUser lu = pack $ C.unpack $ fmap H.hex SP.runPut $ P.encodeMessage $ luToSlu lu | 118 | serLdapUser :: LdapUser -> Text
serLdapUser lu = pack $ C.unpack $ fmap H.hex SP.runPut $ P.encodeMessage $ luToSlu lu | 118 | serLdapUser lu = pack $ C.unpack $ fmap H.hex SP.runPut $ P.encodeMessage $ luToSlu lu | 86 | false | true | 0 | 9 | 19 | 55 | 25 | 30 | null | null |
NorfairKing/the-notes | src/Functions/Application/Macro.hs | gpl-2.0 | -- | Infix operator for function application
(-:) :: Note -> Note -> Note
(-:) = app | 84 | (-:) :: Note -> Note -> Note
(-:) = app | 39 | (-:) = app | 10 | true | true | 0 | 6 | 16 | 24 | 15 | 9 | null | null |
sdiehl/ghc | compiler/GHC/HsToCore/PmCheck.hs | bsd-3-clause | exhaustiveWarningFlag PatBindRhs = Just Opt_WarnIncompleteUniPatterns | 72 | exhaustiveWarningFlag PatBindRhs = Just Opt_WarnIncompleteUniPatterns | 72 | exhaustiveWarningFlag PatBindRhs = Just Opt_WarnIncompleteUniPatterns | 72 | false | false | 0 | 5 | 7 | 12 | 5 | 7 | null | null |
acowley/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | -- | Only used internally
mkNameL :: String -> Uniq -> Name
mkNameL s u = Name (mkOccName s) (NameL u) | 102 | mkNameL :: String -> Uniq -> Name
mkNameL s u = Name (mkOccName s) (NameL u) | 76 | mkNameL s u = Name (mkOccName s) (NameL u) | 42 | true | true | 0 | 8 | 20 | 47 | 22 | 25 | null | null |
ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Processor/Matrix/NaturalMI.hs | bsd-3-clause | countDiagonal _ _ = EncM.diagonalNonZeros | 52 | countDiagonal _ _ = EncM.diagonalNonZeros | 52 | countDiagonal _ _ = EncM.diagonalNonZeros | 52 | false | false | 0 | 5 | 15 | 13 | 6 | 7 | null | null |
jshholland/octobunce | src/Octobunce/Render.hs | mit | renderCommand IrcPing = byteString "PING" | 49 | renderCommand IrcPing = byteString "PING" | 49 | renderCommand IrcPing = byteString "PING" | 49 | false | false | 0 | 5 | 12 | 12 | 5 | 7 | null | null |
kolmodin/cabal | cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs | bsd-3-clause | prop_roundtrip_legacytypes_buildonly :: ProjectConfigBuildOnly -> Bool
prop_roundtrip_legacytypes_buildonly config =
roundtrip_legacytypes
mempty { projectConfigBuildOnly = config } | 191 | prop_roundtrip_legacytypes_buildonly :: ProjectConfigBuildOnly -> Bool
prop_roundtrip_legacytypes_buildonly config =
roundtrip_legacytypes
mempty { projectConfigBuildOnly = config } | 191 | prop_roundtrip_legacytypes_buildonly config =
roundtrip_legacytypes
mempty { projectConfigBuildOnly = config } | 120 | false | true | 0 | 7 | 24 | 29 | 15 | 14 | null | null |
ekr/tamarin-prover | lib/term/src/Term/Positions.hs | gpl-3.0 | atPos' dt (viewTerm' dt -> FApp (AC _) (a:_)) (0:ps) =
a `atPos` ps | 77 | atPos' dt (viewTerm' dt -> FApp (AC _) (a:_)) (0:ps) =
a `atPos` ps | 77 | atPos' dt (viewTerm' dt -> FApp (AC _) (a:_)) (0:ps) =
a `atPos` ps | 77 | false | false | 0 | 10 | 23 | 61 | 30 | 31 | null | null |
armoredsoftware/protocol | tpm/mainline/src/TPM/Const.hs | bsd-3-clause | tpm_ord_readcounter = (0x000000de :: Word32) | 44 | tpm_ord_readcounter = (0x000000de :: Word32) | 44 | tpm_ord_readcounter = (0x000000de :: Word32) | 44 | false | false | 0 | 5 | 4 | 12 | 7 | 5 | null | null |
PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator9/lab9.hs | cc0-1.0 | -- 2b. pentagon
pentagon :: Distance -> Command
pentagon d = copy 5 (Go d :#: Turn 72) | 86 | pentagon :: Distance -> Command
pentagon d = copy 5 (Go d :#: Turn 72) | 70 | pentagon d = copy 5 (Go d :#: Turn 72) | 38 | true | true | 0 | 8 | 17 | 37 | 18 | 19 | null | null |
avieth/diplomacy | Diplomacy/Province.hs | bsd-3-clause | provinceCoasts Bulgaria = [BulgariaEast, BulgariaSouth] | 55 | provinceCoasts Bulgaria = [BulgariaEast, BulgariaSouth] | 55 | provinceCoasts Bulgaria = [BulgariaEast, BulgariaSouth] | 55 | false | false | 0 | 5 | 4 | 15 | 8 | 7 | null | null |
tylerjl/cis194 | library/Cis194.hs | mit | -- |Supports the main stub
cis194 :: ()
cis194 = () | 51 | cis194 :: ()
cis194 = () | 24 | cis194 = () | 11 | true | true | 0 | 7 | 10 | 23 | 10 | 13 | null | null |
snoyberg/ghc | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | viewP :: ExpQ -> PatQ -> PatQ
viewP e p = do e' <- e
p' <- p
return (ViewP e' p') | 111 | viewP :: ExpQ -> PatQ -> PatQ
viewP e p = do e' <- e
p' <- p
return (ViewP e' p') | 111 | viewP e p = do e' <- e
p' <- p
return (ViewP e' p') | 81 | false | true | 0 | 10 | 51 | 58 | 25 | 33 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Parser/Types.hs | bsd-3-clause | pAliasP :: Parser (Id SrcSpan, PAlias)
pAliasP
= do name <- identifierP
πs <- pAliasVarsP
reservedOp "="
body <- predP
return (name, Alias name [] πs body) | 193 | pAliasP :: Parser (Id SrcSpan, PAlias)
pAliasP
= do name <- identifierP
πs <- pAliasVarsP
reservedOp "="
body <- predP
return (name, Alias name [] πs body) | 193 | pAliasP
= do name <- identifierP
πs <- pAliasVarsP
reservedOp "="
body <- predP
return (name, Alias name [] πs body) | 154 | false | true | 2 | 11 | 64 | 80 | 34 | 46 | null | null |
coolhacks/scripts-hacks | examples/shellcheck-master/ShellCheck/Analytics.hs | mit | prop_checkUnpassedInFunctions7 = verifyTree checkUnpassedInFunctions "foo() { echo $1; }; foo; foo;" | 100 | prop_checkUnpassedInFunctions7 = verifyTree checkUnpassedInFunctions "foo() { echo $1; }; foo; foo;" | 100 | prop_checkUnpassedInFunctions7 = verifyTree checkUnpassedInFunctions "foo() { echo $1; }; foo; foo;" | 100 | false | false | 0 | 5 | 10 | 11 | 5 | 6 | null | null |
lseelenbinder/oodle-compiler | Oodle/Lexer.hs | mit | lexSymbol ('-':cs) = (TokenMinus, cs) | 48 | lexSymbol ('-':cs) = (TokenMinus, cs) | 48 | lexSymbol ('-':cs) = (TokenMinus, cs) | 48 | false | false | 0 | 7 | 15 | 22 | 12 | 10 | null | null |
bitemyapp/hakaru | Language/Hakaru/Mixture.hs | bsd-3-clause | mode :: Mixture k -> (k, Prob)
mode (Mixture m) = maximumBy (comparing snd) (M.toList m) | 88 | mode :: Mixture k -> (k, Prob)
mode (Mixture m) = maximumBy (comparing snd) (M.toList m) | 88 | mode (Mixture m) = maximumBy (comparing snd) (M.toList m) | 57 | false | true | 0 | 8 | 15 | 52 | 26 | 26 | null | null |
agentm/project-m36 | test/Server/Main.hs | unlicense | testNotificationCallback :: MVar () -> NotificationCallback
testNotificationCallback mvar _ _ = putMVar mvar () | 111 | testNotificationCallback :: MVar () -> NotificationCallback
testNotificationCallback mvar _ _ = putMVar mvar () | 111 | testNotificationCallback mvar _ _ = putMVar mvar () | 51 | false | true | 0 | 8 | 13 | 39 | 17 | 22 | null | null |
armoredsoftware/protocol | tpm/mainline/src/TPM/Const.hs | bsd-3-clause | tpm_bad_locality = tpm_base + 61 | 32 | tpm_bad_locality = tpm_base + 61 | 32 | tpm_bad_locality = tpm_base + 61 | 32 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
ezrakilty/narc | Database/Narc/Eval.hs | bsd-2-clause | eval env (Var x, q) =
case lookup x env of
Nothing -> error
("Variable " ++ x ++ " not found in env " ++ show env ++
" while evaluating term.")
Just v -> v | 207 | eval env (Var x, q) =
case lookup x env of
Nothing -> error
("Variable " ++ x ++ " not found in env " ++ show env ++
" while evaluating term.")
Just v -> v | 207 | eval env (Var x, q) =
case lookup x env of
Nothing -> error
("Variable " ++ x ++ " not found in env " ++ show env ++
" while evaluating term.")
Just v -> v | 207 | false | false | 0 | 13 | 88 | 71 | 33 | 38 | null | null |
beni55/pinhole | Pinhole/Level/Level.hs | gpl-3.0 | screenWidth :: Num a => a
screenWidth = 640 | 43 | screenWidth :: Num a => a
screenWidth = 640 | 43 | screenWidth = 640 | 17 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
AlbinTheander/oden | src/Oden/Explode.hs | mit | explodeExpr' (Let si (LetPair _ n e:bs) b) =
Untyped.Let (Metadata si) (explodeNameBinding n) <$> explodeExpr' e <*> explodeExpr' (Let si bs b) | 145 | explodeExpr' (Let si (LetPair _ n e:bs) b) =
Untyped.Let (Metadata si) (explodeNameBinding n) <$> explodeExpr' e <*> explodeExpr' (Let si bs b) | 145 | explodeExpr' (Let si (LetPair _ n e:bs) b) =
Untyped.Let (Metadata si) (explodeNameBinding n) <$> explodeExpr' e <*> explodeExpr' (Let si bs b) | 145 | false | false | 0 | 10 | 24 | 76 | 36 | 40 | null | null |
sdiehl/ghc | libraries/base/GHC/Conc/Sync.hs | bsd-3-clause | unSTM :: STM a -> (State# RealWorld -> (# State# RealWorld, a #))
unSTM (STM a) = a | 83 | unSTM :: STM a -> (State# RealWorld -> (# State# RealWorld, a #))
unSTM (STM a) = a | 83 | unSTM (STM a) = a | 17 | false | true | 0 | 11 | 17 | 51 | 23 | 28 | null | null |
MichielDerhaeg/stack | src/Stack/StaticBytes.hs | bsd-3-clause | withByteArrayS :: StaticBytes sbytes => sbytes -> (Ptr p -> IO a) -> IO a
withByteArrayS sbytes = withByteArray (fromStatic sbytes :: ByteString) | 145 | withByteArrayS :: StaticBytes sbytes => sbytes -> (Ptr p -> IO a) -> IO a
withByteArrayS sbytes = withByteArray (fromStatic sbytes :: ByteString) | 145 | withByteArrayS sbytes = withByteArray (fromStatic sbytes :: ByteString) | 71 | false | true | 0 | 10 | 22 | 57 | 27 | 30 | null | null |
jstolarek/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | -- | @reifyAnnotations target@ returns the list of annotations
-- associated with @target@. Only the annotations that are
-- appropriately typed is returned. So if you have @Int@ and @String@
-- annotations for the same target, you have to call this function twice.
reifyAnnotations :: Data a => AnnLookup -> Q [a]
rei... | 363 | reifyAnnotations :: Data a => AnnLookup -> Q [a]
reifyAnnotations an = Q (qReifyAnnotations an) | 95 | reifyAnnotations an = Q (qReifyAnnotations an) | 46 | true | true | 0 | 9 | 59 | 49 | 24 | 25 | null | null |
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell | src/ATP/Poly.hs | gpl-3.0 | destRational _ = __IMPOSSIBLE__ | 31 | destRational _ = __IMPOSSIBLE__ | 31 | destRational _ = __IMPOSSIBLE__ | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
olorin/amazonka | gen/src/Gen/AST/Data/Syntax.hs | mpl-2.0 | tycon :: Text -> Type
tycon = TyCon . unqual | 44 | tycon :: Text -> Type
tycon = TyCon . unqual | 44 | tycon = TyCon . unqual | 22 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
JohnLato/impulse | src/Reactive/Impulse/Internal/Chain.hs | lgpl-3.0 | addChain child evt@(EApply lbl prevE beh) = addBound childLbl lbl evt $ do
mTrace $ "EApply " ++ show lbl
cbeh <- makeBehavior beh
added <- addChains False True child lbl evt (CApply lbl cbeh)
Fold.forM_ added $ \newChain -> addChain newChain prevE
where childLbl = child^.label | 298 | addChain child evt@(EApply lbl prevE beh) = addBound childLbl lbl evt $ do
mTrace $ "EApply " ++ show lbl
cbeh <- makeBehavior beh
added <- addChains False True child lbl evt (CApply lbl cbeh)
Fold.forM_ added $ \newChain -> addChain newChain prevE
where childLbl = child^.label | 298 | addChain child evt@(EApply lbl prevE beh) = addBound childLbl lbl evt $ do
mTrace $ "EApply " ++ show lbl
cbeh <- makeBehavior beh
added <- addChains False True child lbl evt (CApply lbl cbeh)
Fold.forM_ added $ \newChain -> addChain newChain prevE
where childLbl = child^.label | 298 | false | false | 0 | 11 | 66 | 120 | 56 | 64 | null | null |
romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The message for the Spot Instance state change.
sisfMessage :: Lens' SpotInstanceStateFault (Maybe Text)
sisfMessage = lens _sisfMessage (\s a -> s { _sisfMessage = a }) | 174 | sisfMessage :: Lens' SpotInstanceStateFault (Maybe Text)
sisfMessage = lens _sisfMessage (\s a -> s { _sisfMessage = a }) | 121 | sisfMessage = lens _sisfMessage (\s a -> s { _sisfMessage = a }) | 64 | true | true | 1 | 9 | 28 | 51 | 25 | 26 | null | null |
vikraman/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | ctEvLoc :: CtEvidence -> CtLoc
ctEvLoc = ctev_loc | 49 | ctEvLoc :: CtEvidence -> CtLoc
ctEvLoc = ctev_loc | 49 | ctEvLoc = ctev_loc | 18 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
mightymoose/liquidhaskell | tests/pos/vector2.hs | bsd-3-clause | {-@ type SparseVector a N = [({v: Int | (0 <= v && v < N)}, a)] @-}
{-@ sparseDotProduct :: (Num a) => x:(Vector a) -> (SparseVector a {(vlen x)}) -> a @-}
sparseDotProduct x y = go 0 y
where
{-@ Decrease go 2 @-}
go sum ((i, v) : y') = go (sum + (x ! i) * v) y'
go sum [] = sum | 306 | sparseDotProduct x y = go 0 y
where
{-@ Decrease go 2 @-}
go sum ((i, v) : y') = go (sum + (x ! i) * v) y'
go sum [] = sum | 149 | sparseDotProduct x y = go 0 y
where
{-@ Decrease go 2 @-}
go sum ((i, v) : y') = go (sum + (x ! i) * v) y'
go sum [] = sum | 149 | true | false | 1 | 10 | 95 | 89 | 42 | 47 | null | null |
romildo/gsynt | src/LR.hs | isc | traceLR ((stack, state, input, actions):rest) =
do (do forM_ (reverse stack) $ \(s, t@(Node (Just x) _)) ->
do textcolor (DefColor Blue) $ texy s
-- texy x
tree texy t
textcolor (DefColor Blue) $ textbf $ texy state
hfill
mconcat (intersperse " " (fmap... | 477 | traceLR ((stack, state, input, actions):rest) =
do (do forM_ (reverse stack) $ \(s, t@(Node (Just x) _)) ->
do textcolor (DefColor Blue) $ texy s
-- texy x
tree texy t
textcolor (DefColor Blue) $ textbf $ texy state
hfill
mconcat (intersperse " " (fmap... | 477 | traceLR ((stack, state, input, actions):rest) =
do (do forM_ (reverse stack) $ \(s, t@(Node (Just x) _)) ->
do textcolor (DefColor Blue) $ texy s
-- texy x
tree texy t
textcolor (DefColor Blue) $ textbf $ texy state
hfill
mconcat (intersperse " " (fmap... | 477 | false | false | 0 | 18 | 174 | 176 | 84 | 92 | null | null |
kaoskorobase/mescaline | resources/hugs/packages/base/Data/IntMap.hs | gpl-3.0 | {- | /O(n+m)/. Is this a proper submap? (ie. a submap but not equal).
The expression (@'isProperSubmapOfBy' f m1 m2@) returns 'True' when
@m1@ and @m2@ are not equal,
all keys in @m1@ are in @m2@, and when @f@ returns 'True' when
applied to their respective values. For example, the following
expressions are all '... | 912 | isProperSubmapOfBy :: (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool
isProperSubmapOfBy pred t1 t2
= case submapCmp pred t1 t2 of
LT -> True
ge -> False | 169 | isProperSubmapOfBy pred t1 t2
= case submapCmp pred t1 t2 of
LT -> True
ge -> False | 98 | true | true | 2 | 8 | 172 | 74 | 35 | 39 | null | null |
nikita-volkov/hasql | library/Hasql/Private/Decoders.hs | mit | bytea :: Value ByteString
bytea = Value (Value.decoder (const A.bytea_strict)) | 78 | bytea :: Value ByteString
bytea = Value (Value.decoder (const A.bytea_strict)) | 78 | bytea = Value (Value.decoder (const A.bytea_strict)) | 52 | false | true | 0 | 10 | 9 | 33 | 16 | 17 | null | null |
psibi/yesod | yesod-core/Yesod/Core/Handler.hs | mit | -- | Bypass remaining handler code and output the given file.
--
-- For some backends, this is more efficient than reading in the file to
-- memory, since they can optimize file sending via a system call to sendfile.
sendFile :: MonadHandler m => ContentType -> FilePath -> m a
sendFile ct fp = handlerError $ HCSendFile... | 334 | sendFile :: MonadHandler m => ContentType -> FilePath -> m a
sendFile ct fp = handlerError $ HCSendFile ct fp Nothing | 117 | sendFile ct fp = handlerError $ HCSendFile ct fp Nothing | 56 | true | true | 0 | 8 | 60 | 49 | 25 | 24 | null | null |
synsem/texhs | src/Text/TeX/Lexer/TokenParser/State.hs | gpl-3.0 | -- | Lookup macro definition.
lookupMacro :: Macro k a => k -> LexerState -> Maybe a
lookupMacro k = lookup k . getMacros | 121 | lookupMacro :: Macro k a => k -> LexerState -> Maybe a
lookupMacro k = lookup k . getMacros | 91 | lookupMacro k = lookup k . getMacros | 36 | true | true | 1 | 9 | 23 | 48 | 21 | 27 | null | null |
fmthoma/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | getTcCoVar_maybe _ = Nothing | 40 | getTcCoVar_maybe _ = Nothing | 40 | getTcCoVar_maybe _ = Nothing | 40 | false | false | 0 | 4 | 15 | 10 | 4 | 6 | null | null |
duplode/stack | src/Stack/Ide.hs | bsd-3-clause | -- | Launch a GHCi IDE for the given local project targets with the
-- given options and configure it with the load paths and extensions
-- of those targets.
ide
:: (HasConfig r, HasBuildConfig r, HasEnvConfig r, MonadReader r m, MonadIO m, MonadThrow m, MonadLogger m, MonadCatch m, MonadBaseControl IO m, HasHttpMa... | 2,276 | ide
:: (HasConfig r, HasBuildConfig r, HasEnvConfig r, MonadReader r m, MonadIO m, MonadThrow m, MonadLogger m, MonadCatch m, MonadBaseControl IO m, HasHttpManager r)
=> [Text] -- ^ Targets.
-> [String] -- ^ GHC options.
-> m ()
ide targets useropts = do
pkgs <- ghciSetup targets
pwd <- getWorki... | 2,118 | ide targets useropts = do
pkgs <- ghciSetup targets
pwd <- getWorkingDir
(pkgopts,srcfiles) <-
liftM mconcat $
forM pkgs $
\pkg ->
do dist <- distDirFromDir (ghciPkgDir pkg)
autogen <- return (autogenDir dist)
paths_foo <-
... | 1,873 | true | true | 0 | 22 | 868 | 566 | 280 | 286 | null | null |
akc/sym | Sym/Perm/D8.hs | bsd-3-clause | -- | @symmetryClasses fs xs@ is the list of equivalence classes under
-- the action of the /group/ of functions @fs@.
symmetryClasses :: [Perm -> Perm] -> [Perm] -> [[Perm]]
symmetryClasses _ [] = [] | 200 | symmetryClasses :: [Perm -> Perm] -> [Perm] -> [[Perm]]
symmetryClasses _ [] = [] | 82 | symmetryClasses _ [] = [] | 26 | true | true | 0 | 8 | 35 | 46 | 26 | 20 | null | null |
monsanto/hie | Hie/Language/Haskell/Exts/ParseUtils.hs | gpl-3.0 | check3Exprs :: PExp L -> PExp L -> PExp L -> (S.Exp L -> S.Exp L -> S.Exp L -> a) -> P a
check3Exprs e1 e2 e3 f = do
e1 <- checkExpr e1
e2 <- checkExpr e2
e3 <- checkExpr e3
return (f e1 e2 e3) | 209 | check3Exprs :: PExp L -> PExp L -> PExp L -> (S.Exp L -> S.Exp L -> S.Exp L -> a) -> P a
check3Exprs e1 e2 e3 f = do
e1 <- checkExpr e1
e2 <- checkExpr e2
e3 <- checkExpr e3
return (f e1 e2 e3) | 209 | check3Exprs e1 e2 e3 f = do
e1 <- checkExpr e1
e2 <- checkExpr e2
e3 <- checkExpr e3
return (f e1 e2 e3) | 120 | false | true | 0 | 14 | 63 | 124 | 55 | 69 | null | null |
lostMohican/estimation_generator | src/Main.hs | gpl-3.0 | estimate :: String -> Platform -> Days
--estimate contents pl = pl * (length $ lines contents)
estimate contents pl = pl * (foldl addSentences 0 $ lines contents) | 163 | estimate :: String -> Platform -> Days
estimate contents pl = pl * (foldl addSentences 0 $ lines contents) | 106 | estimate contents pl = pl * (foldl addSentences 0 $ lines contents) | 67 | true | true | 0 | 8 | 29 | 44 | 22 | 22 | null | null |
massudaw/mtk | Kalman/Linear/Naive.hs | bsd-3-clause | rtsmoother (LinearModel a h g b vg vb vgb) (xn,pn) (xp,pp) (x,p) = (xs,ps)
where
c = p !*! distribute a !*! inverse pp
ps = p !+! c !*! ( pn !-! pp ) !*! distribute c
xs = x ^+^ c !* ( xn ^-^ xp)
m = p !*! distribute c !+! c !*! ( m !-! a !*! p) !*! distribute c | 302 | rtsmoother (LinearModel a h g b vg vb vgb) (xn,pn) (xp,pp) (x,p) = (xs,ps)
where
c = p !*! distribute a !*! inverse pp
ps = p !+! c !*! ( pn !-! pp ) !*! distribute c
xs = x ^+^ c !* ( xn ^-^ xp)
m = p !*! distribute c !+! c !*! ( m !-! a !*! p) !*! distribute c | 302 | rtsmoother (LinearModel a h g b vg vb vgb) (xn,pn) (xp,pp) (x,p) = (xs,ps)
where
c = p !*! distribute a !*! inverse pp
ps = p !+! c !*! ( pn !-! pp ) !*! distribute c
xs = x ^+^ c !* ( xn ^-^ xp)
m = p !*! distribute c !+! c !*! ( m !-! a !*! p) !*! distribute c | 302 | false | false | 0 | 11 | 105 | 163 | 86 | 77 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/IO/CSVImport.hs | bsd-3-clause | filterWith :: Int -> (Double -> Bool) -> Filter
filterWith r p = filter (p . (!! r)) | 84 | filterWith :: Int -> (Double -> Bool) -> Filter
filterWith r p = filter (p . (!! r)) | 84 | filterWith r p = filter (p . (!! r)) | 36 | false | true | 0 | 8 | 17 | 49 | 25 | 24 | null | null |
jmitchell/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | filterName (NS n _) = filterName n | 36 | filterName (NS n _) = filterName n | 36 | filterName (NS n _) = filterName n | 36 | false | false | 0 | 7 | 8 | 20 | 9 | 11 | null | null |
Fulmene/dotfiles | xmonad/.xmonad/lib/XMonad/Fulmene/Management.hs | mit | workspaceManageHook = composeAll [ className =? c --> doShift ws | (ws, cs) <- wsClass, c <- cs ] | 97 | workspaceManageHook = composeAll [ className =? c --> doShift ws | (ws, cs) <- wsClass, c <- cs ] | 97 | workspaceManageHook = composeAll [ className =? c --> doShift ws | (ws, cs) <- wsClass, c <- cs ] | 97 | false | false | 0 | 9 | 18 | 45 | 23 | 22 | null | null |
phdenzel/dotfiles | .config/xmonad/lib/Colors/Palenight.hs | mit | color15 = "#ffffff" | 19 | color15 = "#ffffff" | 19 | color15 = "#ffffff" | 19 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
juhp/stack | src/Stack/Types/Compiler.hs | bsd-3-clause | whichCompiler :: ActualCompiler -> WhichCompiler
whichCompiler ACGhc{} = Ghc | 76 | whichCompiler :: ActualCompiler -> WhichCompiler
whichCompiler ACGhc{} = Ghc | 76 | whichCompiler ACGhc{} = Ghc | 27 | false | true | 0 | 6 | 8 | 22 | 11 | 11 | null | null |
urbanslug/ghc | compiler/codeGen/StgCmmClosure.hs | bsd-3-clause | getCallMethod dflags name id (LFReEntrant _ arity _ _) n_args _cg_loc
_self_loop_info
| n_args == 0 = ASSERT( arity /= 0 )
ReturnIt -- No args at all
| n_args < arity = SlowCall -- Not enough args
| otherwise = DirectEntry (enterIdLabel dflags name (idCafIn... | 333 | getCallMethod dflags name id (LFReEntrant _ arity _ _) n_args _cg_loc
_self_loop_info
| n_args == 0 = ASSERT( arity /= 0 )
ReturnIt -- No args at all
| n_args < arity = SlowCall -- Not enough args
| otherwise = DirectEntry (enterIdLabel dflags name (idCafIn... | 333 | getCallMethod dflags name id (LFReEntrant _ arity _ _) n_args _cg_loc
_self_loop_info
| n_args == 0 = ASSERT( arity /= 0 )
ReturnIt -- No args at all
| n_args < arity = SlowCall -- Not enough args
| otherwise = DirectEntry (enterIdLabel dflags name (idCafIn... | 333 | false | false | 0 | 10 | 110 | 107 | 50 | 57 | null | null |
li-zhirui/EoplLangs | test/CallByReference/ParserSuite.hs | bsd-3-clause | testConstExpr :: Test
testConstExpr = TestList
[ testEq "Parse single number" (constNum 5) "5"
, testEq "Parse multi-numbers" (constNum 123) "123"
, testEq "Parse negative number" (constNum (-233)) "-233"
] | 214 | testConstExpr :: Test
testConstExpr = TestList
[ testEq "Parse single number" (constNum 5) "5"
, testEq "Parse multi-numbers" (constNum 123) "123"
, testEq "Parse negative number" (constNum (-233)) "-233"
] | 214 | testConstExpr = TestList
[ testEq "Parse single number" (constNum 5) "5"
, testEq "Parse multi-numbers" (constNum 123) "123"
, testEq "Parse negative number" (constNum (-233)) "-233"
] | 192 | false | true | 0 | 10 | 37 | 67 | 34 | 33 | null | null |
twittner/cql | src/Database/CQL/Protocol/Codec.hs | mpl-2.0 | encodeConsistency Three = encodeShort 0x03 | 48 | encodeConsistency Three = encodeShort 0x03 | 48 | encodeConsistency Three = encodeShort 0x03 | 48 | false | false | 0 | 5 | 10 | 12 | 5 | 7 | null | null |
mgax/beancount | lib/haskell/JournalParser.hs | gpl-2.0 | proceeds :: A.Quantity -> Parser A.Proceeds
proceeds qty = do pro <- (valueExt qty <?> "transaction proceeds (net of commissions)")
<|> pricePerUnit qty
when (pro < 0) (fail "proceeds cannot be negative")
return pro | 284 | proceeds :: A.Quantity -> Parser A.Proceeds
proceeds qty = do pro <- (valueExt qty <?> "transaction proceeds (net of commissions)")
<|> pricePerUnit qty
when (pro < 0) (fail "proceeds cannot be negative")
return pro | 283 | proceeds qty = do pro <- (valueExt qty <?> "transaction proceeds (net of commissions)")
<|> pricePerUnit qty
when (pro < 0) (fail "proceeds cannot be negative")
return pro | 239 | false | true | 0 | 12 | 102 | 81 | 36 | 45 | null | null |
msiegenthaler/SouSiT | Data/SouSiT/Trans.hs | bsd-3-clause | mapSinkTransFun f = mapSinkStatus (applyTransFun f) | 51 | mapSinkTransFun f = mapSinkStatus (applyTransFun f) | 51 | mapSinkTransFun f = mapSinkStatus (applyTransFun f) | 51 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
rodrigogribeiro/mptc | src/Tc/Kc/KcMonad.hs | bsd-3-clause | incFresh :: KcState -> KcState
incFresh s = s{fresh = (fresh s) + 1} | 68 | incFresh :: KcState -> KcState
incFresh s = s{fresh = (fresh s) + 1} | 68 | incFresh s = s{fresh = (fresh s) + 1} | 37 | false | true | 0 | 10 | 13 | 42 | 20 | 22 | null | null |
spechub/Hets | QVTR/Parser.hs | gpl-2.0 | pRelInvocation :: CharParser st QVTR.RelInvok
pRelInvocation = do
skip
nam <- pIdentifier
skip
char '('
skip
params <- pCommaSep (skip >> pIdentifier << skip)
skip
char ')'
skip
char ';'
return ( QVTR.RelInvok nam params )
-- Auxiliary definitions | 271 | pRelInvocation :: CharParser st QVTR.RelInvok
pRelInvocation = do
skip
nam <- pIdentifier
skip
char '('
skip
params <- pCommaSep (skip >> pIdentifier << skip)
skip
char ')'
skip
char ';'
return ( QVTR.RelInvok nam params )
-- Auxiliary definitions | 271 | pRelInvocation = do
skip
nam <- pIdentifier
skip
char '('
skip
params <- pCommaSep (skip >> pIdentifier << skip)
skip
char ')'
skip
char ';'
return ( QVTR.RelInvok nam params )
-- Auxiliary definitions | 225 | false | true | 0 | 11 | 62 | 96 | 41 | 55 | null | null |
ecaustin/haskhol-core | src/HaskHOL/Core/Parser.hs | bsd-2-clause | -- | Specifies a 'Text' to be recognized as a type binder by the parser.
parseAsTyBinder :: Text -> HOL Theory thry ()
parseAsTyBinder op = let fun ops = nub (op : ops) in
overParseContext State.tyBinders fun | 212 | parseAsTyBinder :: Text -> HOL Theory thry ()
parseAsTyBinder op = let fun ops = nub (op : ops) in
overParseContext State.tyBinders fun | 139 | parseAsTyBinder op = let fun ops = nub (op : ops) in
overParseContext State.tyBinders fun | 93 | true | true | 0 | 11 | 41 | 64 | 29 | 35 | null | null |
google/cabal2bazel | src/Google/Utils/Pick.hs | apache-2.0 | -- | The same as partialPick, but returns Maybe instead.
pick :: [a] -> IO (Maybe a)
pick [] = return Nothing | 109 | pick :: [a] -> IO (Maybe a)
pick [] = return Nothing | 52 | pick [] = return Nothing | 24 | true | true | 0 | 9 | 21 | 41 | 19 | 22 | null | null |
yangjueji/hblas | src/Numerical/HBLAS/BLAS/Internal/Level2.hs | bsd-3-clause | gerAbstraction :: (SM.Storable el, PrimMonad m)
=> String
-> GerxFunFFI scale el
-> GerxFunFFI scale el
-> (el -> (scale -> m ())-> m ())
-> forall orient . GerFun el orient (PrimState m) m
gerAbstraction gerName gerSafeFFI gerUnsafeFFI constHan... | 2,044 | gerAbstraction :: (SM.Storable el, PrimMonad m)
=> String
-> GerxFunFFI scale el
-> GerxFunFFI scale el
-> (el -> (scale -> m ())-> m ())
-> forall orient . GerFun el orient (PrimState m) m
gerAbstraction gerName gerSafeFFI gerUnsafeFFI constHan... | 2,044 | gerAbstraction gerName gerSafeFFI gerUnsafeFFI constHandler = ger
where
shouldCallFast :: Int -> Int -> Bool
shouldCallFast m n = flopsThreshold >= (fromIntegral m :: Int64)
* (fromIntegral n :: Int64)
isBadGer :: Int -> Int -> Int -> Int -> Bool
i... | 1,779 | false | true | 0 | 20 | 727 | 524 | 276 | 248 | null | null |
expipiplus1/vulkan | src/Vulkan/Core10/CommandBufferBuilding.hs | bsd-3-clause | -- | vkCmdSetStencilReference - Set stencil reference value dynamically for a
-- command buffer
--
-- = Description
--
-- This command sets the stencil reference value for subsequent drawing
-- commands when the graphics pipeline is created with
-- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_REFERENCE' set
... | 5,721 | cmdSetStencilReference :: forall io
. (MonadIO io)
=> -- | @commandBuffer@ is the command buffer into which the command will be
-- recorded.
CommandBuffer
-> -- | @faceMask@ is a bitmask of
... | 1,442 | cmdSetStencilReference commandBuffer faceMask reference = liftIO $ do
let vkCmdSetStencilReferencePtr = pVkCmdSetStencilReference (case commandBuffer of CommandBuffer{deviceCmds} -> deviceCmds)
unless (vkCmdSetStencilReferencePtr /= nullFunPtr) $
throwIO $ IOError Nothing InvalidArgument "" "The function pointe... | 611 | true | true | 5 | 11 | 1,424 | 231 | 157 | 74 | null | null |
alanz/htelehash | src/Network/TeleHash/Utils.hs | bsd-3-clause | getChanMaybe :: Uid -> TeleHash (Maybe TChan)
getChanMaybe chanUid = do
sw <- get
return $ Map.lookup chanUid (swIndexChans sw)
-- --------------------------------------------------------------------- | 205 | getChanMaybe :: Uid -> TeleHash (Maybe TChan)
getChanMaybe chanUid = do
sw <- get
return $ Map.lookup chanUid (swIndexChans sw)
-- --------------------------------------------------------------------- | 205 | getChanMaybe chanUid = do
sw <- get
return $ Map.lookup chanUid (swIndexChans sw)
-- --------------------------------------------------------------------- | 159 | false | true | 0 | 10 | 26 | 55 | 26 | 29 | null | null |
judah/haskeline | System/Console/Haskeline/Backend/Terminfo.hs | bsd-3-clause | left,right,up :: Int -> TermAction
left = flip leftA | 52 | left,right,up :: Int -> TermAction
left = flip leftA | 52 | left = flip leftA | 17 | false | true | 2 | 5 | 8 | 26 | 13 | 13 | null | null |
lally/orgmode | tests/Data/ArbOrgNode.hs | bsd-3-clause | lineWidth = 78 | 14 | lineWidth = 78 | 14 | lineWidth = 78 | 14 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
google/codeworld | codeworld-api/src/CodeWorld/DrawState.hs | apache-2.0 | scaleDS :: Double -> Double -> DrawState -> DrawState
scaleDS x y = mapDSAT $ \(AffineTransformation a b c d e f) ->
AffineTransformation (x * a) (x * b) (y * c) (y * d) e f | 175 | scaleDS :: Double -> Double -> DrawState -> DrawState
scaleDS x y = mapDSAT $ \(AffineTransformation a b c d e f) ->
AffineTransformation (x * a) (x * b) (y * c) (y * d) e f | 175 | scaleDS x y = mapDSAT $ \(AffineTransformation a b c d e f) ->
AffineTransformation (x * a) (x * b) (y * c) (y * d) e f | 121 | false | true | 2 | 9 | 39 | 101 | 50 | 51 | null | null |
conal/hermit | src/HERMIT/Dictionary/AlphaConversion.hs | bsd-2-clause | dupVars :: [Var] -> [Var]
dupVars = dupsBy ((==) `on` unqualifiedName) | 70 | dupVars :: [Var] -> [Var]
dupVars = dupsBy ((==) `on` unqualifiedName) | 70 | dupVars = dupsBy ((==) `on` unqualifiedName) | 44 | false | true | 0 | 8 | 10 | 42 | 22 | 20 | null | null |
snoyberg/ghc | compiler/utils/Pretty.hs | bsd-3-clause | mkUnion p q = p `union_` q | 30 | mkUnion p q = p `union_` q | 30 | mkUnion p q = p `union_` q | 30 | false | false | 0 | 5 | 10 | 17 | 9 | 8 | null | null |
urbanslug/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | deTagAlt :: TaggedAlt t -> CoreAlt
deTagAlt (con, bndrs, rhs) = (con, [b | TB b _ <- bndrs], deTagExpr rhs) | 107 | deTagAlt :: TaggedAlt t -> CoreAlt
deTagAlt (con, bndrs, rhs) = (con, [b | TB b _ <- bndrs], deTagExpr rhs) | 107 | deTagAlt (con, bndrs, rhs) = (con, [b | TB b _ <- bndrs], deTagExpr rhs) | 72 | false | true | 0 | 10 | 20 | 64 | 32 | 32 | null | null |
bjornbm/dimensional-tf | Numeric/Units/Dimensional/TF/QuantitiesTest.hs | bsd-3-clause | y20 :: Exposure Double
y20 = 1 *~ (coulomb / kilo gram) | 55 | y20 :: Exposure Double
y20 = 1 *~ (coulomb / kilo gram) | 55 | y20 = 1 *~ (coulomb / kilo gram) | 32 | false | true | 2 | 8 | 11 | 36 | 16 | 20 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/GetOpt.hs | bsd-3-clause | wrapText :: Int -> String -> [String]
wrapText width = map unwords . wrap 0 [] . words
where wrap :: Int -> [String] -> [String] -> [[String]]
wrap 0 [] (w:ws)
| length w + 1 > width
= wrap (length w) [w] ws
wrap col line (w:ws)
| col + length w + 1 > width
... | 946 | wrapText :: Int -> String -> [String]
wrapText width = map unwords . wrap 0 [] . words
where wrap :: Int -> [String] -> [String] -> [[String]]
wrap 0 [] (w:ws)
| length w + 1 > width
= wrap (length w) [w] ws
wrap col line (w:ws)
| col + length w + 1 > width
... | 946 | wrapText width = map unwords . wrap 0 [] . words
where wrap :: Int -> [String] -> [String] -> [[String]]
wrap 0 [] (w:ws)
| length w + 1 > width
= wrap (length w) [w] ws
wrap col line (w:ws)
| col + length w + 1 > width
= reverse line : wrap 0 [] (w:ws)
... | 908 | false | true | 7 | 14 | 276 | 285 | 142 | 143 | null | null |
HuwCampbell/grenade | examples/main/gan-mnist.hs | bsd-2-clause | randomDiscriminator :: MonadRandom m => m Discriminator
randomDiscriminator = randomNetwork | 91 | randomDiscriminator :: MonadRandom m => m Discriminator
randomDiscriminator = randomNetwork | 91 | randomDiscriminator = randomNetwork | 35 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
SKA-ScienceDataProcessor/RC | MS1/dna/DNA/Compiler/CH.hs | apache-2.0 | -- Generate master fucntion
buildMaster :: DataflowGraph -> IntMap ActorRes -> Compile [HS.Decl]
buildMaster gr actorMap = do
-- Identifier for node list
vnodes <- HS.Ident <$> fresh "nodes"
-- Generate map from node ID to variable it's bound and statement
-- for spawning CH process
actorVar <- forIntM actorM... | 1,159 | buildMaster :: DataflowGraph -> IntMap ActorRes -> Compile [HS.Decl]
buildMaster gr actorMap = do
-- Identifier for node list
vnodes <- HS.Ident <$> fresh "nodes"
-- Generate map from node ID to variable it's bound and statement
-- for spawning CH process
actorVar <- forIntM actorMap $ \n a -> do
let Just... | 1,131 | buildMaster gr actorMap = do
-- Identifier for node list
vnodes <- HS.Ident <$> fresh "nodes"
-- Generate map from node ID to variable it's bound and statement
-- for spawning CH process
actorVar <- forIntM actorMap $ \n a -> do
let Just (ANode sch _) = lab gr n
spawnActor vnodes sch a
-- Variable h... | 1,062 | true | true | 0 | 22 | 360 | 314 | 161 | 153 | null | null |
JoeyEremondi/haskelm | src/Parse/Module.hs | bsd-3-clause | listing :: IParser a -> IParser (Var.Listing a)
listing item =
do try (whitespace >> char '(')
whitespace
listing <- choice [ const Var.openListing <$> string ".."
, Var.Listing <$> commaSep1 item <*> return False
] <?> "listing of values (x,y,z)"
whitespac... | 355 | listing :: IParser a -> IParser (Var.Listing a)
listing item =
do try (whitespace >> char '(')
whitespace
listing <- choice [ const Var.openListing <$> string ".."
, Var.Listing <$> commaSep1 item <*> return False
] <?> "listing of values (x,y,z)"
whitespac... | 355 | listing item =
do try (whitespace >> char '(')
whitespace
listing <- choice [ const Var.openListing <$> string ".."
, Var.Listing <$> commaSep1 item <*> return False
] <?> "listing of values (x,y,z)"
whitespace
char ')'
return listing | 307 | false | true | 0 | 14 | 118 | 119 | 51 | 68 | null | null |
lally/orgmode | src/Data/OrgMode.hs | bsd-3-clause | addDrawer :: TextLine -> Maybe NodeChild -> OrgDocZipper -> OrgDocZipper
addDrawer line lastChild doczip@(OrgDocZipper path _ _)
| not (openDrawer lastChild) =
let drawer = Drawer (parseDrawerName line) [] [line]
in addChildToLastNode (ChildDrawer drawer) doczip path
-- Parse to get drProperties, and igno... | 693 | addDrawer :: TextLine -> Maybe NodeChild -> OrgDocZipper -> OrgDocZipper
addDrawer line lastChild doczip@(OrgDocZipper path _ _)
| not (openDrawer lastChild) =
let drawer = Drawer (parseDrawerName line) [] [line]
in addChildToLastNode (ChildDrawer drawer) doczip path
-- Parse to get drProperties, and igno... | 693 | addDrawer line lastChild doczip@(OrgDocZipper path _ _)
| not (openDrawer lastChild) =
let drawer = Drawer (parseDrawerName line) [] [line]
in addChildToLastNode (ChildDrawer drawer) doczip path
-- Parse to get drProperties, and ignore :END:.
| otherwise =
let Just (ChildDrawer (Drawer n p lines)) =... | 620 | false | true | 16 | 9 | 178 | 218 | 112 | 106 | null | null |
wouwouwou/2017_module_8 | src/haskell/series7/series7.hs | apache-2.0 | env :: Env
env = [("+", FunType IntType (FunType IntType IntType))
,("-", FunType IntType (FunType IntType IntType))
,("*", FunType IntType (FunType IntType IntType))
,("&&", FunType BoolType (FunType BoolType BoolType))
,("||", FunType BoolType (FunType BoolType BoolType))
... | 2,018 | env :: Env
env = [("+", FunType IntType (FunType IntType IntType))
,("-", FunType IntType (FunType IntType IntType))
,("*", FunType IntType (FunType IntType IntType))
,("&&", FunType BoolType (FunType BoolType BoolType))
,("||", FunType BoolType (FunType BoolType BoolType))
... | 2,018 | env = [("+", FunType IntType (FunType IntType IntType))
,("-", FunType IntType (FunType IntType IntType))
,("*", FunType IntType (FunType IntType IntType))
,("&&", FunType BoolType (FunType BoolType BoolType))
,("||", FunType BoolType (FunType BoolType BoolType))
,("++... | 2,007 | false | true | 0 | 12 | 413 | 724 | 385 | 339 | null | null |
ocharles/hackage-server | Distribution/Server/Features/Distro/Distributions.hs | bsd-3-clause | --- Removing
-- | Remove a distirbution from the list of known distirbutions
removeDistro :: DistroName -> Distributions -> Distributions
removeDistro distro distros = distros { nameMap = Map.delete distro (nameMap distros) } | 226 | removeDistro :: DistroName -> Distributions -> Distributions
removeDistro distro distros = distros { nameMap = Map.delete distro (nameMap distros) } | 148 | removeDistro distro distros = distros { nameMap = Map.delete distro (nameMap distros) } | 87 | true | true | 0 | 9 | 33 | 47 | 25 | 22 | null | null |
urbanslug/nairobi-bot | tests/Bot/URLSpec.hs | gpl-3.0 | spec :: Spec
spec = describe "URL tests: " $ do
urlTests
botTests | 82 | spec :: Spec
spec = describe "URL tests: " $ do
urlTests
botTests | 82 | spec = describe "URL tests: " $ do
urlTests
botTests | 69 | false | true | 0 | 8 | 29 | 31 | 12 | 19 | null | null |
jgoerzen/escpterm | escpbuf.hs | gpl-2.0 | -- forward roll x/216 in (108/216 in)
postPause = "\ESCj\x46" | 61 | postPause = "\ESCj\x46" | 23 | postPause = "\ESCj\x46" | 23 | true | false | 1 | 5 | 9 | 11 | 4 | 7 | null | null |
divipp/lensref | src/LensRef/Demo/SevenGUIs.hs | bsd-3-clause | multiplying :: (Fractional a, Eq a) => a -> Lens' a a
multiplying 0 = error "multiplying: factor 0" | 99 | multiplying :: (Fractional a, Eq a) => a -> Lens' a a
multiplying 0 = error "multiplying: factor 0" | 99 | multiplying 0 = error "multiplying: factor 0" | 45 | false | true | 0 | 7 | 18 | 41 | 20 | 21 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | diskRdwr :: String
diskRdwr = Types.diskModeToRaw DiskRdWr | 58 | diskRdwr :: String
diskRdwr = Types.diskModeToRaw DiskRdWr | 58 | diskRdwr = Types.diskModeToRaw DiskRdWr | 39 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
Skyfold/postgrest | src/PostgREST/OpenAPI.hs | mit | escapeHostName "!4" = "0.0.0.0" | 31 | escapeHostName "!4" = "0.0.0.0" | 31 | escapeHostName "!4" = "0.0.0.0" | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
acowley/language-c | src/Language/C/Parser/Tokens.hs | bsd-3-clause | posLenOfTok (CTokVoid pos ) = pos | 38 | posLenOfTok (CTokVoid pos ) = pos | 38 | posLenOfTok (CTokVoid pos ) = pos | 38 | false | false | 0 | 6 | 10 | 16 | 7 | 9 | null | null |
geocurnoff/nikki | src/Sorts/Nikki/State.hs | lgpl-3.0 | updateState :: Controls -> Mode -> Seconds -> Contacts -> (Bool, ControlData)
-> Nikki -> IO Nikki
updateState config mode now _ (False, _) nikki = do
let action = case mode of
TerminalMode{} -> UsingTerminal
RobotMode{} -> UsingTerminal
(LevelFinished _ result) -> NikkiLevel... | 546 | updateState :: Controls -> Mode -> Seconds -> Contacts -> (Bool, ControlData)
-> Nikki -> IO Nikki
updateState config mode now _ (False, _) nikki = do
let action = case mode of
TerminalMode{} -> UsingTerminal
RobotMode{} -> UsingTerminal
(LevelFinished _ result) -> NikkiLevel... | 546 | updateState config mode now _ (False, _) nikki = do
let action = case mode of
TerminalMode{} -> UsingTerminal
RobotMode{} -> UsingTerminal
(LevelFinished _ result) -> NikkiLevelFinished result
jumpInformation' = jumpInformation $ state nikki
State{direction} = sta... | 443 | false | true | 0 | 14 | 139 | 173 | 86 | 87 | null | null |
phischu/game-dsl | GameDSL.hs | bsd-3-clause | setAttribute :: (Ord attribute) => attribute -> Entity -> Value -> Action tag attribute ()
setAttribute attribute entity value = do
State.modify (modifyEntity entity (\(Properties ts attributes) ->
Properties ts (Map.insert attribute value attributes))) | 265 | setAttribute :: (Ord attribute) => attribute -> Entity -> Value -> Action tag attribute ()
setAttribute attribute entity value = do
State.modify (modifyEntity entity (\(Properties ts attributes) ->
Properties ts (Map.insert attribute value attributes))) | 265 | setAttribute attribute entity value = do
State.modify (modifyEntity entity (\(Properties ts attributes) ->
Properties ts (Map.insert attribute value attributes))) | 174 | false | true | 0 | 15 | 45 | 97 | 48 | 49 | null | null |
pparkkin/eta | compiler/ETA/Rename/RnTypes.hs | bsd-3-clause | badSigErr :: Bool -> HsDocContext -> LHsType RdrName -> TcM ()
badSigErr is_type doc (L loc ty)
= setSrcSpan loc $ addErr $
vcat [ hang (ptext (sLit "Illegal") <+> what
<+> ptext (sLit "signature:") <+> quotes (ppr ty))
2 (ptext (sLit "Perhaps you intended to use") <+> flag)
... | 552 | badSigErr :: Bool -> HsDocContext -> LHsType RdrName -> TcM ()
badSigErr is_type doc (L loc ty)
= setSrcSpan loc $ addErr $
vcat [ hang (ptext (sLit "Illegal") <+> what
<+> ptext (sLit "signature:") <+> quotes (ppr ty))
2 (ptext (sLit "Perhaps you intended to use") <+> flag)
... | 552 | badSigErr is_type doc (L loc ty)
= setSrcSpan loc $ addErr $
vcat [ hang (ptext (sLit "Illegal") <+> what
<+> ptext (sLit "signature:") <+> quotes (ppr ty))
2 (ptext (sLit "Perhaps you intended to use") <+> flag)
, docOfHsDocContext doc ]
where
what | is_type = ptex... | 489 | false | true | 2 | 13 | 157 | 228 | 104 | 124 | null | null |
spechub/Hets | GUI/GtkProverGUI.hs | gpl-2.0 | setSelectedComorphism :: TreeView -> ListStore GProver -> ComboBox -> ProofState
-> IO ProofState
setSelectedComorphism view list cbComorphism s = do
mfinder <- getSelectedSingle view list
case mfinder of
Just (i, f) -> do
sel <- comboBoxGetActive cbComorphism
let nf = f { selected = sel }
l... | 401 | setSelectedComorphism :: TreeView -> ListStore GProver -> ComboBox -> ProofState
-> IO ProofState
setSelectedComorphism view list cbComorphism s = do
mfinder <- getSelectedSingle view list
case mfinder of
Just (i, f) -> do
sel <- comboBoxGetActive cbComorphism
let nf = f { selected = sel }
l... | 401 | setSelectedComorphism view list cbComorphism s = do
mfinder <- getSelectedSingle view list
case mfinder of
Just (i, f) -> do
sel <- comboBoxGetActive cbComorphism
let nf = f { selected = sel }
listStoreSetValue list i nf
return $ setGProver nf s
Nothing -> return s | 301 | false | true | 0 | 16 | 96 | 135 | 62 | 73 | null | null |
dorchard/constrained-normal | Control/Category/ConstrainedNormal.hs | bsd-3-clause | liftNPC :: (c a, c b) => t a b -> NPC c t a b
liftNPC g = Comp2 id g (Arr id) | 77 | liftNPC :: (c a, c b) => t a b -> NPC c t a b
liftNPC g = Comp2 id g (Arr id) | 77 | liftNPC g = Comp2 id g (Arr id) | 31 | false | true | 0 | 8 | 23 | 64 | 30 | 34 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'B.intercalate'
b_intercalate = B.intercalate | 49 | b_intercalate = B.intercalate | 29 | b_intercalate = B.intercalate | 29 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
ocharles/hackage-server | Distribution/Server/Pages/Package/HaddockHtml.hs | bsd-3-clause | docAppend (DocDefList ds1) (DocAppend (DocDefList ds2) d)
= DocAppend (DocDefList (ds1++ds2)) d | 97 | docAppend (DocDefList ds1) (DocAppend (DocDefList ds2) d)
= DocAppend (DocDefList (ds1++ds2)) d | 97 | docAppend (DocDefList ds1) (DocAppend (DocDefList ds2) d)
= DocAppend (DocDefList (ds1++ds2)) d | 97 | false | false | 0 | 9 | 13 | 49 | 24 | 25 | null | null |
matterhorn-chat/matterhorn | src/Matterhorn/Config.hs | bsd-3-clause | defaultSkylightingPaths :: IO [FilePath]
defaultSkylightingPaths = do
xdg <- xdgSyntaxDir
adjacent <- getBundledSyntaxPath
cabalDataFiles <- Paths.getDataFileName syntaxDirName
return [xdg, adjacent, cabalDataFiles] | 231 | defaultSkylightingPaths :: IO [FilePath]
defaultSkylightingPaths = do
xdg <- xdgSyntaxDir
adjacent <- getBundledSyntaxPath
cabalDataFiles <- Paths.getDataFileName syntaxDirName
return [xdg, adjacent, cabalDataFiles] | 231 | defaultSkylightingPaths = do
xdg <- xdgSyntaxDir
adjacent <- getBundledSyntaxPath
cabalDataFiles <- Paths.getDataFileName syntaxDirName
return [xdg, adjacent, cabalDataFiles] | 190 | false | true | 0 | 9 | 36 | 58 | 28 | 30 | null | null |
leshchevds/ganeti | test/hs/Test/Ganeti/Query/Query.hs | bsd-2-clause | -- | Check that the nodes reported by a name filter are sane.
prop_queryNode_filter :: Property
prop_queryNode_filter =
forAll (choose (1, maxNodes)) $ \nodes ->
forAll (genEmptyCluster nodes `suchThat`
areNodeNamesSane) $ \cluster -> monadicIO $ do
let node_list = map nodeName . Map.elems . fromConta... | 924 | prop_queryNode_filter :: Property
prop_queryNode_filter =
forAll (choose (1, maxNodes)) $ \nodes ->
forAll (genEmptyCluster nodes `suchThat`
areNodeNamesSane) $ \cluster -> monadicIO $ do
let node_list = map nodeName . Map.elems . fromContainer $
configNodes cluster
count <- pi... | 862 | prop_queryNode_filter =
forAll (choose (1, maxNodes)) $ \nodes ->
forAll (genEmptyCluster nodes `suchThat`
areNodeNamesSane) $ \cluster -> monadicIO $ do
let node_list = map nodeName . Map.elems . fromContainer $
configNodes cluster
count <- pick $ choose (1, nodes)
fqdn_se... | 828 | true | true | 0 | 22 | 258 | 294 | 144 | 150 | null | null |
brendanhay/gogol | gogol-run/gen/Network/Google/Run/Types/Product.hs | mpl-2.0 | -- | Spec holds the desired state of the Route (from the client).
rSpec :: Lens' Route (Maybe RouteSpec)
rSpec = lens _rSpec (\ s a -> s{_rSpec = a}) | 149 | rSpec :: Lens' Route (Maybe RouteSpec)
rSpec = lens _rSpec (\ s a -> s{_rSpec = a}) | 83 | rSpec = lens _rSpec (\ s a -> s{_rSpec = a}) | 44 | true | true | 0 | 9 | 29 | 46 | 25 | 21 | null | null |
jberryman/hashabler | tests/Consistency.hs | bsd-3-clause | checkGeneratedVectors :: IO [(String,String,String,String,String)]
checkGeneratedVectors = fmap concat $
forHashableInstances $ \nm inputs-> do
putStr "."
let checkAgainstStored :: (Hashable h, Show h)=> [h] -> IO [(String,String,String,String,String)]
checkAgainstStored ins = fmap concat $
... | 1,813 | checkGeneratedVectors :: IO [(String,String,String,String,String)]
checkGeneratedVectors = fmap concat $
forHashableInstances $ \nm inputs-> do
putStr "."
let checkAgainstStored :: (Hashable h, Show h)=> [h] -> IO [(String,String,String,String,String)]
checkAgainstStored ins = fmap concat $
... | 1,812 | checkGeneratedVectors = fmap concat $
forHashableInstances $ \nm inputs-> do
putStr "."
let checkAgainstStored :: (Hashable h, Show h)=> [h] -> IO [(String,String,String,String,String)]
checkAgainstStored ins = fmap concat $
forHashFunctions $ \hashNm hashFunc -> do
let outF... | 1,745 | false | true | 0 | 28 | 781 | 468 | 221 | 247 | null | null |
nevrenato/Hets_Fork | Isabelle/IsaParse.hs | gpl-2.0 | -- allow "and", etc. in unknown parts
unknown :: Parser ()
unknown = skipMany1 $ (lexP (reserved usedTopKeys anyP) >> return [()])
<|> recordP cus
<|> parensP cus
<|> bracketsP cus
<|> bracesP cus
where cus = commalist (unknown <|> forget (lexP anyP)) | 301 | unknown :: Parser ()
unknown = skipMany1 $ (lexP (reserved usedTopKeys anyP) >> return [()])
<|> recordP cus
<|> parensP cus
<|> bracketsP cus
<|> bracesP cus
where cus = commalist (unknown <|> forget (lexP anyP)) | 263 | unknown = skipMany1 $ (lexP (reserved usedTopKeys anyP) >> return [()])
<|> recordP cus
<|> parensP cus
<|> bracketsP cus
<|> bracesP cus
where cus = commalist (unknown <|> forget (lexP anyP)) | 242 | true | true | 0 | 14 | 92 | 101 | 49 | 52 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | laughingly = id | 15 | laughingly = id | 15 | laughingly = id | 15 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
jeffreyrosenbluth/Sheet | app/Main.hs | bsd-3-clause | -- | Decode a sheet and use it and the file name to set the model.
-- Return the 'Model' along with a message indicating success or failure.
openSheet :: FilePath -> IO (Model, String)
openSheet fname = do
let fn = withExt "sht" fname
exists <- doesFileExist fn
if exists
then do
efile <- BS.readFile f... | 609 | openSheet :: FilePath -> IO (Model, String)
openSheet fname = do
let fn = withExt "sht" fname
exists <- doesFileExist fn
if exists
then do
efile <- BS.readFile fn
return $ case decode efile of
Left msg -> (emptyModel, "*** CANNOT DECODE FILE: " ++ msg ++ " ***")
Right events ->... | 466 | openSheet fname = do
let fn = withExt "sht" fname
exists <- doesFileExist fn
if exists
then do
efile <- BS.readFile fn
return $ case decode efile of
Left msg -> (emptyModel, "*** CANNOT DECODE FILE: " ++ msg ++ " ***")
Right events -> (setModel events fn, "*** " ++ fn ++ " LOAD... | 422 | true | true | 0 | 16 | 159 | 158 | 78 | 80 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.