Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,969
    • Issues 4,969
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 473
    • Merge requests 473
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #9703
Closed
Open
Created Oct 18, 2014 by Luite Stegeman@luiteDeveloper

Add missing calling conventions to Template Haskell

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.

Trac metadata
Trac field Value
Version 7.9
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Core Libraries
Test case
Differential revisions
BlockedBy
Related
Blocking
CC core-libraries-committee@haskell.org
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking