diff options
Diffstat (limited to 'src/AST/Count.hs')
-rw-r--r-- | src/AST/Count.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/AST/Count.hs b/src/AST/Count.hs index 6a00e83..40a46f6 100644 --- a/src/AST/Count.hs +++ b/src/AST/Count.hs @@ -46,6 +46,7 @@ Occ l1 r1 <||> Occ l2 r2 = Occ (l1 <> l2) (max r1 r2) -- | This code is executed many times scaleMany :: Occ -> Occ +scaleMany (Occ l Zero) = Occ l Zero scaleMany (Occ l _) = Occ l Many occCount :: Idx env a -> Expr x env t -> Occ @@ -124,6 +125,8 @@ occCountGeneral onehot unpush alter many = go WId EOp _ _ e -> re e EWith a b -> re a <> re1 b EAccum _ a b e -> re a <> re b <> re e + EZero _ -> mempty + EPlus _ a b -> re a <> re b EError{} -> mempty where re :: Monoid (r env') => Expr x env' t'' -> r env' |