File tree Expand file tree Collapse file tree 3 files changed +6
-18
lines changed
Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ import Models.Edge
3535import Models.History
3636import Models.MaterializedPath
3737import Models.NID
38- import Models.Node
3938import Models.NormalizedPath (leastConstrainedNormalizedPath , normalizePath )
4039import Models.Path.ParsedPath
4140import Models.Path.Simple (Path )
@@ -183,9 +182,6 @@ interpretCommand = \case
183182 (\ a s -> insertEdge (Edge nid (t <> pack s) a))
184183 (toList ambiguities)
185184 suffixes
186- ListOut -> do
187- n <- subsumeUserError currentNode
188- printTransitions n. outgoing
189185 ShowImage -> do
190186 n <- subsumeUserError (currentNode @ Text )
191187 forM_ n. rawData $ subsumeUserError @ Missing . displayImage . fromStrict
@@ -248,10 +244,8 @@ interpretCommand = \case
248244 put @ History history'
249245 Seq ps -> do
250246 toList ps & traverse_ interpretCommand
251- V2Path p -> do
247+ Preview p -> do
252248 nid <- currentLocation
253- -- say $ "current location: " ++ tshow nid
254- -- say $ "parsed path: " ++ tshow p
255249 scoped_ do
256250 p' <- handleDirectivesWith interpretDirective p
257251 mp <- materializePath nid p'
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ data Command
2424 Make Path
2525 | -- | mg
2626 Merge Path
27- | -- | ls
28- ListOut
2927 | -- | t
3028 Tag Path Path
3129 | Text Text Text
@@ -68,6 +66,6 @@ data Command
6866 Back Int
6967 | -- | Execute a list of commands sequentially
7068 Seq (TwoElemList Command )
71- | -- | debug-v2-path, v2
72- V2Path ParsedPath
69+ | -- | preview, ls
70+ Preview ParsedPath
7371 deriving (Eq , Show , Ord , Generic )
Original file line number Diff line number Diff line change @@ -31,9 +31,6 @@ pMake = (command "mk" $> Make) <*> path
3131pMerge :: Parser Command
3232pMerge = (command " mg" $> Merge ) <*> path
3333
34- pList :: Parser Command
35- pList = command " ls" $> ListOut
36-
3734pTag :: Parser Command
3835pTag = (commandFrom [" tag" , " t" ] $> Tag ) <*> path <*> path
3936
@@ -91,17 +88,16 @@ pEdit = command "vi" $> Edit
9188pBack :: Parser Command
9289pBack = (command " back" $> Back ) <*> number
9390
94- pV2Path :: Parser Command
95- pV2Path = (commandFrom [" debug-v2-path " , " v2 " ] $> V2Path ) <*> pPath
91+ pPreview :: Parser Command
92+ pPreview = (commandFrom [" preview " , " ls " ] $> Preview ) <*> option Wild pPath
9693
9794pCommandTerm :: Parser Command
9895pCommandTerm =
9996 try pChangeNode
100- <|> try pV2Path
97+ <|> try pPreview
10198 <|> try pDualize
10299 <|> try pMake
103100 <|> try pMerge
104- <|> try pList
105101 <|> try pTag
106102 <|> try pText
107103 <|> try pDescribe
You can’t perform that action at this time.
0 commit comments