[GHC] #11278: Spurious potential superclass cycle with constraint synonyms

#11278: Spurious potential superclass cycle with constraint synonyms -------------------------------------+------------------------------------- Reporter: ezyang | Owner: simonpj Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC rejects Unknown/Multiple | valid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The superclass cycle detector isn't smart enough to deal with constraint synonyms: {{{ {-# LANGUAGE ConstraintKinds #-} module A where type K a = (Show a, Read a) class K a => C a where }}} On HEAD I get: {{{ A.hs:4:1: error: • Potential superclass cycle for ‘C’ one of whose superclasses is ‘GHC.Classes.(%,%)’ one of whose superclass constraints is headed by a type variable: ‘c1’ Use UndecidableSuperClasses to accept this • In the class declaration for ‘C’ }}} The error goes away if the constraint synonym only has one constraint in it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11278 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11278: Spurious potential superclass cycle with constraint synonyms
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: simonpj
Type: bug | Status: new
Priority: high | Milestone: 8.0.1
Component: Compiler (Type | Version: 7.11
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#11278: Spurious potential superclass cycle with constraint synonyms -------------------------------------+------------------------------------- Reporter: ezyang | Owner: simonpj Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.11 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | polykinds/T11278 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: => polykinds/T11278 * resolution: => fixed Comment: Thank you; fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11278#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC