diff --git a/lib/typing/render.ml b/lib/typing/render.ml new file mode 100644 index 0000000..d6d4406 --- /dev/null +++ b/lib/typing/render.ml @@ -0,0 +1,25 @@ +open Typedtree +module Fmt = Format + +module type PPConfig = sig end + +module MakePP (Config : PPConfig) = struct + let rec pp_expr (fmt : Format.formatter) (e : expr) = + match e with + | EConst (CBool b, _) -> Fmt.pp_print_bool fmt b + | EConst (CInt i, _) -> Fmt.pp_print_int fmt i + | EConst (CString s, _) -> + Fmt.pp_print_string fmt (Printf.sprintf "\"%s\"" s) + | EVar (_, _) -> _ + | ELet (_, _, _, _) -> _ + | ELetrec (_, _, _) -> _ + | ELam _ -> _ + | EIf (_, _, _, _) -> _ + | ECase (_, _, _) -> _ + | EApp (_, _, _) -> _ + | EAnn (_, _) -> _ + | ETuple (_, _) -> _ + | EField (_, _, _) -> _ + | ECons (_, _) -> _ + | EFieldCons (_, _, _) -> _ +end