Yes! Can has syntax!
So far my language has existed mostly in the form of commutative diagrams and ASTs. But it now has a concrete syntax! (Or most of one, anyway.)
And indeed finally has its first (albeit somewhat useless) example program. Yarr!
type Request = (Integer, Identification) type Identification = Integer data Bool = True | False data Response = Dollar Integer | Deny protocol User = #Use Request >> (Response << User) protocol Bank = #Dbt Request >> Bank protocol Credit = #Cdt Request >> (Bool << Credit) Bank_Machine :: usr : User ||- bnk : Bank, crd : Credit Bank_Machine = drive Process by usr: #Use: get usr (x, id) => case x of True -> put bnk #Dbt (x, id) ; put usr Dollar x ; Process False -> put crd #Cdr (x, id) ; get crd p => case p of True -> put bnk #Dbt (x, id) ; put usr Dollar x ; Process False -> put usr Deny ; Process -- don't you just love it when debiting your account is a no-op? Bank_Account :: bnk : Bank ||- 1 : 1 Bank_Account = drive Process by bnk: #Dbt: get bnk (x, id) => Process -- even-numbered accounts always pass the credit check, har Credit_Check :: crd : Credit ||- 1 : 1 Credit_Check = drive Process by crd: #Cdt: get crd (x, id) => case id % 2 of 1 -> put crd False ; Process 0 -> put crd True ; Process
"And everybody join in with me now! I say: Hallelujah!"