Detect invalid foreign imports in bytecode compiler
authorSylvain HENRY <hsyl20@gmail.com>
Wed, 11 Nov 2015 11:32:08 +0000 (12:32 +0100)
committerBen Gamari <ben@smart-cactus.org>
Wed, 11 Nov 2015 11:32:16 +0000 (12:32 +0100)
commitbadf5d54907a5a5e9224c44310f991a52379b4c1
tree94f4b585569ba424a1b6733797262325b3ab8bdc
parent0f49508399a1fc145e17950ea1591da7f0de4f2a
Detect invalid foreign imports in bytecode compiler

The bytecode compiler doesn't handle every foreign import calling
convention. Instead of crashing during the generation of the foreign
call, we display an error.

Fix lint warnings

Test Plan: prog014 ghci test added

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: thomie

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

GHC Trac Issues: #10462
compiler/ghci/ByteCodeGen.hs
testsuite/tests/ghci/prog014/Makefile [new file with mode: 0644]
testsuite/tests/ghci/prog014/Primop.hs [new file with mode: 0644]
testsuite/tests/ghci/prog014/dummy.c [new file with mode: 0644]
testsuite/tests/ghci/prog014/prog014.T [new file with mode: 0644]
testsuite/tests/ghci/prog014/prog014.script [new file with mode: 0644]
testsuite/tests/ghci/prog014/prog014.stderr [new file with mode: 0644]
testsuite/tests/ghci/prog014/prog014.stdout [new file with mode: 0644]