remove ope stuff too

This commit is contained in:
rhiannon morris 2023-01-08 15:43:54 +01:00
parent 9dbd0b066c
commit 0c1b3a78c3
5 changed files with 47 additions and 47 deletions

View File

@ -7,7 +7,7 @@ import public Quox.Syntax.Universe
import public Quox.Syntax.Qty import public Quox.Syntax.Qty
import public Quox.Syntax.Dim import public Quox.Syntax.Dim
import public Quox.Name import public Quox.Name
import public Quox.OPE -- import public Quox.OPE
import Quox.Pretty import Quox.Pretty

View File

@ -116,46 +116,46 @@ pushSubstsE' : Elim d n -> Elim d n
pushSubstsE' e = (pushSubstsE e).fst pushSubstsE' e = (pushSubstsE e).fst
mutual -- mutual
-- tightening a term/elim also causes substitutions to be pushed through. -- -- tightening a term/elim also causes substitutions to be pushed through.
-- this is because otherwise a variable in an unused part of the subst -- -- this is because otherwise a variable in an unused part of the subst
-- would cause it to incorrectly fail -- -- would cause it to incorrectly fail
export covering -- export covering
Tighten (Term d) where -- Tighten (Term d) where
tighten p (TYPE l) = -- tighten p (TYPE l) =
pure $ TYPE l -- pure $ TYPE l
tighten p (Pi qty x arg res) = -- tighten p (Pi qty x arg res) =
Pi qty x <$> tighten p arg -- Pi qty x <$> tighten p arg
<*> tighten p res -- <*> tighten p res
tighten p (Lam x body) = -- tighten p (Lam x body) =
Lam x <$> tighten p body -- Lam x <$> tighten p body
tighten p (E e) = -- tighten p (E e) =
E <$> tighten p e -- E <$> tighten p e
tighten p (CloT tm th) = -- tighten p (CloT tm th) =
tighten p $ pushSubstsTWith' id th tm -- tighten p $ pushSubstsTWith' id th tm
tighten p (DCloT tm th) = -- tighten p (DCloT tm th) =
tighten p $ pushSubstsTWith' th id tm -- tighten p $ pushSubstsTWith' th id tm
export covering -- export covering
Tighten (Elim d) where -- Tighten (Elim d) where
tighten p (F x) = -- tighten p (F x) =
pure $ F x -- pure $ F x
tighten p (B i) = -- tighten p (B i) =
B <$> tighten p i -- B <$> tighten p i
tighten p (fun :@ arg) = -- tighten p (fun :@ arg) =
[|tighten p fun :@ tighten p arg|] -- [|tighten p fun :@ tighten p arg|]
tighten p (tm :# ty) = -- tighten p (tm :# ty) =
[|tighten p tm :# tighten p ty|] -- [|tighten p tm :# tighten p ty|]
tighten p (CloE el th) = -- tighten p (CloE el th) =
tighten p $ pushSubstsEWith' id th el -- tighten p $ pushSubstsEWith' id th el
tighten p (DCloE el th) = -- tighten p (DCloE el th) =
tighten p $ pushSubstsEWith' th id el -- tighten p $ pushSubstsEWith' th id el
export covering -- export covering
Tighten (ScopeTerm d) where -- Tighten (ScopeTerm d) where
tighten p (TUsed body) = TUsed <$> tighten (Keep p) body -- tighten p (TUsed body) = TUsed <$> tighten (Keep p) body
tighten p (TUnused body) = TUnused <$> tighten p body -- tighten p (TUnused body) = TUnused <$> tighten p body
public export %inline public export %inline

View File

@ -2,7 +2,7 @@ module Quox.Syntax.Var
import Quox.Name import Quox.Name
import Quox.Pretty import Quox.Pretty
import Quox.OPE -- import Quox.OPE
import Data.Nat import Data.Nat
import Data.List import Data.List
@ -264,10 +264,10 @@ decEqFromBool i j =
public export %inline DecEq (Var n) where decEq = varDecEq public export %inline DecEq (Var n) where decEq = varDecEq
export -- export
Tighten Var where -- Tighten Var where
tighten Id i = pure i -- tighten Id i = pure i
tighten (Drop q) VZ = empty -- tighten (Drop q) VZ = empty
tighten (Drop q) (VS i) = tighten q i -- tighten (Drop q) (VS i) = tighten q i
tighten (Keep q) VZ = pure VZ -- tighten (Keep q) VZ = pure VZ
tighten (Keep q) (VS i) = VS <$> tighten q i -- tighten (Keep q) (VS i) = VS <$> tighten q i

View File

@ -10,7 +10,7 @@ depends = base, contrib, elab-util, sop, snocvect
modules = modules =
Quox.NatExtra, Quox.NatExtra,
-- Quox.Unicode, -- Quox.Unicode,
Quox.OPE, -- Quox.OPE,
Quox.Pretty, Quox.Pretty,
Quox.Syntax, Quox.Syntax,
Quox.Syntax.Dim, Quox.Syntax.Dim,