[Haskell-cafe] Strange problem with type classes (ghc 6.8.2 looks allright and ghc 6.10.1 doesn't).

Serguey Zefirov sergueyz at gmail.com
Tue Sep 22 18:11:11 EDT 2009


(followup to my previous letter with the same subject)

I found the way to break 6.8.2 type checker.

It's as easy as to uncomment Div case alternative in valueIndex.

Weird.

I found a solution, though. Instead of (valueIndex (x_38,(x_36,x_37)))
in that Div alternative I should create expression (valueIndex
x_38*valuesCount x_36*valuesCount x_37 + valueIndex x_36 * valuesCount
x_37+valueIndex x_37) which is equivalent to above one.

Slightly more work. And I still cannot figure why valueIndex (a,(b,c))
works in one type and doesn;t in another.


More information about the Haskell-Cafe mailing list