Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#10638 closed bug (fixed)

quoting and Template Haskell handling for prim and javascript foreign imports broken

Reported by: luite Owned by:
Priority: highest Milestone: 7.10.2
Component: Compiler Version: 7.10.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: th/T10638
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1070
Wiki Page:

Description

In GHC 7.10.1, Template Haskell support was added for all calling conventions. Unfortunately a few cases are unhandled, which makes the TH code treat the prim and javascript calling conventions as if they were C calling conventions, adding the static keyword and running them through parseCImport.

This is particularly bad for javascript imports, since most JS imports aren't valid C imports, so they get rejected.

I'm testing a fix for this that I'll submit later today. I hope this is in time for 7.10.2

Attachments (1)

trac-10638-710.patch (2.6 KB) - added by luite 4 years ago.
diff from phabricator backported to 7.10 branch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by luite

Differential Rev(s): Phab:D1070

comment:2 Changed 4 years ago by hvr

Priority: normalhighest

comment:3 Changed 4 years ago by hvr

Status: newpatch

Changed 4 years ago by luite

Attachment: trac-10638-710.patch added

diff from phabricator backported to 7.10 branch

comment:4 Changed 4 years ago by bgamari

The backported patch has been merged to ghc-7.10 as 98587f0c34b15ed307a9a6f8ebc50fb5339b4042.

comment:5 Changed 4 years ago by Ben Gamari <ben@…>

In 4cd008b6/ghc:

Do not treat prim and javascript imports as C imports in TH and QQ

Reviewers: austin, hvr, goldfire, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1070

GHC Trac Issues: #10638

comment:6 Changed 4 years ago by bgamari

Resolution: fixed
Status: patchclosed

comment:7 Changed 4 years ago by simonpj

Is there a regression test for this?

Simon

comment:8 Changed 4 years ago by luite

Yes it's part of D1070, but it's not backported to the 7.10 branch.

comment:9 Changed 4 years ago by thomie

Test Case: th/T10638
Note: See TracTickets for help on using tickets.