curry.backends.py.currylib.prelude.constr module
- curry.backends.py.currylib.prelude.constr.concurrent_and(rts, _0)[source]
Implements Prelude.&.
- Evaluate an argument and inspect its head symbol:
If true, rewrite to the other argument;
If false, rewrite to false;
- If it suspends:
if the other arg has not been inspected, work on the other arg;
if any step occurred, work on the other arg;
otherwise, suspend;
See
digits.curry.
- curry.backends.py.currylib.prelude.constr.nonstrict_eq(rts, _0)[source]
Implements =:<=.
This follows “Declarative Programming with Function Patterns,” Antoy and Hanus, LOPSTR 2005, pg. 16. The left side is the pattern, the right side the actual argument. A free variable on the left takes the right side as a non-strict binding. A free variable on the right is bound to the constructor or the value on the left, as =:= binds it: a builtin type passes its one value to hnf, so a free Char, Int or Float gets the value instead of a suspension.