[cvs-nhc98] nhc breaks when given fixity information in cdecls

Ian Lynagh igloo@earth.li
Wed, 19 Dec 2001 17:21:09 +0000


With the following module:

    module Demo where

    class Class13 a where
        f :: a -> a
        infixl 9 `f`

I get

    Fail: Need.hs:246: Non-exhaustive patterns in function needClassInst

I noticed lots of warning while building nhc (one of which I'd have
thought would have highlighted the existence of this bug), as well as
some dangerous mixing of tabs and spaces. Would you apply patches to fix
these (not that I am at all sure if/when I will have time to make them)?
I think that if the builds were generally warning free then the
existence of a warning may have helped detect the bug earlier.

For the latter I would be changing tabs to spaces as tabs in Haskell are
harder to do correctly than other languages, and looking at the source
code out there people have enough trouble with languages like C.


Thanks
Ian