X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FExternalCore.lhs;h=07a1dfbd8ee1b8bcc7f48a41d2be7ba071425d1d;hb=2662dbc5b2c30fc11ccb99e7f9b2dba794d680ba;hp=d3b6e3ace509101a9dd10f57a49674dd6a527bdc;hpb=4c6a3f787abcaed009a574196d82237d9ae64fc8;p=ghc-hetmet.git diff --git a/compiler/coreSyn/ExternalCore.lhs b/compiler/coreSyn/ExternalCore.lhs index d3b6e3a..07a1dfb 100644 --- a/compiler/coreSyn/ExternalCore.lhs +++ b/compiler/coreSyn/ExternalCore.lhs @@ -10,15 +10,12 @@ data Module data Tdef = Data (Qual Tcon) [Tbind] [Cdef] - | Newtype (Qual Tcon) [Tbind] Axiom (Maybe Ty) + | Newtype (Qual Tcon) (Qual Tcon) [Tbind] Ty data Cdef = Constr (Qual Dcon) [Tbind] [Ty] | GadtConstr (Qual Dcon) Ty --- Newtype coercion -type Axiom = (Qual Tcon, [Tbind], Kind) - data Vdefg = Rec [Vdef] | Nonrec Vdef @@ -59,6 +56,16 @@ data Ty | Tcon (Qual Tcon) | Tapp Ty Ty | Tforall Tbind Ty +-- We distinguish primitive coercions +-- (represented in GHC by wired-in names), because +-- External Core treats them specially, so we have +-- to print them out with special syntax. + | TransCoercion Ty Ty + | SymCoercion Ty + | UnsafeCoercion Ty Ty + | InstCoercion Ty Ty + | LeftCoercion Ty + | RightCoercion Ty data Kind = Klifted