Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. ghci :load vs import (Doug McIlroy) 2. ghci :load vs import (Doug McIlroy) 3. Re: ghci :load vs import (Silent Leaf) 4. Re: ghci :load vs import (Imants Cekusins) 5. Re: ghci :load vs import (Silent Leaf) ---------------------------------------------------------------------- Message: 1 Date: Tue, 19 Apr 2016 15:31:07 -0400 From: Doug McIlroy <d...@cs.dartmouth.edu> To: beginners@haskell.org Subject: [Haskell-beginners] ghci :load vs import Message-ID: <201604191931.u3jjv705008...@coolidge.cs.dartmouth.edu> Content-Type: text/plain; charset=us-ascii I have module Powser stored in haskell/Powser.hs. There is no file ./Powser*. This loads the module shellprompt> ghci -ihaskell Prelude> :load Powser But this can't find it shellprompt> ghci -ihaskell Prelude> import Powser What might cause the difference? (I am running ghci 7.8.4.) Doug ------------------------------ Message: 2 Date: Tue, 19 Apr 2016 15:34:49 -0400 From: Doug McIlroy <d...@cs.dartmouth.edu> To: beginners@haskell.org Subject: [Haskell-beginners] ghci :load vs import Message-ID: <201604191934.u3jjynar008...@coolidge.cs.dartmouth.edu> Content-Type: text/plain; charset=us-ascii I have module Powser stored in haskell/Powser.hs. There is no file ./Powser*. This loads the module shellprompt> ghci -ihaskell Prelude> :load Powser But this can't find it shellprompt> ghci -ihaskell Prelude> import Powser What might cause the difference? (I am running ghci 7.8.4.) Doug ------------------------------ Message: 3 Date: Tue, 19 Apr 2016 21:43:03 +0200 From: Silent Leaf <silent.le...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] ghci :load vs import Message-ID: <cagfccjn1_frmsa-lkjrqbq2ys3dw5xcqpxpsix9jtd4ggzz...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" I'm a true beginner, so maybe what I say is false or useless, but from the few I know, I think the statement "import" is asking for the name of a module, not just the name of a file. So, is your file starting with the module declaration statement "module Powser (...) where" ? Le mardi 19 avril 2016, Doug McIlroy <d...@cs.dartmouth.edu> a ?crit : > I have module Powser stored in haskell/Powser.hs. > There is no file ./Powser*. > > This loads the module > shellprompt> ghci -ihaskell > Prelude> :load Powser > But this can't find it > shellprompt> ghci -ihaskell > Prelude> import Powser > > What might cause the difference? > (I am running ghci 7.8.4.) > > Doug > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160419/0f443643/attachment-0001.html> ------------------------------ Message: 4 Date: Tue, 19 Apr 2016 21:51:36 +0200 From: Imants Cekusins <ima...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] ghci :load vs import Message-ID: <cap1qinb3a4jq1yz7sb0_gvp-qs5smt-5jdivvdgxorrpvyo...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" interesting. I just found this: https://downloads.haskell.org/~ghc/7.8.4/docs/html/users_guide/interactive-evaluation.html#ghci-import-decl 2.4.5.5. :module and :load ... You can add a module to the scope (via :module or import) only if either (a) it is loaded, or (b) it is a module from a package that GHCi knows about. Using :module or import to try bring into scope a non-loaded module may result in the message ?module M is not loaded?. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160419/6c439f3f/attachment-0001.html> ------------------------------ Message: 5 Date: Tue, 19 Apr 2016 22:00:07 +0200 From: Silent Leaf <silent.le...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] ghci :load vs import Message-ID: <cagfccjnrwv8yaz8l2pe9a34ccpqqbny4fzlm4dy6keuhs2t...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Interesting indeed. Logical too, in my personal view, since otherwise, to merely import a module could have triggered an unwanted, unpredictable (re)compilation of some other file. One must be able to control this, it seems fitting the internal statement "import" doesn't have such an external effect of (re)compilation of other modules, it's definitely not its role nor "right" in my view. Le mardi 19 avril 2016, Imants Cekusins <ima...@gmail.com> a ?crit : > interesting. I just found this: > https://downloads.haskell.org/~ghc/7.8.4/docs/html/users_guide/interactive-evaluation.html#ghci-import-decl > 2.4.5.5. :module and :load > ... > You can add a module to the scope (via :module or import) only if either (a) it is loaded, or (b) it is a module from a package that GHCi knows about. Using :module or import to try bring into scope a non-loaded module may result in the message ?module M is not loaded?. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160419/54fb6046/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 94, Issue 17 *****************************************