[GHC] #8067: -XDefaultSignatures panic in type error diagnostic

#8067: -XDefaultSignatures panic in type error diagnostic -------------------------------------+------------------------------------- Reporter: exFalso | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: defaultsignatures | Operating System: Linux panic | Type of failure: Compile-time Architecture: x86_64 (amd64) | crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- The following piece of code shouldn't (and doesn't) typecheck, however GHC panics during the diagnostic. {{{ $ cat /tmp/Weird.hs {-# LANGUAGE DefaultSignatures #-} module Weird where import Control.Monad.Trans class Class a where fun :: () -> () -> a default fun :: () -> () -> m a fun = lift $ ghc /tmp/Weird.hs [1 of 1] Compiling Weird ( /tmp/Weird.hs, /tmp/Weird.o ) /tmp/Weird.hs:9:11: Couldn't match kind `* -> *' with `*' Expected type: ()ghc: panic! (the 'impossible' happened) (GHC version 7.6.3 for x86_64-unknown-linux): kindFunResult ghc-prim:GHC.Prim.*{(w) tc 34d} }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8067 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8067: -XDefaultSignatures panic in type error diagnostic -------------------------------------+------------------------------------- Reporter: exFalso | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: defaultsignatures Operating System: Linux | panic Type of failure: Compile-time | Architecture: x86_64 (amd64) crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Changes (by monoidal): * status: new => closed * resolution: => duplicate Comment: Thanks for the report; it is a duplicate of #8055 and related bugs, fixed in HEAD. In fact you do not need default signatures: `fun = lift :: () -> () -> m a` is enough to crash 7.6. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8067#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC