A Pointless Library Proposal
ajb at spamcop.net
ajb at spamcop.net
Tue Oct 24 00:28:05 EDT 2006
G'day all.
Quoting John Meacham <john at repetae.net>:
> but since 'Zero' is often used in type arithmetic implementations (even
> though those uses arn't entirely incompatable) I think we should name it
> something else.
Actually, this works fine.
data Zero
data Succ a
class Add a b c | a b -> c
instance Add Zero b b
instance (Add a b c) => Add (Succ a) b (Succ c)
It does smell like semantic overloading, though.
Cheers,
Andrew Bromage
More information about the Libraries
mailing list