[GHC] #10462: GHCi doesn't work Any and missing RealWorld foreign prim imports

GHC ghc-devs at haskell.org
Mon Oct 26 13:28:42 UTC 2015


#10462: GHCi doesn't work Any and missing RealWorld foreign prim imports
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:
       Component:  GHCi              |              Version:  7.10.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by hsyl20):

 I don't think your first example works as expected. It type checks but the
 calling convention is silently ignored and replaced by the default CCall
 one (see #3336 and "convToABI" in compiler/ghci/LibFFI.hsc). The other
 examples fail because "generateCCall" from compiler/ghci/ByteCodeGen.hs
 shouldn't be called at all for primops and there are errors when
 parameters are pushed (your first case) or when parameters are converted
 into types understandable by libffi (second case).

 I attach a patch with an additional check which fails sooner and in a
 nicer way (similarily to #1257).

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


More information about the ghc-tickets mailing list