Benjamin Krupp wrote:
> I am interested in Haskell mainly because of wxHaskell. So my
> situation is that I know little about Haskell and little about
> wxHaskell but want to learn both as fast as possible.
>
> After downloading and installing ghc-6.0.1 and wxhaskell-0.4 (.dmg
> version for mac - I'm using Mac OS X 10.2.8 Jaguar) I tried to compile
> the examples in the wx, wxcore and contrib-directorys. Some worked
> fine (contrib: Camels.hs, wx: BouncingBalls.hs, HelloWorld.hs,
> Minimal.hs, TimeFlows.hs, wxcore: ByeDemo.hs, ImageViewer.hs,
> Paint.hs) others not. The errors I got looked like this:
>
> Layout.hs:18: Variable not in scope: `alignment'
> Layout.hs:19: Variable not in scope: `alignment'
>
wxHaskell 0.4 is old, close to antique (about 2 years old now). I don't
know if it's the source of your problems but will probably have better
luck with a newer version. It might be a good idea to upgrade any way.
There exists .dmg-version for wxHaskell 0.9.4, which is the latest
released, both for ghc 6.2.2 and 6.4.
http://wxhaskell.sourceforge.net/download.html
Cheers,
Lennart
> But when I tried to help myself the dirty way (remove the
> alignment-assignments) I got the following errors:
>
> Layout.hs:18:
> Couldn't match `IO' against `(->) [Prop (TextCtrl ())]'
> Expected type: IO t
> Inferred type: [Prop (TextCtrl ())] -> IO (TextCtrl ())
> Probable cause: `textEntry' is applied to too few arguments in
> the call
> (textEntry p [text := "100"])
> In a 'do' expression: xinput <- textEntry p [text := "100"]
>
> This is how I called ghc from the shell:
>
> ghc -package wx -o layout Layout.hs
>
> What's my fault (except from my dirty methods and my impatience)?
>
> bened
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
> Register for a JBoss Training Course. Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> wxhaskell-users mailing list
> wxh...@li...
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
|