-
Effekt Library
- effekt
- js
- chez
- llvm
- println
- readln
- println
- println
- println
- println
- println
- println
- showBuiltin
- showBuiltin
- showBuiltin
- showBuiltin
- inspect
- panic
- show
- genericShow
- infixPlusPlus
- length
- unsafeSubstring
- random
- Ordering
- Less
- Equal
- Greater
- compareInt
- genericCompareImpl
- genericCompare
- println
- genericEquals
- infixEq
- infixEq
- infixNeq
- infixEq
- infixNeq
- infixEq
- infixNeq
- infixEq
- infixNeq
- infixEq
- infixNeq
- infixPlus
- infixStar
- infixSlash
- infixMinus
- mod
- infixPlus
- infixStar
- infixMinus
- infixSlash
- cos
- sin
- atan
- tan
- sqrt
- square
- neg
- min
- max
- abs
- log
- log1p
- exp
- pow
- pow
- _pi
- PI
- toInt
- toDouble
- round
- round
- floor
- ceil
- min
- max
- neg
- abs
- infixLt
- infixLte
- infixGt
- infixGte
- infixEq
- infixNeq
- infixLt
- infixLte
- infixGt
- infixGte
- infixLt
- infixLte
- infixGt
- infixGte
- not
- infixBarBar
- infixAmpAmp
- bitwiseShl
- bitwiseShr
- bitwiseAnd
- bitwiseOr
- bitwiseXor
- bitwiseNot
- toByte
- toInt
- undefined
- isUndefined
- as
- absurd
- Tuple2
- Tuple3
- Tuple4
- Tuple5
- Tuple6
- OneOrBoth
- This
- That
- Both
- forever
- stop
- stop
- boundary
- loop
- loop
- each
- repeat
- locally
- write
- write
- splice
- splice
- SourcePosition
- C
- String
- Int
- Double
- Float
- Ptr
- Obj
- Void
- String
- Int
- Double
- Float
- Bool
- Null
- toString
- toInt
- toDouble
- toFloat
- isNull
- toBool
- infixEq
- effekt Jump to source: libraries/common/effekt.effekt
- js
- chez
- llvm
- print
(value: String): Unit / {} - println
(value: String): Unit / {} - readln
: String / {} - println
(value: Int): Unit / {} - println
(value: Unit): Unit / {} - println
(value: Double): Unit / {} - println
(value: Bool): Unit / {} - println
(value: Byte): Unit / {} - println
(value: Char): Unit / {} - showBuiltin
(value: Int): String / {} - showBuiltin
(value: Double): String / {} - showBuiltin
(value: Char): String / {} - showBuiltin
(value: Byte): String / {} - inspect
[R] (value: R): Unit / {} - panic
(msg: String): Nothing / {} - show
[R] (value: R): String / {} - genericShow
[R] (value: R): String / {} - infixPlusPlus
(s1: String, s2: String): String / {} - length
(str: String): Int / {} - unsafeSubstring
(str: String, from: Int, to: Int): String / {} - random
: Double / {} - Ordering
- Less
- Equal
- Greater
- compareInt
(n: Int, m: Int) - genericCompareImpl
[R] (x: R, y: R): Int / {} - genericCompare
[R] (x: R, y: R): Ordering / {} - println
(o: Ordering): Unit / {} - genericEquals
[R] (x: R, y: R): Bool / {} - infixEq
(x: Unit, y: Unit): Bool / {} - infixEq
(x: Int, y: Int): Bool / {} - infixNeq
(x: Int, y: Int): Bool / {} - infixEq
(x: Char, y: Char): Bool / {} - infixNeq
(x: Char, y: Char): Bool / {} - infixEq
(x: String, y: String): Bool / {} - infixNeq
(x: String, y: String): Bool / {} - infixEq
(x: Bool, y: Bool): Bool / {} - infixNeq
(x: Bool, y: Bool): Bool / {} - infixEq
(x: Byte, y: Byte): Bool / {} - infixNeq
(x: Byte, y: Byte): Bool / {} - infixPlus
(x: Int, y: Int): Int / {} - infixStar
(x: Int, y: Int): Int / {} - infixSlash
(x: Int, y: Int): Int / {} - infixMinus
(x: Int, y: Int): Int / {} - mod
(x: Int, y: Int): Int / {} - infixPlus
(x: Double, y: Double): Double / {} - infixStar
(x: Double, y: Double): Double / {} - infixMinus
(x: Double, y: Double): Double / {} - infixSlash
(x: Double, y: Double): Double / {} - cos
(x: Double): Double / {} - sin
(x: Double): Double / {} - atan
(x: Double): Double / {} - tan
(x: Double): Double / {} - sqrt
(x: Double): Double / {} - square
(x: Double): Double / {} - neg
(n: Double): Double / {} - min
(n: Double, m: Double): Double / {} - max
(n: Double, m: Double): Double / {} - abs
(n: Double): Double / {} - log
(x: Double): Double / {} - log1p
(x: Double): Double / {} - exp
(x: Double): Double / {} - pow
(base: Double, exponent: Int): Double / {} - pow
(base: Double, exponent: Double): Double / {} - _pi
: Double / {} - PI
- toInt
(d: Double): Int / {} - toDouble
(d: Int): Double / {} - round
(d: Double): Int / {} - round
(d: Double, digits: Int): Double / {} - floor
(d: Double): Int / {} - ceil
(d: Double): Int / {} - min
(n: Int, m: Int): Int / {} - max
(n: Int, m: Int): Int / {} - neg
(n: Int): Int / {} - abs
(n: Int): Int / {} - infixLt
(x: Int, y: Int): Bool / {} - infixLte
(x: Int, y: Int): Bool / {} - infixGt
(x: Int, y: Int): Bool / {} - infixGte
(x: Int, y: Int): Bool / {} - infixEq
(x: Double, y: Double): Bool / {} - infixNeq
(x: Double, y: Double): Bool / {} - infixLt
(x: Double, y: Double): Bool / {} - infixLte
(x: Double, y: Double): Bool / {} - infixGt
(x: Double, y: Double): Bool / {} - infixGte
(x: Double, y: Double): Bool / {} - infixLt
(x: String, y: String): Bool / {} - infixLte
(x: String, y: String): Bool / {} - infixGt
(x: String, y: String): Bool / {} - infixGte
(x: String, y: String): Bool / {} - not
(b: Bool): Bool / {} - infixBarBar
{ first: => Bool } { second: => Bool }: Bool / {} - infixAmpAmp
{ first: => Bool } { second: => Bool }: Bool / {} - bitwiseShl
(x: Int, y: Int): Int / {} - bitwiseShr
(x: Int, y: Int): Int / {} - bitwiseAnd
(x: Int, y: Int): Int / {} - bitwiseOr
(x: Int, y: Int): Int / {} - bitwiseXor
(x: Int, y: Int): Int / {} - bitwiseNot
(x: Int): Int / {} - toByte
(n: Int): Byte / {} - toInt
(n: Byte): Int / {} - undefined
[A]: A / {} - isUndefined
[A] (value: A): Bool / {} - as
[A] (x: A): A / {} - absurd
[A] (x: Nothing): A / {} - Tuple2
[A, B] (first: A, second: B) - Tuple3
[A, B, C] (first: A, second: B, third: C) - Tuple4
[A, B, C, D] (first: A, second: B, third: C, fourth: D) - Tuple5
[A, B, C, D, E] (first: A, second: B, third: C, fourth: D, fifth: E) - Tuple6
[A, B, C, D, E, F] (first: A, second: B, third: C, fourth: D, fifth: E, sixth: F) - OneOrBoth
[A, B] - This
(a: A) - That
(b: B) - Both
(a: A, b: B) - forever
{ action: => Unit }: Nothing / {} - stop
- stop
: Nothing / {} - boundary
{ program: => Unit / {stop} }: Unit / {} - loop
{ action: => Unit / {stop} }: Unit / {} - loop
{ action: (Int) => Unit / {stop} }: Unit / {} - each
(start: Int, end: Int) { action: (Int) => Unit } - repeat
(n: Int) { action: => Unit } - locally
[R] { p: => R }: R / {} - write
- write
(s: String): Unit / {} - splice
[A] - splice
(x: A): Unit / {} - SourcePosition
(file: String, startLine: Int, startColumn: Int, endLine: Int, endColumn: Int) - C
- String
- Int
- Double
- Float
- Ptr
- Obj
- Void
- String
(value: String): String / {} - Int
(value: Int): Int / {} - Double
(value: Double): Double / {} - Float
(value: Double): Float / {} - Bool
(value: Bool): Int / {} - Null
: Ptr / {} - toString
(value: String): String / {} - toInt
(value: Int): Int / {} - toDouble
(value: Double): Double / {} - toFloat
(value: Float): Double / {} - isNull
(ptr: Ptr): Bool / {} - toBool
(value: Int): Bool / {} - infixEq
(v1: Int, v2: Int): Bool / {}
Example usage: examples/stdlib/effekt
A fatal runtime error that cannot be caught
A show function structurally generated by the compiler for any type.
Returns a textual representation of a value for debugging purposes. The output is backend-specific, works only on JS and Chez backends. Prefer using `show` instead when possible.
Beware that this function is backend-dependent. If you want to get the number of bytes that a string would take up in a UTF-8 encoding, use `string::utf8ByteLength` instead.
Result of comparison between two objects according to some order: - `Less()` means that the first object is *before* the first in the order, - `Equal()` means that the two objects are the same in the order, - and `Greater()` means that the second object is *before* the first in the order.
Compares two values of the same type, returning an `Ordering`. Only available on the JavaScript backend.
Structural equality: Not available in the LLVM backend
Truncating signed integer division (quotient rounded towards zero)
Arithmetic left shift
Arithmetic right shift
The value used by the FFI to represent undefined values
Is an FFI value undefined?
Ascribe a type, for example `f().as[Int]`.
Witness absurdity, for example `f().absurd`. Very often the type argument is inferred.
Repeat `action` forever
Signal that we should stop.
Signal that we should stop.
When the program stops, then to here.
Repeat `action` until `stop` is thrown.
Repeat `action` until `stop` is thrown, supplying the iteration count.
Calls provided action repeatedly. `start` is inclusive, `end` is not.
Scopes a local computation