aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
authorEduardo Julian2018-02-07 22:48:20 -0400
committerEduardo Julian2018-02-07 22:48:20 -0400
commitca53b9929cfb4f5cef11c6f296e4f62bab518226 (patch)
treef00c3033afec4688f806444312caf2dbf84f4295 /luxc
parent6e2815e80aad20fc96ea9df03ea2d2ebad856584 (diff)
- Fixed how type-application is text-encoded in old compiler.
Diffstat (limited to 'luxc')
-rw-r--r--luxc/src/lux/type.clj18
1 files changed, 10 insertions, 8 deletions
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 [<tag> <flatten> <at> <desc>]
(do (defn <flatten> [type]