From: Axel S. <A....@uk...> - 2002-08-29 13:06:22
|
On Tue, Aug 27, 2002 at 09:59:11AM +0200, Friedrich Dominicus wrote: > Ok I got it compiled with the CVS version. But when I'm trying to run > it I either get an error message or no output at all. > > The first happens while having the "main" functon named main > Than I got this error message: > frido@fbigm:/var/install/gtk2hs/demo/treeList% ghc --make ListTest.hs -package mogul > ghc-5.04: chasing modules from: ListTest.hs > Compiling Main ( ListTest.hs, ./ListTest.o ) > > ListTest.hs:2: > Ambiguous occurrence `main' > It could refer to either `Main.main', defined at ListTest.hs:6 > or `General.main', imported from Mogul at ListTest.hs:4 > > The other thing happened while renaming main to my_main which compiles > the code find but won't give me any output.. Yes, that is a very stupid choice of names in the Gtk library. I'll rename the main function to something else in the future. Till then, you need to say import Mogul hiding (main) import qualified Mogul main = do Mogul.init Nothing -- build your GUI Mogul.main I hope this fixes it. Axel. |