From solovay at Math.Berkeley.EDU Sun May 21 06:31:48 2006 From: solovay at Math.Berkeley.EDU (Robert M. Solovay) Date: Sun May 21 06:25:10 2006 Subject: [nhc-users] Trouble with NHC? Message-ID: I am trying to compile the following simple program: module Main where import System.Environment main :: IO () main = do args <- getArgs putStrLn ("Hello, " ++ args !! 0) I get the following error message: solovay@chaos Haskell_Scheme]$ nhc98 program1.hs I/O error (user-defined), call to function `userError': Can't open any of: ./System/Environment.hi /usr/local/include/nhc98/packages/base/System/Environment.hi /usr/local/include/nhc98/System/Environment.hi when trying to read System.Environment. Have I installed nhc98 incorrectly? Or what is it I'm doing wrong? Thanks, --Bob Solovay From Malcolm.Wallace at cs.york.ac.uk Sun May 21 10:16:33 2006 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Sun May 21 10:09:39 2006 Subject: [nhc-users] Trouble with NHC? In-Reply-To: References: Message-ID: <20060521151633.4a677906.Malcolm.Wallace@cs.york.ac.uk> "Robert M. Solovay" writes: > $ nhc98 program1.hs > I/O error (user-defined), call to function `userError': > Can't open any of: > ./System/Environment.hi > /usr/local/include/nhc98/packages/base/System/Environment.hi > /usr/local/include/nhc98/System/Environment.hi > when trying to read System.Environment. > > Have I installed nhc98 incorrectly? Or what is it I'm doing wrong? It certainly looks like the installation was incomplete. The interface file for System.Environment ought to live in /usr/local/include/nhc98/packages/base/System/Environment.hi How did you install nhc98? If you built it with a C compiler, it is possible that you need to download and install the extra interface files for the hierarchical libraries (available at the bottom of the download web page): http://haskell.org/nhc98/download.html These were accidentally omitted from the main package (they are normally built afresh at build time if you bootstrap with a Haskell compiler instead of via C). On the other hand, if only some interface files are missing from /usr/local/include/nhc98/packages/base/ rather than all of them, then there may have been a compile error at build time, in which case it would be useful to rebuild and capture the error message. Regards, Malcolm