diff options
author | Eduardo Julian | 2016-12-04 23:40:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2016-12-04 23:40:05 -0400 |
commit | c8128604f62d0d5223aad8f35f32b22ded7aa690 (patch) | |
tree | ad7fa24756902f642adeba538f177cd0cf6cd168 /stdlib/source/lux.lux | |
parent | a6b65a0595d079ffbb094b8d91f486f5365ce354 (diff) |
- Minor refactorings and expansions.
Diffstat (limited to 'stdlib/source/lux.lux')
-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)))))))))))) |