Ticket #5934 (closed bug: fixed)

Opened 15 months ago

Last modified 14 months ago

ghc: panic! (the 'impossible' happened)

Reported by: guest Owned by:
Priority: normal Milestone: 7.6.1
Component: Compiler Version: 7.4.1
Keywords: Cc: dimitris@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: indexed-types/should_fail/T5934.hs Blocked By:
Blocking: Related Tickets:

Description

GHC asked me nicely to report this compile-time panic / crash.

Minimal code:

{-# LANGUAGE Rank2Types #-}

module Foo where
import System.Random.MWC (GenST)
run :: (forall s . GenST s) -> Int
run = 0

Output:

$ ghc Foo.hs 
[1 of 1] Compiling Foo              ( Foo.hs, Foo.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.1 for x86_64-unknown-linux):
	tcTyVarDetails
    ( s{tv a10F} [tv] :: ghc-prim:GHC.Prim.*{(w) tc 34d} )

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

Change History

Changed 14 months ago by simonpj

  • cc dimitris@… added
  • difficulty set to Unknown

Thanks. I know what is going on here. Will fix as part of the refactoring Dimitrios is doing on the constraint solver.

Simon

Her's a standalone test case

{-# LANGUAGE RankNTypes, TypeFamilies, KindSignatures #-}

module T5934 where
import Control.Monad.ST

data Gen s
type GenST s = Gen (PrimState (ST s))

run :: (forall s . GenST s) -> Int
run = 0

type family PrimState (m :: * -> *)

Changed 14 months ago by dimitris

  • status changed from new to merge
  • testcase set to indexed-types/should_fail/T5934.hs

Yes this is now fixed by commit 2d8374a8fbc34bbb44f9c73d0131f3071869f110

Testcase in indexed-types/should_fail/

Changed 14 months ago by pcapriotti

Dimitrios, does this depend on the 'new-flavor' branch? If so, then it probably shouldn't be merged in 7.4.

Changed 14 months ago by dimitris

Thanks Paolo, I was wrong. It should be declared as fixed, not merge. Can you do this? Apologies.

Changed 14 months ago by pcapriotti

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

Sure, no problem.

Changed 14 months ago by pcapriotti

  • milestone set to 7.6.1
Note: See TracTickets for help on using tickets.