GHC 8 allows ambiguous type without AllowAmbiguousTypes
This module compiles with GHC 8:
{-# LANGUAGE DefaultSignatures #-}
-- {-# LANGUAGE AllowAmbiguousTypes #-} -- Not required with GHC 8.0.1.
module T12151 where
class Put a where
put :: a
default put :: t -- This should be `a` instead of `t`
put = undefined
GHC 7.10 required AllowAmbiguousTypes, to defer the ambiguity check to use sites.
(Example extracted from the description of #7437 (closed))
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |