module ExternalCore where
-import List (elemIndex)
data Module
= Module Mname [Tdef] [Vdefg]
| 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)
| 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
type Id = String
-primMname = "PrelGHC"
+primMname = "GHCziPrim"
tcArrow :: Qual Tcon
tcArrow = (primMname, "ZLzmzgZR")