summaryrefslogtreecommitdiff
path: root/src/AST
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-06-18 10:10:30 +0200
committerTom Smeding <tom@tomsmeding.com>2025-06-18 10:10:30 +0200
commit3db7d00b3248d746aa99f57b117d5722cbe90df0 (patch)
treed01a0f9c1e95de07d6dc3fcb8f6895bf94a77165 /src/AST
parent62639875102decae2bb96b3847ae48db5d1f8fd0 (diff)
Give DeepZero to With
Diffstat (limited to 'src/AST')
-rw-r--r--src/AST/Accum.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/AST/Accum.hs b/src/AST/Accum.hs
index 619c2b1..988a450 100644
--- a/src/AST/Accum.hs
+++ b/src/AST/Accum.hs
@@ -102,6 +102,14 @@ type family DeepZeroInfo t where
DeepZeroInfo (TArr n a) = TArr n (DeepZeroInfo a)
DeepZeroInfo (TScal t) = TNil
+tDeepZeroInfo :: SMTy t -> STy (DeepZeroInfo t)
+tDeepZeroInfo SMTNil = STNil
+tDeepZeroInfo (SMTPair a b) = STPair (tDeepZeroInfo a) (tDeepZeroInfo b)
+tDeepZeroInfo (SMTLEither a b) = STLEither (tDeepZeroInfo a) (tDeepZeroInfo b)
+tDeepZeroInfo (SMTMaybe a) = STMaybe (tDeepZeroInfo a)
+tDeepZeroInfo (SMTArr n t) = STArr n (tDeepZeroInfo t)
+tDeepZeroInfo (SMTScal _) = STNil
+
-- -- | Additional info needed for accumulation. This is empty unless there is
-- -- sparsity in the monoid.
-- type family AccumInfo t where