
#7838: ghc(i) crashes on instance declaration --------------------------------------+------------------------------------- Reporter: alios | Owner: Type: bug | Status: closed Priority: normal | Component: Compiler Version: 7.6.2 | Resolution: fixed Keywords: MultiParamTypeClasses | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Blockedby: | Blocking: Related: | --------------------------------------+------------------------------------- Changes (by monoidal): * status: new => closed * resolution: => fixed Comment: Thanks for the report. The bug is already fixed in HEAD. Now you get: {{{ A.hs:28:13: Expected a constraint, but ‛C (TPI t) m (TPI t)’ has kind ‛*’ In the class declaration for ‛TS’ }}} Here's a reduced version: {{{ {-# LANGUAGE ConstraintKinds, UndecidableInstances, FlexibleInstances #-} module Crash where data C m class (C m) => TS m instance TS m where }}} Once you change "data C m" to "class C m", there's no panic. Sometimes 7.6 does not enforce the difference between kinds Constraint and * during type-checking. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7838#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler