Derived types unequal with let binding
The types of x and y are different. This breaks the replacing equals with equals gives equals property. I am not sure whether this is a bug, but I would be very keen to know whether it is.
class X l z b m | l -> z b where
p:: (Show a, Show b, Show b') => l a b -> m (l a b')
e::(Show a, Show b) => l a b -> m [z]
foo :: (X l a b m, Show b, Show a1) => [a] -> l a1 b -> m [(Int, Int, b)]
foo = undefined
o :: (Show z1, Show b, X l z b m) =>(Int, Int, b) -> l a1 b -> m (l z1 b)
o = undefined
x f r = do
es <- e r
something <- p r
xxx <- foo es r
foldM
(flip o)
something
(map f xxx)
y f r = do
es <- e r
something <- p r
xxx <- foo es r
let abc = map f xxx
foldM
(flip o)
something
abc
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |