diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2016-09-24 16:28:02 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2016-09-24 16:29:05 +0100 |
commit | bc7c730c613f5c35eea512955728d1e7a0d01aa9 (patch) | |
tree | 7d1c785b3f3da9836133845ea3a585cb37ee1aaa | |
parent | 55d92cc06fb02fe4e4ef5acf310dc5e2f91ad64d (diff) | |
download | haskell-bc7c730c613f5c35eea512955728d1e7a0d01aa9.tar.gz |
Pattern Synonyms documentation update
-rw-r--r-- | docs/users_guide/glasgow_exts.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index 025aad89da..6af26b5815 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 |