Opened 12 years ago

Last modified 2 years ago

#108 new task

make toEnum and fromEnum take and return Integers

Reported by: Owned by: none
Priority: normal Milestone:
Version: Keywords: enum
Cc: Meta Owner:
State: discussion Section: N/A or multiple
Related Tickets:

Description

Change the signature of toEnum and fromEnum in the Enum a typeclass to

 toEnum :: Integer -> a
 fromEnum :: a -> Integer

(they currently use Int)

It's possible, for example, to have Enumeratable types that are larger than Int

pros: No overflow possibilities

cons: efficiency

Change History (2)

comment:1 Changed 2 years ago by Herbert Valerio Riedel

Milestone:

moving non-milestoned many year old legacy tickets out of the way

comment:2 Changed 2 years ago by Herbert Valerio Riedel

Priority: trivialnormal

Set default priority (as this confuses Trac otherwise)

Note: See TracTickets for help on using tickets.