[Haskell-beginners] Confused by the qualified imports

David McBride toad3k at gmail.com
Sun Jan 6 18:00:03 CET 2013


If you use "import qualified Data.Array.Repa as R" then you have to specify
R in front of every function, operator, or type.

But if you use "import Data.Array.Repa as R" without the qualified keyword,
then you only have to use it when it would be ambiguous which module your
function or type comes from (ie. you had multiple modules imported without
qualification).

On Sun, Jan 6, 2013 at 11:30 AM, Libor Wagner <liborwagner at gmail.com> wrote:

> Hi,
>
> I was looking into Gloss examples for usage of Repa arrays. For example
> the Snow example (
> http://code.ouroborus.net/gloss/gloss-stable/gloss-examples/raster/Snow/Main.hs).
> What I do not get is that there is qualified import of the Repa package,
> but the "Z" and ":." are used without the prefix. When I some times
> accidentally omit the prefix the ghc always yell at me. What em I missing?
>
> Thanks,
> Libor
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130106/401f2570/attachment.htm>


More information about the Beginners mailing list