Re: User defined Ix instances potentially unsafe

2001-05-05 Thread Fergus Henderson
On 02-May-2001, Matt Harden <[EMAIL PROTECTED]> wrote: > Matt Harden wrote: > > > blah, blah, blah, bug in the Library Report, blah, blah... > > OK, so I failed to read the Library Report. It clearly states: > > > An implementation is entitled to assume the following laws about these operation

Re: User defined Ix instances potentially unsafe

2001-05-02 Thread Matt Harden
Matt Harden wrote: > blah, blah, blah, bug in the Library Report, blah, blah... OK, so I failed to read the Library Report. It clearly states: > An implementation is entitled to assume the following laws about these operations: > > range (l,u) !! index (l,u) i == i -- when i is in

User defined Ix instances potentially unsafe

2001-05-01 Thread Matt Harden
Sorry if this has been reported before. I shouldn't be able to crash ghc or hugs without using any "unsafe" features, right? Well, here 'tis: > module CrashArray where > > import Array > import Ix > > newtype CrashIx = CrashIx Int deriving (Ord, Eq, Show) > > instance Enum CrashIx where >