diff options
author | Nicolas Pouillard <np@nicolaspouillard.fr> | 2006-06-29 21:55:15 +0000 |
---|---|---|
committer | Nicolas Pouillard <np@nicolaspouillard.fr> | 2006-06-29 21:55:15 +0000 |
commit | 7a780a0c5e823e744d4c16c58148a339e13a9608 (patch) | |
tree | 1f98d7873780a560c856942a1d288beacbafda84 /camlp4/test/fixtures/functor-perf3.ml | |
parent | 4e509164a91f5eba2227a1cf595e3a1dcd24806d (diff) |
Add few more test fixtures
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7458 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/test/fixtures/functor-perf3.ml')
-rw-r--r-- | camlp4/test/fixtures/functor-perf3.ml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/camlp4/test/fixtures/functor-perf3.ml b/camlp4/test/fixtures/functor-perf3.ml new file mode 100644 index 000000000..5bf5359c6 --- /dev/null +++ b/camlp4/test/fixtures/functor-perf3.ml @@ -0,0 +1,50 @@ +<% types, with_constrs, make, make2 = ARGV.map { |x| x.to_i } %> + +module type S = sig +<%- for i in 0 .. types do -%> + type t<%= i %> +<%- end -%> +end + +module Make (M : S) +: S with type t0 = M.t0 + <%- for i in 1 .. with_constrs do -%> + and type t<%= i %> = M.t<%= i %> + <%- end -%> += struct + include M +end + +module type S2 = sig + module M : S +end + +module Make2 (M2 : S2) +: S2 with module M = M2.M += struct + include M2 +end + +module M = struct +<%- for i in 0 .. types do -%> + type t<%= i %> = int -> int -> int +<%- end -%> +end + +module M1 = + Make +<%- make.times do -%> + (Make +<%- end -%> + (M)<%= ')' * make %> + +module M2 = struct + module M = M1 +end + +module X = + Make2 +<%- make2.times do -%> + (Make2 +<%- end -%> + (M2)<%= ')' * make2 %> |