def wr_done

gralha-byte-words@0.1.0.0 · words.bend:166

import gralha-byte-words@0.1.0.0/words.bend as Words
import Base

166def wr_done(what: String, r: Array<U32> & Result<&1, &1, U32 & String, Unit>) -> IO(Array<U32>):
167  (a, w) = r
168  match w:
169    case Done{u}:
170      IO.pure(Array<U32>, a)
171    case Fail{e}:
172      do IO<Array<U32>>:
173        Unit <- fail(what, e)
174        return a

Uses (11)

Used by (3)