Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

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

  1. mapSerialized :: 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 -> t) -> (t -> 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

    >>> testParse (mapSerialized ByteString.unpack ByteString.pack byte) [1,2,3]
    Right [(1,[2,3])]
    

  2. mapValue :: forall (m :: Type -> Type) a b (n :: Type -> Type) s . Functor m => (a -> b) -> (b -> 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.

    >>> testParse (mapValue (read @Int) show $ takeCharsWhile1 isDigit) "012 34"
    Right [(12," 34")]
    
    >>> testSerialize (mapValue read show $ takeCharsWhile1 isDigit) 12
    Right "12"
    

  3. 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.

  4. mapParserInput :: (InputMappableParsing m, InputParsing (m s), s ~ ParserInput (m s), Monoid s, Monoid s') => (s -> s') -> (s' -> s) -> m s a -> m s' a

    construct Construct.Classes

    Converts a parser accepting one input stream type to another. The functions forth and back must be inverses of each other and they must distribute through <>:

    f (s1 <> s2) == f s1 <> f s2
    

  5. mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])

    control-monad-free Control.Monad.Free

    The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state monad.

  6. mapFree :: (Functor f, Functor g) => (f (Free g a) -> g (Free g a)) -> Free f a -> Free g a

    control-monad-free Control.Monad.Free

    No documentation available.

  7. mapFreeA :: (Traversable f, Functor g, Applicative m) => m (f (Free g a) -> g (Free g a)) -> Free f a -> m (Free g a)

    control-monad-free Control.Monad.Free

    No documentation available.

  8. mapFreeM :: (Traversable f, Functor g, Monad m) => (f (Free g a) -> m (g (Free g a))) -> Free f a -> m (Free g a)

    control-monad-free Control.Monad.Free

    No documentation available.

  9. mapFreeM' :: (Functor f, Traversable g, Monad m) => (forall a1 . () => f a1 -> m (g a1)) -> Free f a -> m (Free g a)

    control-monad-free Control.Monad.Free

    No documentation available.

  10. mapFreeT :: forall (f :: Type -> Type) m m' a . (Functor f, Functor m) => (forall a1 . () => m a1 -> m' a1) -> FreeT f m a -> FreeT f m' a

    control-monad-free Control.Monad.Free

    No documentation available.

Page 285 of many | Previous | Next