diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux.lux | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index e2782012b..bff74ff0c 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -5463,13 +5463,11 @@ (macro: #export (@post tokens) (case tokens - (^ (list test pattern expr)) + (^ (list test expr)) (do Monad<Lux> - [g!output (gensym "") - exp-type get-expected-type] - (wrap (list (` (let [(~ g!output) (: (~ (type->ast exp-type)) (~ expr)) - (~ pattern) (~ g!output)] - (if (~ test) + [g!output (gensym "")] + (wrap (list (` (let [(~ g!output) (~ expr)] + (if ((~ test) (~ g!output)) (~ g!output) (error! (with-cursor (~ (text$ (Text/append "Post-condition failed: " (ast-to-text test)))))))))))) |