def hop.at
import ezx@1.11.0.0/src/ws/run.bend as Runimport Base
import ezx@1.11.0.0/src/ws/hop.bend as H
102# a command acted on as its hop says
103def hop.at(hop: H.Hop, go: Unit -> IO(Unit)) -> IO(Unit):
104 match hop:
105 case H.Here{}:
106 go(Unit{})
107 case H.Stop{why}:
108 IO.die(Unit, 1, why)
109 case H.Hop{dir}:
110 hop.run(dir)