[commit: ghc] master: Optional context for a quantified constraint (8ec2946)

git at git.haskell.org git at git.haskell.org
Tue Jul 10 11:56:45 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8ec2946048123f9278cf68eaf520104319a1f569/ghc

>---------------------------------------------------------------

commit 8ec2946048123f9278cf68eaf520104319a1f569
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Jul 10 12:55:21 2018 +0100

    Optional context for a quantified constraint
    
    This is a documentation-only fix, addressing Trac #15354.


>---------------------------------------------------------------

8ec2946048123f9278cf68eaf520104319a1f569
 docs/users_guide/glasgow_exts.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 2a98522..041cfb4 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -9731,11 +9731,11 @@ We to extend ``class`` (warning: this is a rather confusingly named non-terminal
 .. code-block:: none
 
     class ::= ...
-          | context => qtycls inst
-          | context => tyvar inst
+          | [context =>] qtycls inst
+          | [context =>] tyvar inst
 
 The definition of ``inst`` is unchanged from the Haskell Report (roughly, just a type).
-That is the only syntactic change to the language.
+The ``context =>`` part is optional.  That is the only syntactic change to the language.
 
 Notes:
 
@@ -9744,8 +9744,8 @@ Notes:
 .. code-block:: none
 
     class ::= ...
-           | [forall tyavrs .] context => qtycls inst1 ... instn
-           | [forall tyavrs .] context => tyvar inst1 ... instn
+           | [forall tyavrs .] [context =>] qtycls inst1 ... instn
+           | [forall tyavrs .] [context =>] tyvar inst1 ... instn
 
   Note that an explicit ``forall`` is often absolutely essential. Consider the rose-tree example ::
 



More information about the ghc-commits mailing list