Ticket #5721 (closed bug: fixed)

Opened 17 months ago

Last modified 17 months ago

Panic when quoting a scoped type variable

Reported by: benmachine Owned by:
Priority: normal Milestone: 7.4.2
Component: Template Haskell Version: 7.2.1
Keywords: template haskell, scoped type variables Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: th/T5721 Blocked By:
Blocking: Related Tickets:

Description

{-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-}
module GetNameOfThing where

import Language.Haskell.TH

f :: a -> Name
f (x :: a) = ''a
ghc: panic! (the 'impossible' happened)
  (GHC version 7.2.2 for i386-unknown-linux):
	th_bracket a{tv ahF}

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

The function is probably nonsense, but the error message could be friendlier.

Tested on GHC 7.2.2.

Change History

Changed 17 months ago by igloo

  • difficulty set to Unknown
  • component changed from Compiler to Template Haskell
  • milestone set to 7.6.1

Thanks for the report

Changed 17 months ago by igloo

  • milestone changed from 7.6.1 to 7.4.2

Changed 17 months ago by simonpj@…

commit d2761231ceb8f4336d22464c9f00f1249b18ae86

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Dec 29 10:30:34 2011 +0000

    Fix Trac #5721; type variables can be quoted in TH

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

Changed 17 months ago by simonpj

  • status changed from new to merge
  • testcase set to th/T5721

Thanks!

Changed 17 months ago by igloo

  • status changed from merge to closed
  • resolution set to fixed

Merged as a716bd4d080c0870a610683453200bdd073a00a1

Note: See TracTickets for help on using tickets.