GHC accepts overly general instance sigs
{-# LANGUAGE InstanceSigs #-}
data I a = MkI a
instance Functor I where
fmap :: (a -> b) -> f a -> f b
fmap = undefined
is accepted when the type is too general, even things like:
fmap :: (a -> b) -> f a -> g b
-- &
fmap :: whoami
are accepted
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |