Question about uniqueness typing in Clean

Arthur Gold agold@bga.com
Fri, 19 Apr 1996 03:13:36 -0500


>Doesn't this apply to the if-construct too. I've noticed that the
>uniqueness information conflicted if I used an if, e.g. in
>
>change file  = if whatever_test file
>                  fwritec 'c' file;
>
>This is a uniqueness preserving function, isn't it? The OS/2 compiler
>reports conflicting uniqueness information.

Well, no. The mere fact that there are _two_ references to 'file' (within
the same construct) messes up the uniqueness.

>
>Using a second function with pattern matching helped, e.g.
>
>change file = change2 whatever_test file;
>
>change2 True file = file;
>change2 False file = fwritec 'c' file;
>
This works because only _one_ of the rule alternatives would be looked at
in any one call of the function.
>
BTW, list lurkers, I've begun to use 1.1, and have run into a couple of
anomalies in converting 1.0 code (already reported to the Clean
Team)...does anyone have any experiences to share?

Thanks.
--Artie


Onward,
    Artie Gold

agold@bga.com ArtieGold@aol.com  agold@cs.utexas.edu

"Gotta make it somehow, on the dreams you still believe."