slight simplify
This commit is contained in:
parent
c40e6a60ff
commit
802dfae493
1 changed files with 4 additions and 4 deletions
|
@ -75,13 +75,13 @@ C eqs :<? d = C $ eqs :< d
|
||||||
|
|
||||||
private %inline
|
private %inline
|
||||||
ifVar : Var d -> Dim d -> Maybe (Dim d) -> Maybe (Dim d)
|
ifVar : Var d -> Dim d -> Maybe (Dim d) -> Maybe (Dim d)
|
||||||
ifVar i p = map $ \q => if isYes $ q `decEq` B i then p else q
|
ifVar i p = map $ \q => if q == B i then p else q
|
||||||
|
|
||||||
|
-- (using decEq instead of (==) because of the proofs below)
|
||||||
private %inline
|
private %inline
|
||||||
checkConst : (e, f : DimConst) -> (eqs : Lazy (DimEq' d)) -> DimEq d
|
checkConst : (e, f : DimConst) -> (eqs : Lazy (DimEq' d)) -> DimEq d
|
||||||
checkConst Zero Zero eqs = C eqs
|
checkConst e f eqs = if isYes $ e `decEq` f then C eqs else ZeroIsOne
|
||||||
checkConst One One eqs = C eqs
|
|
||||||
checkConst _ _ _ = ZeroIsOne
|
|
||||||
|
|
||||||
export
|
export
|
||||||
setConst : Var d -> DimConst -> DimEq' d -> DimEq d
|
setConst : Var d -> DimConst -> DimEq' d -> DimEq d
|
||||||
|
|
Loading…
Reference in a new issue