Add `Lift Exp` instance to `Language.Haskell.TH.Syntax`
Being open-minded, I played around with TH quotations and encountered a strange error message:
TyFamWitnesses.hs:106:40-71: error:
• No instance for (Lift Exp) arising from a use of ‘lift’
• In the expression: lift eqTypeRep
In the expression:
[| eqTypeRep (typeRep @Maybe) |]
pending(rn) [<eqTypeRep, lift eqTypeRep>]
In an equation for ‘fun'’:
fun'
= [| eqTypeRep (typeRep @Maybe) |]
pending(rn) [<eqTypeRep, lift eqTypeRep>]
|
106 | fun' = [e|eqTypeRep (typeRep @ Maybe)|]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed, 0 modules loaded.
Adding an orphan instance locally helped (of course).
instance Lift Exp where lift = pure
It appears to be the right thing to do... Why isn't this in Language.Haskell.TH.Syntax?
Just forgotten? If so, and somebody gives me a thumbs up, I'll add it tomorrow to HEAD (with a corresponding @since annotation).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.2.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Template Haskell |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |