1 data Process : Type → Type∗ → Type data ProcRef : Type → Type 6 spawn : Process l’ a → Process l (ProcRef l’) receive : Process l l 11 send : ProcRef l’ → l’ → Process l () 16 become : Process l a → (a → Process l’ b) → Process l’ b Archibald Samuel Elliott, Edwin Brady Erlang meets Dependent Types
Too Dependent 1 data GFL : (st : Type) → (se : Type) → (se → st → Type) → Type → Type where MkGFL : (st : Type) → (se : Type) → (ser : (se → st → Type )) 6 → (e : Type) → GFL st se ser e GFP : Type → Type data GFRef : (GFL _ _ _ _) 11 → Type where MkGFRef : {l : GFL _ _ _ _} → ErlPid → GFRef l 16 sync_send_event : {l : GFL st se ser e} → GFRef l → (ev : se) → GFP ??? Archibald Samuel Elliott, Edwin Brady Erlang meets Dependent Types
Idris has several IRs, but only some for Code Generation • Lambda Terms • Defunctionalised Terms • Applicative Normal Form • Bytecode Archibald Samuel Elliott, Edwin Brady Erlang meets Dependent Types
We can produce verified concurrent programs in Idris • We can compile these programs to work with Erlang • We can run verified programs in Erlang Archibald Samuel Elliott, Edwin Brady Erlang meets Dependent Types