From a4c5927ec4f68fac0242bd6070372f9c439ae197 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Sat, 19 Mar 2022 17:30:41 -0400 Subject: [PATCH] Notes to selves --- src/ludus/interpreter.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ludus/interpreter.clj b/src/ludus/interpreter.clj index 8eddf7c..73b7614 100644 --- a/src/ludus/interpreter.clj +++ b/src/ludus/interpreter.clj @@ -47,6 +47,7 @@ (merge ctx new-ctx)) ;; TODO: get "if let" pattern working +;; TODO: get typed exceptions to distinguish panics (defn- interpret-let [ast ctx] (let [pattern (:pattern ast) expr (:expr ast) @@ -101,6 +102,8 @@ ;; note that the runtime representations of collections is ;; unboxed in the tree-walk interpreter + ;; tuples & lists are both vectors, the first element + ;; distinguishes them ::ast/tuple (let [members (:members ast)] (into [::colls/tuple] (map #(interpret % ctx)) members))