[clean-list] finding and curing a Space Leak
Martin Wierich
martinw@cs.kun.nl
Fri, 08 Dec 2000 01:28:07 +0100
Erik Zuurbier wrote:
>
> Martin Wierich wrote
>
> >Writing
> >
> > :: *Counts :== *{!(!Real,!Int)}
> >
> >is the same as writing
> >
> > :: *Counts :== *{!(Real,Int)}
> >
>
> Is that because it is a tuple?
Yes.
>Is it because the elements are basic types?
No.
> Does the array matter?
The same would happen for other types like the following:
:: T a = T !a
:: G :== T (!Real, !Int)
> How does the compiler interpret the types? As a tuple having strict
> components, or as a tuple having lazy components? I guess it must be lazy,
> given the space leak I had.
Yes.
> In that case, should not the compiler refuse the first type above?
I think this would be better.
cheers
Martin Wierich