diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2012-07-30 18:04:46 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2012-07-30 18:04:46 +0000 |
commit | 997a678d5ee774930288bfec23d4b145ce45c078 (patch) | |
tree | ef26b1b6992733f6ee00a1f760ab1da89eaef315 /typing/datarepr.ml | |
parent | b7271628a25d208c90e77dce62ff0244a1c2fcdd (diff) | |
download | ocaml-997a678d5ee774930288bfec23d4b145ce45c078.tar.gz |
clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing/datarepr.ml')
-rw-r--r-- | typing/datarepr.ml | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/typing/datarepr.ml b/typing/datarepr.ml index 5d44504270..443123aa96 100644 --- a/typing/datarepr.ml +++ b/typing/datarepr.ml @@ -22,7 +22,7 @@ open Btype (* Simplified version of Ctype.free_vars *) let free_vars ty = let ret = ref TypeSet.empty in - let rec loop ty = + let rec loop ty = let ty = repr ty in if ty.level >= lowest_level then begin ty.level <- pivot_level - ty.level; @@ -34,7 +34,7 @@ let free_vars ty = iter_row loop row; if not (static_row row) then loop row.row_more | _ -> - iter_type_expr loop ty + iter_type_expr loop ty end in loop ty; @@ -51,39 +51,39 @@ let constructor_descrs ty_res cstrs priv = let rec describe_constructors idx_const idx_nonconst = function [] -> [] | (name, ty_args, ty_res_opt) :: rem -> - let ty_res = - match ty_res_opt with - | Some ty_res' -> ty_res' - | None -> ty_res - in + let ty_res = + match ty_res_opt with + | Some ty_res' -> ty_res' + | None -> ty_res + in let (tag, descr_rem) = match ty_args with [] -> (Cstr_constant idx_const, describe_constructors (idx_const+1) idx_nonconst rem) | _ -> (Cstr_block idx_nonconst, describe_constructors idx_const (idx_nonconst+1) rem) in - let existentials = - match ty_res_opt with - | None -> [] - | Some type_ret -> - let res_vars = free_vars type_ret in - let arg_vars = free_vars (newgenty (Ttuple ty_args)) in - TypeSet.elements (TypeSet.diff arg_vars res_vars) - in - let cstr = - { cstr_res = ty_res; - cstr_existentials = existentials; + let existentials = + match ty_res_opt with + | None -> [] + | Some type_ret -> + let res_vars = free_vars type_ret in + let arg_vars = free_vars (newgenty (Ttuple ty_args)) in + TypeSet.elements (TypeSet.diff arg_vars res_vars) + in + let cstr = + { cstr_res = ty_res; + cstr_existentials = existentials; cstr_args = ty_args; cstr_arity = List.length ty_args; cstr_tag = tag; cstr_consts = !num_consts; cstr_nonconsts = !num_nonconsts; - cstr_normal = !num_normal; + cstr_normal = !num_normal; cstr_private = priv; - cstr_generalized = ty_res_opt <> None - } in + cstr_generalized = ty_res_opt <> None + } in (name, cstr) :: descr_rem in - describe_constructors 0 0 cstrs + describe_constructors 0 0 cstrs let exception_descr path_exc decl = { cstr_res = Predef.type_exn; |