Hi,

I'm using Hugs-1.4 (version 970410) on the following machines:
        SunOS 5.5.x Ultra-1
        SunOS 4.1.x sun4c
        Linux 2.0.x i586

(NOTE: this bug shows up in Hugs-1.3Beta too)

The following function should return "3" when applied to both "True"
and "False", but instead maps "True" to "2", and "False" to "3"

bug :: Bool -> Int
bug max = runST (
  do { array <- newArray size 0
     ; writeArray array 3 3
     ; writeArray array 2 2
     ; readArray array 3
     }
   )
   where 
   size = if max 
            then (minBound,maxBound)   -- a BIG array    
            else (0,20)                -- a normal sized array


byron    :-)

Reply via email to