Fix let-bindings
authorLuke Lau <luke_lau@icloud.com>
Sun, 4 Aug 2019 18:23:09 +0000 (19:23 +0100)
committerLuke Lau <luke_lau@icloud.com>
Sun, 4 Aug 2019 18:23:09 +0000 (19:23 +0100)
ast.scm

diff --git a/ast.scm b/ast.scm
index 1a4afe21f3258d829c4f305ea78fd2f804cca2ad..3b4d164b9e23fa71a1c3547c01dd6a20fbe13dac 100644 (file)
--- a/ast.scm
+++ b/ast.scm
@@ -73,7 +73,7 @@
 (define (let-bindings e)
   (define (pattern-match x body)
     (if (eqv? (ast-type x) 'var)
-       (cons x body)
+       (list (cons x body))
        (let* ([constructor (car x)]
              [destructor (lambda (i) `(destruct ,i ,constructor))])
          (flat-map (lambda (y i)