From b56d67eed0e1257af1df83d3314ac82c4921c2d3 Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Mon, 2 Apr 2012 21:04:06 -0700 Subject: [PATCH] rename classes to create GArrowCopyDropSwap[Loop] --- GHC/HetMet/GArrow.hs | 16 +++++----------- GHC/HetMet/Private.hs | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/GHC/HetMet/GArrow.hs b/GHC/HetMet/GArrow.hs index 4649ad0..c009f43 100644 --- a/GHC/HetMet/GArrow.hs +++ b/GHC/HetMet/GArrow.hs @@ -34,8 +34,8 @@ module GHC.HetMet.GArrow ( GArrowUnit, GArrowExponent, - GArrowSTKC(..), - GArrowSTKCL(..), + GArrowCopyDropSwap(..), + GArrowCopyDropSwapLoop(..), GArrowSTLC(..), GArrowPCF(..) @@ -179,7 +179,7 @@ class GArrow g (**) u => GArrowCurry g (**) u (~>) where -- However, in daily practice it's a pain to have all those extra type -- variables floating around. If you'd like to hide them, you can use -- the type families below to do so; see the definition of class --- GArrowSTKC for an example. Keep in mind, however, that any given +-- GArrowCopyDropSwap for an example. Keep in mind, however, that any given -- type may only have a single instance declared using the type -- families. -- @@ -194,22 +194,16 @@ type family GArrowExponent g :: * -> * -> * -- (~>) ------------------------------------------------------------------------ -- 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 (GArrowTensor g) (GArrowUnit g), GArrowCopy g (GArrowTensor g) (GArrowUnit g), GArrowSwap g (GArrowTensor g) (GArrowUnit g)) => - GArrowSTKC g + GArrowCopyDropSwap 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 + GArrowCopyDropSwapLoop g -- The simply typed LAMBDA calculus class (GArrowDrop g (GArrowTensor g) (GArrowUnit g), diff --git a/GHC/HetMet/Private.hs b/GHC/HetMet/Private.hs index 59bddbf..3d204f8 100644 --- a/GHC/HetMet/Private.hs +++ b/GHC/HetMet/Private.hs @@ -39,7 +39,7 @@ import GHC.HetMet.GArrow ------------------------------------------------------------------------- -- Used internally by the compiler, subject to change without notice!! -newtype PGArrow g x y = PGArrowD { unG :: GArrowSTKCL g => g x y } +newtype PGArrow g x y = PGArrowD { unG :: GArrowCopyDropSwapLoop g => g x y } pga_id :: forall g x. PGArrow g x x pga_id = PGArrowD { unG = Control.Category.id } -- 1.7.10.4