[project @ 2004-09-30 10:35:15 by simonpj]
[ghc-hetmet.git] / ghc / compiler / coreSyn / ExternalCore.lhs
index 8ddc7da..09a6e7f 100644 (file)
@@ -5,7 +5,6 @@
 
 module ExternalCore where
 
-import List (elemIndex)
 
 data Module 
  = Module Mname [Tdef] [Vdefg]
@@ -15,13 +14,14 @@ data Tdef
   | Newtype (Qual Tcon) [Tbind] (Maybe Ty)
 
 data Cdef 
-  = Constr (Qual Dcon) [Tbind] [Ty]
+  = Constr Dcon [Tbind] [Ty]
+  | GadtConstr Dcon Ty
 
 data Vdefg 
   = Rec [Vdef]
   | Nonrec Vdef
 
-type Vdef = (Qual Var,Ty,Exp) 
+type Vdef = (Var,Ty,Exp)       -- Top level bindings are unqualified now
 
 data Exp 
   = Var (Qual Var)
@@ -31,7 +31,7 @@ data Exp
   | Appt Exp Ty
   | Lam Bind Exp         
   | Let Vdefg Exp
-  | Case Exp Vbind [Alt] {- non-empty list -}
+  | Case Exp Vbind Ty [Alt] {- non-empty list -}
   | Coerce Ty Exp 
   | Note String Exp
   | External String Ty
@@ -77,7 +77,7 @@ type Qual t = (Mname,t)
 
 type Id = String
 
-primMname = "PrelGHC"
+primMname = "GHCziPrim"
 
 tcArrow :: Qual Tcon
 tcArrow = (primMname, "ZLzmzgZR")