Ticket #5968 (closed bug: fixed)

Opened 15 months ago

Last modified 15 months ago

GHC Panic: "AThing evaluated unexpectedly"

Reported by: goldfire Owned by:
Priority: normal Milestone:
Component: Template Haskell Version: 7.5
Keywords: TemplateHaskell Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: th/T5968 Blocked By:
Blocking: Related Tickets:

Description

Using an unmodified build from March 13, 2012, I compiled the following:

{-# LANGUAGE TemplateHaskell #-}
data Bar a = Bar $( [t| a |] )

I got the following panic:

ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.5.20120313 for x86_64-unknown-linux):
        AThing evaluated unexpectedly tcTyVar a{tv aKM}

I observed this exact same panic on a modified 3/25/12 build.

Change History

Changed 15 months ago by simonpj@…

commit 4dd0fd314fd4da0634d42274d71a1e21a6d98326

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Mar 30 12:48:34 2012 +0100

    Don't do validity checking on types in Template Haskell type brackets
    We might be in the "knot" of a type declaration: see Trac #5968.

 compiler/typecheck/TcSplice.lhs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Changed 15 months ago by simonpj@…

commit e21e13fb52b99b14770cc5857df57bbcc9c85102

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Mar 30 12:47:55 2012 +0100

    A related group of changes that make lexically scoped type
    variables work in Template Haskell
    
    Triggered by fixing Trac #5968.

 compiler/deSugar/DsMeta.hs   |   84 ++++++++++++++++++++++++++++--------------
 compiler/typecheck/TcEnv.lhs |   28 ++++++-------
 2 files changed, 69 insertions(+), 43 deletions(-)

Changed 15 months ago by simonpj

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed
  • testcase set to th/T5968
Note: See TracTickets for help on using tickets.