1. camlspotter
  2. olfend

Commits

camlspotter  committed 249d60b

port to ocaml4

  • Participants
  • Parent commits 704b865
  • Branches default

Comments (0)

Files changed (3)

File interm.ml

View file
 
   module E = Expr
 
-  let rec of_typed top = match top with
+  let of_typed top = match top with
     | TT.Let (pat, env, t) -> 
         let id_ptyps = List.map (function
           | (id, pty) -> id, pty) env 

File pattern.ml

View file
 
   let format_row ppf (pat_s, lang) = 
     Format.fprintf ppf "| @[<2>%a ->@ @[%a@]@]"
-      (Format.list_sep_str ", " Sexp.pp_hum) (List.map sexp_of_pattern_ pat_s)
+      (Format.list ",@ " Sexp.pp_hum) (List.map sexp_of_pattern_ pat_s)
       Sexp.pp_hum (sexp_of_lang lang)
 
-  let format_matrix = Format.list_sep_str " " format_row
+  let format_matrix = Format.list "@ " format_row
 
   let tag_const = function
     | PVar _ | PAny -> None

File types.ml

View file
 
   let of_type t = Poly ([], t)
 
-  let rec to_raw env (Poly (rvars, t)) = 
+  let to_raw env (Poly (rvars, t)) = 
     let rev_vars, env = List.fold_left (fun (rev_vars, env) v ->
       let var = Type.create_name v env in
       let env = (v,var)::env in
 
   let free_vars (Poly (params, ty)) = Type.free_vars (List.map (fun n -> Var (n,-1)) params, ty)
 
-  let rec rename s (Poly (params, ty)) = 
+  let rename s (Poly (params, ty)) = 
     let s, params = rename_params s params in
     let s, ty = rename_typ s ty in
     s, Poly (params, ty)