mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +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.
48 lines
780 B
Markdown
48 lines
780 B
Markdown
``` ucm
|
|
test-5055/main> builtins.merge
|
|
|
|
Done.
|
|
|
|
```
|
|
``` unison
|
|
foo.add x y = x Int.+ y
|
|
|
|
foo.subtract x y = x Int.- y
|
|
```
|
|
|
|
``` 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`:
|
|
|
|
foo.add : Int -> Int -> Int
|
|
foo.subtract : Int -> Int -> Int
|
|
|
|
```
|
|
``` ucm
|
|
test-5055/main> add
|
|
|
|
⍟ I've added these definitions:
|
|
|
|
foo.add : Int -> Int -> Int
|
|
foo.subtract : Int -> Int -> Int
|
|
|
|
test-5055/main> ls foo
|
|
|
|
1. add (Int -> Int -> Int)
|
|
2. subtract (Int -> Int -> Int)
|
|
|
|
test-5055/main> view 1
|
|
|
|
foo.add : Int -> Int -> Int
|
|
foo.add x y =
|
|
use Int +
|
|
x + y
|
|
|
|
```
|