From ca53b9929cfb4f5cef11c6f296e4f62bab518226 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 7 Feb 2018 22:48:20 -0400 Subject: - Fixed how type-application is text-encoded in old compiler. --- luxc/src/lux/type.clj | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'luxc/src') diff --git a/luxc/src/lux/type.clj b/luxc/src/lux/type.clj index 84c00b978..76d580cb0 100644 --- a/luxc/src/lux/type.clj +++ b/luxc/src/lux/type.clj @@ -371,14 +371,16 @@ _ (&/T [type &/$Nil]))) -(defn ^:private unravel-app [fun-type] - (|case fun-type - (&/$Apply ?arg ?func) - (|let [[?fun-type ?args] (unravel-app ?func)] - (&/T [?fun-type (&/$Cons ?arg ?args)])) - - _ - (&/T [fun-type &/$Nil]))) +(defn ^:private unravel-app + ([fun-type tail] + (|case fun-type + (&/$Apply ?arg ?func) + (unravel-app ?func (&/$Cons ?arg tail)) + + _ + (&/T [fun-type tail]))) + ([fun-type] + (unravel-app fun-type &/$Nil))) (do-template [ ] (do (defn [type] -- cgit v1.2.3