unison/unison-src/transcripts/find-by-type.md
2024-06-25 11:11:07 -07:00

351 B

scratch/main> alias.type ##Text builtin.Text
unique type A = A Text

foo : A
foo = A "foo!"

bar : Text -> A
bar = A

baz : A -> Text
baz = cases
  A t -> t
scratch/main> add
scratch/main> find : Text -> A
scratch/main> find : A -> Text
scratch/main> find : A
scratch/main> find : Text