GHC crashes with multiple => in instance
GHC will crash (rather than a syntax error) if you write
import Data.Array.Unboxed
newtype Vector r = Vector (UArray Int r)
instance (IArray UArray r) => (Num r) => Num (Vector r) where
(Vector v1) + (Vector v2) = Vector $ listArray (0,0) []
This is unfortunately the smallest program I found that crashes the compiler; removing the definition of (+) yields a syntax error as expected.
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 |