Hoogle Search

Within LTS Haskell 24.57 (ghc-9.10.3)

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

  1. fuseBothMaybe :: forall (m :: Type -> Type) a b u v c r . Monad m => Pipe a b u m v -> Pipe b c v m r -> Pipe a c u m (Maybe v, r)

    conduino Data.Conduino

    Like fuseBoth and &|, except does not wait for the upstream pipe to terminate. Return Nothing in the first field if the upstream pipe hasn't terminated, and Just if it has, with the terminating value.

  2. iterateMaybe :: forall o i u (m :: Type -> Type) . (o -> Maybe o) -> o -> Pipe i o u m ()

    conduino Data.Conduino.Combinators

    A version of iterate that can choose to terminate and stop by returning Nothing.

  3. repeatMaybeM :: Monad m => m (Maybe o) -> Pipe i o u m ()

    conduino Data.Conduino.Combinators

    Repeat a monadic action, yielding the item in the Just every time. As soon as it sees Nothing, stop producing forever. Remember that each item will only be "executed" when something downstream requests output.

  4. unfoldMaybe :: forall s o i u (m :: Type -> Type) . (s -> Maybe (o, s)) -> s -> Pipe i o u m ()

    conduino Data.Conduino.Combinators

    A version of unfold that can terminate and end by returning Nothing.

  5. objectEntryMaybeParser :: (Char -> Parser a) -> Parser (Maybe (Text, Value))

    conduit-aeson Data.Conduit.Aeson

    Parse JSON key value pairs followed either by a delimiter or terminating character ']', which is also supplied to the delimiter parser. Nothing is returned when terminating character is reached.

  6. valueMaybeParser :: (Char -> Parser a) -> Parser (Maybe Value)

    conduit-aeson Data.Conduit.Aeson

    Parse a JSON value followed either by a delimiter or terminating character ']', which is also supplied to the delimiter parser. Nothing is returned when terminating character is reached.

  7. mapMaybeSerialized :: forall s t (m :: Type -> Type -> Type) (n :: Type -> Type) a . (Monoid s, Monoid t, InputParsing (m s), InputParsing (m t), s ~ ParserInput (m s), t ~ ParserInput (m t), InputMappableParsing m, Functor n) => (s -> Maybe t) -> (t -> Maybe s) -> Format (m s) n s a -> Format (m t) n t a

    construct Construct

    Converts a format for serialized streams of type s so it works for streams of type t instead. The argument functions may return Nothing to indicate they have insuficient input to perform the conversion.

  8. mapMaybeValue :: forall (m :: Type -> Type) a b (n :: Type -> Type) s . (Monad m, Parsing m, Show a, Show b, AlternativeFail n) => (a -> Maybe b) -> (b -> Maybe a) -> Format m n s a -> Format m n s b

    construct Construct

    Converts a format for in-memory values of type a so it works for values of type b instead. The argument functions may signal conversion failure by returning Nothing.

  9. mapMaybeParserInput :: (InputMappableParsing m, InputParsing (m s), s ~ ParserInput (m s), Monoid s, Monoid s') => (s -> Maybe s') -> (s' -> Maybe s) -> m s a -> m s' a

    construct Construct.Classes

    Converts a parser accepting one input stream type to another just like mapParserInput, except the argument functions can return Nothing to indicate they need more input.

  10. traceMaybe :: forall (m :: Type -> Type) a b . Monad m => (a -> Maybe b) -> Tracer m b -> Tracer m a

    contra-tracer Control.Tracer

    Run a tracer only for the Just variant of a Maybe. If it's Nothing, the nullTracer is used (no output). The arrow representation allows for proper laziness: if the tracer parameter does not produce any tracing effects, then the predicate won't even be evaluated. Contrast with the simple contravariant representation as a -> m (), in which the predicate _must_ be forced no matter what, because it's impossible to know a priori whether that function will not produce any tracing effects. It's written out explicitly for demonstration. Could also use arrow notation:

    traceMaybe p tr = Tracer $ proc a -> do
    case k a of
    Just b  -> use tr        -< b
    Nothing -> Arrow.squelch -< ()
    

Page 271 of many | Previous | Next