Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions array/array.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import(
// Values
fn[A, B, C] zip_with(Array[A], Array[B], (A, B) -> C raise?) -> Array[C] raise?

// Errors

// Types and methods
fn[T] FixedArray::all(Self[T], (T) -> Bool raise?) -> Bool raise?
fn[T] FixedArray::any(Self[T], (T) -> Bool raise?) -> Bool raise?
Expand Down
2 changes: 2 additions & 0 deletions bench/bench.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ fn new() -> T

fn single_bench(name? : String, () -> Unit, count~ : UInt = ..) -> Summary

// Errors

// Types and methods
type Summary
impl ToJson for Summary
Expand Down
2 changes: 2 additions & 0 deletions bigint/bigint.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import(

// Values

// Errors

// Types and methods
type BigInt
#deprecated
Expand Down
2 changes: 2 additions & 0 deletions bool/bool.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package "moonbitlang/core/bool"

// Values

// Errors

// Types and methods
fn Bool::to_int(Bool) -> Int
fn Bool::to_int16(Bool) -> Int16
Expand Down
2 changes: 2 additions & 0 deletions buffer/buffer.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fn from_iter(Iter[Byte]) -> T

fn new(size_hint~ : Int = ..) -> T

// Errors

// Types and methods
type T
fn T::contents(Self) -> Bytes
Expand Down
21 changes: 11 additions & 10 deletions builtin/builtin.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ fn[T : Show] println(T) -> Unit

fn[T : Show] repr(T) -> String

// Errors
pub(all) suberror BenchError String

pub(all) suberror Failure String
impl Show for Failure
impl ToJson for Failure

pub(all) suberror InspectError String

pub(all) suberror SnapshotError String

// Types and methods
pub(all) type ArgsLoc Array[SourceLoc?]
fn ArgsLoc::inner(Self) -> Array[SourceLoc?]
Expand Down Expand Up @@ -144,12 +155,6 @@ fn[T] ArrayView::swap(Self[T], Int, Int) -> Unit
fn[T] ArrayView::unsafe_get(Self[T], Int) -> T
impl[X : ToJson] ToJson for ArrayView[X]

pub(all) suberror BenchError String

pub(all) suberror Failure String
impl Show for Failure
impl ToJson for Failure

type Hasher
fn[T : Hash] Hasher::combine(Self, T) -> Unit
fn Hasher::combine_bool(Self, Bool) -> Unit
Expand All @@ -167,8 +172,6 @@ fn Hasher::combine_unit(Self) -> Unit
fn Hasher::finalize(Self) -> Int
fn Hasher::new(seed~ : Int = ..) -> Self

pub(all) suberror InspectError String

type Iter[T]
fn[T] Iter::all(Self[T], (T) -> Bool) -> Bool
fn[T] Iter::any(Self[T], (T) -> Bool) -> Bool
Expand Down Expand Up @@ -288,8 +291,6 @@ impl[K : Hash + Eq, V : Eq] Eq for Map[K, V]
impl[K : Show, V : Show] Show for Map[K, V]
impl[K : Show, V : ToJson] ToJson for Map[K, V]

pub(all) suberror SnapshotError String

pub(all) type SourceLoc
fn SourceLoc::to_string(Self) -> String
impl Show for SourceLoc
Expand Down
2 changes: 2 additions & 0 deletions byte/byte.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ let max_value : Byte

let min_value : Byte

// Errors

// Types and methods
fn Byte::popcnt(Byte) -> Int
fn Byte::to_uint64(Byte) -> UInt64
Expand Down
2 changes: 2 additions & 0 deletions bytes/bytes.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fn from_iter(Iter[Byte]) -> Bytes

fn of(FixedArray[Byte]) -> Bytes

// Errors

// Types and methods
type View
fn View::data(Self) -> Bytes
Expand Down
2 changes: 2 additions & 0 deletions char/char.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package "moonbitlang/core/char"

// Values

// Errors

// Types and methods
fn Char::is_ascii(Char) -> Bool
fn Char::is_ascii_alphabetic(Char) -> Bool
Expand Down
2 changes: 2 additions & 0 deletions cmp/cmp.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ fn[T : Compare] minimum(T, T) -> T

fn[T, K : Compare] minimum_by_key(T, T, (T) -> K) -> T

// Errors

// Types and methods

// Type aliases
Expand Down
2 changes: 2 additions & 0 deletions coverage/coverage.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ fn end() -> Unit

fn track(String, CoverageCounter) -> Unit

// Errors

// Types and methods
type CoverageCounter
fn CoverageCounter::incr(Self, Int) -> Unit
Expand Down
2 changes: 2 additions & 0 deletions deque/deque.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fn[A] new(capacity~ : Int = ..) -> T[A]

fn[A] of(FixedArray[A]) -> T[A]

// Errors

// Types and methods
type T[A]
fn[A] T::as_views(Self[A]) -> (ArrayView[A], ArrayView[A])
Expand Down
2 changes: 2 additions & 0 deletions double/double.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ let neg_infinity : Double

let not_a_number : Double

// Errors

// Types and methods
fn Double::abs(Double) -> Double
fnalias Double::abs
Expand Down
2 changes: 2 additions & 0 deletions double/internal/ryu/ryu.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package "moonbitlang/core/double/internal/ryu"
// Values
fn ryu_to_string(Double) -> String

// Errors

// Types and methods

// Type aliases
Expand Down
2 changes: 2 additions & 0 deletions env/env.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ fn current_dir() -> String?

fn now() -> UInt64

// Errors

// Types and methods

// Type aliases
Expand Down
2 changes: 2 additions & 0 deletions error/error.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package "moonbitlang/core/error"

// Values

// Errors

// Types and methods
impl Show for Error
impl ToJson for Error
Expand Down
2 changes: 2 additions & 0 deletions float/float.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ let neg_infinity : Float

let not_a_number : Float

// Errors

// Types and methods
fn Float::abs(Float) -> Float
fnalias Float::abs
Expand Down
2 changes: 2 additions & 0 deletions hashmap/hashmap.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fn[K, V] new(capacity~ : Int = ..) -> T[K, V]

fn[K : Eq + Hash, V] of(FixedArray[(K, V)]) -> T[K, V]

// Errors

// Types and methods
type T[K, V]
fn[K, V] T::capacity(Self[K, V]) -> Int
Expand Down
2 changes: 2 additions & 0 deletions hashset/hashset.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fn[K] new(capacity~ : Int = ..) -> T[K]

fn[K : Hash + Eq] of(FixedArray[K]) -> T[K]

// Errors

// Types and methods
type T[K]
fn[K : Hash + Eq] T::add(Self[K], K) -> Unit
Expand Down
2 changes: 2 additions & 0 deletions immut/array/array.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ fn[A] new() -> T[A]

fn[A] of(FixedArray[A]) -> T[A]

// Errors

// Types and methods
type T[A]
fn[A] T::concat(Self[A], Self[A]) -> Self[A]
Expand Down
2 changes: 2 additions & 0 deletions immut/hashmap/hashmap.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ fn[K : Eq + Hash, V] of(FixedArray[(K, V)]) -> T[K, V]

fn[K : Hash, V] singleton(K, V) -> T[K, V]

// Errors

// Types and methods
type T[K, V]
fn[K : Eq + Hash, V] T::add(Self[K, V], K, V) -> Self[K, V]
Expand Down
2 changes: 2 additions & 0 deletions immut/hashset/hashset.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fn[A] new() -> T[A]

fn[A : Eq + Hash] of(FixedArray[A]) -> T[A]

// Errors

// Types and methods
type T[A]
fn[A : Eq + Hash] T::add(Self[A], A) -> Self[A]
Expand Down
2 changes: 2 additions & 0 deletions immut/internal/path/path.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package "moonbitlang/core/immut/internal/path"
// Values
fn[A : Hash] of(A) -> Path

// Errors

// Types and methods
pub(all) type Path UInt
fn Path::idx(Self) -> Int
Expand Down
2 changes: 2 additions & 0 deletions immut/internal/sparse_array/sparse_array.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ fn[X] empty() -> SparseArray[X]

fn[X] singleton(Int, X) -> SparseArray[X]

// Errors

// Types and methods
pub(all) type Bitset UInt
fn Bitset::add(Self, Int) -> Self
Expand Down
2 changes: 2 additions & 0 deletions immut/list/list.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ fn[A] singleton(A) -> T[A]
#deprecated
fn[A, S] unfold((S) -> (A, S)? raise?, init~ : S) -> T[A] raise?

// Errors

// Types and methods
pub(all) enum T[A] {
Nil
Expand Down
2 changes: 2 additions & 0 deletions immut/priority_queue/priority_queue.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fn[A] new() -> T[A]

fn[A : Compare] of(FixedArray[A]) -> T[A]

// Errors

// Types and methods
type T[A]
fn[A : Compare] T::from_iter(Iter[A]) -> Self[A]
Expand Down
2 changes: 2 additions & 0 deletions immut/sorted_map/sorted_map.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fn[K : Compare, V] of(FixedArray[(K, V)]) -> T[K, V]

fn[K, V] singleton(K, V) -> T[K, V]

// Errors

// Types and methods
type T[K, V]
fn[K : Compare, V] T::add(Self[K, V], K, V) -> Self[K, V]
Expand Down
2 changes: 2 additions & 0 deletions immut/sorted_set/sorted_set.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fn[A : Compare] of(FixedArray[A]) -> T[A]

fn[A] singleton(A) -> T[A]

// Errors

// Types and methods
type T[A]
fn[A : Compare] T::add(Self[A], A) -> Self[A]
Expand Down
2 changes: 2 additions & 0 deletions int/int.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ let max_value : Int

let min_value : Int

// Errors

// Types and methods
fn Int::abs(Int) -> Int
fnalias Int::abs
Expand Down
2 changes: 2 additions & 0 deletions int16/int16.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ let max_value : Int16

let min_value : Int16

// Errors

// Types and methods
fn Int16::abs(Int16) -> Int16
fn Int16::reinterpret_as_uint16(Int16) -> UInt16
Expand Down
2 changes: 2 additions & 0 deletions int64/int64.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ let max_value : Int64

let min_value : Int64

// Errors

// Types and methods
fn Int64::abs(Int64) -> Int64
fnalias Int64::abs
Expand Down
17 changes: 9 additions & 8 deletions json/json.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,12 @@ fn parse(String) -> Json raise ParseError

fn valid(String) -> Bool

// Types and methods
// Errors
pub(all) suberror JsonDecodeError (JsonPath, String)
impl Eq for JsonDecodeError
impl Show for JsonDecodeError
impl ToJson for JsonDecodeError

type JsonPath
fn JsonPath::add_index(Self, Int) -> Self
fn JsonPath::add_key(Self, String) -> Self
impl Eq for JsonPath
impl Show for JsonPath
impl ToJson for JsonPath

pub(all) suberror ParseError {
InvalidChar(Position, Char)
InvalidEof
Expand All @@ -37,6 +30,14 @@ impl Eq for ParseError
impl Show for ParseError
impl ToJson for ParseError

// Types and methods
type JsonPath
fn JsonPath::add_index(Self, Int) -> Self
fn JsonPath::add_key(Self, String) -> Self
impl Eq for JsonPath
impl Show for JsonPath
impl ToJson for JsonPath

pub(all) struct Position {
line : Int
column : Int
Expand Down
2 changes: 2 additions & 0 deletions list/list.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ fn[A] singleton(A) -> T[A]

fn[A, S] unfold((S) -> (A, S)? raise?, init~ : S) -> T[A] raise?

// Errors

// Types and methods
pub enum T[A] {
Empty
Expand Down
2 changes: 2 additions & 0 deletions math/math.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ fn tanhf(Float) -> Float

fn trunc(Double) -> Double

// Errors

// Types and methods

// Type aliases
Expand Down
2 changes: 2 additions & 0 deletions option/option.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ fn[T] unless(Bool, () -> T) -> T?
#deprecated
fn[T] when(Bool, () -> T) -> T?

// Errors

// Types and methods
fn[T, U] Option::bind(T?, (T) -> U?) -> U?
fn[T] Option::filter(T?, (T) -> Bool) -> T?
Expand Down
2 changes: 2 additions & 0 deletions prelude/prelude.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ fn[T] tap(T, (T) -> Unit) -> T

fn[T, R] then(T, (T) -> R) -> R

// Errors

// Types and methods

// Type aliases
Expand Down
2 changes: 2 additions & 0 deletions priority_queue/priority_queue.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fn[A] new() -> T[A]

fn[A : Compare] of(FixedArray[A]) -> T[A]

// Errors

// Types and methods
type T[A]
fn[A] T::clear(Self[A]) -> Unit
Expand Down
Loading
Loading