Signs, Word32 and Array
Ian Lynagh <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.hugs.bugs |
|---|---|
| Message-ID | <[email protected]> |
This looks like a hugs bug to me - GHCi gets it right.
Inflate> 4294967295 :: Word32
4294967295
Inflate> (4294967295 :: Word32) > 0
True
Inflate> array (0, (4294967295 :: Word32)) [] // [(5, 98)]
array
Program error: {_out_of_bounds (0,-1) 5}
Inflate>
Incidentally, how do you get the Word and Array modules in scope at once
without using a module to import them both? My fiddling with :l and :a
wasn't fruitful.
Thanks
Ian