mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-21 07:17:25 +03:00
16201809f5
We were attempting to determine a type being a records, by looking number of accessors and seeing if they matched a freshly generated number of them. This was not working as we too eagerly removed type prefixed names thus causing a mismatch.
887 B
887 B
Ensure that Records keep their syntax after being added to the codebase
Record with 1 field
unique type Record1 = { a : Text }
.> view Record1
unique type Record1 = { a : Text }
Record with 2 fields
unique type Record2 = { a : Text, b : Int }
.> view Record2
unique type Record2 = { a : Text, b : Int }
Record with 3 fields
unique type Record3 = { a : Text, b : Int, c : Nat }
.> view Record3
unique type Record3 = { a : Text, b : Int, c : Nat }
Record with many fields
unique type Record4 =
{ a : Text
, b : Int
, c : Nat
, d : Bytes
, e : Text
, f : Nat
, g : [Nat]
}
.> view Record4
unique type Record4
= { a : Text,
b : Int,
c : Nat,
d : Bytes,
e : Text,
f : Nat,
g : [Nat] }