SstCursor.verify.loop: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend as SstCursor Lines 308-332 of mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend&start_line=308&end_line=332 import Base import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader def verify.loop( fuel: Nat, path: String, state: VerifyState ) -> IO(Result<&1, &1, U32 & String, Cursor>): match fuel: case 0n: verify.exhausted(state) case 1n+rest: match state: case VerifyNeed{reader, bounds}: do IO>: result : Result<&1, &1, U32 & String, ByteBlockReader.Step> <- ByteBlockReader.next(reader) verify.loop(rest, path, VerifyRead{result, bounds}) case VerifyRead{result, bounds}: match result: case Fail{error}: IO.pure(Result<&1, &1, U32 & String, Cursor>, Fail{error}) case Done{ByteBlockReader.End{}}: do IO>: reopened : Result<&1, &1, U32 & String, ByteBlockReader.Reader> <- ByteBlockReader.open(path) verify.complete(bounds, reopened) case Done{ByteBlockReader.Block{reader, _}}: verify.loop(rest, path, VerifyNeed{reader, bounds}) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&name=Reader https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&name=Step https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&name=next https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&name=open https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend&name=VerifyState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend&name=verify.complete https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend&name=verify.exhausted