[project @ 1996-07-25 20:43:49 by partain]
[ghc-hetmet.git] / ghc / compiler / coreSyn / AnnCoreSyn.lhs
index 9f51e1a..b5ce22a 100644 (file)
@@ -11,14 +11,14 @@ really is} just like @CoreSyntax@.)
 #include "HsVersions.h"
 
 module AnnCoreSyn (
-       AnnCoreBinding(..), AnnCoreExpr(..),
+       AnnCoreBinding(..), SYN_IE(AnnCoreExpr),
        AnnCoreExpr'(..),       -- v sad that this must be exported
        AnnCoreCaseAlts(..), AnnCoreCaseDefault(..),
 
        deAnnotate -- we may eventually export some of the other deAnners
     ) where
 
-import Ubiq{-uitous-}
+IMP_Ubiq(){-uitous-}
 
 import CoreSyn
 \end{code}
@@ -54,6 +54,10 @@ data AnnCoreExpr' val_bdr val_occ tyvar uvar annot
 
   | AnnSCC     CostCentre
                (AnnCoreExpr val_bdr val_occ tyvar uvar annot)
+
+  | AnnCoerce  Coercion
+               (GenType tyvar uvar)
+               (AnnCoreExpr val_bdr val_occ tyvar uvar annot)
 \end{code}
 
 \begin{code}
@@ -83,6 +87,7 @@ deAnnotate (_, AnnPrim        op args)    = Prim op args
 deAnnotate (_, AnnLam  binder body)= Lam binder (deAnnotate body)
 deAnnotate (_, AnnApp  fun arg)    = App (deAnnotate fun) arg
 deAnnotate (_, AnnSCC  lbl body)   = SCC lbl (deAnnotate body)
+deAnnotate (_, AnnCoerce c ty body) = Coerce c ty (deAnnotate body)
 
 deAnnotate (_, AnnLet bind body)
   = Let (deAnnBind bind) (deAnnotate body)