2d unique arrays
Arthur Gold
agold@bga.com
Tue, 5 Nov 1996 14:58:49 -0600
Hey folks:
In an attempt to work with unique multi-dimensional arrays, I figured I'd
start with the 2d case...
Consider the following code:
::*Matrix a :== *{Row a}
::*Row a :== *{#a}
::Coord :== (Int,Int)
GetF::Coord (Matrix a)->(a,Matrix a) | ArrayElem a
GetF (i,j) s = (x,s``)
where
(r,s`) = uselect s i
(x,r`) = uselect_u r j
s`` = update s` i r`
It doesn't compile (if it did, I guess there would be no question
here...:-) ) and gives the msg:
Type error : conflicting uniqueness information due to argument 1 of
uselect ({})
Has anyone any insight as to what's going on???
Many thanks,
--Artie
Arthur Gold Austin, Texas
-------------------------------------------------------
| agold@bga.com agold@cs.utexas.edu ArtieGold@aol.com |
-------------------------------------------------------
"If not now, when?"