From bd6667665f160f07550b25e9c80fbc197ae2f642 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 6 Feb 2020 11:12:04 -0500 Subject: users-guide: Clarify that bundled patsyns were introduced in GHC 8.0 Closes #17094. --- docs/users_guide/exts/pattern_synonyms.rst | 8 +++++--- 1 file 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 -- cgit v1.2.1