Skip to content

Template Haskell cannot represent type wildcards

There does not appear to be a way for Template Haskell code to generate partial type signature wildcards. The type quasiquote [t|_|] results in Wildcard not allowed, and use in an expression quasiquote like [|() :: _|] results in Exotic form of type not (yet) handled by Template Haskell _.

It would be useful if TH code could partially constrain the type of the expressions it was generating, without needing to determine the type completely.

Trac metadata
Trac field Value
Version 7.10.1-rc1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information