-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A small compatibility shim exposing the new types from transformers 0.3 and 0.4 to older Haskell platforms. -- -- This package includes backported versions of types that were added to -- transformers in transformers 0.3 an 0.4 for users who need strict -- transformers 0.2 or 0.3 compatibility to run on old versions of the -- platform, but also need those types. -- -- Those users should be able to just depend on transformers >= -- 0.2 and transformers-compat >= 0.3. -- -- Note: missing methods are not supplied, but this at least permits the -- types to be used. @package transformers-compat @version 0.3.3.3 -- | Prelude classes, lifted to unary type constructors. module Data.Functor.Classes -- | Lifting of the Eq class to unary type constructors. class Eq1 f eq1 :: (Eq1 f, Eq a) => f a -> f a -> Bool -- | Lifting of the Ord class to unary type constructors. class Eq1 f => Ord1 f compare1 :: (Ord1 f, Ord a) => f a -> f a -> Ordering -- | Lifting of the Read class to unary type constructors. class Read1 f readsPrec1 :: (Read1 f, Read a) => Int -> ReadS (f a) -- | Lifting of the Show class to unary type constructors. class Show1 f showsPrec1 :: (Show1 f, Show a) => Int -> f a -> ShowS -- | readsData p d is a parser for datatypes where each -- alternative begins with a data constructor. It parses the constructor -- and passes it to p. Parsers for various constructors can be -- constructed with readsUnary, readsUnary1 and -- readsBinary1, and combined with mappend from the -- Monoid class. readsData :: (String -> ReadS a) -> Int -> ReadS a -- | readsUnary n c n' matches the name of a unary data -- constructor and then parses its argument using readsPrec. readsUnary :: Read a => String -> (a -> t) -> String -> ReadS t -- | readsUnary1 n c n' matches the name of a unary data -- constructor and then parses its argument using readsPrec1. readsUnary1 :: (Read1 f, Read a) => String -> (f a -> t) -> String -> ReadS t -- | readsBinary1 n c n' matches the name of a binary data -- constructor and then parses its arguments using readsPrec1. readsBinary1 :: (Read1 f, Read1 g, Read a) => String -> (f a -> g a -> t) -> String -> ReadS t -- | showsUnary n d x produces the string representation of -- a unary data constructor with name n and argument x, -- in precedence context d. showsUnary :: Show a => String -> Int -> a -> ShowS -- | showsUnary1 n d x produces the string representation -- of a unary data constructor with name n and argument -- x, in precedence context d. showsUnary1 :: (Show1 f, Show a) => String -> Int -> f a -> ShowS -- | showsBinary1 n d x produces the string representation -- of a binary data constructor with name n and arguments -- x and y, in precedence context d. showsBinary1 :: (Show1 f, Show1 g, Show a) => String -> Int -> f a -> g a -> ShowS instance Show1 f => Show1 (Reverse f) instance Read1 f => Read1 (Reverse f) instance Ord1 f => Ord1 (Reverse f) instance Eq1 f => Eq1 (Reverse f) instance (Show1 f, Show a) => Show (Reverse f a) instance (Read1 f, Read a) => Read (Reverse f a) instance (Ord1 f, Ord a) => Ord (Reverse f a) instance (Eq1 f, Eq a) => Eq (Reverse f a) instance Show1 f => Show1 (Backwards f) instance Read1 f => Read1 (Backwards f) instance Ord1 f => Ord1 (Backwards f) instance Eq1 f => Eq1 (Backwards f) instance (Show1 f, Show a) => Show (Backwards f a) instance (Read1 f, Read a) => Read (Backwards f a) instance (Ord1 f, Ord a) => Ord (Backwards f a) instance (Eq1 f, Eq a) => Eq (Backwards f a) instance Show1 f => Show1 (Lift f) instance Read1 f => Read1 (Lift f) instance Ord1 f => Ord1 (Lift f) instance Eq1 f => Eq1 (Lift f) instance (Show1 f, Show a) => Show (Lift f a) instance (Read1 f, Read a) => Read (Lift f a) instance (Ord1 f, Ord a) => Ord (Lift f a) instance (Eq1 f, Eq a) => Eq (Lift f a) instance (Show1 g, Show a) => Show (Apply g a) instance (Read1 g, Read a) => Read (Apply g a) instance (Ord1 g, Ord a) => Ord (Apply g a) instance (Eq1 g, Eq a) => Eq (Apply g a) instance Show1 Identity instance Read1 Identity instance Ord1 Identity instance Eq1 Identity instance Show a => Show1 (Constant a) instance Read a => Read1 (Constant a) instance Ord a => Ord1 (Constant a) instance Eq a => Eq1 (Constant a) instance (Show1 f, Show1 g) => Show1 (Product f g) instance (Read1 f, Read1 g) => Read1 (Product f g) instance (Ord1 f, Ord1 g) => Ord1 (Product f g) instance (Eq1 f, Eq1 g) => Eq1 (Product f g) instance (Show1 f, Show1 g, Show a) => Show (Product f g a) instance (Read1 f, Read1 g, Read a) => Read (Product f g a) instance (Ord1 f, Ord1 g, Ord a) => Ord (Product f g a) instance (Eq1 f, Eq1 g, Eq a) => Eq (Product f g a) instance (Functor f, Show1 f, Show1 g) => Show1 (Compose f g) instance (Functor f, Read1 f, Read1 g) => Read1 (Compose f g) instance (Functor f, Ord1 f, Ord1 g) => Ord1 (Compose f g) instance (Functor f, Eq1 f, Eq1 g) => Eq1 (Compose f g) instance (Functor f, Show1 f, Show1 g, Show a) => Show (Compose f g a) instance (Functor f, Read1 f, Read1 g, Read a) => Read (Compose f g a) instance (Functor f, Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a) instance (Functor f, Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) instance (Show w, Show1 m) => Show1 (WriterT w m) instance (Read w, Read1 m) => Read1 (WriterT w m) instance (Ord w, Ord1 m) => Ord1 (WriterT w m) instance (Eq w, Eq1 m) => Eq1 (WriterT w m) instance (Show w, Show1 m, Show a) => Show (WriterT w m a) instance (Read w, Read1 m, Read a) => Read (WriterT w m a) instance (Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) instance (Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) instance (Show w, Show1 m) => Show1 (WriterT w m) instance (Read w, Read1 m) => Read1 (WriterT w m) instance (Ord w, Ord1 m) => Ord1 (WriterT w m) instance (Eq w, Eq1 m) => Eq1 (WriterT w m) instance (Show w, Show1 m, Show a) => Show (WriterT w m a) instance (Read w, Read1 m, Read a) => Read (WriterT w m a) instance (Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) instance (Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) instance Show1 m => Show1 (MaybeT m) instance Read1 m => Read1 (MaybeT m) instance Ord1 m => Ord1 (MaybeT m) instance Eq1 m => Eq1 (MaybeT m) instance (Show1 m, Show a) => Show (MaybeT m a) instance (Read1 m, Read a) => Read (MaybeT m a) instance (Ord1 m, Ord a) => Ord (MaybeT m a) instance (Eq1 m, Eq a) => Eq (MaybeT m a) instance Show1 m => Show1 (ListT m) instance Read1 m => Read1 (ListT m) instance Ord1 m => Ord1 (ListT m) instance Eq1 m => Eq1 (ListT m) instance (Show1 m, Show a) => Show (ListT m a) instance (Read1 m, Read a) => Read (ListT m a) instance (Ord1 m, Ord a) => Ord (ListT m a) instance (Eq1 m, Eq a) => Eq (ListT m a) instance Show1 f => Show1 (IdentityT f) instance Read1 f => Read1 (IdentityT f) instance Ord1 f => Ord1 (IdentityT f) instance Eq1 f => Eq1 (IdentityT f) instance (Show1 f, Show a) => Show (IdentityT f a) instance (Read1 f, Read a) => Read (IdentityT f a) instance (Ord1 f, Ord a) => Ord (IdentityT f a) instance (Eq1 f, Eq a) => Eq (IdentityT f a) instance (Show e, Show1 m) => Show1 (ErrorT e m) instance (Read e, Read1 m) => Read1 (ErrorT e m) instance (Ord e, Ord1 m) => Ord1 (ErrorT e m) instance (Eq e, Eq1 m) => Eq1 (ErrorT e m) instance (Show e, Show1 m, Show a) => Show (ErrorT e m a) instance (Read e, Read1 m, Read a) => Read (ErrorT e m a) instance (Ord e, Ord1 m, Ord a) => Ord (ErrorT e m a) instance (Eq e, Eq1 m, Eq a) => Eq (ErrorT e m a) instance Show a => Show1 (Either a) instance Read a => Read1 (Either a) instance Ord a => Ord1 (Either a) instance Eq a => Eq1 (Either a) instance Show a => Show1 ((,) a) instance Read a => Read1 ((,) a) instance Ord a => Ord1 ((,) a) instance Eq a => Eq1 ((,) a) instance Show1 [] instance Read1 [] instance Ord1 [] instance Eq1 [] instance Show1 Maybe instance Read1 Maybe instance Ord1 Maybe instance Eq1 Maybe instance Ord a => Ord (Constant a b) instance Eq a => Eq (Constant a b) instance Read a => Read (Constant a b) instance Show a => Show (Constant a b) instance Ord a => Ord (Identity a) instance Eq a => Eq (Identity a) instance Read a => Read (Identity a) instance Show a => Show (Identity a) -- | Sums, lifted to functors. module Data.Functor.Sum -- | Lifted sum of functors. data Sum f g a InL :: (f a) -> Sum f g a InR :: (g a) -> Sum f g a instance (Traversable f, Traversable g) => Traversable (Sum f g) instance (Foldable f, Foldable g) => Foldable (Sum f g) instance (Functor f, Functor g) => Functor (Sum f g) instance (Show1 f, Show1 g) => Show1 (Sum f g) instance (Read1 f, Read1 g) => Read1 (Sum f g) instance (Ord1 f, Ord1 g) => Ord1 (Sum f g) instance (Eq1 f, Eq1 g) => Eq1 (Sum f g) instance (Show1 f, Show1 g, Show a) => Show (Sum f g a) instance (Read1 f, Read1 g, Read a) => Read (Sum f g a) instance (Ord1 f, Ord1 g, Ord a) => Ord (Sum f g a) instance (Eq1 f, Eq1 g, Eq a) => Eq (Sum f g a) -- | Signatures for monad operations that require specialized lifting. module Control.Monad.Signatures -- | Signature of the callCC operation, introduced in -- Control.Monad.Trans.Cont. type CallCC m a b = ((a -> m b) -> m a) -> m a -- | Signature of the catchE operation, introduced in -- Control.Monad.Trans.Except. type Catch e m a = m a -> (e -> m a) -> m a -- | Signature of the listen operation, introduced in -- Control.Monad.Trans.Writer. type Listen w m a = m a -> m (a, w) -- | Signature of the pass operation, introduced in -- Control.Monad.Trans.Writer. type Pass w m a = m (a, w -> w) -> m a -- | This monad transformer extends a monad with the ability throw -- exceptions. -- -- A sequence of actions terminates normally, producing a value, only if -- none of the actions in the sequence throws an exception. If one throws -- an exception, the rest of the sequence is skipped and the composite -- action exits with that exception. -- -- If the value of the exception is not required, the variant in -- Control.Monad.Trans.Maybe may be used instead. module Control.Monad.Trans.Except -- | The parameterizable exception monad. -- -- Computations are either exceptions or normal values. -- -- The return function returns a normal value, while -- >>= exits on the first exception. type Except e = ExceptT e Identity -- | Constructor for computations in the exception monad. (The inverse of -- runExcept). except :: Either e a -> Except e a -- | Extractor for computations in the exception monad. (The inverse of -- except). runExcept :: Except e a -> Either e a -- | Map the unwrapped computation using the given function. -- --
mapExcept :: (Either e a -> Either e' b) -> Except e a -> Except e' b -- | Transform any exceptions thrown by the computation using the given -- function (a specialization of withExceptT). withExcept :: (e -> e') -> Except e a -> Except e' a -- | A monad transformer that adds exceptions to other monads. -- -- ExceptT constructs a monad parameterized over two things: -- --runExceptT (mapExceptT f m) = f -- (runExceptT m)