GArrowConstant(..),
GArrowLiteral(..), -- should be implemented, but never invoked, by user code
- GArrowSum(..),
+ GArrowSum(..), ga_inl, ga_inr,
GArrowProd(..),
GArrowReify(..),
GArrowReflect(..),
GArrowCurry(..),
- GArrowApply(..)
+ GArrowApply(..),
+
+ GArrowSTKC(..),
+ GArrowSTLC(..),
+ GArrowPCF(..)
+
) where
import Control.Category
class (GArrow g (**) u,
- GArrow g (<*>) u) =>
- GArrowProd g (**) u (<*>) where
+ GArrow g (<*>) v) =>
+ GArrowProd g (**) u (<*>) v where
ga_prod_copy :: g x (x<*>x)
- ga_prod_drop :: g x u
+ ga_prod_drop :: g x v
class (GArrow g (**) u,
GArrow g (<+>) v) =>
- GArrowSum g (**) u v (<+>) where
+ GArrowSum g (**) u (<+>) v where
ga_merge :: g (x<+>x) x
ga_never :: g v x
-
-
-
+ga_inl = ga_uncancelr >>> ga_second ga_never
+ga_inr = ga_uncancell >>> ga_first ga_never
------------------------------------------------------------------------
-- Loop
class GArrow g (**) u => GArrowCurry g (**) u (~>) where
ga_curryl :: g (x**y) z -> g x (y~>z)
ga_curryr :: g (x**y) z -> g y (x~>z)
+
+
+
+
+------------------------------------------------------------------------
+-- Commonly Implemented Collections of Classes
+
+--
+-- The simply typed KAPPA calculus; see Hasegawa, __Decomposing Typed
+-- Lambda Calculus into a Couple of Categorical Programming
+-- Languages__, http://dx.doi.org/10.1007/3-540-60164-3_28
+--
+class (GArrowDrop g (**) u,
+ GArrowCopy g (**) u,
+ GArrowSwap g (**) u) =>
+ GArrowSTKC g (**) u
+
+-- The simply typed LAMBDA calculus
+class (GArrowSTKC g (**) u,
+ GArrowCurry g (**) u (~>),
+ GArrowApply g (**) u (~>)) =>
+ GArrowSTLC g (**) u (~>)
+
+-- Programming Language for Computable Functions (w/o integers and booleans)
+class (GArrowSTLC g (**) u (~>),
+ GArrowLoop g (**) u) =>
+ GArrowPCF g (**) u (~>)
+
+
+
+
+
+
+
+
+