File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
module Applib.Show;
2
2
3
3
import Stdlib.Prelude open;
4
+ import Stdlib.Debug.Fail open;
4
5
import Stdlib.Math open;
5
6
6
7
--- non-builtin equivalent of ;natToString;
@@ -19,7 +20,7 @@ recursiveNatToString (n : Nat) : String :=
19
20
| d == 7 := "7"
20
21
| d == 8 := "8"
21
22
| d == 9 := "9"
22
- | else := "impossible";
23
+ | else := failwith "impossible";
23
24
in if
24
25
| n < 10 := showDigit n
25
26
| else := recursiveNatToString (div n 10) ++ showDigit (mod n 10);
Original file line number Diff line number Diff line change 258
258
(ByteArray.toList b ++ replicate (sub size numBytes) 0))
259
259
| else :=
260
260
failwith
261
- "NullifierKeyCommitment.fromByteArray expects a ByteArray of at most 32 bytes" ;
261
+ ( "NullifierKeyCommitment.fromByteArray expects a ByteArray of at most 32 bytes. Was given a ByteArray of length " ++ recursiveNatToString numBytes) ;
262
262
263
263
toAnomaAtom : NullifierKeyCommitment -> AnomaAtom :=
264
264
toByteArray >> toAnomaContents;
You can’t perform that action at this time.
0 commit comments