2 % (c) The University of Glasgow 2001-2006
5 module ExternalCore where
9 = Module Mname [Tdef] [Vdefg]
12 = Data (Qual Tcon) [Tbind] [Cdef]
13 | Newtype (Qual Tcon) (Qual Tcon) [Tbind] (Maybe Ty)
16 = Constr (Qual Dcon) [Tbind] [Ty]
17 | GadtConstr (Qual Dcon) Ty
23 -- Top-level bindings are qualified, so that the printer doesn't have to pass
24 -- around the module name.
25 type Vdef = (Bool,Qual Var,Ty,Exp)
35 | Case Exp Vbind Ty [Alt] {- non-empty list -}
38 | External String String Ty {- target name, convention, and type -}
39 | DynExternal String Ty {- convention and type (incl. Addr# of target as first arg) -}
47 = Acon (Qual Dcon) [Tbind] [Vbind] Exp
52 type Tbind = (Tvar,Kind)
70 | Lrational Rational Ty
81 type Qual t = (Mname,t)
86 -- For truly horrible reasons, this must be z-encoded.
87 -- With any hope, the z-encoding will die soon.
88 primMname = "ghczmprim:GHCziPrim"
91 tcArrow = (primMname, "(->)")