mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
32 lines
408 B
Markdown
32 lines
408 B
Markdown
|
|
```ucm:hide
|
|
scratch/main> builtins.merge
|
|
```
|
|
|
|
```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
|
|
scratch/main> add
|
|
scratch/main> test
|
|
```
|
|
|
|
```unison
|
|
bool = false
|
|
```
|
|
|
|
```ucm:error
|
|
scratch/main> update.old
|
|
scratch/main> test
|
|
```
|