Hoogle Search

Within LTS Haskell 24.46 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. subsumeBundle :: forall (r' :: [Effect]) (r :: EffectRow) a . Members r' r => Sem (Bundle r' ': r) a -> Sem r a

    polysemy Polysemy.Bundle

    Run a Bundle r if the effect stack contains all effects of r.

  2. class Subsume (r :: EffectRow) (r' :: EffectRow)

    polysemy Polysemy.Internal

    See subsume_.

  3. subsume :: forall (e :: Effect) (r :: EffectRow) a . Member e r => Sem (e ': r) a -> Sem r a

    polysemy Polysemy.Internal

    Interprets an effect in terms of another identical effect. This is useful for defining interpreters that use reinterpretH without immediately consuming the newly introduced effect. Using such an interpreter recursively may result in duplicate effects, which may then be eliminated using subsume. For a version that can introduce an arbitrary number of new effects and reorder existing ones, see subsume_.

  4. subsumeUnion :: forall (m :: Type -> Type) a . Subsume r r' => Union r m a -> Union r' m a

    polysemy Polysemy.Internal

    No documentation available.

  5. subsumeUsing :: forall (e :: Effect) (r :: [Effect]) a . ElemOf e r -> Sem (e ': r) a -> Sem r a

    polysemy Polysemy.Internal

    Interprets an effect in terms of another identical effect, given an explicit proof that the effect exists in r. This is useful in conjunction with tryMembership in order to conditionally make use of effects. For example:

    tryListen :: KnownRow r => Sem r a -> Maybe (Sem r ([Int], a))
    tryListen m = case tryMembership @(Writer [Int]) of
    Just pr -> Just $ subsumeUsing pr (listen (raise m))
    _       -> Nothing
    

  6. subsume_ :: forall (r :: EffectRow) (r' :: EffectRow) a . Subsume r r' => Sem r a -> Sem r' a

    polysemy Polysemy.Internal

    Allows reordering and adding known effects on top of the effect stack, as long as the polymorphic "tail" of new stack is a raise-d version of the original one. This function is highly polymorphic, so it may be a good idea to use its more concrete version (subsume), fitting functions from the raise family or type annotations to avoid vague errors in ambiguous contexts.

  7. subsumeMembership :: forall (r :: [Effect]) (r' :: EffectRow) (e :: Effect) . Members r r' => ElemOf e r -> ElemOf e r'

    polysemy Polysemy.Internal.Bundle

    Transform a membership proof's stack by arbitrary effects using evidence from the context.

  8. subsumeUsing :: forall (e :: Effect) (r :: [Effect]) a . ElemOf e r -> Sem (e ': r) a -> Sem r a

    polysemy Polysemy.Membership

    Interprets an effect in terms of another identical effect, given an explicit proof that the effect exists in r. This is useful in conjunction with tryMembership in order to conditionally make use of effects. For example:

    tryListen :: KnownRow r => Sem r a -> Maybe (Sem r ([Int], a))
    tryListen m = case tryMembership @(Writer [Int]) of
    Just pr -> Just $ subsumeUsing pr (listen (raise m))
    _       -> Nothing
    

  9. consumeInput :: Connection -> IO Bool

    postgresql-libpq Database.PostgreSQL.LibPQ

    If input is available from the server, consume it. consumeInput normally returns True indicating "no error", but returns False if there was some kind of trouble (in which case errorMessage can be consulted). Note that the result does not say whether any input data was actually collected. After calling consumeInput, the application can check isBusy and/or notifies to see if their state has changed.

  10. optMarkdownSummaryPath :: CommandLineOptions a -> Maybe FilePath

    sandwich Test.Sandwich.Misc

    No documentation available.

Page 123 of many | Previous | Next