diff options
author | Thomas Winant <thomas.winant@cs.kuleuven.be> | 2016-11-10 15:22:14 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-10 15:25:40 -0500 |
commit | e8ae4dc8558b5917f6c65ad196859783e90038bd (patch) | |
tree | 5c0897f9251b2bdd0acbc51afa104107473653dc /docs | |
parent | aa10c67ec5b9cea9d89ecac88f3a22ec873439c2 (diff) | |
download | haskell-e8ae4dc8558b5917f6c65ad196859783e90038bd.tar.gz |
Update user's guide after D2490
D2490 added support for type wildcards in TH pattern splices. The user's
guide still said that they were not supported, this patch fixes this.
Test Plan: build documentation
Reviewers: goldfire, austin, mvv, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2686
GHC Trac Issues: #12164
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/glasgow_exts.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index 3c340feeda..38afb3b675 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -9997,9 +9997,14 @@ splices. - Typed expression splices: the same wildcards as in (untyped) expression splices are supported. -- Pattern splices: Template Haskell doesn't support type signatures in - pattern splices. Consequently, partial type signatures are not - supported either. +- Pattern splices: anonymous and named wildcards can be used in pattern + signatures. Note that :ghc-flag:`-XScopedTypeVariables` has to be enabled + to allow pattern signatures. Extra-constraints wildcards are not supported, + just like in regular pattern signatures. + :: + + {-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-} + foo $( [p| (x :: _) |] ) = x - Type splices: only anonymous wildcards are supported in type splices. Named and extra-constraints wildcards are not. :: |