summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-06 11:12:04 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-08 10:22:45 -0500
commitbd6667665f160f07550b25e9c80fbc197ae2f642 (patch)
treeecb60f9cd3c285347b913ca918fd6d146a5f903c
parent3900cb83fb10b0209fb5fb1d713bf3aaf3ee42b8 (diff)
downloadhaskell-bd6667665f160f07550b25e9c80fbc197ae2f642.tar.gz
users-guide: Clarify that bundled patsyns were introduced in GHC 8.0
Closes #17094.
-rw-r--r--docs/users_guide/exts/pattern_synonyms.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/users_guide/exts/pattern_synonyms.rst b/docs/users_guide/exts/pattern_synonyms.rst
index fbdd50d083..abb7b82860 100644
--- a/docs/users_guide/exts/pattern_synonyms.rst
+++ b/docs/users_guide/exts/pattern_synonyms.rst
@@ -298,9 +298,11 @@ example: ::
would bring into scope the data constructor ``Just`` from the ``Maybe``
type, without also bringing the type constructor ``Maybe`` into scope.
-To bundle a pattern synonym with a type constructor, we list the pattern
-synonym in the export list of a module which exports the type constructor.
-For example, to bundle ``Zero`` with ``MyNum`` we could write the following: ::
+As of GHC 8.0.1 you may also "bundle" pattern synonyms with an exported type
+constructor, making that pattern appear as a data constructor of that type. To
+bundle a pattern synonym, we list the pattern synonym in the export list of a
+module which exports the type constructor. For example, to bundle ``Zero``
+with ``MyNum`` we could write the following: ::
module Example ( MyNum(Zero) ) where