Constraint synonym instances
It would be great if GHC could compile:
{-# LANGUAGE ConstraintKinds #-}
type Ring = Num
instance Ring [a] where
(+) = (++)
Currently this gives an error: (+) is not a visible method of class Ring. After removing the last line, the code compiles with warnings about missing methods.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |