[commit: ghc] master: Fix typo in pattern synonym documentation. (12098c2)
git at git.haskell.org
git at git.haskell.org
Sun Aug 30 16:46:18 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/12098c2e70b2a432f4ed675ed72b53a396cb2842/ghc
>---------------------------------------------------------------
commit 12098c2e70b2a432f4ed675ed72b53a396cb2842
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date: Sun Aug 30 18:31:01 2015 +0200
Fix typo in pattern synonym documentation.
`MkT` is the name of the constructor whilst `T` is the name of
the type.
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1191
GHC Trac Issues: #10787
>---------------------------------------------------------------
12098c2e70b2a432f4ed675ed72b53a396cb2842
docs/users_guide/glasgow_exts.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 909d841..92cbdc0 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -1095,13 +1095,13 @@ For example, consider
data T a where
MkT :: (Show b) => a -> b -> T a
-f1 :: (Eq a, Num a) => MkT a -> String
+f1 :: (Eq a, Num a) => T a -> String
f1 (MkT 42 x) = show x
pattern ExNumPat :: (Show b) => (Num a, Eq a) => b -> T a
pattern ExNumPat x = MkT 42 x
-f2 :: (Eq a, Num a) => MkT a -> String
+f2 :: (Eq a, Num a) => T a -> String
f2 (ExNumPat x) = show x
</programlisting>
Here <literal>f1</literal> does not use pattern synonyms. To match against the
More information about the ghc-commits
mailing list