Spurious potential superclass cycle with constraint synonyms
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.11 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |