logo       

ignoring contexts (version 6.4.20050304): msg#00114

lang.haskell.glasgow.bugs

Subject: ignoring contexts (version 6.4.20050304)

Hello,

is it a bug?

When defining

newtype Floating a => Vector a = Vector [a],

version 20050304 accepts e.g.

Vector [True,False], Vector "Hi".

Also making Vector an instance of Functor poses no problems, either by
deriving or declaring it directly and does not reject

*Vector> fmap even (Vector [1 .. 7])
Vector [False,True,False,True,False,True,False].

Deriving the instance leads to the desired behaviour (rejecting non-Floatings)
in version 6.2.2.

Is it a bug or intentional?

Cheers,

Daniel Fischer


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise