+ : topdecls { cvTopDecls $1 }
+
+-----------------------------------------------------------------------------
+-- Interfaces (.hi-boot files)
+
+iface :: { ParsedIface }
+ : 'module' modid 'where' ifacebody
+ { ParsedIface {
+ pi_mod = $2,
+ pi_pkg = opt_InPackage,
+ pi_vers = 1, -- Module version
+ pi_orphan = False,
+ pi_exports = (1,[($2,mkIfaceExports $4)]),
+ pi_deps = noDependencies,
+ pi_usages = [],
+ pi_fixity = [],
+ pi_insts = [],
+ pi_decls = map (\x -> (1,x)) $4,
+ pi_rules = (1,[]),
+ pi_deprecs = Nothing
+ }
+ }
+
+ifacebody :: { [RdrNameTyClDecl] }
+ : '{' ifacedecls '}' { $2 }
+ | layout_on ifacedecls close { $2 }
+
+ifacedecls :: { [RdrNameTyClDecl] }
+ : ifacedecl ';' ifacedecls { $1 : $3 }
+ | ';' ifacedecls { $2 }
+ | ifacedecl { [$1] }
+ | {- empty -} { [] }
+
+ifacedecl :: { RdrNameTyClDecl }
+ : tycl_decl { $1 }
+ | srcloc var '::' sigtype { IfaceSig $2 $4 [] $1 }