From 3db7d00b3248d746aa99f57b117d5722cbe90df0 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 18 Jun 2025 10:10:30 +0200 Subject: Give DeepZero to With --- src/AST/Accum.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/AST') 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 -- cgit v1.2.3-70-g09d2