instances and modules

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
Tue, 1 Jan 2002 14:03:34 +0000 (UTC)


Mon, 31 Dec 2001 22:52:44 -0800, Feuer <feuer@his.com> pisze:

> I don't understand how a type can be considered an instance of a
> class if it doesn't provide all the methods of that class.

1. A method can have a default definition.

2. A missing method definition is assumed to be bottom.
   (I don't like this rule. Ghc with suitable options warns in such case.)

The first point is important. It's possible that an overloaded function
in the next version of a library is promoted to a method with a default
definition, and then existing code using that class doesn't break.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^
QRCZAK