[Hugs-users] Scoping inconsistency in ghci
Malcolm Wallace
malcolm.wallace at cs.york.ac.uk
Mon Nov 23 22:47:05 EST 2009
> List.\\ and List.(\\) . The former is in scope, but the latter is
> not.
The first is a qualified operator, the second is not. The correct
syntax to make a qualified operator prefix is (List.\\). There has
been some discussion of changing it in Haskell Prime to match your
intuition for how it should look, but the change was rejected for
H'2010. Maybe it will be adopted in H'2011 or H'2012.
> My expectation is that neither of them should be in scope unless we
> load the List module with with the :m command.
Yes, ghci is decidedly strange in this respect. Any name from any
exposed package is available in qualified form at the command prompt,
without having to load the module containing it. Indeed,
frustratingly, ghci will often complain if you *do* try to load the
module:
Prelude> :l List
<no location info>: module `List' is a package module
Failed, modules loaded: none.
Regards,
Malcolm
More information about the Hugs-Users
mailing list