Roleify TcCoercion
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 27 Nov 2013 14:21:39 +0000 (14:21 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 27 Nov 2013 15:13:22 +0000 (15:13 +0000)
commit9d643cf6f2928c6e87ef6ae55fff001a0bf4c26b
treedcbd21788d218f035097eb23aad3f686b52c6fbf
parentf432229be0ee206c5dd774a43cc7ce461d9110fb
Roleify TcCoercion

Previously, TcCoercion were only used to represent boxed Nominal
coercions. In order to also talk about boxed Representational coercions
in the type checker, we add Roles to TcCoercion. Again, we closely
mirror Coercion.

The roles are verified by a few assertions, and at the latest after
conversion to Coercion. I have put my trust in the comprehensiveness of
the testsuite here, but any role error after desugaring popping up now
might be caused by this refactoring.
20 files changed:
compiler/coreSyn/MkCore.lhs
compiler/deSugar/DsArrows.lhs
compiler/deSugar/DsBinds.lhs
compiler/deSugar/DsExpr.lhs
compiler/deSugar/Match.lhs
compiler/hsSyn/HsUtils.lhs
compiler/typecheck/Inst.lhs
compiler/typecheck/TcArrows.lhs
compiler/typecheck/TcBinds.lhs
compiler/typecheck/TcCanonical.lhs
compiler/typecheck/TcEvidence.lhs
compiler/typecheck/TcExpr.lhs
compiler/typecheck/TcHsSyn.lhs
compiler/typecheck/TcInteract.lhs
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcPat.lhs
compiler/typecheck/TcSMonad.lhs
compiler/typecheck/TcUnify.lhs
compiler/types/Coercion.lhs
compiler/types/Type.lhs