Categorical Message Passing Language

Concurrency with a type system that keeps its promises.

CaMPL is a typed, functional-style concurrent language where processes communicate by passing messages on channels. Its semantics come from the categorical theory of message passing — and pure programs are deadlock- and livelock-free.

helloworld.mpl
coprotocol S => Console =
    ConsolePut :: S => Get( [Char] | S )
    ConsoleClose :: S => TopBot

proc helloworld :: | Console => =
    | console => -> do
        hput ConsolePut on console
        put "Hello World" on console
        hput ConsoleClose on console
        halt console

Why CaMPL?

Four ideas set it apart from the concurrency you already know.

Typed concurrency
Channels carry typed communication protocols — the type system checks how processes talk, not just what they compute.
Deadlock & livelock free
Pure CaMPL is guaranteed free of deadlocks and livelocks, and guarantees progress — by construction.
Controlled non-determinism
Races let you express non-deterministic concurrent behaviour deliberately, where you want it.
Sequential data & codata
Alongside processes, CaMPL has a full functional core with data and codata declarations.