Core Reference

compiler generated documentation

#!+ [builtin]

#!- one type to rule them all.
primitive Class;

#!- this type is infered.
primitive auto;

#!- a void type.
primitive void;

#!- integer type.
primitive int;

#!- character type.
primitive char extends int;

#!- float type.
primitive float;

#!- represent duration.
primitive dur;

#!- represent time.
primitive time;

#!- internal time for `now`.
primitive @now extends time;
specialid const now;

#!- internal predicate representation.
specialid const @predicate;
#!- internal base of all objects and structures.
primitive enum extends int;
primitive @Compound;
primitive Object extends @Compound;
specialid const this;
specialid const super;
primitive bool extends int;
const bool true;
const bool false;
operator bool ! (int);
operator @implicit (bool, float);
specialid const maybe;
operator bool @conditional (int);
operator bool @unconditional (int);
operator int + (int, int);
operator int - (int, int);
operator int * (int, int);
operator int / (int, int);
operator int  (int, int);
operator int > (int, int);
operator int >= (int, int);
operator int < (int, int);
operator int <= (int, int);
operator int >> (int, int);
operator int << (int, int);
operator int & (int, int);
operator int | (int, int);
operator int ^ (int, int);
operator bool && (int, int);
operator bool || (int, int);
operator bool == (int, int);
operator bool != (int, int);
operator int :=> (int, int);
operator int +=> (int, int);
operator int -=> (int, int);
operator int *=> (int, int);
operator int /=> (int, int);
operator int %=> (int, int);
operator int <<=> (int, int);
operator int >>=> (int, int);
operator int &=> (int, int);
operator int |=> (int, int);
operator int ^=> (int, int);
operator int - (int);
operator int ++ (int);
operator int -- (int);
operator int ~ (int);
operator int [:] ();
operator int int ++ ();
operator int int -- ();
primitive u8 1;
primitive u16 2;
primitive u32 4;
primitive u64 8;
operator bool @conditional (float);
operator bool @unconditional (float);
operator float + (float, float);
operator float - (float, float);
operator float * (float, float);
operator float / (float, float);
operator float @implicit (float, float);
operator float :=> (float, float);
operator float +=> (float, float);
operator float -=> (float, float);
operator float *=> (float, float);
operator float /=> (float, float);
operator bool && (float, float);
operator bool || (float, float);
operator bool == (float, float);
operator bool != (float, float);
operator bool > (float, float);
operator bool >= (float, float);
operator bool < (float, float);
operator bool <= (float, float);
operator float - (float);
operator dur :: (int, dur);
operator dur :: (float, dur);
operator bool ! (float);
operator int > (int, float);
operator int >= (int, float);
operator int < (int, float);
operator int <= (int, float);
operator float + (int, float);
operator float * (int, float);
operator float - (int, float);
operator float / (int, float);
operator float :=> (int, float);
operator float +=> (int, float);
operator float -=> (int, float);
operator float *=> (int, float);
operator float /=> (int, float);
operator float $ (int, float);
operator float @implicit (int, float);
operator bool && (int, float);
operator bool || (int, float);
operator bool == (int, float);
operator bool != (int, float);
operator float + (float, int);
operator float - (float, int);
operator float * (float, int);
operator float / (float, int);
operator float :=> (float, int);
operator float +=> (float, int);
operator float -=> (float, int);
operator float *=> (float, int);
operator float /=> (float, int);
operator float $ (float, int);
operator bool && (float, int);
operator bool || (float, int);
operator bool == (float, int);
operator bool != (float, int);
operator bool > (float, int);
operator bool >= (float, int);
operator bool < (float, int);
operator bool <= (float, int);
operator bool @conditional (dur);
operator bool @unconditional (dur);
operator dur :=> (dur, dur);
operator dur +=> (dur, dur);
operator dur -=> (dur, dur);
operator dur *=> (dur, dur);
operator dur /=> (dur, dur);
operator dur + (dur, dur);
operator dur - (dur, dur);
operator dur * (dur, dur);
operator float / (dur, dur);
operator dur / (dur, float);
operator dur *=> (float, dur);
operator dur /=> (float, dur);
operator bool == (dur, dur);
operator bool != (dur, dur);
operator bool > (dur, dur);
operator bool >= (dur, dur);
operator bool < (dur, dur);
operator bool <= (dur, dur);
operator bool @conditional (time);
operator bool @unconditional (time);
operator time :=> (time, time);
operator time + (time, dur);
operator time * (time, dur);
operator time / (time, dur);
operator dur - (time, time);
operator time *=> (float, time);
operator time /=> (float, time);
operator time :=> (dur, time);
operator time + (dur, time);
operator time => (dur, @now);
operator bool => (time, time);
operator bool > (time, time);
operator bool >= (time, time);
operator bool < (time, time);
operator bool <= (time, time);

