mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
This is for consistency with the `cmark` style. Now the blocks we still pretty-print ourselves will match the bulk of them that `cmark` produces.
35 lines
710 B
Markdown
35 lines
710 B
Markdown
``` unison
|
|
structural type One a = One a
|
|
unique type Woot a b c = Woot a b c
|
|
unique type Z = Z
|
|
|
|
snoc k aN = match k with
|
|
One a0 -> Woot (One a0) (One aN) 99
|
|
|
|
> snoc (One 1) 2
|
|
```
|
|
|
|
``` ucm
|
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
I found and typechecked these definitions in scratch.u. If you
|
|
do an `add` or `update`, here's how your codebase would
|
|
change:
|
|
|
|
⍟ These new definitions are ok to `add`:
|
|
|
|
structural type One a
|
|
type Woot a b c
|
|
type Z
|
|
snoc : One a -> aN -> Woot (One a) (One aN) ##Nat
|
|
|
|
Now evaluating any watch expressions (lines starting with
|
|
`>`)... Ctrl+C cancels.
|
|
|
|
8 | > snoc (One 1) 2
|
|
⧩
|
|
Woot (One 1) (One 2) 99
|
|
|
|
```
|