[GHC] #11278: Spurious potential superclass cycle with constraint synonyms
GHC
ghc-devs at haskell.org
Wed Dec 23 02:35:21 UTC 2015
#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
More information about the ghc-tickets
mailing list