summaryrefslogtreecommitdiff
path: root/src/AST.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-11-07 23:58:03 +0100
committerTom Smeding <tom@tomsmeding.com>2024-11-07 23:58:03 +0100
commit58d4d0b47f5e609e21132f48b727de37d06b6777 (patch)
tree2339f67037ab37d26d5f3a50e30b005cc0bb7015 /src/AST.hs
parent92ddb2263ae495c229badcc209c76a1252bd2752 (diff)
Remove build1
Diffstat (limited to 'src/AST.hs')
-rw-r--r--src/AST.hs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/AST.hs b/src/AST.hs
index 60fc5ad..f603443 100644
--- a/src/AST.hs
+++ b/src/AST.hs
@@ -82,7 +82,6 @@ data Expr x env t where
-- array operations
EConstArr :: Show (ScalRep t) => x (TArr n (TScal t)) -> SNat n -> SScalTy t -> Array n (ScalRep t) -> Expr x env (TArr n (TScal t))
- EBuild1 :: x (TArr (S Z) t) -> Expr x env TIx -> Expr x (TIx : env) t -> Expr x env (TArr (S Z) t)
EBuild :: x (TArr n t) -> SNat n -> Expr x env (Tup (Replicate n TIx)) -> Expr x (Tup (Replicate n TIx) : env) t -> Expr x env (TArr n t)
EFold1Inner :: x (TArr n t) -> Expr x (t : t : env) t -> Expr x env t -> Expr x env (TArr (S n) t) -> Expr x env (TArr n t)
ESum1Inner :: ScalIsNumeric t ~ True => x (TArr n (TScal t)) -> Expr x env (TArr (S n) (TScal t)) -> Expr x env (TArr n (TScal t))
@@ -190,7 +189,6 @@ typeOf = \case
EMaybe _ e _ _ -> typeOf e
EConstArr _ n t _ -> STArr n (STScal t)
- EBuild1 _ _ e -> STArr (SS SZ) (typeOf e)
EBuild _ n _ e -> STArr n (typeOf e)
EFold1Inner _ _ _ e | STArr (SS n) t <- typeOf e -> STArr n t
ESum1Inner _ e | STArr (SS n) t <- typeOf e -> STArr n t
@@ -265,7 +263,6 @@ subst' f w = \case
EJust x e -> EJust x (subst' f w e)
EMaybe x a b e -> EMaybe x (subst' f w a) (subst' (sinkF f) (WCopy w) b) (subst' f w e)
EConstArr x n t a -> EConstArr x n t a
- EBuild1 x a b -> EBuild1 x (subst' f w a) (subst' (sinkF f) (WCopy w) b)
EBuild x n a b -> EBuild x n (subst' f w a) (subst' (sinkF f) (WCopy w) b)
EFold1Inner x a b c -> EFold1Inner x (subst' (sinkF (sinkF f)) (WCopy (WCopy w)) a) (subst' f w b) (subst' f w c)
ESum1Inner x e -> ESum1Inner x (subst' f w e)