[GHC] #9694: Template Haskell: support other FFI calling conventions

GHC ghc-devs at haskell.org
Wed Oct 15 19:20:44 UTC 2014


#9694: Template Haskell: support other FFI calling conventions
-------------------------------------+-------------------------------------
       Reporter:  mtolly             |                   Owner:
           Type:  feature request    |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Template Haskell   |                 Version:  7.8.3
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:
     Blocked By:                     |  None/Unknown
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 In the Template Haskell syntax representations, an
 [https://hackage.haskell.org/package/template-haskell-2.9.0.0/docs
 /Language-Haskell-TH-Syntax.html#t:Callconv FFI calling convention] can
 currently only be CCall or StdCall. I'd like to generate code with
 [http://weblog.luite.com/wordpress/?p=14 GHCJS JavaScript imports], which
 use a "javascript" calling convention. The
 [http://www.haskell.org/onlinereport/haskell2010/haskellch8.html#x15-1550008.4.1
 FFI section of the Report] mentions other potential conventions, and
 specifically says that implementations can create new ones as appropriate,
 so perhaps a new constructor could be added which takes an arbitrary
 string? Something like:

 {{{
 data Callconv = CCall | StdCall | Callconv String
     deriving( Show, Eq, Data, Typeable )
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9694>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list