HGL on Mac OS X

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HGL on Mac OS X

Ruben Zilibowitz-2
Hi,

Has anyone got the GHC module HGL to work on Mac OS X? If so I'd be  
very interested to know how.

Cheers,

Ruben

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: HGL on Mac OS X

Heinrich Apfelmus
Ruben Zilibowitz wrote:
> Has anyone got the GHC module HGL to work on Mac OS X? If so I'd be very
> interested to know how.

As HGL uses X-Windows, you have to start /Programs/Utilities/X11.app
before using HGL.

Here is a terminal transcript of testing whether HGL works in ghci.

localhost:~ apfelmus$ ghci
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Prelude> :m +Graphics.HGL
Prelude Graphics.HGL> runGraphics $ withWindow_ "Hello World" (300,200)
getKey
Loading package X11-1.1 ... linking ... done.
Loading package HGL-3.1 ... linking ... done.

A window should appear.

Regards,
apfelmus

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe