import BidirTT.Syntax

namespace BidirTT

mutual
  partial def prettyTm : Tm → String
    | .var i      => s!"#{i}"
    | .lam t      => s!"(fun => {prettyTm t})"
    | .app t u    => s!"({prettyTm t} {prettyTm u})"
    | .pi a b     => s!"(Pi {prettyTm a} -> {prettyTm b})"
    | .sig a b    => s!"(Sigma {prettyTm a} * {prettyTm b})"
    | .pair t u   => s!"({prettyTm t}, {prettyTm u})"
    | .fst t      => s!"({prettyTm t}.1)"
    | .snd t      => s!"({prettyTm t}.2)"
    | .univ i     => s!"U{i}"
    | .letE a t u => s!"(let : {prettyTm a} := {prettyTm t}; {prettyTm u})"
end

end BidirTT
