ElixirST (ElixirST v0.6.2) View Source
This module is the starting point of ElixirST. It parses the @session
(and @dual
) attribute
and starts analysing the AST code using session types.
A basic module, typechecked using ElixirST, takes the following form:
defmodule Examples.SmallExample do
use ElixirST
@session "X = !Hello()"
@spec some_process(pid) :: atom()
def some_process(pid) do
send(pid, {:Hello})
:ok
end
@dual "X"
# ...
end
Link to this section Summary
Functions
Spawns two actors, exchanges their pids and then calls the server/client functions
Link to this section Functions
Specs
spawn( (... -> any()), maybe_improper_list(), (... -> any()), maybe_improper_list() ) :: {pid(), pid()}
Spawns two actors, exchanges their pids and then calls the server/client functions
server_fn
and client_fn
need to accept a pid
as their first parameter.