on master help sign in
Delete splitPair tactic
commit773f4170195ee4c0d7429fa5a2f4fbb38dc29500 authorJoomy Korkut <joomy@cattheory.com> dateTue 3 Oct 2017, 17:09 (9 years ago) parente685711
2 files changed+1−16
CHANGELOG.md+1−1 libs/pruviloj/Pruviloj/Core.idr−15
CHANGELOG.md+1−1
@@ -13,7 +13,7 @@
1313
1414+ Added `Text.Literate`, a module for working with literate source files.
1515+ Added `Data.IORef`, for working with mutable references in `IO`.
16−+ Added `discriminate` and `splitPair` tactics to Pruviloj.
16++ Added `discriminate` and `construct` tactics to Pruviloj.
1717
1818## Tool Updates
1919+ Private functions are no longer visible in the REPL except for modules
libs/pruviloj/Pruviloj/Core.idr−15
@@ -256,21 +256,6 @@ unproduct tm =
256256 try (unproduct (Var n1))
257257 try (unproduct (Var n2))
258258
259−||| If the goal is a tuple or a dependent pair, then split it into
260−||| two goals and return the new goal names.
261−||| It fails if the goal is neither a `Pair` nor a `DPair`.
262−splitPair : Elab (TTName, TTName)
263−splitPair =
264− let bug = [TextPart "Splitting created wrong number of holes"] in
265− case !goalType of
266− `(Pair ~A ~B) => do [x, y] <- apply `(MkPair {A=~A} {B=~B}) [False, False]
267− | _ => fail bug
268− solve ; pure (x, y)
269− `(DPair ~A ~Pr) => do [x, y] <- apply `(MkDPair {a=~A} {P=~Pr}) [False, False]
270− | _ => fail bug
271− solve ; pure (x, y)
272− _ => fail [TextPart "Goal is not a pair"]
273−
274259||| Try to apply the constructors of the goal data type one by one,
275260||| and apply the first one that works.
276261||| Similar to `constructor` in Coq.