skulk-0.1.3.0: Eclectic collection of utility functions

Skulk.Deep

Description

Collection of convenience functions for dealing with nested applicativemonadicetc structures.

Synopsis

# Documentation

newtype Deep a b c Source #

Constructors

 Deep Fieldsexpose :: a (b c)

Instances

 (Monad a, Monad b, Traversable b) => Monad (Deep a b) Source # Methods(>>=) :: Deep a b a -> (a -> Deep a b b) -> Deep a b b #(>>) :: Deep a b a -> Deep a b b -> Deep a b b #return :: a -> Deep a b a #fail :: String -> Deep a b a # (Functor a, Functor b) => Functor (Deep a b) Source # Methodsfmap :: (a -> b) -> Deep a b a -> Deep a b b #(<$) :: a -> Deep a b b -> Deep a b a # (Monad a, Applicative b) => Applicative (Deep a b) Source # Methodspure :: a -> Deep a b a #(<*>) :: Deep a b (a -> b) -> Deep a b a -> Deep a b b #(*>) :: Deep a b a -> Deep a b b -> Deep a b b #(<*) :: Deep a b a -> Deep a b b -> Deep a b a # Eq (a (b c)) => Eq (Deep a b c) Source # Methods(==) :: Deep a b c -> Deep a b c -> Bool #(/=) :: Deep a b c -> Deep a b c -> Bool # Show (a (b c)) => Show (Deep a b c) Source # MethodsshowsPrec :: Int -> Deep a b c -> ShowS #show :: Deep a b c -> String #showList :: [Deep a b c] -> ShowS # wrap :: Monad a => b c -> Deep a b c Source # inject :: (Functor a, Monad b) => a c -> Deep a b c Source # eject :: Functor a => (b c -> c) -> Deep a b c -> a c Source # reduceABA :: (Applicative a, Monad a, Traversable b) => a (b (a x)) -> a (b x) Source # Reduces A (B (A x)) to A (B x). reduceBAB :: (Applicative a, Traversable b, Monad b) => b (a (b x)) -> a (b x) Source # Reduces B (A (B x)) to A (B x). reduceABAB :: (Applicative a, Monad a, Traversable b, Monad b) => a (b (a (b x))) -> a (b x) Source # Reduces A (B (A (B x))) to A (B x). reduceBABA :: (Applicative a, Monad a, Traversable b, Monad b) => b (a (b (a x))) -> a (b x) Source # Reduces B (A (B (A x))) to A (B x). (<$\$>) :: (Functor a, Functor b) => (x -> y) -> a (b x) -> a (b y) infixl 4 Source #

"Deep" fmap for mapping over nested functors.

(>>>=) :: (Applicative a, Monad a, Traversable b, Monad b) => a (b x) -> (x -> a (b y)) -> a (b y) infixl 1 Source #

Variety of "deep bind" for chaining operations on nested data structures.

(>>==) :: (Functor a, Functor b, Monad b) => a (b x) -> (x -> b y) -> a (b y) infixl 1 Source #

Variety of "deep bind" for chaining operations on nested data structures.

(>=>=) :: (Applicative a, Monad a, Traversable b) => a (b x) -> (x -> a y) -> a (b y) infixl 1 Source #

Variety of "deep bind" for chaining operations on nested data structures.