[commit: ghc] master: Update note for Parent to explain PatternSynonym. (8868ff3)

git at git.haskell.org git at git.haskell.org
Fri Nov 13 10:12:52 UTC 2015


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

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

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

commit 8868ff3eb742977c5de2609f7d748f4ff8882d6d
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Fri Nov 13 10:10:52 2015 +0000

    Update note for Parent to explain PatternSynonym.


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

8868ff3eb742977c5de2609f7d748f4ff8882d6d
 compiler/basicTypes/RdrName.hs | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/compiler/basicTypes/RdrName.hs b/compiler/basicTypes/RdrName.hs
index e3d1216..bfb11e0 100644
--- a/compiler/basicTypes/RdrName.hs
+++ b/compiler/basicTypes/RdrName.hs
@@ -495,6 +495,23 @@ Note [Parents]
   class C          Class operations
                    Associated type constructors
 
+The `PatternSynonym` constructor is so called as pattern synonyms can be
+bundled with any type constructor (during renaming). In other words, they can
+have any parent.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~
+ Constructor      Meaning
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+  NoParent        Can not be bundled with a type constructor.
+  ParentIs n      Can be bundled with the type constructor corresponding to
+                  n.
+  PatternSynonym  Can be bundled with any type constructor. It is so called
+                  because only pattern synonyms can be bundled with any type
+                  constructor.
+  FldParent       See Note [Parents for record fields]
+
+
+
 
 Note [Parents for record fields]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the ghc-commits mailing list