diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-02-06 11:12:04 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-02-06 11:12:36 -0500 |
commit | e99d20f358b64dd7670d47edc40f8963b4933c64 (patch) | |
tree | 7691100750cfda94a007cf420a2e31ccb6f0b61d | |
parent | e8004e5d1e993363a89b0107380604c5bc02be6b (diff) | |
download | haskell-wip/T17094.tar.gz |
users-guide: Clarify that bundled patsyns were introduced in GHC 8.0wip/T17094
Closes #17094.
-rw-r--r-- | docs/users_guide/exts/pattern_synonyms.rst | 8 |
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 |