module V1.WellTypedSyntax where
open import Library
open import V1.AST public using (Type; bool; int; Boolean; true; false; PrintBoolean)
data Op : (dom codom : Type) → Set where
  plus  : Op int  int
  gt    : Op int  bool
  and   : Op bool bool
data Exp : Type → Set where
  
  eInt  : (i : ℤ)                               → Exp int
  eBool : (b : Boolean)                         → Exp bool
  
  eOp   : ∀{t t'} (op : Op t t') (e e' : Exp t) → Exp t'
  
  eCond : ∀{t} (e : Exp bool) (e' e'' : Exp t)  → Exp t
record Program : Set where
  constructor program
  field
    theMain  : Exp int
open Program public