Hi,
Am Dienstag, den 08.04.2008, 11:51 -0700 schrieb Dan Weston:
> Paul Johnson wrote:
> > You can regard an "instance" declaration as an inference rule for the 
> > type checker, with "=>" meaning "implies" (though I don't think its the 
> > answer to your other question about names).
> 
> "implies" might be a bad word, because the direction is backwards:
> 
> Eq a => Ord a
> 
> is clearly false if read that "Eq a implies Ord a". It is Ord a that 
> implies Eq a.
> 
> I just read it as "required for" myself.

I think both can be justified. Take

> instance X a => Y a where ...

"X a" is required so that the instance declaration can be used.

But also:

Given this declaration, having an instance "X a" implies that you will
also have an instance "Y a". But not not every type with "Y b" will also
have "Y a".

Or were you talking about constraints in the class declaration, which
your choice of Eq and Ord suggests?

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
  mail: [EMAIL PROTECTED] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [EMAIL PROTECTED] | http://www.joachim-breitner.de/
  Debian Developer: [EMAIL PROTECTED]

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to