2024-01-30 22:55:36 +03:00
|
|
|
```ucm:hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge
|
2024-01-30 22:55:36 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison:hide
|
|
|
|
x = 30
|
|
|
|
|
|
|
|
y : Nat
|
|
|
|
y =
|
|
|
|
z = x + 2
|
|
|
|
z + 10
|
|
|
|
|
|
|
|
structural type Optional a = Some a | None
|
|
|
|
|
|
|
|
ability Ask a where
|
|
|
|
ask : a
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
|
|
|
scratch/main> debug.term.abt Nat.+
|
|
|
|
scratch/main> debug.term.abt y
|
|
|
|
scratch/main> debug.term.abt Some
|
|
|
|
scratch/main> debug.term.abt ask
|
|
|
|
scratch/main> debug.type.abt Nat
|
|
|
|
scratch/main> debug.type.abt Optional
|
|
|
|
scratch/main> debug.type.abt Ask
|
2024-01-30 22:55:36 +03:00
|
|
|
```
|