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] (Maybe Ty)
16 = Constr Dcon [Tbind] [Ty]
23 type Vdef = (Bool,Var,Ty,Exp) -- Top level bindings are unqualified now
33 | Case Exp Vbind Ty [Alt] {- non-empty list -}
36 | External String String Ty {- target name, convention, and type -}
37 | DynExternal String Ty {- convention and type (incl. Addr# of target as first arg) -}
45 = Acon (Qual Dcon) [Tbind] [Vbind] Exp
50 type Tbind = (Tvar,Kind)
68 | Lrational Rational Ty
79 type Qual t = (Mname,t)
84 primMname = "base:GHC.Prim"
87 tcArrow = (primMname, "(->)")