(* Pretty-normal form (PNF) subset of core-calculus, explicitly typed, with subtyping *) module Pnf = struct type id = Tcore.id type label = Tcore.label type var = Tcore.var and typ = Tcore.typ (* = IntT | ArrowT of typ * typ | RecordT of rtyp | SumT of rtyp *) and rtyp = (label * typ) list (* labels are sorted and unique *) type trexp = Var of var | Abs of var * typ * exp | Int of int and exp = Triv of trexp | Let of var * typ * exp * exp | App of trexp * trexp | Fix of (var * trexp * typ) list * exp | Record of row | Select of label * trexp | Variant of label * trexp | Switch of trexp * row and row = (label * trexp) list end