Haskell Graphics Lib problem

Don Wakefield don_wakefield@mentorg.com
Thu, 15 Feb 2001 16:37:42 -0800 (PST)


I just bought 'The Haskell School of Expression', so I downloaded the
latest version of Hugs98, February 2001, and the latest version of the
Hugs Graphics Library, 2.0.3.

Since the documentation mentioned building on Linux, I built and
installed hugs98, ran some tests and felt it was okay. This is on a
Redhat Linux 6.0 installation.

Then I built the Hugs Graphics Library, and tried to run the first test
suggested:
=======================================================================

<1122:~/tmp/haskell> runhugs -Pgraphics-2.0.3/lib/x11: graphics-2.0.3/demos/HelloWorld.hs
runhugs: Error occurred
Reading file "graphics-2.0.3/demos/HelloWorld.hs":
Reading file "graphics-2.0.3/lib/x11/GraphicsUtils.hs":
Reading file "graphics-2.0.3/lib/x11/GraphicsCore.hs":
Reading file "graphics-2.0.3/lib/x11/GraphicsEvent.hs":
Reading file "graphics-2.0.3/lib/x11/GraphicsWindow.hs":
Reading file "graphics-2.0.3/lib/x11/Xlib.hs":
Reading file "graphics-2.0.3/lib/x11/StdDIS.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Int.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Bits.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Int.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Word.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Addr.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/Monad.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Foreign.hs":
Reading file "graphics-2.0.3/lib/x11/StdDIS.hs":
Reading file "graphics-2.0.3/lib/x11/X.hs":
Reading file "graphics-2.0.3/lib/x11/Xlib.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Concurrent.lhs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/ChannelVar.lhs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/ConcBase.hs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/ChannelVar.lhs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Channel.lhs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Semaphore.lhs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/SampleVar.lhs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/exts/Concurrent.lhs":
Reading file "/user/donw/tmp/haskell/Hugs.ixl/share/hugs/lib/System.hs":
Reading file "graphics-2.0.3/lib/x11/Graphics_Utilities.hs":
Dependency analysis
ERROR graphics-2.0.3/lib/x11/Graphics_Utilities.hs:73 - Illegal type "IOResult a" in constructor application


<1123:~/tmp/haskell> pushd graphics-2.0.3
~/tmp/haskell/graphics-2.0.3 ~/tmp/haskell
<1125:~/tmp/haskell/graphics-2.0.3> find . -name '*hs' -print | xargs grep IOResult
./lib/x11/Graphics_Utilities.hs:  mkErr :: Maybe (IOResult a) -> IOError
./lib/win32/GraphicsUtilities.hs:  mkErr :: Maybe (IOResult a) -> IOError

=======================================================================

I couldn't find a discussion of IOResult in the html versions of the
Haskell 98 report or library report, but it is in the prelude:

=======================================================================

./lib/Prelude.hs:data IOResult 

=======================================================================

I'm still learning all the ins and outs of Haskell, so I don't really
know what the problem is. Any helpful hints?

-- 
Don Wakefield                              Mentor Graphics Corporation
(503) 685-1262                             8005 S.W. Boeckman Road    
don_wakefield@mentorg.com                  Wilsonville, OR 97070-7777