+-- Type declaration or value declaration
+--
+tydecl :: { Located (OrdList (LHsDecl RdrName)) }
+tydecl : ty_decl { LL (unitOL (L1 (TyClD (unLoc $1)))) }
+ | decl { $1 }
+
+tydecls :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+ : tydecls ';' tydecl { LL (unLoc $1 `appOL` unLoc $3) }
+ | tydecls ';' { LL (unLoc $1) }
+ | tydecl { $1 }
+ | {- empty -} { noLoc nilOL }
+
+
+tydecllist
+ :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+ : '{' tydecls '}' { LL (unLoc $2) }
+ | vocurly tydecls close { $2 }
+
+-- Form of the body of class and instance declarations
+--
+where :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+ -- No implicit parameters
+ -- May have type declarations
+ : 'where' tydecllist { LL (unLoc $2) }
+ | {- empty -} { noLoc nilOL }
+