Hello, I just download the Hugs 98 Version: Dec 2001 for windows All the hs files are in the C:\Program Files\Hugs98\lib I put your excample Fact.hs in it as well, but I could not load it if I use the "WINHUGS", or "Hugs(Hugs mode)" or "Hugs(Hugs98 mode)" which appears in start->program->Hugs98 the message of it is ///////////////////////////////////////////////////////////////////////// __ __ __ __ ____ ___ _________________________________________ || || || || || || ||__ Hugs 98: Based on the Haskell 98 standard ||___|| ||__|| ||__|| __|| Copyright (c) 1994-2001 ||---|| ___|| World Wide Web: http://haskell.org/hugs || || Report bugs to: hugs-bugs@haskell.org || || Version: December 2001 _________________________________________ Haskell 98 mode: Restart with command line option -98 to enable extensions Reading file "C:\Program Files\Hugs98\\lib\Prelude.hs": Hugs session for: C:\Program Files\Hugs98\\lib\Prelude.hs Type :? for help Prelude> :load Fact.hs Reading file "Fact.hs": ERROR "Fact.hs" - Unable to open file "Fact.hs" Prelude> ////////////////////////////////////////////////////////////////////////// But if I just click the Fact.hs file , it works fine, do you think it is your bug or I did not set up the hugs correctly? yours sincerely Helen _________________________________________________________________ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
Hi, interesting usability issue. The behaviour of the :load command you're seeing is intentional, but arguably a bit confusing. When you do :load Fact.hs Hugs will only look in its current directory for the _file_ Fact.hs, and fail if its not there (the current directory in your case is probably the desktop -- use the ":!cd" command to find out.) However, if you do :load Fact it will look along its module search path for the _module_ Fact, which includes the lib/ directory where it'll find Fact.hs. i.e., the :load command is really two operations rolled into one, file and module loading. If file loading also consulted the module search path, you wouldn't have run into this distinction, so perhaps modifying Hugs to do just that would be worthwhile. --sigbjorn When you double-click, you're effectively doing :load "c:/Program Files/Hugs98/lib/Fact.hs" which is why it loads up the file OK. ----- Original Message ----- From: "li wei" <liwei_uk@hotmail.com> To: <hugs-bugs@haskell.org> Sent: Thursday, November 14, 2002 08:35 Subject: bugs
Hello, I just download the Hugs 98 Version: Dec 2001 for windows
All the hs files are in the C:\Program Files\Hugs98\lib I put your excample Fact.hs in it as well, but I could not load it if I use the "WINHUGS", or "Hugs(Hugs mode)" or "Hugs(Hugs98 mode)" which appears in start->program->Hugs98
the message of it is
...
Reading file "C:\Program Files\Hugs98\\lib\Prelude.hs":
Hugs session for: C:\Program Files\Hugs98\\lib\Prelude.hs Type :? for help Prelude> :load Fact.hs Reading file "Fact.hs": ERROR "Fact.hs" - Unable to open file "Fact.hs" Prelude>
//////////////////////////////////////////////////////////////////////////
But if I just click the Fact.hs file , it works fine, do you think it is your bug or I did not set up the hugs correctly?
yours sincerely Helen
participants (2)
-
li wei -
Sigbjorn Finne