|
We now recommend down-loading the source code for SOE below, which imports a new graphics library called simply SOE. The SOE library uses a highly-portable graphics package based on OpenGL. Alternatively, there is a version based on Gtk, although it is not quite as portable as the former. In both cases we recommend using GHC (and GHCi) as the Haskell compiler (and interpreter). Both methods for installing SOE are described below. Acknowledgements: Thanks to Paul Liu for writing the GLFW package, and to Duncan Coutts for writing the Gtk2Hs library for SOE (some of the code from that is in fact used in GLFW). Note: If you encounter any problems with the graphics packages, please send email to both Paul Liu (hai.liu@yale.edu) and Paul Hudak (paul.hudak@yale.edu). OpenGL This is the recommended implementation. It depends on the OpenGL and GLFW packages for better cross-platform support than was previously available. Step 1: Note: Users of GHC 6.6 through GHC 6.8.3 should skip directly to Step 2. For Linux and OS X users, you may download
OpenGL from: Step 2: To install SOE, first download and unzip the following files:
GLFW (see http://haskell.org/haskellwiki/GLFW) comes as Haskell package that must be installed before running SOE code. It is a Haskell front-end for the GLFW OpenGL framework, and provides an alternative to GLUT for OpenGL-based Haskell programs. The second download is a Haskell Cabal package that can be installed in the following way: The SOE source code requires no installation once GLFW is installed. Simply place the SOE code where you want it, load any module into GHCi, and hope for the best! However, on MacOS X, you'll have to use the "EnableGUI trick" from wxHaskell (see http://wxhaskell.sourceforge.net/building-macosx.html). The software for that trick is included in the SOE download, so all you need to do is the following:
Gtk2Hs Instead of using OpenGL / GLFW, an alternative way to run SOE source code is to use the module Graphics.SOE.Gtk instead of the SOE.hs included in the source above. To do this, follow the installation instructions for Gtk2Hs at http://www.haskell.org/gtk2hs, then import the module Graphics.SOE.Gtk instead of SOE.hs in your code. Although both platforms have their advantages from a graphics point of view, keep in mind that:
|