[Git][ghc/ghc][wip/T24022] users-guide: Fix BNF grammar of instance declarations

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Oct 3 17:15:33 UTC 2023



Ben Gamari pushed to branch wip/T24022 at Glasgow Haskell Compiler / GHC


Commits:
409542df by Ben Gamari at 2023-10-03T13:15:24-04:00
users-guide: Fix BNF grammar of instance declarations

Fixes #24022.

- - - - -


1 changed file:

- docs/users_guide/exts/instances.rst


Changes:

=====================================
docs/users_guide/exts/instances.rst
=====================================
@@ -135,12 +135,15 @@ BNF-style grammar for the tops of instance declarations below.
         |  ctype ',' ctxt
 
   inst_head ::= '(' inst_head ')'
-             |  prefix_cls_tycon arg_types
-             |  arg_type infix_cls_tycon arg_type
-             |  '(' arg_type infix_cls_tycon arg_type ')' arg_types
+             |  prefix_cls_tycon args
+             |  arg_type args infix_cls_tycon arg_type args
+             |  '(' arg_type args infix_cls_tycon arg_type args ')' args
 
-  arg_type ::= <empty>
-            |  arg_type arg_types
+  args ::= <empty>
+        |  arg args
+
+  arg :: '@' arg_type
+       | arg_type
 
   opt_where ::= <empty>
              |  'where'



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/409542dff6baf1a90a58eebfb5c814a31def04a4

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/409542dff6baf1a90a58eebfb5c814a31def04a4
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231003/b9e43626/attachment-0001.html>


More information about the ghc-commits mailing list