diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-02-25 23:56:46 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-02-25 23:56:46 +0100 |
commit | 6a5055b7747424b8a05ad70354e68e42d680109a (patch) | |
tree | 7ff966168ad35cc799397df2a00881519f060402 | |
parent | ef95be4403d09ebecbaef80e668d52fc5ecd9b46 (diff) |
UnMonoid: Properly recurse
-rw-r--r-- | src/AST/UnMonoid.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AST/UnMonoid.hs b/src/AST/UnMonoid.hs index c87bed1..4b6b523 100644 --- a/src/AST/UnMonoid.hs +++ b/src/AST/UnMonoid.hs @@ -12,8 +12,8 @@ import Data unMonoid :: Ex env t -> Ex env t unMonoid = \case EZero _ t -> zero t - EPlus _ t a b -> plus t a b - EOneHot _ t i a b -> onehot t i a b + EPlus _ t a b -> plus t (unMonoid a) (unMonoid b) + EOneHot _ t i a b -> onehot t i (unMonoid a) (unMonoid b) EVar _ t i -> EVar ext t i ELet _ rhs body -> ELet ext (unMonoid rhs) (unMonoid body) |