mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
Make List be a phantom type
This commit is contained in:
parent
657caf3222
commit
a263ddee5e
3 changed files with 2 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ Builtin :: [].{
|
|||
contains = |_str, _other| True
|
||||
}
|
||||
|
||||
List :: [ProvidedByCompiler].{
|
||||
List(_item) :: [ProvidedByCompiler].{
|
||||
len : List(_item) -> U64
|
||||
is_empty : List(_item) -> Bool
|
||||
concat : List(item), List(item) -> List(item)
|
||||
|
|
|
|||
|
|
@ -1366,7 +1366,7 @@ test "Store comprehensive CompactWriter roundtrip" {
|
|||
try std.testing.expectEqual(Content{ .structure = .{ .str = {} } }, deser_str.desc.content);
|
||||
|
||||
const deser_list = deserialized.resolveVar(list_var);
|
||||
// List is now a nominal type
|
||||
// List is a nominal type
|
||||
try std.testing.expect(deser_list.desc.content.structure == .nominal_type);
|
||||
const deser_nominal = deser_list.desc.content.structure.nominal_type;
|
||||
const deser_list_args = deserialized.sliceNominalArgs(deser_nominal);
|
||||
|
|
|
|||
|
|
@ -395,7 +395,6 @@ pub const TypeIdent = struct {
|
|||
pub const FlatType = union(enum) {
|
||||
str,
|
||||
box: Var,
|
||||
// NOTE: .list and .list_unbound have been removed - List is now a nominal type
|
||||
record: Record,
|
||||
record_unbound: RecordField.SafeMultiList.Range,
|
||||
tuple: Tuple,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue