module alloy/paragraphs/Fun
imports
  alloy/Names
  alloy/expressions/Block
exports
  sorts FunDecl Args

context-free syntax

  "private" FunDecl -> FunDecl {cons("APrivateFunDecl")}

  "pred" (Ref ".")? Name Args? Block          -> FunDecl {cons("AFunDecl")}
  "fun" (Ref ".")? Name Args? ":" Expr Block -> FunDecl {cons("AFunDecl")}
  
  "[" {Decl ","}* "]" -> Args {cons("AArgs")}
  "(" {Decl ","}* ")" -> Args {cons("AArgs")}
