-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A Category typeclass hierarchy powerful enough to encode full programs. -- -- Please see the README on GitHub at -- https://github.com/githubuser/catalyst#readme @package catalyst @version 0.0.0.0 module Control.Category.Closed module Control.Category.Monoidal class SymmetricProduct k => MonoidalProduct k (***) :: MonoidalProduct k => (al `k` bl) -> (ar `k` br) -> (al, ar) `k` (bl, br) first' :: MonoidalProduct k => (a `k` b) -> (a, c) `k` (b, c) second' :: MonoidalProduct k => (a `k` b) -> (c, a) `k` (c, b) class SymmetricSum k => MonoidalSum k (+++) :: MonoidalSum k => (al `k` bl) -> (ar `k` br) -> Either al ar `k` Either bl br left :: MonoidalSum k => (a `k` b) -> Either a c `k` Either b c right :: MonoidalSum k => (a `k` b) -> Either c a `k` Either c b class Category k => SymmetricProduct k swap :: SymmetricProduct k => (l, r) `k` (r, l) reassoc :: SymmetricProduct k => (a, (b, c)) `k` ((a, b), c) class Category k => SymmetricSum k swapE :: SymmetricSum k => Either l r `k` Either r l reassocE :: SymmetricSum k => Either a (Either b c) `k` Either (Either a b) c class CategoryPlus k => CategoryZero k zeroC :: CategoryZero k => k a b class Category k => CategoryPlus k (<+>) :: CategoryPlus k => k a b -> k a b -> k a b instance Control.Category.Monoidal.MonoidalSum (->) instance Control.Category.Monoidal.SymmetricSum (->) instance Control.Category.Monoidal.MonoidalProduct (->) instance Control.Category.Monoidal.SymmetricProduct (->) module Control.Category.Cartesian class MonoidalProduct k => Cartesian k (&&&) :: Cartesian k => (a `k` l) -> (a `k` r) -> a `k` (l, r) consume :: Cartesian k => a `k` () copy :: Cartesian k => a `k` (a, a) fst' :: Cartesian k => (l, r) `k` l snd' :: Cartesian k => (l, r) `k` r class MonoidalSum k => Cocartesian k (|||) :: Cocartesian k => (al `k` b) -> (ar `k` b) -> Either al ar `k` b injectL :: Cocartesian k => a `k` Either a b injectR :: Cocartesian k => a `k` Either b a unify :: Cocartesian k => Either a a `k` a -- | tags Right when True, Left when False tag :: Cocartesian k => k (Bool, a) (Either a a) instance Control.Category.Cartesian.Cocartesian (->) instance Control.Category.Cartesian.Cartesian (->) module Control.Category.Numeric module Control.Category.Recursive class Category k => Recursive k recurseL :: Recursive k => (Either a s `k` Either b s) -> a `k` b recurseR :: Recursive k => (Either s a `k` Either s b) -> a `k` b class Category k => Fixed k fixL :: Fixed k => ((a, s) `k` (b, s)) -> a `k` b fixR :: Fixed k => ((s, a) `k` (s, b)) -> a `k` b instance Control.Category.Recursive.Fixed (->) instance Control.Category.Recursive.Recursive (->) module Control.Category.Free data IsCategory HasCategory :: IsCategory NoCategory :: IsCategory data IsSymmetricProduct HasSymmetricProduct :: IsSymmetricProduct NoSymmetricProduct :: IsSymmetricProduct data IsSymmetricSum HasSymmetricSum :: IsSymmetricSum NoSymmetricSum :: IsSymmetricSum data IsMonoidalProduct HasMonoidalProduct :: IsMonoidalProduct NoMonoidalProduct :: IsMonoidalProduct data IsMonoidalSum HasMonoidalSum :: IsMonoidalSum NoMonoidalSum :: IsMonoidalSum data IsCartesian HasCartesian :: IsCartesian NoCartesian :: IsCartesian data IsCocartesian HasCocartesian :: IsCocartesian NoCocartesian :: IsCocartesian data IsRecursive HasRecursive :: IsRecursive NoRecursive :: IsRecursive data IsFixed HasFixed :: IsFixed NoFixed :: IsFixed data Requirements Req :: IsCategory -> IsSymmetricProduct -> IsSymmetricSum -> IsMonoidalProduct -> IsMonoidalSum -> IsCartesian -> IsCocartesian -> IsRecursive -> IsFixed -> Requirements type family ConstraintsOf (x :: anykind) (k :: * -> * -> *) = (c :: Constraint) type FreeFunction c a b = Catalyst ('Req 'HasCategory 'HasSymmetricProduct 'HasSymmetricSum 'HasMonoidalProduct 'HasMonoidalSum 'HasCartesian 'HasCocartesian 'HasRecursive 'HasFixed) c data Catalyst (r :: Requirements) (p :: * -> * -> *) a b [ID] :: r ~ 'Req 'HasCategory symP symS monP monS cart cocart rec fix => Catalyst r p x x [Comp] :: Catalyst ('Req 'HasCategory symP symS monP monS cart cocart rec fix) p x y -> Catalyst ('Req 'HasCategory symP symS monP monS cart cocart rec fix) p y z -> Catalyst ('Req 'HasCategory symP symS monP monS cart cocart rec fix) p x z [Swap] :: r ~ 'Req 'HasCategory 'HasSymmetricProduct symS monP monS cart cocart rec fix => Catalyst r p (a, b) (b, a) [Reassoc] :: r ~ 'Req 'HasCategory 'HasSymmetricProduct symS monP monS cart cocart rec fix => Catalyst r p (a, (b, c)) ((a, b), c) [SwapE] :: r ~ 'Req cat symP 'HasSymmetricSum monP monS cart cocart rec fix => Catalyst r p (Either a b) (Either b a) [ReassocE] :: r ~ 'Req cat symP 'HasSymmetricSum monP monS cart cocart rec fix => Catalyst r p (Either a (Either b c)) (Either (Either a b) c) [First] :: r ~ 'Req cat symP symS 'HasMonoidalProduct monS cart cocart rec fix => Catalyst r p a b -> Catalyst r p (a, m) (b, m) [Second] :: r ~ 'Req cat symP symS 'HasMonoidalProduct monS cart cocart rec fix => Catalyst r p a b -> Catalyst r p (m, a) (m, b) [Alongside] :: r ~ 'Req cat symP symS 'HasMonoidalProduct monS cart cocart rec fix => Catalyst r p a b -> Catalyst r p a' b' -> Catalyst r p (a, a') (b, b') [Fanout] :: r ~ 'Req cat symP symS monP monS 'HasCartesian cocart rec fix => Catalyst r p a b -> Catalyst r p a b' -> Catalyst r p a (b, b') [Left'] :: r ~ 'Req cat symP symS monP 'HasMonoidalSum cart cocart rec fix => Catalyst r p a b -> Catalyst r p (Either a x) (Either b x) [Right'] :: r ~ 'Req cat symP symS monP 'HasMonoidalSum cart cocart rec fix => Catalyst r p a b -> Catalyst r p (Either x a) (Either x b) [EitherOf] :: r ~ 'Req cat symP symS monP 'HasMonoidalSum cart cocart rec fix => Catalyst r p a b -> Catalyst r p a' b' -> Catalyst r p (Either a a') (Either b b') [Fanin] :: r ~ 'Req cat symP symS monP monS cart 'HasCocartesian rec fix => Catalyst r p a b -> Catalyst r p a' b -> Catalyst r p (Either a a') b [Copy] :: r ~ 'Req cat symP symS monP monS 'HasCartesian cocart rec fix => Catalyst r p x (x, x) [Consume] :: r ~ 'Req cat symP symS monP monS 'HasCartesian cocart rec fix => Catalyst r p x () [Fst] :: r ~ 'Req cat symP symS monP monS 'HasCartesian cocart rec fix => Catalyst r p (a, b) a [Snd] :: r ~ 'Req cat symP symS monP monS 'HasCartesian cocart rec fix => Catalyst r p (a, b) b [InjectL] :: r ~ 'Req cat symP symS monP monS cart 'HasCocartesian rec fix => Catalyst r p a (Either a b) [InjectR] :: r ~ 'Req cat symP symS monP monS cart 'HasCocartesian rec fix => Catalyst r p b (Either a b) [Unify] :: r ~ 'Req cat symP symS monP monS cart 'HasCocartesian rec fix => Catalyst r p (Either a a) a [Tag] :: r ~ 'Req cat symP symS monP monS cart 'HasCocartesian rec fix => Catalyst r p (Bool, a) (Either a a) [RecurseL] :: r ~ 'Req cat symP symS monP monS cart cocart 'HasRecursive fix => Catalyst r p (Either a d) (Either b d) -> Catalyst r p a b [RecurseR] :: r ~ 'Req cat symP symS monP monS cart cocart 'HasRecursive fix => Catalyst r p (Either d a) (Either d b) -> Catalyst r p a b [FixL] :: r ~ 'Req cat symP symS monP monS cart cocart rec 'HasFixed => Catalyst r p (a, d) (b, d) -> Catalyst r p a b [FixR] :: r ~ 'Req cat symP symS monP monS cart cocart rec 'HasFixed => Catalyst r p (d, a) (d, b) -> Catalyst r p a b [LiftC] :: p a b -> Catalyst r p a b runFree :: forall r p c a b. ConstraintsOf r p => (forall x y. c x y -> p x y) -> Catalyst r c a b -> p a b liftC :: c a b -> Catalyst r c a b instance (forall x y. GHC.Show.Show (c x y)) => GHC.Show.Show (Control.Category.Free.Catalyst r c a b) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory symP symS monP monS cart cocart rec fix) => Control.Category.Category (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory 'Control.Category.Free.HasSymmetricProduct symS 'Control.Category.Free.HasMonoidalProduct monS 'Control.Category.Free.HasCartesian cocart rec fix) => Control.Category.Cartesian.Cartesian (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory symP 'Control.Category.Free.HasSymmetricSum monP 'Control.Category.Free.HasMonoidalSum cart 'Control.Category.Free.HasCocartesian rec fix) => Control.Category.Cartesian.Cocartesian (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory 'Control.Category.Free.HasSymmetricProduct symS monP monS cart cocart rec fix) => Control.Category.Monoidal.SymmetricProduct (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory symP 'Control.Category.Free.HasSymmetricSum monP monS cart cocart rec fix) => Control.Category.Monoidal.SymmetricSum (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory 'Control.Category.Free.HasSymmetricProduct symS 'Control.Category.Free.HasMonoidalProduct monS cart cocart rec fix) => Control.Category.Monoidal.MonoidalProduct (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory symP 'Control.Category.Free.HasSymmetricSum monP 'Control.Category.Free.HasMonoidalSum cart cocart rec fix) => Control.Category.Monoidal.MonoidalSum (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory symP symS monP monS cart cocart 'Control.Category.Free.HasRecursive fix) => Control.Category.Recursive.Recursive (Control.Category.Free.Catalyst r c) instance (r GHC.Types.~ 'Control.Category.Free.Req 'Control.Category.Free.HasCategory symP symS monP monS cart cocart rec 'Control.Category.Free.HasFixed) => Control.Category.Recursive.Fixed (Control.Category.Free.Catalyst r c)