Opened 5 years ago

Closed 4 years ago

#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 Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

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 5 years ago.
Compile me with "-O2 -fext-core"

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by EduardSergeev

Attachment: array.hs added

Compile me with "-O2 -fext-core"

comment:1 Changed 5 years ago by simonpj

difficulty: 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.


comment:2 Changed 5 years 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 5 years ago by igloo

Description: modified (diff)

comment:4 Changed 5 years ago by igloo

Component: CompilerExternal Core
Milestone: 7.8.1

comment:5 Changed 5 years 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?


comment:6 Changed 4 years ago by igloo

Resolution: duplicate
Status: newclosed

Duplicate of #5630

Note: See TracTickets for help on using tickets.