[mercury-users] maybe(T)
Ralph Becket
rafe at cs.mu.OZ.AU
Mon Oct 21 10:44:00 AEST 2002
Michael Day, Monday, 21 October 2002:
>
> > Yes. Well, close enough anyway. We use a pointer to T to represent
> > yes(T) and we use a pointer with value "1" to represent no.
>
> Actually I made a mistake, the maybe(T) type has "no" as its *first*
> functor, not the second. Does this affect its representation?
Maybe :-)
I believe that the compiler reserves a number of "impossible"
pointer values as representations for situations like these, so it might
be the case that the actual representation of `no' is slightly
different, but not materially. Fergus?
Is this an issue you have to deal with or just a point of interest?
- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list