As Phil Wadler alluded to this subject in his message today, I thought
I might as well count up what's in the .hi files for the Glasgow
Haskell compiler (written in Haskell, as you know).
Bear in mind: We've tried [none too successfully] to produce
"self-contained interfaces"; i.e., we export en
> > All (all?) I'm proposing is to print them out.
>
> Yes we do, and it's fine for the *implementation* to print such things out.
> But it is NOT fine to cross the dividing line of (1) the implementation, and
> (2) the language it implements. As I believe I have made abundantly clear
> a showFu
Ian writes:
Should the following be legal or not?
data T a = F (a->a->Bool)
x = F (==)
The compilers all produce an `ambiguous overloading' error, and I am not sure
why. Everything is OK if you give a type declaration for x (x :: Eq a => T a)
or if you add an argument to x.
Should the following be legal or not?
data T a = F (a->a->Bool)
x = F (==)
The compilers all produce an `ambiguous overloading' error, and I am not sure
why. Everything is OK if you give a type declaration for x (x :: Eq a => T a)
or if you add an argument to x.
Ian
To go back to the debate on instances, here is a concrete proposal for handling
instances in Haskell 1.3:
1) A C-T instance can be defined in any module in which C and T are in scope.
2) A C-T instance defined in module M is in scope in every module which
imports from M, directly or in