On Saturday 06 November 2004 17:57, you wrote:
> Benjamin Franksen wrote:
> > My question: Is this as it should be or is it a bug?
>
> The Monomorphism Restriction.
Grumble... I almost suspected it. Only the context in which I got the error
originally didn't _look_ as if MR would apply, and when
Benjamin Franksen wrote:
main = let ?b = True in use_b
--use_b :: (?g::Bool) => IO ()
use_b = print ?b
It isn't: ghc -fimplicit-params says
Unbound implicit parameter (?b :: a)
arising from use of implicit parameter `?b' at TestBug.hs:4
In the first argument of `print', namely `?b'
To be fair, the ghc docs do not mention constraint inference for implicit
parameters. OTOH they do not say that signatures must be given explicitly if
I use implicit parameters.
However, I always thought that this would be ok:
> main = let ?b = True in use_b
> --use_b :: (?g::Bool) => IO ()
>