#!- the base of all functions.
primitive function;

#!- the base of decayed operators.
primitive operator extends function;

#!- the base of function pointers.
class funptr extends Object {
    fun void @ctor();
    fun void default();
}
operator funptr class ();
operator => (@Any, function);
operator => (@Any, funptr);
operator :=> (function, funptr);
operator @implicit (function, funptr);
operator $ (function, funptr);
operator @implicit (operator, funptr);
operator $ (operator, funptr);
operator :=> (function, function);
operator function @partial ();
operator Class @partial ();
primitive @error;
operator :=> (Object, Object);
operator => (@Any, @Compound);
operator bool == (Object, Object);
operator bool != (Object, Object);
operator bool $ (Object, Object);
operator bool @unconditional (Object);
operator bool @conditional (Object);
operator bool ! (Object);
operator @Compound class ();
const float samplerate;
const float pi;
const dur d_zero;
const dur samp;
const dur ms;
const dur second;
const dur minute;
const dur hour;
const time t_zero;
primitive None;
specialid const None;
operator None :=> (None, None);
const int index;
fun bool is(int member);
operator auto new:[ T ](int size, int id, T value);
operator . (union, @Any);
union Option :[ A ] {
    None none;
    A val;
};
class Array:[ T ] extends Object {
    funptr static A map_t:[ A ](T elem);
    funptr static Option:[ A ] compactmap_t:[ A ](T elem);
    funptr static A fold_t:[ A ](T elem, A acc);
    funptr static bool filter_t(T elem);
    funptr static T new_t(int idx);
    fun bool remove(int index);
    fun bool insert(int index, T data);
    fun int size();
    fun int depth();
    fun int cap();
    fun T random();
    fun A[] map:[ A ](map_t:[ A ] data);
    fun A[] compactMap:[ A ](compactmap_t:[ A ] data);
    fun T[] filter(filter_t data);
    fun int count(filter_t data);
    fun A foldl:[ A ](fold_t:[ A ] data, A initial);
    fun A foldr:[ A ](fold_t:[ A ] data, A initial);
    operator auto new(new_t init);
}
operator :=> (Array, Array);
operator @implicit (Array, Array);
operator << (Array, @Any);
operator >> (@Any, Array);
operator $ (Array, Array);
operator int [:] (int, Array);
operator [] (int, Array);
operator Array void @each_init ();
operator Array int @each ();
operator Array @each_val ();
operator Array int @each_idx ();
operator Array class ();
operator @Any bool @array_init ();
class Event extends Object {
    fun void @ctor();
    fun void signal();
    fun void broadcast();
}
operator int => (Event, @now);
class UGen extends Object {
    fun void @ctor();
    fun UGen chan(int arg0);
    fun int op();
    fun int op(int arg0);
    fun float last();
}
operator UGen ~> (UGen, UGen);
operator UGen ~< (UGen, UGen);
operator UGen :~> (UGen, UGen);
operator UGen :~< (UGen, UGen);
operator UGen[] ~> (UGen[], UGen[]);
operator UGen[] ~< (UGen[], UGen[]);
operator UGen[] :~> (UGen[], UGen[]);
operator UGen[] :~< (UGen[], UGen[]);
operator UGen[] ~> (UGen, UGen[]);
operator UGen[] ~< (UGen, UGen[]);
operator UGen[] :~> (UGen, UGen[]);
operator UGen[] :~< (UGen, UGen[]);
operator UGen ~> (UGen[], UGen);
operator UGen ~< (UGen[], UGen);
operator UGen :~> (UGen[], UGen);
operator UGen :~< (UGen[], UGen);
const UGen blackhole;
const UGen dac;
const UGen adc;
operator spork (@Any);
operator fork (@Any);
operator new (@Any);

#!- Ref: take a reference from a variable.
#!- used just as the variable it reference.
#!- can only be used as argument.
#!- and cannot be returned.
struct Ref:[ A ] {
    #!- a pointer to the referenced variable.
}

