From 1e8fee55a5b5ce6770ccf46faa79cec2fabe5091 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Sun, 10 Apr 2011 17:03:58 -0700 Subject: [PATCH] add GArrowSTKC, GArrowPCF --- GHC/HetMet/GArrow.hs | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/GHC/HetMet/GArrow.hs b/GHC/HetMet/GArrow.hs index c53e2f8..3b64d90 100644 --- a/GHC/HetMet/GArrow.hs +++ b/GHC/HetMet/GArrow.hs @@ -28,7 +28,12 @@ module GHC.HetMet.GArrow ( GArrowReflect(..), GArrowCurry(..), - GArrowApply(..) + GArrowApply(..), + + GArrowSTKC(..), + GArrowSTLC(..), + GArrowPCF(..) + ) where import Control.Category @@ -145,3 +150,39 @@ class GArrow g (**) u => GArrowApply g (**) u (~>) where 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 (~>) + + + + + + + + + -- 1.7.10.4