File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,12 @@ choice node further down the tree.
8484partial def addChoice (env : Environment) (vs : List Value) (v : Value) : List Value :=
8585 match vs, v with
8686 | [], v => [v]
87- | v1@(ctor i1 _ ) :: cs, ctor i2 _ =>
87+ | v1@(ctor i1 vs1 ) :: cs, ctor i2 vs2 =>
8888 if i1 == i2 then
89- ( merge env v1 v ) :: cs
89+ ctor i1 (Array.zipWith ( merge env) vs1 vs2 ) :: cs
9090 else
9191 v1 :: addChoice env cs v
92- | _, _ => panic! "invalid addChoice"
92+ | _, _ => panic! s! "invalid addChoice { repr v } into { repr vs } "
9393
9494/--
9595Merge two values into one. `bot` is the neutral element, `top` the annihilator.
Original file line number Diff line number Diff line change 1+ /-!
2+ Regression tests for #11393 and #11389
3+ -/
4+
5+ #guard_msgs in
6+ open System in
7+ def loadModuleContent : IO Unit := do
8+ let lakefile : FilePath := " lakefile.lean"
9+
10+ if !(← lakefile.pathExists) then
11+ IO.println " nope"
12+
13+ discard <| IO.Process.output {
14+ cmd := " ls" , args := #[]
15+ }
16+
17+ #guard_msgs in
18+ def test (s : String) : IO Bool := do
19+ if s.startsWith " x" then return true
20+ let b ← IO.Process.output {cmd := " true" , args := #[]}
21+ return b.exitCode == 0
You can’t perform that action at this time.
0 commit comments