#5515: panic! (the 'impossible' happened) with evil self-referential instance ---------------------------------+------------------------------------------ Reporter: andersk | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.3 | Keywords: Testcase: | Blockedby: Os: Unknown/Multiple | Blocking: Architecture: Unknown/Multiple | Failure: Compile-time crash ---------------------------------+------------------------------------------ This bit of code escaped from my fingertips: {{{ #!hs {-# LANGUAGE ConstraintKinds, FlexibleInstances, TypeFamilies, UndecidableInstances #-} class ctx (Arg ctx) => Some ctx where type Arg ctx instance ctx a => Some ctx where type Arg ctx = a }}} and crashed GHC master with: {{{ ghc: panic! (the 'impossible' happened) (GHC version 7.3.20110927 for x86_64-unknown-linux): tcTyVarDetails a{tv aav} [tv]
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} This causes a similar crash without using ConstraintKinds: {{{ #!hs {-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TypeFamilies, UndecidableInstances #-} class C f a class C f (Arg f) => Some f where type Arg f instance C f a => Some f where type Arg f = a }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5515> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs