Skip to content

Commit

Permalink
chore: update moon info
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfettes authored and peter-jerry-ye committed Jan 8, 2025
1 parent 8035473 commit b47d75d
Show file tree
Hide file tree
Showing 20 changed files with 27 additions and 64 deletions.
6 changes: 2 additions & 4 deletions array/array.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ alias @moonbitlang/core/quickcheck as @quickcheck
// Values

// Types and methods


impl FixedArray {
all[T](Self[T], (T) -> Bool) -> Bool
any[T](Self[T], (T) -> Bool) -> Bool
Expand Down Expand Up @@ -46,7 +44,7 @@ impl FixedArray {
starts_with[T : Eq](Self[T], Self[T]) -> Bool
swap[T](Self[T], Int, Int) -> Unit
}

impl[X : @quickcheck.Arbitrary] @quickcheck.Arbitrary for FixedArray[X]

impl Array {
copy[T](Self[T]) -> Self[T]
Expand All @@ -62,7 +60,7 @@ impl Array {
sort_by[T](Self[T], (T, T) -> Int) -> Unit
sort_by_key[T, K : Compare](Self[T], (T) -> K) -> Unit
}

impl[X : @quickcheck.Arbitrary] @quickcheck.Arbitrary for Array[X]

impl ArrayView {
all[T](Self[T], (T) -> Bool) -> Bool
Expand Down
3 changes: 1 addition & 2 deletions bool/bool.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ package moonbitlang/core/bool
// Values

// Types and methods


impl Bool {
to_int(Bool) -> Int
to_int64(Bool) -> Int64
to_uint(Bool) -> UInt
to_uint64(Bool) -> UInt64
}
impl Hash for Bool

// Type aliases

Expand Down
31 changes: 0 additions & 31 deletions builtin/builtin.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,11 @@ impl UninitializedArray {
op_set[T](Self[T], Int, T) -> Unit
}


impl Unit {
op_equal(Unit, Unit) -> Bool
to_json(Unit) -> Json
}


impl Bool {
compare(Bool, Bool) -> Int
default() -> Bool
Expand All @@ -414,7 +412,6 @@ impl Bool {
to_string(Bool) -> String
}


impl Byte {
compare(Byte, Byte) -> Int
default() -> Byte
Expand All @@ -438,7 +435,6 @@ impl Byte {
to_uint(Byte) -> UInt
}


impl Char {
compare(Char, Char) -> Int
default() -> Char
Expand All @@ -451,7 +447,6 @@ impl Char {
to_uint(Char) -> UInt
}


impl Int {
asr(Int, Int) -> Int //deprecated
clz(Int) -> Int
Expand Down Expand Up @@ -494,7 +489,6 @@ impl Int {
upto(Int, Int, inclusive~ : Bool = ..) -> Iter[Int] //deprecated
}


impl Int64 {
asr(Int64, Int) -> Int64 //deprecated
clz(Int64) -> Int
Expand Down Expand Up @@ -532,7 +526,6 @@ impl Int64 {
upto(Int64, Int64, inclusive~ : Bool = ..) -> Iter[Int64] //deprecated
}


impl UInt {
clz(UInt) -> Int
compare(UInt, UInt) -> Int
Expand Down Expand Up @@ -566,7 +559,6 @@ impl UInt {
upto(UInt, UInt, inclusive~ : Bool = ..) -> Iter[UInt] //deprecated
}


impl UInt64 {
clz(UInt64) -> Int
compare(UInt64, UInt64) -> Int
Expand Down Expand Up @@ -603,7 +595,6 @@ impl UInt64 {
upto(UInt64, UInt64, inclusive~ : Bool = ..) -> Iter[UInt64] //deprecated
}


impl Float {
compare(Float, Float) -> Int
op_add(Float, Float) -> Float
Expand All @@ -622,7 +613,6 @@ impl Float {
upto(Float, Float, inclusive~ : Bool = ..) -> Iter[Float] //deprecated
}


impl Double {
compare(Double, Double) -> Int
convert_uint(UInt) -> Double
Expand All @@ -648,7 +638,6 @@ impl Double {
upto(Double, Double, inclusive~ : Bool = ..) -> Iter[Double] //deprecated
}


impl String {
escape(String) -> String
get(String, Int) -> Char
Expand All @@ -662,21 +651,18 @@ impl String {
to_string(String) -> String
}


impl Option {
op_equal[X : Eq](X?, X?) -> Bool
to_json[T : ToJson](T?) -> Json
to_string[X : Show](X?) -> String
unwrap[X](X?) -> X
}


impl Result {
op_equal[T : Eq, E : Eq](Self[T, E], Self[T, E]) -> Bool
to_json[Ok : ToJson, Err : ToJson](Self[Ok, Err]) -> Json
}


impl FixedArray {
blit_from_bytes(Self[Byte], Int, Bytes, Int, Int) -> Unit
blit_from_string(Self[Byte], Int, String, Int, Int) -> Unit
Expand All @@ -700,7 +686,6 @@ impl FixedArray {
unsafe_get[T](Self[T], Int) -> T
}


impl Bytes {
blit(Bytes, Int, Bytes, Int, Int) -> Unit
blit_from_string(Bytes, Int, String, Int, Int) -> Unit //deprecated
Expand All @@ -722,97 +707,81 @@ impl Bytes {
unsafe_get(Bytes, Int) -> Byte
}


impl Logger {
write_iter[T : Show](&Self, Iter[T], prefix~ : String = .., suffix~ : String = .., sep~ : String = .., trailing~ : Bool = ..) -> Unit
write_object[Obj : Show](&Self, Obj) -> Unit
}


impl Tuple(2) {
compare[T0 : Compare, T1 : Compare]((T0, T1), (T0, T1)) -> Int
op_equal[T0 : Eq, T1 : Eq]((T0, T1), (T0, T1)) -> Bool
}


impl Tuple(3) {
compare[T0 : Compare, T1 : Compare, T2 : Compare]((T0, T1, T2), (T0, T1, T2)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq]((T0, T1, T2), (T0, T1, T2)) -> Bool
}


impl Tuple(4) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare]((T0, T1, T2, T3), (T0, T1, T2, T3)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq]((T0, T1, T2, T3), (T0, T1, T2, T3)) -> Bool
}


impl Tuple(5) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare]((T0, T1, T2, T3, T4), (T0, T1, T2, T3, T4)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq]((T0, T1, T2, T3, T4), (T0, T1, T2, T3, T4)) -> Bool
}


impl Tuple(6) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare]((T0, T1, T2, T3, T4, T5), (T0, T1, T2, T3, T4, T5)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq]((T0, T1, T2, T3, T4, T5), (T0, T1, T2, T3, T4, T5)) -> Bool
}


impl Tuple(7) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare]((T0, T1, T2, T3, T4, T5, T6), (T0, T1, T2, T3, T4, T5, T6)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq]((T0, T1, T2, T3, T4, T5, T6), (T0, T1, T2, T3, T4, T5, T6)) -> Bool
}


impl Tuple(8) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7), (T0, T1, T2, T3, T4, T5, T6, T7)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7), (T0, T1, T2, T3, T4, T5, T6, T7)) -> Bool
}


impl Tuple(9) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8), (T0, T1, T2, T3, T4, T5, T6, T7, T8)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8), (T0, T1, T2, T3, T4, T5, T6, T7, T8)) -> Bool
}


impl Tuple(10) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare, T9 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq, T9 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> Bool
}


impl Tuple(11) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare, T9 : Compare, T10 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq, T9 : Eq, T10 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> Bool
}


impl Tuple(12) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare, T9 : Compare, T10 : Compare, T11 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq, T9 : Eq, T10 : Eq, T11 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> Bool
}


impl Tuple(13) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare, T9 : Compare, T10 : Compare, T11 : Compare, T12 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq, T9 : Eq, T10 : Eq, T11 : Eq, T12 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)) -> Bool
}


impl Tuple(14) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare, T9 : Compare, T10 : Compare, T11 : Compare, T12 : Compare, T13 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq, T9 : Eq, T10 : Eq, T11 : Eq, T12 : Eq, T13 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)) -> Bool
}


impl Tuple(15) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare, T9 : Compare, T10 : Compare, T11 : Compare, T12 : Compare, T13 : Compare, T14 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq, T9 : Eq, T10 : Eq, T11 : Eq, T12 : Eq, T13 : Eq, T14 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)) -> Bool
}


impl Tuple(16) {
compare[T0 : Compare, T1 : Compare, T2 : Compare, T3 : Compare, T4 : Compare, T5 : Compare, T6 : Compare, T7 : Compare, T8 : Compare, T9 : Compare, T10 : Compare, T11 : Compare, T12 : Compare, T13 : Compare, T14 : Compare, T15 : Compare]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)) -> Int
op_equal[T0 : Eq, T1 : Eq, T2 : Eq, T3 : Eq, T4 : Eq, T5 : Eq, T6 : Eq, T7 : Eq, T8 : Eq, T9 : Eq, T10 : Eq, T11 : Eq, T12 : Eq, T13 : Eq, T14 : Eq, T15 : Eq]((T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)) -> Bool
Expand Down
2 changes: 0 additions & 2 deletions byte/byte.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ let max_value : Byte
let min_value : Byte

