GArrowKappa(..),
GArrowSTKC(..),
+ GArrowSTKCL(..),
GArrowSTLC(..),
GArrowPCF(..)
-- Loop
class GArrow g (**) u => GArrowLoop g (**) u where
- ga_loopl :: g (x**z) (y**z) -> g x y
- ga_loopr :: g (z**x) (z**y) -> g x y
+ ga_loopr :: g (x**z) (y**z) -> g x y
+ ga_loopl :: g (z**x) (z**y) -> g x y
------------------------------------------------------------------------
GArrowSwap g (GArrowTensor g) (GArrowUnit g)) =>
GArrowSTKC g
+class (GArrowDrop g (GArrowTensor g) (GArrowUnit g),
+ GArrowCopy g (GArrowTensor g) (GArrowUnit g),
+ GArrowSwap g (GArrowTensor g) (GArrowUnit g),
+ GArrowLoop g (GArrowTensor g) (GArrowUnit g)) =>
+ GArrowSTKCL g
+
-- The simply typed LAMBDA calculus
class (GArrowDrop g (GArrowTensor g) (GArrowUnit g),
GArrowCopy g (GArrowTensor g) (GArrowUnit g),
pga_applyr,
pga_curryl,
pga_curryr,
+ pga_loopl,
+ pga_loopr,
pga_kappa
) where
import Control.Category ( (>>>) )
-------------------------------------------------------------------------
-- Used internally by the compiler, subject to change without notice!!
-newtype PGArrow g x y = PGArrowD { unG :: GArrowSTKC g => g x y }
+newtype PGArrow g x y = PGArrowD { unG :: GArrowSTKCL g => g x y }
pga_id :: forall g x. PGArrow g x x
pga_id = PGArrowD { unG = Control.Category.id }
pga_curryr = error "not implemented"
pga_kappa :: forall g x y . (g (GArrowUnit g) x -> g (GArrowUnit g) y) -> g x y
pga_kappa = error "not implemented"
+pga_loopr :: forall g x y z . PGArrow g (GArrowTensor g x z) (GArrowTensor g y z) -> PGArrow g x y
+pga_loopr f = PGArrowD { unG = ga_loopr $ unG f }
+pga_loopl :: forall g x y z . PGArrow g (GArrowTensor g z x) (GArrowTensor g z y) -> PGArrow g x y
+pga_loopl f = PGArrowD { unG = ga_loopl $ unG f }