[GHC] #9703: Add missing calling conventions to Template Haskell
GHC
ghc-devs at haskell.org
Sat Nov 1 19:18:58 UTC 2014
#9703: Add missing calling conventions to Template Haskell
-------------------------------------+-------------------------------------
Reporter: luite | Owner: ekmett
Type: feature | Status: patch
request | Milestone:
Priority: normal | Version: 7.9
Component: Core | Keywords:
Libraries | Architecture: Unknown/Multiple
Resolution: | Difficulty: Easy (less than 1
Operating System: | hour)
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: D353 |
-------------------------------------+-------------------------------------
Comment (by luite):
Replying to [comment:2 mtolly]:
> Just reported this a bit ago :)
https://ghc.haskell.org/trac/ghc/ticket/9694
Ah sorry, I missed that one. There is a workaround in GHCJS that lets you
output javascript imports by encoding them with a special name, see
https://github.com/ghcjs/ghcjs-
ffiqq/blob/75c7ee1b09c019c897a30d87713d023e8e1fc43f/src/GHCJS/Foreign/QQ.hs#L100
. GHCJS picks this up in the desugarer and replaces it with a `javascript`
import. This will probably be removed when `template-haskell` supports the
calling convention directly.
I'm not sure if a `String` field is all that useful, since it'd have to be
possible to convert it between the TH and GHC representation. Converting
might still be possible with `Read`/`Show` or similar, but that doesn't
sound very attractive to me. I'd say it's better to keep the current
approach until there's a real need for a flexible `String` constructor,
like a non-GHC compiler supporting TH with very different calling
conventions.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9703#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list