Confused about default
Ian Lynagh
igloo@earth.li
Mon, 17 Dec 2001 17:32:02 +0000
On Mon, Dec 17, 2001 at 08:57:28AM -0800, Simon Peyton-Jones wrote:
> Well, Foo *is* an instance of Num, so a correct Haskell impl
> should pick that instance always.
I was looking at what the implementations would allow, the module wasn't
supposed to be useful.
> Since you don't define the
> fromInteger method in the instance decl, you get a runtime error.
I expected this, I included it as in some cases I *didn't* et a runtime
error though.
> I don't know what you expect the [Foo] and Foo -> Int defaults
> to do.
Let me try to clarify what I was asking:
What is a monotype? For example, is "[Foo]" a monotype and is
"Foo -> Int" a monotype? The context free grammar implies that a
monotype is identical to a type, in which case why is a different name
used?
The rest was to attempt to highlight some inconsistencies in the
implementations.
Thanks
Ian