> Prompted by an IOHCC entry I have the following question:
>
> Is the following legal?
>
> ----------------------
> module M(x) where
> x = 1
> z = x==1
> ----------------------
>
> If the definition of z wasn't there it would clearly be
> illegal since it exports an overload non-function value.
> But the use of x in z forces x to be in Int there, so
> maybe it's legal? (First I thought not, but now I'm in doubt.)
Yes, it's legal. The monomorphism restriction requires x to be
used at one type in M. This type is forced by the equality
(and default default type) to be Int.
Kevin