[commit: ghc] master: Pattern Synonyms documentation update (bc7c730)

git at git.haskell.org git at git.haskell.org
Sat Sep 24 15:29:22 UTC 2016


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

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

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

commit bc7c730c613f5c35eea512955728d1e7a0d01aa9
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Sat Sep 24 16:28:02 2016 +0100

    Pattern Synonyms documentation update


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

bc7c730c613f5c35eea512955728d1e7a0d01aa9
 docs/users_guide/glasgow_exts.rst | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 025aad8..6af26b5 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -4199,7 +4199,7 @@ constructors. The syntax for doing this is as follows:
 
 ::
 
-      pattern Point :: (Int, Int)
+      pattern Point :: Int -> Int -> (Int, Int)
       pattern Point{x, y} = (x, y)
 
 The idea is that we can then use ``Point`` just as if we had defined a new
@@ -4229,7 +4229,11 @@ For a unidirectional record pattern synonym we define record selectors but do
 not allow record updates or construction.
 
 The syntax and semantics of pattern synonyms are elaborated in the
-following subsections. See the :ghc-wiki:`Wiki page <PatternSynonyms>` for more
+following subsections.
+There are also lots more details in the `paper
+<https://www.microsoft.com/en-us/research/wp-content/uploads/2016/08/pattern-synonyms-Haskell16.pdf>`_.
+
+See the :ghc-wiki:`Wiki page <PatternSynonyms>` for more
 details.
 
 Syntax and scoping of pattern synonyms



More information about the ghc-commits mailing list