Primitive chars and strings aren't handled by Template Haskell's quasiquoter
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.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Template Haskell |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |