From 2d446b3a85dd72886a44397bee37ea45381eab03 Mon Sep 17 00:00:00 2001 From: Brett Saiki Date: Mon, 26 Aug 2024 13:46:34 -0700 Subject: [PATCH] add fpcore check --- src/syntax/syntax.rkt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/syntax/syntax.rkt b/src/syntax/syntax.rkt index aa347bf95..1ee7e434d 100644 --- a/src/syntax/syntax.rkt +++ b/src/syntax/syntax.rkt @@ -342,9 +342,11 @@ (cond [fpcore ; provided -> TODO: check free variables, props (match fpcore - [`(! ,props ... (,operator ,args ...)) (void)] + [`(! ,props ... (,operator ,args ...)) + (unless (even? (length props)) + (error 'register-operator-impl! "umatched property for ~a: ~a" name fpcore))] [`(,operator ,args ...) (void)] - [_ (raise-herbie-syntax-error "Invalid fpcore for ~a: ~a" name fpcore)]) + [_ (error 'register-operator-impl! "Invalid fpcore for ~a: ~a" name fpcore)]) fpcore] [else ; not provided => need to generate it (define repr (context-repr ctx))