#!- internal `Ref` type creation.
operator Ref class ();
class string extends Object {
    fun void @ctor();
    fun int size();
    fun string upper();
    fun string lower();
    fun string ltrim();
    fun string rtrim();
    fun string trim();
    fun string insert(int pos, string str);
    fun string replace(int pos, string str);
    fun string replace(int pos, int n, string str);
    fun int find(char c);
    fun int find(char c, int pos);
    fun int find(string str);
    fun int find(string str, int pos);
    fun int rfind(char c);
    fun int rfind(char c, int pos);
    fun int rfind(string str);
    fun int rfind(string str, int pos);
    fun void erase(int start, int length);
    fun void save(string path);
    fun static string load(string path);
    fun int atoi();
    fun int atoi2(&int offset);
    fun float atof();
}
operator [] (int, string);
operator bool == (string, string);
operator bool != (string, string);
operator string [:] (int, string);
specialid const __file__;
specialid const __func__;
specialid const __line__;
class Shred extends Object {
    const int cancel;
    fun void exit();
    fun bool running();
    fun bool done();
    fun int id();
    fun static Shred fromId(int xid);
    fun void yield();
    fun int args();
    fun string arg(int n);
    fun string name();
    fun string path();
    fun string dir();
    fun string code_name();
    fun string code_path();
    fun string code_dir();
    fun void set_cancel(bool n);
    fun void test_cancel();
    fun void lock();
    fun void unlock();
    fun float get_now();
    fun UGen get_blackhole();
}
specialid const me;
class Fork extends Shred {
    const int is_done;
    const Event ev;
    fun void join();
    fun void test_cancel();
}
class TypedFork:[ A ] extends Fork {
    const A retval;
}
class Gain extends UGen {
    fun void @ctor();
    fun float gain();
    fun float gain(float arg0);
}
class Impulse extends UGen {
    fun void @ctor();
    fun float next();
    fun float next(float arg0);
}
class FullRect extends UGen {
    fun void @ctor();
}
class HalfRect extends UGen {
    fun void @ctor();
}
class Step extends UGen {
    fun void @ctor();
    fun float next();
    fun float next(float arg0);
}
class ZeroX extends UGen {
    fun void @ctor();
}
class UsrUGen extends UGen {
    fun void @ctor();
    fun int default_tick();
}
operator UsrUGen ~=> (function, UsrUGen);

#!- allow member access.
operator . (@Compound, @Any);
operator . (function, @Any);

#!- Operators class types.
operator bool == (Class, Class);
operator bool != (Class, Class);
operator bool >= (Class, Class);
operator bool > (Class, Class);
operator bool <= (Class, Class);
operator bool < (Class, Class);

#!- Allow binary call to constructors.
operator => (@Any, Class);

#!- internal constructor operator.
operator call_type (@Any);

#!- allow static access.
operator . (Class, @Any);

#!- Deep Equality fallback
operator bool ?= (@Any, @Any);

#!- Deep Inequality fallback
operator bool <> (@Any, @Any);

#!- Deep Equality
operator bool ?= (@Compound, @Compound);

#!- Deep Inequality
operator bool <> (@Compound, @Compound);
class Dict:[ Key, Val ] extends Object {
    fun void @ctor();
    fun void remove(Key key);
}
operator Dict class ();
operator Dict int @each ();
operator Dict void @each_init ();
operator Dict @each_val ();
operator Dict @each_idx ();
fun int hash(int key);
fun int hash(Object key);
fun int hash(float key);
fun int hash(time key);
fun int hash(dur key);
fun int hash(string key);

#!- a type for *pretty print*.
primitive @Gack;

#!- @Gack implicit cast
operator @implicit (@Gack, @Any);
class Sift extends Shred {
}

#!- This operator expands too
#!- spork {
#!-   while(true) {
#!-     lhs.last() => rhs;
#!-     samp => now;
#!-   }
#!- }
operator Sift |> (UGen, function);
operator Sift |> (Sift, function);
operator Sift |> (UGen, funptr);
operator Sift |> (Sift, funptr);

#!- Definition of the basic locale
fun float BasicLocale(string str);
enum @hidden_enum {
    0 :=> @hidden_enum,
}
built with mdr and mdBook
You'll find the source here, Luke! note: privacy guards may interfere with the playground