Re: prelude extension proposal

From: Bernd Brassel <>
Date: Fri, 14 Oct 2005 11:54:04 +0200

Wolfgang Lux schrieb:
>> data SearchTree a
>> = Fail
>> | Value a
>> | Or [SearchTree a]
>> | Suspend
> IIUC, the main difference between the paper and your proposal is the
> introduction of the Suspend constructor in SearchTree. Looking at the
> definitions of allValuesD and allValuesB, Suspend is always handled like
> a failure.

That is true. But one of the sanity conditions of getSearchTree we
discussed in the aforementioned paper, is that encapsulation should also
not be rigid. Having strong encapsulation like defined in that paper
essentially means that you should not be able to influence the layout of
the search tree by the remaining computation. In this point of view,
encapsulated suspensions can never awake and thus resemble a failure. We
could maybe have some kind of injection in order to revive a suspended
computation, but this is not yet covered even by an operational
semantics and thus postponed.

curry mailing list
Received on Fr Okt 14 2005 - 12:23:00 CEST

This archive was generated by hypermail 2.3.0 : Sa Apr 13 2024 - 07:15:07 CEST