Left root inconsistently attributed
Richard A. O'Keefe
ok@atlas.otago.ac.nz
Tue, 2 Mar 1999 13:40:45 +1300 (NZDT)
When a '*' is used in (the right hand side of) a type synonym,
the name of the type synonym should be prefixed with a '*'.
Thank you. This was not clear to me. Now that it has been explained,
I know what I have to do, but it still isn't clear. My mental model
had been that
:: <Id> :== <Type>
was basically a macro definition so that I could use <Id> exactly as
if it were <Type>. Now I find that this is not true; that part of
the <Type> has to migrate over to the <Id>. Why?
Is there any reason why Clean compilers could not or should not
accept
:: T0 :== *T1
as if it were
:: *T0 :== *T1
You probably do not want to make the Int's unique, because the
primitive functions on Int (+,-,...) do not return *Int because
of overloading.
One other thing. I have a function
copy_random :: RNG_State -> *(RNG_State, RNG_State)
copy_random (a,b,c) = ((a+0,b+0,c+0), (a*1,b*1,c*1))
because I wasn't sure that
copy_random (a,b,c) = ((a,b,c), (a,b,c))
would give me uniqueness. Was I unnecessarily paranoid? Does a Clean
compiler share structures between function inputs and results ONLY if
I use as-patterns, or does it do common subexpression elimination for me?