[Haskell-cafe] ghci module re exporting qualified as

Henning Thielemann lemming at henning-thielemann.de
Wed Nov 18 16:30:51 UTC 2020


On Wed, 18 Nov 2020, Immanuel Litzroth wrote:

> You mean this?
> #+BEGIN_SRC haskell :tangle T1.hs
> module T1 where
> import Data.Map as Map
> #+END_SRC
>
> that doesn't seem to do it:
> #+BEGIN_EXAMPLE
> λ⊢ :show modules
> T1
> λ⊢ :show imports
> import T1 -- added automatically
> import Prelude -- implicit
> λ⊢ fromList
>
> <interactive>:143:1-8: error: Variable not in scope: fromList
> λ⊢ Map.fromList
>
> <interactive>:144:1-12: error:
>    Not in scope: ‘Map.fromList’
>    No module named ‘Map’ is imported.
> λ⊢ Data.Map.FromList


Hm. Was the module compiled? You can only benefit from imports, if the 
module is interpreted.


More information about the Haskell-Cafe mailing list