diff options
-rw-r--r-- | chickadee/graphics/seagull.scm | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/chickadee/graphics/seagull.scm b/chickadee/graphics/seagull.scm index 4827577..41aacc1 100644 --- a/chickadee/graphics/seagull.scm +++ b/chickadee/graphics/seagull.scm @@ -685,16 +685,6 @@ ;; vec4, mat4 -> mat4 ;; mat4, vec4 -> mat4 -;; (+ x (+ 1 2)) -;; e a d b c - -;; ((= a (maybe (int ((= b int) (= c int))) -;; (float ((= b float) (= c float))))) -;; (= b (maybe (int ((= a int) (= c int))) -;; (float ((= a float) (= c float))))) -;; (= c (maybe (int ((= a int) (= b int))) -;; (float ((= a float) (= b float)))))) - (list (intersection-type (function-type (list int-type int-type) (list int-type)) @@ -1109,14 +1099,16 @@ (define sub0 (fold (lambda (exp subs) (compose-substitutions (infer exp) subs)) - (empty-env) + (infer body) exps)) + (define sub1 + (unify (apply-substitutions-to-types types sub0) + (apply-substitutions-to-types (texp-types body) sub0))) (compose-substitutions (infer body) sub0)) (define (infer exp) (match exp (('t types (or (? immediate?) ('var _ _))) - (pk 'infer:basic exp) '()) (('t types ('if predicate consequent alternate)) (infer:if types predicate consequent alternate)) |