Default type family instances
The following code does not compile in GHC 7.4, unless line (2) is uncommented. I thought line (1) would remove need for (2). If it does not, probably declaration (1) should cause an error.
{-# LANGUAGE TypeFamilies #-}
class R m where
type D m a :: *
type D m a = () -- (1)
f :: m a -> D m a -> ()
instance R Maybe where
-- type D Maybe a = () -- (2)
f = undefined
x = f (Nothing :: Maybe Int) ()
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |