Added listliterals
[cc1516.git] / sem.icl
diff --git a/sem.icl b/sem.icl
index b000eac..9eac35b 100644 (file)
--- a/sem.icl
+++ b/sem.icl
@@ -132,6 +132,13 @@ instance unfoldL_ Expr where
         pure ([fd], fe)
     unfoldL_ (FunExpr p f es fs) = flattenT <$> mapM unfoldL_ es >>= \(fds, es_)->
         pure (fds, FunExpr p f es_ fs)
+    unfoldL_ (Op2Expr p e1 op e2) = unfoldL_ e1 >>= \(fds1, e1_)->
+        unfoldL_ e2 >>= \(fds2, e2_)->
+        pure (fds1++fds2, Op2Expr p e1_ op e2_)
+    unfoldL_ (Op1Expr p op e1) = unfoldL_ e1 >>= \(fds, e1_)->pure (fds, Op1Expr p op e1_)
+    unfoldL_ (TupleExpr p (e1, e2)) = unfoldL_ e1 >>= \(fds1, e1_)->
+        unfoldL_ e2 >>= \(fds2, e2_)->
+        pure (fds1++fds2, TupleExpr p (e1_, e2_))
     unfoldL_ e = pure ([], e)
 
 //------------