Skip to content

Template Haskell: support other FFI calling conventions

In the Template Haskell syntax representations, an FFI calling convention can currently only be CCall or StdCall. I'd like to generate code with GHCJS JavaScript imports, which use a "javascript" calling convention. The 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 )
Trac metadata
Trac field Value
Version 7.8.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information