From: Adam Megacz Date: Mon, 11 Apr 2011 00:03:58 +0000 (-0700) Subject: add GArrowSTKC, GArrowPCF X-Git-Url: http://git.megacz.com/?p=ghc-base.git;a=commitdiff_plain;h=1e8fee55a5b5ce6770ccf46faa79cec2fabe5091 add GArrowSTKC, GArrowPCF --- 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 (~>) + + + + + + + + +