Changes between Initial Version and Version 2 of Ticket #7239


Ignore:
Timestamp:
Sep 17, 2012 3:13:08 PM (3 years ago)
Author:
simonpj
Comment:

Fixed by

commit 7b8a17ad3c0792f06ffa991e9e587f5458610a3c
Author: Simon Peyton Jones <[email protected]>
Date:   Sat Sep 15 23:12:23 2012 +0100

    Print literal integers in External Core.

>---------------------------------------------------------------

 compiler/coreSyn/MkExternalCore.lhs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/coreSyn/MkExternalCore.lhs b/compiler/coreSyn/MkExternalCore.lhs
index d05da2a..2103708 100644
--- a/compiler/coreSyn/MkExternalCore.lhs
+++ b/compiler/coreSyn/MkExternalCore.lhs
@@ -229,7 +229,8 @@ make_lit dflags l =
     MachWord64 i -> C.Lint i t
     MachFloat r -> C.Lrational r t
     MachDouble r -> C.Lrational r t
-    _ -> error "MkExternalCore died: make_lit"
+    LitInteger i _ -> C.Lint i t
+    _ -> pprPanic "MkExternalCore died: make_lit" (ppr l)
   where 
     t = make_ty dflags (literalType l)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7239

    • Property Cc audun@… added
    • Property Difficulty changed from to Unknown
  • Ticket #7239 – Description

    initial v2  
    11Compiling the attached example with -fext-core crashes ghc with the following text: 
    2  
     2{{{ 
    33$ ghc -fext-core min.hs 
    44[1 of 1] Compiling Main             ( min.hs, min.o ) 
     
    66  (GHC version 7.4.1 for x86_64-unknown-linux): 
    77        MkExternalCore died: make_lit 
     8}}} 
    89 
    9 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug 
    1010 
    11 Replacing the data declaration with a newtype or a library type such as Complex or Ratio gives the same crash. An empty .hcr file is created. 
     11Replacing the data declaration with a newtype or a library type such as `Complex` or `Ratio` gives the same crash. An empty `.hcr` file is created. 
    1212 
    1313Replacing the "main" action with "return ()" or removing one of the type synonym declarations makes the crash go away.