#7423: panic on typo in deriving clause
Reporter:  guest         |          Owner:          
    Type:  bug           |         Status:  new     
Priority:  normal        |      Component:  Compiler
 Version:  7.4.1         |       Keywords:          
      Os:  Linux         |   Architecture:  Other   
 Failure:  None/Unknown  |      Blockedby:          
Blocking:                |        Related:          
 Consider the following:

 data T = T deriving (eq)

 Note the misspelled lower-case capital - Eq was intended instead. Rather
 than reporting a syntax error, GHC panics:

 mnykanen@localhost$ ghc -v -dcore-lint extest.hs
 Glasgow Haskell Compiler, Version 7.4.1, stage 2 booted by GHC version
 Using binary package database:
 Using binary package database:
 wired-in package ghc-prim mapped to ghc-
 wired-in package integer-gmp mapped to integer-
 wired-in package base mapped to
 wired-in package rts mapped to builtin_rts
 wired-in package template-haskell mapped to template-
 wired-in package dph-seq not found.
 wired-in package dph-par not found.
 Hsc static flags: -static
 *** Chasing dependencies:
 Chasing modules from: *extest.hs
 Stable obj: []
 Stable BCO: []
 Ready for upsweep
       ModSummary {
          ms_hs_date = Sat Nov 17 10:05:25 EET 2012
          ms_mod = main:Main,
          ms_textual_imps = [import (implicit) Prelude]
          ms_srcimps = []
 *** Deleting temp files:
 compile: input file extest.hs
 Created temporary directory: /tmp/ghc2802_0
 *** Checking old interface for main:Main:
 [1 of 1] Compiling Main             ( extest.hs, extest.o )
 *** Parser:
 *** Renamer/typechecker:
 *** Deleting temp files:
 Deleting: /tmp/ghc2802_0/ghc2802_0.s
 Warning: deleting non-existent /tmp/ghc2802_0/ghc2802_0.s
 *** Deleting temp dirs:
 Deleting: /tmp/ghc2802_0
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.4.1 for x86_64-unknown-linux):
         nameModule eq{tv a9I}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7423>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

Glasgow-haskell-bugs mailing list

Reply via email to