Ticket #7713 (new bug)

Opened 3 months ago

Last modified 5 weeks ago

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) (diff)

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

array.hs Download (0.6 KB) - added by EduardSergeev 3 months ago.
Compile me with "-O2 -fext-core"

Change History

Changed 3 months ago by EduardSergeev

Compile me with "-O2 -fext-core"

Changed 2 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

Changed 2 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".

Changed 6 weeks ago by igloo

  • description modified (diff)

Changed 6 weeks ago by igloo

  • component changed from Compiler to External Core
  • milestone set to 7.8.1

Changed 5 weeks 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

Note: See TracTickets for help on using tickets.