diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2019-09-24 09:55:32 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2019-09-24 09:55:32 +0100 |
commit | 9619045636c63479d1528781039ca5af392aa3c7 (patch) | |
tree | 0cb7b9e37cf0f55e88a7a7dd8758a906a350994b | |
parent | 0317999d079459379ac74bb44abc48a5854decaa (diff) | |
download | haskell-wip/T17223-map-coercion.tar.gz |
Wibbleswip/T17223-map-coercion
-rw-r--r-- | compiler/typecheck/TcMType.hs | 2 | ||||
-rw-r--r-- | compiler/types/TyCoRep.hs | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index 39190680f6..2ec1ea0851 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -347,7 +347,7 @@ checkCoercionHole cv mco ok :: Type -> Bool ok cv_ty = case mco of - MRefl | EqPred NomEq cv_t1 cv_t2 <- classifyPredType cv_ty + MRefl | EqPred _ cv_t1 cv_t2 <- classifyPredType cv_ty -> cv_t1 `eqType` cv_t2 MCo co | (Pair t1 t2, role) <- coercionKindRole co diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index 065efcd417..0837271b7c 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -1168,11 +1168,12 @@ instance Outputable Coercion where -- | A semantically more meaningful type to represent what may or may not be a -- useful 'Coercion'. data MCoercion - = MRefl - -- A trivial Reflexivity coercion - | MCo Coercion - -- Other coercions + = MRefl -- A trivial Reflexivity coercion, + -- could be Nominal or Representational + + | MCo Coercion -- Other coercions; maybe reflexive maybe not deriving Data.Data + type MCoercionR = MCoercion type MCoercionN = MCoercion |