[Haskell-cafe] Why this exception occurs ?

L.Guo leaveye.guo at gmail.com
Fri May 25 04:17:10 EDT 2007


I think it likes a trap. See this.

Data.ByteString.unpack . Data.ByteString.pack $! ([0,17..255] ++ [1,18..256])

Without thinking about for Word8, [1,18..256] is equal to [1,18..0]. Though
I try to use "$!" to let GHC generate the list as Integer. It would not do so.

:-L

------------------				 
L.Guo
2007-05-25



More information about the Haskell-Cafe mailing list