[Haskell-cafe] Strange results when trying to create large Bool arrays.

Thomas Conway drtomc at gmail.com
Wed Jul 11 19:11:18 EDT 2007


On 7/12/07, Stefan O'Rear <stefanor at cox.net> wrote:
> Indeed.  I beleive that Int should be removed from the Prelude.

metoo.

Actually, one of the really annoying things that I am finding in my
code which is a mixture of ByteString, Word16, Word32 and Word64, is
that all the standard libraries use Int everywhere, so I end up having
to get out the fromIntegral spray-gun, which uglifies the code and
makes it much harder to read.

Is there a compelling reason (hysterical raisins is not a compelling
reason) why Data.*.{length,size,take,drop,etc} use Int and not Num n
=> .... or similar?

If the answer is efficiency, then cannot they use Int# or similar
internally, and have an optimizable fromIntegral *inside* them?

T.
-- 
Dr Thomas Conway
drtomc at gmail.com

Silence is the perfectest herald of joy:
I were but little happy, if I could say how much.


More information about the Haskell-Cafe mailing list