Skip to content

Commit 62111b5

Browse files
committed
Remove slice dependency
1 parent 54d5716 commit 62111b5

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

WaterproofGenre.lean

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import Verso
66
import Lean.Elab
7-
import SubVerso.Examples.Slice
87
import SubVerso.Highlighting
98
import Init.Data.ToString.Basic
109
import Verso.Code
@@ -19,7 +18,6 @@ open Verso.Doc Elab
1918
open Lean.Quote
2019
open Lean Syntax
2120

22-
open SubVerso.Examples.Slice
2321
open SubVerso.Highlighting
2422

2523
structure Block where
@@ -49,7 +47,6 @@ def processString (altStr : String) : DocElabM (Array (TSyntax `term)) := do
4947
let mut cmdState : Command.State := {env := ← getEnv, maxRecDepth := ← MonadRecDepth.getMaxRecDepth, scopes := [{header := ""}, {header := ""}]}
5048
let mut pstate := {pos := 0, recovering := false}
5149
let mut exercises := #[]
52-
let mut solutions := #[]
5350

5451
repeat
5552
let scope := cmdState.scopes.head!
@@ -58,14 +55,9 @@ def processString (altStr : String) : DocElabM (Array (TSyntax `term)) := do
5855
pstate := ps'
5956
cmdState := {cmdState with messages := messages}
6057

61-
-- dbg_trace "Unsliced is {cmd}"
62-
let slices : Slices ← DocElabM.withFileMap (FileMap.ofString altStr) (sliceSyntax cmd)
63-
let sol := slices.sliced.getD "solution" slices.residual
64-
solutions := solutions.push sol
65-
6658
cmdState ← withInfoTreeContext (mkInfoTree := pure ∘ InfoTree.node (.ofCommandInfo {elaborator := `DemoTextbook.Exts.lean, stx := cmd})) do
6759
let mut cmdState := cmdState
68-
match (← liftM <| EIO.toIO' <| (Command.elabCommand sol cctx).run cmdState) with
60+
match (← liftM <| EIO.toIO' <| (Command.elabCommand cmd cctx).run cmdState) with
6961
| Except.error e => logError e.toMessageData
7062
| Except.ok ((), s) =>
7163
cmdState := s

0 commit comments

Comments
 (0)