{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 704
{-# LANGUAGE Safe #-}
#elif __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
module Data.Functor.Composition
( Composition(..) ) where
import Data.Functor.Compose
class Composition o where
decompose :: o f g x -> f (g x)
compose :: f (g x) -> o f g x
instance Composition Compose where
decompose :: forall (f :: * -> *) (g :: * -> *) x. Compose f g x -> f (g x)
decompose = forall {k1} {k2} (f :: k1 -> *) (g :: k2 -> k1) (a :: k2).
Compose f g a -> f (g a)
getCompose
compose :: forall (f :: * -> *) (g :: * -> *) x. f (g x) -> Compose f g x
compose = forall {k} {k1} (f :: k -> *) (g :: k1 -> k) (a :: k1).
f (g a) -> Compose f g a
Compose