From 4321ea874b8e8ae1fdb5fdccb282699075f6a4dc Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Tue, 26 Jun 2018 22:39:06 -0700 Subject: [PATCH] don't compose lits It forces the identities of lits to change during relabel(). I think we still have to update() the expression to track changes in the F function stack effect or we risk losing assoviations between type variables in the stack effects and type variables in the pending expression. Hrmmm. --- joy/utils/polytypes.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/joy/utils/polytypes.py b/joy/utils/polytypes.py index ff0ddb1..d6df74d 100644 --- a/joy/utils/polytypes.py +++ b/joy/utils/polytypes.py @@ -242,17 +242,13 @@ def infer(e, F=ID): fi, fo = n.enter_guard(F) res = [] for combinator in n.stack_effects: - print fo - print e new_fo, ee, _ = combinator(fo, e, {}) - print new_fo - print ee ee = update(FUNCTIONS, ee) # Fix Symbols. new_F = fi, new_fo res.extend(infer(ee, new_F)) else: - lit = s9, (n, s9) - res = flatten(infer(e, Fn) for Fn in MC([F], [lit])) + fi, fo = F + res = infer(e, (fi, (n, fo))) return res