[GHC] #9703: Add missing calling conventions to Template Haskell
GHC
ghc-devs at haskell.org
Sat Oct 18 20:14:11 UTC 2014
#9703: Add missing calling conventions to Template Haskell
-------------------------------------+-------------------------------------
Reporter: luite | Owner: ekmett
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Core Libraries | Version: 7.9
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Easy (less than 1 | Type of failure:
hour) | None/Unknown
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Template Haskell only supports the `CCall` and `StdCall` calling
conventions, while GHC supports more:
http://git.haskell.org/packages/template-
haskell.git/blob/9bcc122819a6f4a2ae7ad569717324b8368e801c:/Language/Haskell/TH/Syntax.hs#l1311
http://git.haskell.org/ghc.git/blob/7369d2595a8cceebe457a44c8400828f4df87ea0:/compiler/prelude/ForeignCall.lhs#l159
`CApiConv`, `PrimCallConv` and `JavaScriptCallConv` are missing, and I
think they should just be added unless this is expected to lead to
problems.
I'd personally like to have `JavaScriptCallConv` so I can remove the
horrible hacks to make ghcjs-ffiqq (https://github.com/ghcjs/ghcjs-ffiqq)
work. I imagine that `PrimCallConv` would be useful for a package using a
similar approach for high performance inline assembly or LLVM with
quasiquotes.
A small change in GHC required to convert the new constructors, and
possibly to check if the required extension is enabled.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9703>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list