If you want ghc to chase dependencies when building an executable, pass it the --make flag, ie try:
> ghc --make -v -package wx -o main Main.hs I think this will give you what you need - though I'm assuming those .hi files don't exist, ie you haven't compiled them separately and not told us. :-) Personally, I always build via cabal these days. More info in section 2.4 of: http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program Hope this helps, -Andy On 12 Jan 2010, at 08:13, Mark Norrish wrote: > Hello, > I'm trying to write a script with wxHaskell involving modules, but > GHC doesn't seem able to find them. My program has a main module, > Main.hs: > > module Main where > import Graphics.UI.WX > import BlobboControls -- Blobbo is a circle one can move around the > screen > functions... > > and BlobboControls.hs containing > > import BlobboControls where > import Graphics.UI.WX > more functions... > > and when I try to compile it, I get > > m...@mark-laptop:~/MyCode/Blobbo$ ghc -v -package wx -o main Main.hs [snip] > Main.hs:3:0: > Failed to load interface for `BlobboControls': > locations searched: > BlobboControls.hi > BlobboControls.hi-boot > *** Deleting temp files: > Deleting: /tmp/ghc5654_0/ghc5654_0.s > Warning: deleting non-existent /tmp/ghc5654_0/ghc5654_0.s > *** Deleting temp dirs: > Deleting: /tmp/ghc5654_0 > > Does anyone know why GHC could not BlobboControls.hs, or the module > in the .hi files? -- Andy Gimblett http://gimbo.org.uk/ ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ wxhaskell-users mailing list wxhaskell-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-users