problem compiling an older Haskell program with GHC 6.6.1
Stefan O'Rear
stefanor at cox.net
Sat Jul 7 16:02:47 EDT 2007
On Sat, Jul 07, 2007 at 03:59:48PM -0400, Scott Stoller wrote:
> hi,
>
> I really appreciate the amazingly fast and helpful feedback to my previous
> message. that problem (FiniteMap not found) is solved. but a new problem
> came up...
>
> I am trying to compile paradox 1.0, an older (GHC 5) Haskell program,
> with GHC 6.6.1 (the Solaris 10 / x86 binary distribution).
>
> now I get the error
>
> Data.hs:760:20: Not in scope: 'bounds'
>
> Data.hs is one of the files in the program. here is the nearby code:
>
> updateTable :: Hash a => a -> IO b -> Table a b -> IO b
> updateTable x my (MkTable ref) =
> do MkHTab n arr <- readIORef ref
> let (_,size) = bounds arr
> hashx = hash x
> i = hashx `mod` size
> ...
>
> in case it's helpful, the entire paradox source code is at
> http://www.cs.sunysb.edu/~stoller/out/paradox-1.0-casc.tar.gz
> just delete "-package lang" from the Makefile before running "make".
Bounds was removed in 6.4.x to allow for dynamically sized arrays; it
should work as:
updateTable :: Hash a => a -> IO b -> Table a b -> IO b
updateTable x my (MkTable ref) =
do MkHTab n arr <- readIORef ref
(_,size) <- getBounds arr
let hashx = hash x
i = hashx `mod` size
Stefan
More information about the Glasgow-haskell-users
mailing list