Mon, 10 Jul 2000 09:26:19 -0700, Simon Peyton-Jones <[EMAIL PROTECTED]> pisze:

> Bottom line: I don't like it either, but I don't think it's a typo.
> Feel free to suggest a typo-level of improvement!

It's not typo-level, but maybe the right way for future is to decouple
sequences created by [foo,bar..baz] etc. from the conversions between Int.

A disadvantage is that sequencing functions would no longer be produced
automatically by default method implementations. It's not the only case
where something like this would be convenient:

arithSeqUsingEnum:: Enum a => ArithSeq a where
    arithSeqFrom       a0       = map toEnum [fromEnum a0..]
    arithSeqFromTo     a0    an = map toEnum [fromEnum a0..fromEnum an]
    arithSeqFromThen   a0 a1    = map toEnum [fromEnum a0, fromEnum a1..]
    arithSeqFromThenTo a0 a1 an = map toEnum [fromEnum a0, fromEmum a1..fromEnum an]

instance ArithSeq Char where
    arithSeqUsingEnum

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/            GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
  ^^                W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK                5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-


Reply via email to