L.Guo wrote:
> 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.
$! merely forces evaluation; it doesn't change the types.

What you want is more like:

ws: [Word8]
ws = map fromIntegral [1,18..256 :: Int]


There is no need for multi-precision Integers here: Int will do just fine.

Paul.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to