unison/unison-src/transcripts/universal-cmp.output.md

75 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

File for test cases making sure that universal equality/comparison
cases exist for built-in types. Just making sure they don't crash.
``` unison
unique type A = A
threadEyeDeez _ =
t1 = forkComp '()
t2 = forkComp '()
2022-12-02 08:51:11 +03:00
(t1 == t2, t1 < t2)
```
``` 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`:
type A
2022-12-02 08:51:11 +03:00
threadEyeDeez : ∀ _. _ ->{IO} (Boolean, Boolean)
```
``` ucm
scratch/main> add
⍟ I've added these definitions:
type A
2022-12-02 08:51:11 +03:00
threadEyeDeez : ∀ _. _ ->{IO} (Boolean, Boolean)
scratch/main> run threadEyeDeez
2022-12-02 08:51:11 +03:00
(false, true)
2022-08-15 21:30:14 +03:00
```
``` unison
> typeLink A == typeLink A
> typeLink Text == typeLink Text
> typeLink Text == typeLink A
> termLink threadEyeDeez == termLink threadEyeDeez
```
``` ucm
Loading changes detected in scratch.u.
scratch.u changed.
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
1 | > typeLink A == typeLink A
true
2 | > typeLink Text == typeLink Text
true
3 | > typeLink Text == typeLink A
false
4 | > termLink threadEyeDeez == termLink threadEyeDeez
true
```