mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-19 22:37:12 +03:00
More test cases.
This commit is contained in:
parent
d649ad4b3d
commit
be901d5dab
38
unison-src/transcripts/fix2712.md
Normal file
38
unison-src/transcripts/fix2712.md
Normal file
@ -0,0 +1,38 @@
|
||||
```ucm:hide
|
||||
.> builtins.merge
|
||||
```
|
||||
|
||||
```unison
|
||||
unique type Map k v = Tip | Bin Nat k v (Map k v) (Map k v)
|
||||
|
||||
mapWithKey : (k ->{e} a ->{e} b) -> Map k a ->{e} Map k b
|
||||
mapWithKey f m = Tip
|
||||
```
|
||||
|
||||
```ucm
|
||||
.> add
|
||||
```
|
||||
|
||||
```unison
|
||||
|
||||
naiomi =
|
||||
susan: Nat ->{} Nat -> ()
|
||||
susan a b = ()
|
||||
|
||||
pam: Map Nat Nat
|
||||
pam = Tip
|
||||
|
||||
mapWithKey susan pam
|
||||
|
||||
```
|
||||
|
||||
```ucm
|
||||
.> add
|
||||
.> edit naiomi
|
||||
.> undo
|
||||
```
|
||||
|
||||
```ucm
|
||||
.> load scratch.u
|
||||
.> add
|
||||
```
|
103
unison-src/transcripts/fix2712.output.md
Normal file
103
unison-src/transcripts/fix2712.output.md
Normal file
@ -0,0 +1,103 @@
|
||||
```unison
|
||||
unique type Map k v = Tip | Bin Nat k v (Map k v) (Map k v)
|
||||
|
||||
mapWithKey : (k ->{e} a ->{e} b) -> Map k a ->{e} Map k b
|
||||
mapWithKey f m = Tip
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
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`:
|
||||
|
||||
unique type Map k v
|
||||
mapWithKey : (k ->{e} a ->{e} b) -> Map k a ->{e} Map k b
|
||||
|
||||
```
|
||||
```ucm
|
||||
.> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
unique type Map k v
|
||||
mapWithKey : (k ->{e} a ->{e} b) -> Map k a ->{e} Map k b
|
||||
|
||||
```
|
||||
```unison
|
||||
naiomi =
|
||||
susan: Nat ->{} Nat -> ()
|
||||
susan a b = ()
|
||||
|
||||
pam: Map Nat Nat
|
||||
pam = Tip
|
||||
|
||||
mapWithKey susan pam
|
||||
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
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`:
|
||||
|
||||
naiomi : Map Nat ()
|
||||
|
||||
```
|
||||
```ucm
|
||||
.> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
naiomi : Map Nat ()
|
||||
|
||||
.> edit naiomi
|
||||
|
||||
☝️
|
||||
|
||||
I added these definitions to the top of
|
||||
/home/dolio/Programming/unison/bugfixing/scratch.u
|
||||
|
||||
naiomi : Map Nat ()
|
||||
naiomi =
|
||||
susan : Nat -> Nat -> ()
|
||||
susan a b = ()
|
||||
pam : Map Nat Nat
|
||||
pam = Tip
|
||||
mapWithKey susan pam
|
||||
|
||||
You can edit them there, then do `update` to replace the
|
||||
definitions currently in this namespace.
|
||||
|
||||
.> undo
|
||||
|
||||
Here are the changes I undid
|
||||
|
||||
Added definitions:
|
||||
|
||||
1. naiomi : Map Nat ()
|
||||
|
||||
```
|
||||
```ucm
|
||||
.> load 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`:
|
||||
|
||||
naiomi : Map Nat ()
|
||||
|
||||
.> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
naiomi : Map Nat ()
|
||||
|
||||
```
|
Loading…
Reference in New Issue
Block a user