[GHC] #10620: Primitive chars and strings aren't handled by Template Haskell's quasiquoter
GHC
ghc-devs at haskell.org
Wed Jul 8 17:32:44 UTC 2015
#10620: Primitive chars and strings aren't handled by Template Haskell's
quasiquoter
-------------------------------------+-------------------------------------
Reporter: | Owner: RyanGlScott
RyanGlScott | Status: new
Type: bug | Milestone:
Priority: normal | Version: 7.10.1
Component: Template | Operating System: Unknown/Multiple
Haskell | Type of failure: GHC rejects
Keywords: | valid program
Architecture: | Blocked By:
Unknown/Multiple | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Currently, Template Haskell can't quasiquote {{{Char#}}} or {{{Addr#}}}
values:
{{{
$ ghci -XTemplateHaskell -XMagicHash
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
λ> import Language.Haskell.TH
λ> $([| 'a'# |])
<interactive>:3:6:
Exotic literal not (yet) handled by Template Haskell 'a'#
λ> $([| "a"# |])
<interactive>:4:6:
Exotic literal not (yet) handled by Template Haskell "a"##
}}}
To fix this, we'd need to change the API of {{{template-haskell}}} a bit,
since {{{Lit}}} has a {{{StringPrimL}}} but not a {{{CharPrimL}}}
constructor.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10620>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list