Sebastian,
Below is another technique, in addition to Bernd's, to simulate
the run (I call it need) time choice semantics. Probably, it is
less efficient. Runs under pakcs.
Cheers,
Sergio
getAllValues x = findall (=:= x)
chooseValue (u:v) = u ? chooseValue v
data Color = Red | Green
Color = Red ? Green
data Tree a = Leaf | Node a (Tree a) (Tree a)
Tree a = Leaf ? Node (chooseValue b) (Tree a) (Tree a)
where b = getAllValues a
test = Node Red (Node Green Leaf Leaf) Leaf =:= Tree Color
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mo Dez 11 2006 - 10:15:52 CET