Num class

Tom Pledger
Fri, 20 Oct 2000 11:45:52 +1300 (NZDT)

Marcin 'Qrczak' Kowalczyk writes:
 > [...]
 > Why it is bad:

I appreciate your objections, and will bear them in mind, but if my
hopes are going to be dashed, I'd rather it were done by one of the
issues I see as bigger:

  - How can we infer types like `(0==) :: Subtype Int a => a -> Bool' ?

  - What is F^{omega}_{<=} and am I trying to reinvent it and what
    makes it so hard to implement?

Feel free to call me a chicken for not answering your individual
points... yet.  :-)

 > [...]
 > > There should be no subtype relationship between Int8 and Word8 in
 > > either direction, because they denote different things: numbers and
 > > encodings respectively.
 > I hope we are not misunderstood. Word8 in GHC is an integer type
 > representing values 0..255. It is definitely a number, in the same sense
 > as Int8. Only their ranges are not contained in one another.

My mistake.  Thanks for the clarification.

 > > If Word8 literals are required, as opposed to terms like fromEnum 10,
 > > they should have some other appearance like 10W.
 > And you are saying that your proposal is less ugly than the current
 > state? :-)

Joking aside, yes, it may make the overall state even more beautiful.