+ : 'where' decllist_cls { LL (unLoc $2) }
+ | {- empty -} { noLoc nilOL }
+
+-- Declarations in instance bodies
+--
+decl_inst :: { Located (OrdList (LHsDecl RdrName)) }
+decl_inst : at_decl_inst { LL (unitOL (L1 (TyClD (unLoc $1)))) }
+ | decl { $1 }
+
+decls_inst :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+ : decls_inst ';' decl_inst { LL (unLoc $1 `appOL` unLoc $3) }
+ | decls_inst ';' { LL (unLoc $1) }
+ | decl_inst { $1 }
+ | {- empty -} { noLoc nilOL }
+
+decllist_inst
+ :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+ : '{' decls_inst '}' { LL (unLoc $2) }
+ | vocurly decls_inst close { $2 }
+
+-- Instance body
+--
+where_inst :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+ -- No implicit parameters
+ -- May have type declarations
+ : 'where' decllist_inst { LL (unLoc $2) }