At 2:38 pm -0500 16/3/00, Chris Okasaki wrote:
>The Haskell report says that in
>
> newtype T = C t
>
>T uses the same representation as t, and so coercions
>between the two can be implemented without execution
>time overhead. Furthermore, the report says that
>"unlike type synonyms, newtype may be used to define
>recursive types."
>
>How are these two statements reconciled for recursive
>types such as
>
> newtype Foo = F Foo
>
>or
>
> newtype A = MkA B
> newtype B = MkB A ?
>
>Admittedly, you could never construct a value of these
>types, but, even so, what do these types mean?
Co-incidentaly I have just been reading a tutorial paper on co-algebras and
co-induction:
B. Jacobs and J.J.M.M. Rutten
A Tutorial on (Co)Algebras and (Co)Induction. Bulletin of EATCS Vol. 62,
1997, pp. 222--259.
http://www.cs.kun.nl/~bart/PAPERS/JR.ps.Z
I think that this might help shed some light on what these types mean, if
not in a specifically Haskell context.
>Chris
Cheers,
Neil
School of Mathematical and Computing Sciences
Victoria University
P. O. Box 600
Wellington Tel +64 4 463 5233 xtn 7094
New Zealand mailto:[EMAIL PROTECTED]
Vladimir: That passed the time.
Estragon: It would have passed in any case.
Vladimir: Yes, but not so rapidly.