TypeSynonymInstances allow some flexible instances
The docs for !TypeSynonymInstances say:
As always, using a type synonym is just shorthand for writing the RHS of the type synonym definition.
However, there are instances that can be defined with only !TypeSynonymInstances enabled that cannot be defined without it. The following compiles:
{-# LANGUAGE TypeSynonymInstances #-}
instance Bounded String where
minBound = ""
maxBound = maxBound : maxBound
even though the same with [Char]
does not.
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |