Skip to content

Commit bf3d63e

Browse files
committed
remove List.t<'a> from Core and use list<'a> instead
1 parent 9da9b19 commit bf3d63e

File tree

5 files changed

+62
-67
lines changed

5 files changed

+62
-67
lines changed

runtime/List.res

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161

6262
@@config({flags: ["-bs-noassertfalse"]})
6363

64-
type t<'a> = list<'a>
65-
6664
module A = {
6765
@new external makeUninitializedUnsafe: int => array<'a> = "Array"
6866
external min: ('a, 'a) => 'a = "%bs_min"
@@ -85,7 +83,7 @@ module A = {
8583
}
8684
}
8785

88-
external mutableCell: ('a, t<'a>) => t<'a> = "#makemutablelist"
86+
external mutableCell: ('a, list<'a>) => list<'a> = "#makemutablelist"
8987

9088
/*
9189
`mutableCell x []` == `x`
@@ -94,7 +92,7 @@ external mutableCell: ('a, t<'a>) => t<'a> = "#makemutablelist"
9492
dont inline a binding to mutable cell, it is mutable
9593
*/
9694
/* INVARIANT: relies on Literals.tl (internal representation) */
97-
@set external unsafeMutateTail: (t<'a>, t<'a>) => unit = "tl"
95+
@set external unsafeMutateTail: (list<'a>, list<'a>) => unit = "tl"
9896

9997
/*
10098
- the cell is not empty
@@ -480,7 +478,7 @@ let rec fromArrayAux = (a, i, res) =>
480478

481479
let fromArray = a => fromArrayAux(a, Array.length(a) - 1, list{})
482480

483-
let toArray = (x: t<_>) => {
481+
let toArray = (x: list<_>) => {
484482
let len = length(x)
485483
let arr = A.makeUninitializedUnsafe(len)
486484
fillAux(arr, 0, x)

0 commit comments

Comments
 (0)