aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
authorEduardo Julian2020-11-02 20:54:09 -0400
committerEduardo Julian2020-11-02 20:54:09 -0400
commitfd3152f29c8d8e9cc134423da18fb828ba20ebcc (patch)
tree5550c43f1eb07c9776314c0d908a8fb91a88881b /luxc
parent03b1085924b225d34d3b11f1a442b0b5d926c417 (diff)
Added CoMonad for CoFree.
Diffstat (limited to 'luxc')
-rw-r--r--luxc/src/lux/optimizer.clj17
1 files changed, 16 insertions, 1 deletions
diff --git a/luxc/src/lux/optimizer.clj b/luxc/src/lux/optimizer.clj
index 0c1b304e0..6e235e084 100644
--- a/luxc/src/lux/optimizer.clj
+++ b/luxc/src/lux/optimizer.clj
@@ -1054,11 +1054,26 @@
(&/$Cons [(&a-case/$StoreTestAC _register) _body] (&/$Nil))
(&/T [meta ($let (pass-0 top-level-func? value) _register (pass-0 top-level-func? _body))])
+ (&/$Cons [(&a-case/$BitTestAC true) _then]
+ (&/$Cons [(&a-case/$BitTestAC false) _else]
+ (&/$Nil)))
+ (&/T [meta ($if (pass-0 top-level-func? value) (pass-0 top-level-func? _then) (pass-0 top-level-func? _else))])
+
+ (&/$Cons [(&a-case/$BitTestAC true) _then]
+ (&/$Cons [(&a-case/$NoTestAC false) _else]
+ (&/$Nil)))
+ (&/T [meta ($if (pass-0 top-level-func? value) (pass-0 top-level-func? _then) (pass-0 top-level-func? _else))])
+
(&/$Cons [(&a-case/$BitTestAC false) _else]
(&/$Cons [(&a-case/$BitTestAC true) _then]
(&/$Nil)))
(&/T [meta ($if (pass-0 top-level-func? value) (pass-0 top-level-func? _then) (pass-0 top-level-func? _else))])
-
+
+ (&/$Cons [(&a-case/$BitTestAC false) _else]
+ (&/$Cons [(&a-case/$NoTestAC) _then]
+ (&/$Nil)))
+ (&/T [meta ($if (pass-0 top-level-func? value) (pass-0 top-level-func? _then) (pass-0 top-level-func? _else))])
+
;; The pattern for a record-get is a single branch, with a
;; tuple pattern and a body corresponding to a
;; local-variable extracted from the tuple.