Implict parameters and monomorphism
Robert Ennals
Robert.Ennals@cl.cam.ac.uk
Wed, 25 Apr 2001 11:19:24 +0100
> On Wed, 25 Apr 2001, Robert Ennals wrote:
>
> > Thus if we want to "inherit" our implicit paramater, we would have:
> >
> > f ?y x = (x :: Int) + ?y
>
> I like the current solution better. They are called "implicit parameters"
> because they are, well, implicit :-)
The semantics is still implicit.
When one calls the function f, one would only explicitly pass x, not y.
Eg one can do
g :: (y :: Int) => Int
g ?y = f 1
And for top level functions, one could make it optional anyway, as there is
nowhere else for the variable to have come from.
-Rob