On 26-Feb-1999, Lennart Augustsson <[EMAIL PROTECTED]> wrote:
> 
> > This occurs because in the absense of type declarations,
> > Haskell assumes that any recursion will be monomorphic,
> > which is in general not necessarily the case.
>
> As I'm sure you know, type inference is in general impossible
> for polymorphic recursion, and since Haskell insists on
> decidable type checking this was an easy solution.

Yep, there is a drawback to the Mercury approach,
you lose decidability.  But as we've been discussing
losing decidability isn't necessarily such a bad thing ;-)

> > Interestingly, the Mercury typechecker behaves differently
> > for the equivalent example: it infers the more general type.
>
> Are you sure Mercury doesn't suffer from the same problem if
> you just complicate the example?

Well, I'm fairly sure it doesn't, but I'm not completely 100% sure.

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger [EMAIL PROTECTED]        |     -- leaked Microsoft memo.



Reply via email to