[GHC] #14296: Add `Lift Exp` instance to `Language.Haskell.TH.Syntax`
GHC
ghc-devs at haskell.org
Fri Sep 29 15:09:06 UTC 2017
#14296: Add `Lift Exp` instance to `Language.Haskell.TH.Syntax`
-------------------------------------+-------------------------------------
Reporter: heisenbug | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Poor/confusing | Unknown/Multiple
error message | Test Case:
Blocked By: | Blocking:
Related Tickets: #14030 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Replying to [comment:5 heisenbug]:
> You mean
> {{{#!hs
> uhOh :: ExpQ
> uhOh = lift "uhOh"
> }}}
Oops. That's right.
> My question is when this happens in a `[p|($uhOh -> binding)|]` and this
ends up in a splice, ultimately being compiled by GHC, then I'll get a
type error "Expected `Exp`, got: `String`", correct?
Sure, GHC will definitely catch the mistake in the form of a (sometimes
hard-to-scrutinize) type error. But I would still be frustrated that that
happened in the first place, since it would violate my intuition of how
`lift` interacts with splicing.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14296#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list