2023-07-11 06:29:00 +03:00
|
|
|
|
|
|
|
```ucm:hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge
|
2023-07-11 06:29:00 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
|
|
|
debug a = match Debug.toText a with
|
|
|
|
None -> ""
|
|
|
|
Some (Left a) -> a
|
|
|
|
Some (Right a) -> a
|
|
|
|
|
|
|
|
test> t1 = if bool then [Ok "Yay"]
|
|
|
|
else [Fail (debug [1,2,3])]
|
|
|
|
bool = true
|
|
|
|
|
|
|
|
allowDebug = debug [1,2,3]
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
|
|
|
scratch/main> test
|
2023-07-11 06:29:00 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
|
|
|
bool = false
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm:error
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> update.old
|
|
|
|
scratch/main> test
|
2023-07-11 06:29:00 +03:00
|
|
|
```
|