We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03ed2af commit 7686753Copy full SHA for 7686753
1 file changed
Binary/Basic.lean
@@ -42,6 +42,12 @@ def DecodeResult.toExcept : DecodeResult α → Except DecodeError α
42
| .error err _ => .error err
43
| .pending _ => .error (.userError "pending input")
44
45
+@[always_inline]
46
+def DecodeResult.toExceptString : DecodeResult α → Except String α
47
+ | .success x _ => .ok x
48
+ | .error err _ => .error s!"{err}"
49
+ | .pending _ => .error "pending input"
50
+
51
@[expose]
52
def Get (α : Type) : Type := Decoder → (DecodeResult α)
53
0 commit comments