#7713 closed bug (duplicate)

Panic! make_exp (App _ (Coercion _)) when compiled with -fext-core

Reported by: EduardSergeev Owned by:
Priority: normal Milestone: 7.8.1
Component: External Core Version: 7.6.2
Keywords: -fext-core panic Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo)

An attempt to compile the attached file with 7.6.2 (and 7.4.2) with "-O2 -fext-core" leads to:

ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.2 for x86_64-unknown-linux):
    make_exp (App _ (Coercion _))

Attachments (1)

array.hs (592 bytes) - added by EduardSergeev 14 months ago.
Compile me with "-O2 -fext-core"

Download all attachments as: .zip

Change History (7)

Changed 14 months ago by EduardSergeev

Compile me with "-O2 -fext-core"

comment:1 Changed 14 months ago by simonpj

  • Difficulty set to Unknown

Indeed. In MkExternalCore we see:

make_exp (App _e (Coercion _co)) = error "make_exp (App _ (Coercion _))"    -- TODO

Generally, External Core lacks a proper treatment of the coercions of Core.

Does anyone feel like looking at this? It's pretty straightforward:

  • The External Core data type
  • Concrete syntax
  • Parsing
  • Pretty printing
  • Conversion to and from Core

Generally, External Core could do with some love.

Simon

comment:2 Changed 13 months ago by mvanier

I got the same compiler panic with ghc 7.4.2 on Mac OS X 10.6.8 with this trivial file:

-- Begin file "Main.hs".
-- Compile with "ghc -fext-core Main.hs"
module Main where

main :: IO ()
main = print 10
-- End file.

Curiously, it doesn't panic when the main = print 10 line is changed to main = print "10".

comment:3 Changed 13 months ago by igloo

  • Description modified (diff)

comment:4 Changed 13 months ago by igloo

  • Component changed from Compiler to External Core
  • Milestone set to 7.8.1

comment:5 Changed 12 months ago by simonpj

Just to re-iterate, there is no technical problem here, just a need for someone who cares about External Core to decide what syntax to use, extend the data type etc. Volunteers?

Simon

comment:6 Changed 10 months ago by igloo

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #5630

Note: See TracTickets for help on using tickets.