summaryrefslogtreecommitdiff
path: root/src/Simplify.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-11-04 23:33:34 +0100
committerTom Smeding <tom@tomsmeding.com>2024-11-04 23:33:34 +0100
commit6fce8a75e239988d2ce154f5411dd2d8c742f3f6 (patch)
tree2edd579d69ab9168c10965a86135daf807f127a4 /src/Simplify.hs
parent4e41364e73a2fbb902e41281c59991b6c789723f (diff)
WIP EOneHot
Diffstat (limited to 'src/Simplify.hs')
-rw-r--r--src/Simplify.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Simplify.hs b/src/Simplify.hs
index cfbdbb9..0ce5594 100644
--- a/src/Simplify.hs
+++ b/src/Simplify.hs
@@ -111,6 +111,7 @@ simplify' = \case
EAccum i e1 e2 e3 -> EAccum i <$> simplify' e1 <*> simplify' e2 <*> simplify' e3
EZero t -> pure $ EZero t
EPlus t a b -> EPlus t <$> simplify' a <*> simplify' b
+ EOneHot t i a b -> EOneHot t i <$> simplify' a <*> simplify' b
EError t s -> pure $ EError t s
acted :: (Any, a) -> (Any, a)
@@ -156,6 +157,7 @@ hasAdds = \case
EAccum _ _ _ _ -> True
EZero _ -> False
EPlus _ a b -> hasAdds a || hasAdds b
+ EOneHot _ _ a b -> hasAdds a || hasAdds b
EError _ _ -> False
checkAccumInScope :: SList STy env -> Bool