// Types and methods


impl Byte {
to_uint64(Byte) -> UInt64
}
Expand Down
3 changes: 1 addition & 2 deletions bytes/bytes.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package moonbitlang/core/bytes
// Values

// Types and methods


impl Bytes {
default() -> Bytes
from_array(Array[Byte]) -> Bytes
Expand All @@ -15,6 +13,7 @@ impl Bytes {
to_array(Bytes) -> Array[Byte]
to_fixedarray(Bytes, len? : Int) -> FixedArray[Byte]
}
impl Hash for Bytes

// Type aliases

Expand Down
1 change: 1 addition & 0 deletions char/char.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package moonbitlang/core/char
// Values

// Types and methods
impl Hash for Char

// Type aliases

Expand Down
4 changes: 2 additions & 2 deletions double/double.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ let neg_infinity : Double
let not_a_number : Double

// Types and methods


impl Double {
abs(Double) -> Double
ceil(Double) -> Double
Expand All @@ -42,6 +40,8 @@ impl Double {
to_string(Double) -> String
trunc(Double) -> Double
}
impl Hash for Double
impl Show for Double

// Type aliases

Expand Down
1 change: 1 addition & 0 deletions error/error.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package moonbitlang/core/error
// Values

// Types and methods
impl Show for Error

// Type aliases

Expand Down
4 changes: 2 additions & 2 deletions float/float.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ let neg_infinity : Float
let not_a_number : Float

// Types and methods


impl Float {
abs(Float) -> Float
ceil(Float) -> Float
Expand All @@ -31,6 +29,8 @@ impl Float {
to_le_bytes(Float) -> Bytes
trunc(Float) -> Float
}
impl Hash for Float
impl Show for Float

// Type aliases

Expand Down
2 changes: 0 additions & 2 deletions int/int.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ let max_value : Int
let min_value : Int

// Types and methods


impl Int {
abs(Int) -> Int
to_be_bytes(Int) -> Bytes
Expand Down
3 changes: 1 addition & 2 deletions int64/int64.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ let max_value : Int64
let min_value : Int64

// Types and methods


impl Int64 {
abs(Int64) -> Int64
from_int(Int) -> Int64
to_be_bytes(Int64) -> Bytes
to_le_bytes(Int64) -> Bytes
}
impl Hash for Int64

// Type aliases

Expand Down
2 changes: 1 addition & 1 deletion json/json.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pub(all) struct Position {
}
impl Eq for Position


impl Json {
as_array(Self) -> Array[Self]?
as_bool(Self) -> Bool?
Expand All @@ -53,6 +52,7 @@ impl Json {
to_json(Self) -> Self
value(Self, String) -> Self?
}
impl Show for Json

// Type aliases
pub typealias JsonValue = Json
Expand Down
3 changes: 1 addition & 2 deletions option/option.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ fn unless[T](Bool, () -> T) -> T?
fn when[T](Bool, () -> T) -> T?

// Types and methods


impl Option {
bind[T, U](T?, (T) -> U?) -> U?
compare[X : Compare](X?, X?) -> Int
Expand All @@ -30,6 +28,7 @@ impl Option {
or_else[T](T?, () -> T) -> T
or_error[T, Err : Error](T?, Err) -> T!Err
}
impl[X : @quickcheck.Arbitrary] @quickcheck.Arbitrary for X?

// Type aliases

Expand Down
Loading

0 comments on commit b47d75d

Please sign in to comment.