diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-06-18 10:10:30 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-06-18 10:10:30 +0200 |
commit | 3db7d00b3248d746aa99f57b117d5722cbe90df0 (patch) | |
tree | d01a0f9c1e95de07d6dc3fcb8f6895bf94a77165 /src/AST | |
parent | 62639875102decae2bb96b3847ae48db5d1f8fd0 (diff) |
Give DeepZero to With
Diffstat (limited to 'src/AST')
-rw-r--r-- | src/AST/Accum.hs | 8 |
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 |