summaryrefslogtreecommitdiff
path: root/src/AST/Weaken.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/AST/Weaken.hs')
-rw-r--r--src/AST/Weaken.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/AST/Weaken.hs b/src/AST/Weaken.hs
index e0b5232..78276ca 100644
--- a/src/AST/Weaken.hs
+++ b/src/AST/Weaken.hs
@@ -39,7 +39,7 @@ splitIdx (SCons _ l) (IS i) = first IS (splitIdx l i)
data env :> env' where
WId :: env :> env
WSink :: forall t env. env :> (t : env)
- WCopy :: env :> env' -> (t : env) :> (t : env')
+ WCopy :: forall t env env'. env :> env' -> (t : env) :> (t : env')
WPop :: (t : env) :> env' -> env :> env'
WThen :: env1 :> env2 -> env2 :> env3 -> env1 :> env3
WClosed :: SList (Const ()) env -> '[] :> env
@@ -95,6 +95,10 @@ wSinks :: forall env bs f. SList f bs -> env :> Append bs env
wSinks SNil = WId
wSinks (SCons _ spine) = WSink .> wSinks spine
+wSinksAnd :: forall env env' bs f. SList f bs -> env :> env' -> env :> Append bs env'
+wSinksAnd SNil w = w
+wSinksAnd (SCons _ spine) w = WSink .> wSinksAnd spine w
+
wCopies :: SList f bs -> env1 :> env2 -> Append bs env1 :> Append bs env2
wCopies SNil w = w
wCopies (SCons _ spine) w = WCopy (wCopies spine w)