Sign in

    moonchor

    Choreographic programming library for MoonBit.

    Choreographic
    MoonBit
    Download zip
    Author
    Version
    0.3.0
    License
    Apache-2.0
    Last updated
    last year
    Downloads
    145

    #Moonchor: Choreographic Programming Library for MoonBit

    #Todo

    Location

    pub(open) trait Location : Show + Hash {
    name(Self) -> String
    }

    AIter

    type AIter[T]

    AIter::each

    fn AIter::each[T](self : AIter[T], f : (T) -> Unit) -> Unit

    AIter2

    type AIter2[A, B]

    AIter2::each

    fn AIter2::each[A, B](self : AIter2[A, B], f : (A, B) -> Unit) -> Unit

    ChoreoContext

    type ChoreoContext

    ChoreoContext::comm

    fn ChoreoContext::comm[T :
    FromJson
    + ToJson, From : Location + Show + Hash, To : Location + Show + Hash](self : ChoreoContext, from : From, to : To, value : Located[T, From]) -> Located[T, To]

    ChoreoContext::condition

    fn ChoreoContext::condition[L : Location + Show + Hash](self : ChoreoContext, loc : L, c : Located[Bool, L]) -> Bool

    ChoreoContext::locally

    fn ChoreoContext::locally[T, L : Location + Show + Hash](self : ChoreoContext, location : L, computation : (Unwrapper[L]) -> T) -> Located[T, L]

    Located

    type Located[T, _]

    NetworkConfig

    type NetworkConfig

    NetworkConfig::broadcast

    fn NetworkConfig::broadcast[From : Location + Show + Hash, T : ToJson +
    FromJson
    ](self : NetworkConfig, from : From, msg : T) -> Unit

    NetworkConfig::recv

    fn NetworkConfig::recv[From : Location + Show + Hash, To : Location + Show + Hash, T : ToJson +
    FromJson
    ](self : NetworkConfig, from : From, to : To) -> T

    NetworkConfig::run

    fn NetworkConfig::run[L : Location + Show + Hash, T](self : NetworkConfig, loc : L, computation : (Unwrapper[L]) -> T) -> T

    NetworkConfig::send

    fn NetworkConfig::send[From : Location + Show + Hash, To : Location + Show + Hash, T : ToJson +
    FromJson
    ](self : NetworkConfig, from : From, to : To, msg : T) -> Unit

    Unwrapper

    type Unwrapper[_]

    Unwrapper::unwrap

    fn Unwrapper::unwrap[T, L](_ : Unwrapper[L], v : Located[T, L]) -> T

    broadcast

    fn broadcast[From : Location + Show + Hash, T : ToJson +
    FromJson
    ](self : NetworkConfig, from : From, msg : T) -> Unit

    comm

    fn comm[T :
    FromJson
    + ToJson, From : Location + Show + Hash, To : Location + Show + Hash](self : ChoreoContext, from : From, to : To, value : Located[T, From]) -> Located[T, To]

    condition

    fn condition[L : Location + Show + Hash](self : ChoreoContext, loc : L, c : Located[Bool, L]) -> Bool

    into_aiter

    fn into_aiter[T](iter : Iter[T]) -> AIter[T]

    into_aiter2

    fn into_aiter2[A, B](iter : Iter2[A, B]) -> AIter2[A, B]

    locally

    fn locally[T, L : Location + Show + Hash](self : ChoreoContext, location : L, computation : (Unwrapper[L]) -> T) -> Located[T, L]

    make_local_config

    fn make_local_config(locations : Array[Location]) -> NetworkConfig

    recv

    fn recv[From : Location + Show + Hash, To : Location + Show + Hash, T : ToJson +
    FromJson
    ](self : NetworkConfig, from : From, to : To) -> T

    run

    fn run[L : Location + Show + Hash, T](self : NetworkConfig, loc : L, computation : (Unwrapper[L]) -> T) -> T

    run_choreo

    fn run_choreo[T, L : Location + Show + Hash](config : NetworkConfig, choreography : (ChoreoContext) -> T, role : L) -> T

    send

    fn send[From : Location + Show + Hash, To : Location + Show + Hash, T : ToJson +
    FromJson
    ](self : NetworkConfig, from : From, to : To, msg : T) -> Unit

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io