[commit: ghc] wip/rae-new-coercible: Checkpoint in adding IsCoercion (fe5ccb1)

git at git.haskell.org git at git.haskell.org
Tue Dec 2 20:43:19 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/rae-new-coercible
Link       : http://ghc.haskell.org/trac/ghc/changeset/fe5ccb11c493664c046b032f5a9b3f066bdb80cf/ghc

>---------------------------------------------------------------

commit fe5ccb11c493664c046b032f5a9b3f066bdb80cf
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Tue Nov 18 15:33:49 2014 -0500

    Checkpoint in adding IsCoercion


>---------------------------------------------------------------

fe5ccb11c493664c046b032f5a9b3f066bdb80cf
 compiler/types/Coercion.hs | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index a16a146..b427255 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1922,4 +1922,19 @@ Note [Kind coercions]
 Kind coercions are only of the form: Refl kind. They are only used to
 instantiate kind polymorphic type constructors in TyConAppCo. Remember
 that kind instantiation only happens with TyConApp, not AppTy.
+
+%************************************************************************
+%*                                                                      *
+                   Generalised coercions
+%*                                                                      *
+%************************************************************************
 -}
+
+-- | Classifies a coercion type. The two canonical inhabitants are
+-- 'Coercion' and 'TcCoercion'. This is useful in order to parameterise
+-- several functions.
+class IsCoercion co where
+  gMkReflCo :: Type -> co
+  gMkSymCo  :: co -> co
+  gMkTransCo :: co -> co -> co
+  



More information about the ghc-commits mailing list