From c8128604f62d0d5223aad8f35f32b22ded7aa690 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 4 Dec 2016 23:40:05 -0400 Subject: - Minor refactorings and expansions. --- stdlib/source/lux.lux | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'stdlib/source/lux.lux') 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 - [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)))))))))))) -- cgit v1.2.3