Commit e8ae4dc8 authored by thomasw's avatar thomasw Committed by Ben Gamari
Browse files

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:

GHC Trac Issues: #12164
parent aa10c67e
......@@ -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. ::
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment