Ticket #108 (new task)

Opened 7 years ago

make toEnum and fromEnum take and return Integers

Reported by: guest Owned by: none
Milestone: Keywords: enum
Cc: Section:
State:

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

Note: See TracTickets for help on using tickets.