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) [Tbind] Axiom (Maybe Ty)
16 = Constr Dcon [Tbind] [Ty]
20 type Axiom = (Qual Tcon, Kind)
26 type Vdef = (Bool,Var,Ty,Exp) -- Top level bindings are unqualified now
36 | Case Exp Vbind Ty [Alt] {- non-empty list -}
39 | External String String Ty {- target name, convention, and type -}
40 | DynExternal String Ty {- convention and type (incl. Addr# of target as first arg) -}
48 = Acon (Qual Dcon) [Tbind] [Vbind] Exp
53 type Tbind = (Tvar,Kind)
71 | Lrational Rational Ty
82 type Qual t = (Mname,t)
87 -- For truly horrible reasons, this must be z-encoded.
88 -- With any hope, the z-encoding will die soon.
89 primMname = "ghczmprim:GHCziPrim"
92 tcArrow = (primMname, "(->)")