diff options
Diffstat (limited to 'lib/std/logic.nim')
-rw-r--r-- | lib/std/logic.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/std/logic.nim b/lib/std/logic.nim new file mode 100644 index 000000000..3cc871a6e --- /dev/null +++ b/lib/std/logic.nim @@ -0,0 +1,10 @@ +## This module provides further logic operators like 'forall' and 'exists' +## They are only supported in ``.ensures`` etc pragmas. + +proc `->`*(a, b: bool): bool {.magic: "Implies".} +proc `<->`*(a, b: bool): bool {.magic: "Iff".} + +proc forall*(args: varargs[untyped]): bool {.magic: "Forall".} +proc exists*(args: varargs[untyped]): bool {.magic: "Exists".} + +proc old*[T](x: T): T {.magic: "Old".} |