Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#8932 closed bug (fixed)

Panic with TemplateHaskell and duplicate indentifiers

Reported by: jstolarek Owned by:
Priority: normal Milestone: 7.8.3
Component: Template Haskell Version: 7.8.1-rc2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Test Case: th/T8932
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


This code causes GHC panic under 7.8.1-RC2:

{-# LANGUAGE TemplateHaskell #-}

module TXXXX where

  foo :: a -> a
  foo x = x

foo :: a
foo = undefined
[killy@xerxes : /dane/projekty/sandbox/haskell] ghc -fforce-recomp TXXXX.hs
[1 of 1] Compiling TXXXX            ( TXXXX.hs, TXXXX.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array- ... linking ... done.
Loading package deepseq- ... linking ... done.
Loading package containers- ... linking ... done.
Loading package pretty- ... linking ... done.
Loading package template-haskell ... linking ... done.
ghc: panic! (the 'impossible' happened)
  (GHC version for x86_64-unknown-linux):
    [{v a2kL} defined at TXXXX.hs:11:1,{v a2kL} defined at TXXXX.hs:5:3]

Change History (4)

comment:1 Changed 20 months ago by Simon Peyton Jones <simonpj@…>

In d8d798b1b33ab0593ed03f193360b8725ba2c2ba/ghc:

Small issue with signatures in a TH splice (fixes Trac #8932)

comment:2 Changed 20 months ago by simonpj

  • Status changed from new to merge
  • Test Case set to th/T8932

Thanks for discovering this. Now fixed.

Merge to the 7.8 branch, but don't hold up the release for it. 7.8.2 would do.


comment:3 Changed 20 months ago by thoughtpolice

  • Resolution set to fixed
  • Status changed from merge to closed

Merged in 7.8, thanks!

comment:4 Changed 20 months ago by thoughtpolice

  • Milestone set to 7.8.3
Note: See TracTickets for help on using tickets.