diff options
Diffstat (limited to 'test/complete.adb')
| -rw-r--r-- | test/complete.adb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/complete.adb b/test/complete.adb index 0890e8b..75aadf5 100644 --- a/test/complete.adb +++ b/test/complete.adb @@ -35,6 +35,14 @@ procedure Complete is return Disjunct (One, Two); end Fives; + function Simple + (This : in Goal; + Item : in Term'Class) + return Goal is + begin + return This.Unify (Item, 1); + end Simple; + begin TIO.Put_Line ("This program will loop forever unless the implementation is using"); @@ -65,6 +73,19 @@ begin TIO.New_Line; + declare + Relation : Goal := Empty_Goal; + Value : constant Term := Relation.Fresh; + begin + Relation.Unify (Value, 9); + Relation := Fives (Relation, Value); + Relation.Disjunct (Empty_Goal.Conjunct (Simple'Access, Value)); + TIO.Put_Line ("Value is " & Printer.Image (Value.Resolve (Relation.Run)) & + " after escaping Conjunct trap."); + end; + + TIO.New_Line; + TIO.Put_Line ("Test complete."); end Complete; |
