├── stdlib ├── hashbang └── templates │ └── README.adoc ├── otherlibs ├── bigarray │ ├── empty.c │ └── .depend ├── str │ └── .depend ├── unix │ └── .depend └── win32unix │ └── .depend ├── testsuite └── tests │ ├── basic-modules │ ├── main.mli │ ├── main.reference │ ├── pr4008.ml │ ├── offset.ml │ └── pr7427.ml │ ├── basic │ ├── arrays.reference │ ├── pr7533.reference │ ├── stringmatch.reference │ ├── trigraph.reference │ ├── eval_order_2.reference │ ├── min_int.reference │ ├── opt_variants.reference │ ├── camlCase.ml │ ├── eval_order_1.reference │ ├── eval_order_3.reference │ ├── zero_divided_by_n.reference │ ├── eval_order_6.reference │ ├── float.reference │ ├── float_physical_equality.reference │ ├── localexn.reference │ ├── localfunction.reference │ ├── pr7657.reference │ ├── switch_opts.reference │ ├── eval_order_4.reference │ ├── pr7253.reference │ ├── float.ml │ ├── tailcalls.reference │ ├── trigraph.ml │ ├── recvalues.reference │ ├── eval_order_1.ml │ ├── maps.reference │ ├── includestruct.reference │ ├── unit_naming.compilers.reference │ ├── bigints.reference │ ├── float_physical_equality.ml │ ├── unit_naming.ml │ └── localexn.ml │ ├── lazy │ └── lazy1.reference │ ├── misc │ ├── gpr1370.reference │ ├── bdd.reference │ ├── finaliser.reference │ ├── weaklifetime.reference │ ├── boyer.reference │ ├── fib.reference │ ├── gcwords.reference │ ├── pr7168.reference │ ├── takc.reference │ ├── taku.reference │ ├── weaktest.reference │ ├── nucleic.reference │ ├── weaklifetime2.reference │ ├── ephetest2.reference │ ├── fib.ml │ ├── takc.ml │ └── taku.ml │ ├── flambda │ ├── gpr998.reference │ ├── specialise.reference │ ├── approx_meet.reference │ ├── gpr2239.reference │ ├── afl_lazy.ml │ └── approx_meet.ml │ ├── lib-set │ ├── testmap.reference │ └── testset.reference │ ├── lib-unix │ ├── common │ │ ├── utimes.txt │ │ ├── test_unixlabels.reference │ │ ├── dup.reference │ │ ├── pipe_eof.reference │ │ ├── process_pid.reference │ │ ├── wait_nohang.reference │ │ ├── dup2.reference │ │ ├── utimes.reference │ │ ├── cmdline_prog.ml │ │ ├── truncate.reference │ │ ├── rename.reference │ │ ├── fdstatus_main.ml │ │ ├── test_unixlabels.ml │ │ ├── uexit.ml │ │ └── dup.ml │ ├── isatty │ │ ├── isatty_tty.reference │ │ └── isatty_std.reference │ ├── kill │ │ └── unix_kill.reference │ ├── unix-execvpe │ │ ├── subdir │ │ │ ├── nonexec │ │ │ ├── script2 │ │ │ └── script1 │ │ └── script3 │ ├── unix-socket │ │ ├── recvfrom_linux.reference │ │ └── recvfrom_unix.reference │ ├── win-symlink │ │ └── test.reference │ ├── win-env │ │ └── test_env.reference │ └── win-stat │ │ ├── test.run │ │ └── test.reference │ ├── parsetree │ └── test.reference │ ├── arch-power │ └── exn_raise.reference │ ├── ast-invariants │ └── test.reference │ ├── basic-more │ ├── pr7683.reference │ ├── pr6216.reference │ ├── if_in_if.reference │ ├── morematch.reference │ ├── opaque_prim.reference │ ├── pr1271.reference │ ├── robustmatch.reference │ ├── tbuffer.reference │ ├── function_in_ref.reference │ ├── structural_constants.reference │ ├── top_level_patterns.reference │ ├── tprintf.reference │ ├── div_by_zero.reference │ ├── pr2719.reference │ ├── pr7683.ml │ ├── bounds.reference │ ├── function_in_ref.ml │ ├── opaque_prim.ml │ └── top_level_patterns.ml │ ├── basic-private │ ├── tlength.reference │ └── length.mli │ ├── exotic-syntax │ └── exotic.reference │ ├── int64-unboxing │ └── test.reference │ ├── letrec-compilation │ ├── ref.reference │ ├── class_1.reference │ ├── labels.reference │ ├── lists.reference │ ├── nested.reference │ ├── pr4989.reference │ ├── generic_array.reference │ ├── lazy_.reference │ ├── backreferences.reference │ ├── mutual_functions.reference │ ├── record_with.reference │ ├── class_2.reference │ ├── mixing_value_closures_1.reference │ ├── mixing_value_closures_2.reference │ ├── float_block_1.reference │ ├── pr8681.reference │ ├── evaluation_order_1.reference │ ├── evaluation_order_2.reference │ ├── evaluation_order_3.reference │ ├── labels.ml │ ├── pr4989.ml │ ├── generic_array.ml │ ├── lazy_.ml │ ├── class_1.ml │ ├── nested.ml │ ├── mixing_value_closures_2.ml │ └── mixing_value_closures_1.ml │ ├── lib-bool │ └── test.reference │ ├── lib-filename │ ├── extension.reference │ ├── suffix.reference │ └── null.ml │ ├── lib-float │ └── test.reference │ ├── lib-fun │ └── test.reference │ ├── lib-int │ └── test.reference │ ├── lib-int64 │ ├── test.reference │ └── issue9460.reference │ ├── lib-list │ └── test.reference │ ├── lib-obj │ ├── new_obj.reference │ ├── with_tag.reference │ └── reachable_words.reference │ ├── lib-option │ └── test.reference │ ├── lib-queue │ └── test.reference │ ├── lib-result │ └── test.reference │ ├── lib-seq │ └── test.reference │ ├── lib-stack │ └── test.reference │ ├── lib-stream │ ├── mpr7769.txt │ ├── mpr7769.reference │ ├── count_concat_bug.reference │ └── mpr7769.ml │ ├── lib-string │ └── test_string.reference │ ├── lib-uchar │ └── test.reference │ ├── ppx-attributes │ └── warning.reference │ ├── regression │ ├── pr8769 │ │ ├── fortuna.ml │ │ ├── rng.ml │ │ └── nocrypto.mli │ ├── gpr1623 │ │ └── gpr1623.reference │ ├── pr7426 │ │ ├── pr7426.reference │ │ └── pr7426.ml │ ├── pr7920 │ │ ├── pr7920.reference │ │ └── pr7920.ml │ ├── pr3612 │ │ └── pr3612.reference │ ├── pr7718 │ │ └── pr7718.reference │ ├── pr7798 │ │ └── pr7798.reference │ ├── pr6024 │ │ ├── pr6024.reference │ │ └── pr6024.ml │ ├── pr5757 │ │ ├── pr5757.reference │ │ └── pr5757.ml │ ├── pr7042 │ │ ├── pr7042.reference │ │ └── pr7042.ml │ ├── pr9028 │ │ └── pr9028.reference │ ├── missing_set_of_closures │ │ ├── b2.ml │ │ ├── dir │ │ │ └── c.ml │ │ ├── b.ml │ │ └── a.ml │ ├── pr5233 │ │ └── pr5233.reference │ ├── pr9292 │ │ └── pr9292.ml │ ├── pr1580 │ │ └── pr1580.reference │ └── pr9443 │ │ └── pr9443.ml │ ├── tool-command-line │ ├── unknown-file │ └── test.compilers.reference │ ├── typing-modules │ ├── .gitattributes │ └── pr8810.ml │ ├── array-functions │ └── test.reference │ ├── asmcomp │ ├── 0001-test.ml │ ├── func_sections.arm.reference │ ├── func_sections.reference │ ├── compare.reference │ ├── simple_float_const.ml │ ├── is_static_flambda_dep.ml │ ├── simple_float_const_opaque.ml │ ├── 0001-test.compilers.reference │ ├── is_in_static_data.c │ └── unrolling_flambda.ml │ ├── lexing │ ├── comments.ocaml.reference │ ├── comments.ml │ └── escape.ml │ ├── lib-dynlink-pr6950 │ ├── byte.reference │ ├── native.reference │ ├── config.ml │ └── b.ml │ ├── lib-dynlink-pr9209 │ ├── main.reference │ ├── ocamltests │ ├── lib2.ml │ ├── test.c │ └── lib.ml │ ├── lib-random │ └── rand.reference │ ├── lib-threads │ ├── beat.reference │ ├── pr7638.reference │ ├── prodcons.reference │ ├── prodcons2.reference │ ├── torture.reference │ ├── pr5325.reference │ ├── swapchan.reference │ ├── bufchan.reference │ ├── delayintr.reference │ ├── sockets.reference │ ├── swapchan.run │ ├── bank.reference │ ├── tls.run │ ├── close.reference │ ├── signal.run │ ├── tls.reference │ ├── delayintr.run │ ├── pr4466.reference │ ├── signal.check-program-output │ ├── test-runtime-cleanup.sh │ └── pr9971.ml │ ├── no-alias-deps │ ├── a2235.ml │ ├── c.mli │ ├── d.mli │ ├── b.cmi.invalid │ ├── lib2235.ml │ ├── lib__2235.ml │ └── user_of_lib2235.ml │ ├── raise-counts │ ├── main.reference │ ├── b.ml │ ├── main.ml │ └── a.ml │ ├── statmemprof │ ├── alloc_counts.reference │ ├── custom.reference │ ├── exception_callback.reference │ ├── minor_no_postpone_stub.c │ ├── exception_callback_minor.reference │ ├── lists_in_minor.reference │ └── moved_while_blocking.reference │ ├── tool-ocamlc-open │ ├── b.ml │ ├── a.ml │ ├── tool-ocamlc-open-error.ml │ ├── tool-ocamlc-open.ml │ └── tool-ocamlc-open-error.compilers.reference │ ├── tool-ocamldep-shadowing │ ├── dir1 │ │ └── b.ml │ ├── dir2 │ │ ├── b.mli │ │ └── c.mli │ └── a.reference │ ├── unboxed-primitive-args │ └── test.reference │ ├── backtrace │ ├── pr6920_why_at.native.reference │ ├── pr6920_why_swallow.native.reference │ ├── backtraces_and_finalizers.reference │ ├── inline_test.run │ ├── inline_traversal_test.run │ ├── backtrace.run │ ├── event_after_prim.reference │ ├── inline_traversal_test.reference │ ├── inline_test.reference │ ├── pr2195-nolocs.byte.reference │ └── pr2195-locs.byte.reference │ ├── basic-multdef │ ├── usemultdef.reference │ ├── multdef.mli │ ├── multdef.ml │ └── usemultdef.ml │ ├── lib-dynlink-private │ ├── plugin4 │ │ └── chicken.mli │ ├── plugin6 │ │ ├── pheasant.mli │ │ ├── partridge.ml │ │ ├── partridge.mli │ │ └── pheasant.ml │ ├── plugin5 │ │ ├── chicken.ml │ │ └── chicken.mli │ ├── pig.mli │ ├── sheep.mli │ ├── plugin1 │ │ ├── sheep.mli │ │ └── sheep.ml │ ├── plugin2 │ │ ├── cow.mli │ │ └── cow.ml │ ├── plugin2b │ │ ├── cow.mli │ │ └── cow.ml │ ├── plugin2c │ │ ├── cow.mli │ │ └── cow.ml │ ├── plugin3 │ │ ├── pig.mli │ │ └── pig.ml │ └── sheep.ml │ ├── lib-marshal │ ├── intern_final.reference │ └── marshal_bigarray.reference │ ├── lib-stdlabels │ └── test_stdlabels.reference │ ├── tool-lexyacc │ ├── mpr7760.reference │ ├── main.compilers.reference │ └── mpr7760.mll │ ├── tool-ocamltest │ ├── norm1.reference │ ├── norm3.reference │ ├── norm4.reference │ ├── norm2.reference │ ├── norm1.ml │ ├── norm2.ml │ ├── norm4.ml │ └── norm3.ml │ ├── tool-toplevel │ ├── mod.ml │ ├── error_highlighting_use2.ml │ ├── error_highlighting_use1.ml │ ├── error_highlighting_use3.ml │ ├── error_highlighting_use4.ml │ ├── pr7751.ml │ ├── tracing.ml │ ├── mod_use.ml │ ├── pr7060.ml │ └── pr6468.ml │ ├── typing-missing-cmi-2 │ ├── foo.mli │ ├── baz.ml │ ├── bar.mli │ └── test.compilers.reference │ ├── typing-multifile │ ├── a.ml │ ├── b.ml │ ├── e.ml │ ├── c.ml │ ├── d.mli │ ├── f.ml │ ├── pr7563.ml │ ├── pr6372.ml │ ├── pr9218.ml │ └── pr7325.ml │ ├── basic-float │ └── zero_sized_float_arrays.reference │ ├── compatibility │ └── main.reference │ ├── extension-constructor │ └── test.reference │ ├── lib-dynlink-init-info │ └── test.reference │ ├── lib-systhreads │ ├── threadsigmask.reference │ ├── eintr.reference │ ├── testpreempt.reference │ └── testfork.reference │ ├── misc-unsafe │ ├── quicksort.reference │ ├── almabench.reference │ └── fft.reference │ ├── tool-debugger │ ├── no_debug_event │ │ ├── a.ml │ │ ├── input_script │ │ ├── b.ml │ │ └── noev.reference │ ├── dynlink │ │ ├── host.reference │ │ ├── input_script │ │ ├── plugin.ml │ │ └── host.debug.reference │ ├── find-artifacts │ │ ├── in │ │ │ ├── blah.ml │ │ │ └── foo.ml │ │ ├── input_script │ │ └── debuggee.reference │ ├── basic │ │ ├── debuggee.reference │ │ └── input_script │ └── printer │ │ ├── debuggee.reference │ │ └── input_script │ ├── tool-ocamldep-modalias │ ├── A.ml │ ├── D.ml │ ├── B.ml │ ├── C.ml │ ├── setup-links.sh │ ├── depend.mod2.reference │ ├── depend.mod3.reference │ ├── depend.mod.reference │ ├── lib_impl.ml │ └── lib.mli │ ├── typing-missing-cmi │ ├── a.ml │ ├── b.ml │ ├── main.ml │ ├── main_ok.ml │ └── subdir │ │ └── m.ml │ ├── lib-digest │ └── md5.reference │ ├── lib-dynlink-pr4229 │ ├── main.reference │ ├── static.ml │ ├── client.ml │ ├── abstract.mli │ ├── sub │ │ ├── abstract.mli │ │ └── abstract.ml │ └── abstract.ml │ ├── match-exception │ ├── identifier_sharing.reference │ ├── match_failure.reference │ ├── nested_handlers.reference │ ├── allocation.reference │ ├── tail_calls.reference │ ├── exception_propagation.reference │ ├── streams.reference │ ├── raise_from_success_continuation.reference │ └── identifier_sharing.ml │ ├── opaque │ ├── fst │ │ ├── regular.ml │ │ ├── opaque_impl.ml │ │ └── opaque_intf.ml │ ├── snd │ │ ├── regular.ml │ │ ├── opaque_impl.ml │ │ └── opaque_intf.ml │ └── intf │ │ ├── regular.mli │ │ ├── opaque_impl.mli │ │ └── opaque_intf.mli │ ├── parsing │ ├── pr6604_3.compilers.reference │ ├── anonymous_class_parameter.compilers.reference │ ├── arrow_ambiguity.compilers.reference │ ├── pr6604.compilers.reference │ ├── pr6604_2.compilers.reference │ ├── constructor_declarations.compilers.reference │ ├── change_start_loc.reference │ ├── pr6604.ml │ ├── pr6604_2.ml │ ├── pr7165.compilers.reference │ ├── pr6604_3.ml │ └── pr6865.ml │ ├── reproducibility │ └── cmis_on_file_system_companion.mli │ ├── runtime-C-exceptions │ └── test.reference │ ├── tool-ocamldoc-open │ ├── inner.ml │ ├── alias.ml │ ├── main.ocamldoc.latex.reference │ └── main.ml │ ├── typing-labels │ ├── mixin.reference │ ├── mixin2.reference │ └── mixin3.reference │ ├── lib-dynlink-native │ ├── plugin.mli │ ├── sub │ │ ├── api.mli │ │ ├── plugin3.ml │ │ ├── api.ml │ │ └── plugin.ml │ ├── pack_client.ml │ ├── packed1_client.ml │ ├── plugin4.ml │ ├── b.ml │ ├── c.ml │ ├── plugin_simple.ml │ ├── a.ml │ ├── bug.ml │ ├── packed1.ml │ ├── plugin_high_arity.ml │ ├── plugin_ext.ml │ ├── plugin_ref.ml │ └── plugin2.ml │ ├── link-test │ ├── aliases.ml │ ├── use_in_pack.ml │ ├── external.mli │ ├── test.reference │ ├── external_for_pack.mli │ ├── submodule.ml │ ├── external.ml │ └── external_for_pack.ml │ ├── self-contained-toplevel │ ├── main.reference │ ├── foo.ml │ ├── input.ml │ └── gen_cached_cmi.ml │ ├── basic-io │ └── wc.reference │ ├── lib-bigarray │ ├── pr5115.reference │ ├── weak_bigarray.reference │ ├── change_layout.reference │ └── fftba.reference │ ├── required-external │ ├── main.reference │ └── file.ml │ ├── tool-toplevel-invocation │ ├── working_arg.txt │ ├── first_arg_fail.txt │ ├── last_arg_fail.txt │ ├── print_args.reference │ ├── indirect_first_arg_fail.txt │ ├── indirect_last_arg_fail.txt │ ├── working_arg.txt.reference │ ├── print_args.ml │ ├── last_arg_fail.txt.reference │ ├── first_arg_fail.txt.reference │ ├── indirect_first_arg_fail.txt.reference │ └── indirect_last_arg_fail.txt.reference │ ├── warnings │ ├── module_without_cmx.mli │ ├── w68.reference │ ├── mnemonics.reference │ ├── w60.compilers.reference │ ├── w58.native.reference │ ├── w60.mli │ ├── deprecated_module.ml │ ├── w51_bis.compilers.reference │ ├── w04.compilers.reference │ ├── deprecated_module.compilers.reference │ └── deprecated_module.mli │ ├── generalized-open │ ├── accepted_batch.reference │ └── funct_body.compilers.reference │ ├── lib-dynlink-initializers │ ├── test8_plugin_b.mli │ ├── test7_interface_only.mli │ ├── test9_second_plugin.mli │ ├── test1_inited_second.ml │ ├── test3_plugin_a.ml │ ├── test4_plugin_b.ml │ ├── test2_inited_first.ml │ ├── test5_plugin_a.ml │ ├── test2_plugin.ml │ ├── test3_plugin_b.ml │ ├── test4_plugin_a.ml │ ├── test5_second_plugin.ml │ ├── test6_second_plugin.ml │ ├── test7_plugin.ml │ ├── test9_plugin.ml │ ├── test9_second_plugin.ml │ ├── test1_plugin.ml │ ├── test8_plugin_b.ml │ ├── test8_plugin_a.ml │ ├── test5_plugin_b.ml │ └── test10_plugin.ml │ ├── lib-dynlink-packed │ ├── byte.reference │ ├── native.reference │ ├── a.ml │ └── b.ml │ ├── prim-revapply │ ├── revapply.reference │ └── apply.reference │ ├── tool-ocamldoc │ ├── t03.ocamldoc.reference │ ├── t05.reference │ ├── Extensible_variant.ocamldoc.latex.reference │ ├── Loop.ml │ ├── Module_whitespace.ocamldoc.html.reference │ ├── Module_whitespace.ml │ ├── No_preamble.mli │ ├── t05.ml │ ├── t02.reference │ ├── t03.reference │ ├── Short_description.txt │ └── latex_ref.mli │ ├── output-complete-obj │ ├── github9344.reference │ ├── test2.reference │ ├── github9344.sh │ ├── puts.c │ └── test.ml_stub.c │ ├── typing-safe-linking │ └── a.ml │ ├── utils │ └── test_strongly_connected_components.reference │ ├── lib-dynlink-pr4839 │ ├── byte.plugin1.reference │ ├── host │ │ ├── api.mli │ │ └── api.ml │ ├── native.plugin1.reference │ ├── byte.plugin2.reference │ ├── native.plugin2.reference │ ├── plugin1 │ │ ├── api.mli │ │ ├── api.ml │ │ └── plugin.ml │ ├── plugin4 │ │ ├── api.mli │ │ ├── api.ml │ │ └── plugin.ml │ ├── plugin2 │ │ ├── api.mli │ │ ├── api.ml │ │ └── plugin.ml │ ├── plugin3 │ │ ├── api.mli │ │ ├── api.ml │ │ └── plugin.ml │ ├── byte.plugin3.reference │ ├── byte.plugin4.reference │ ├── native.plugin3.reference │ └── native.plugin4.reference │ ├── typing-missing-cmi-3 │ └── original.ml │ ├── typing-polyvariants-bugs-2 │ ├── pr3918a.mli │ └── pr3918b.mli │ ├── callback │ ├── tcallback.reference │ └── signals_alloc.reference │ ├── formats-transition │ ├── legacy_unfinished_modifiers.ocaml.reference │ ├── legacy_incompatible_flags.ocaml.reference │ └── deprecated_unsigned_printers.ocaml.reference │ ├── lib-format │ ├── pr6824.reference │ ├── print_seq.reference │ ├── print_if_newline.reference │ └── pr6824.ml │ ├── typing-shadowing-of-pervasives-submodules │ ├── largeFile.ml │ ├── redefine_largefile.reference │ ├── redefine_largefile_top.compilers.reference │ └── redefine_largefile.ml │ ├── lib-bytes │ └── test_bytes.reference │ ├── runtime-naked-pointers │ ├── np2.run │ ├── np3.run │ └── np4.run │ ├── typing-short-paths │ ├── gpr1223_foo.mli │ ├── gpr1223.compilers.reference │ ├── pr6836.compilers.reference │ ├── gpr1223_bar.mli │ ├── pr5918.compilers.reference │ ├── gpr1223.ml │ ├── pr6836.ml │ └── pr5918.ml │ ├── lib-dynlink-csharp │ ├── plugin.ml │ ├── main.bytecode.reference │ └── main.native.reference │ ├── typing-recmod │ ├── pr9494.reference │ ├── t14bad.compilers.reference │ ├── t01bad.compilers.reference │ ├── t15bad.compilers.reference │ ├── t01bad.ml │ ├── t02bad.compilers.reference │ ├── t04bad.ml │ └── t03ok.ml │ ├── lib-str │ └── t01.reference │ ├── prim-bswap │ └── bswap.reference │ ├── runtime-errors │ ├── syserror.win32.reference │ ├── syserror.unix.reference │ ├── stackoverflow.reference │ ├── stackoverflow.native.reference │ └── has-stackoverflow-detection.sh │ ├── lib-bigarray-file │ └── mapfile.reference │ ├── manual-intf-c │ └── prog2.reference │ ├── typing-sigsubst │ ├── test_loc_type_eq.ml │ ├── test_loc_type_subst.ml │ ├── test_loc_modtype_type_eq.ml │ ├── test_loc_modtype_type_subst.ml │ ├── mpr7852.mli │ └── test_functor.ml │ ├── embedded │ └── cmcaml.reference │ ├── typing-fstclassmod │ └── fstclassmod.reference │ ├── asmgen │ ├── catch-rec-deadhandler.reference │ ├── catch-rec-deadhandler.run │ ├── catch-float.cmm │ ├── catch-try.cmm │ ├── catch-rec.cmm │ └── catch-try-float.cmm │ ├── c-api │ └── alloc_async.reference │ ├── lib-dynlink-bytecode │ ├── custom.reference │ ├── static.reference │ ├── registry.ml │ ├── plug2.ml │ ├── plug1.ml │ └── main.reference │ ├── lib-scanf-2 │ └── tscanf2.reference │ ├── letrec-check │ ├── pr7231.ml │ └── pr7706.ml │ ├── tool-ocamlopt-save-ir │ ├── save_ir_after_typing.compilers.reference │ ├── save_ir_after_typing.sh │ └── check_for_pack.compilers.reference │ ├── tool-ocamlc-error-cleanup │ └── check-error-cleanup.sh │ ├── tool-ocamlc-stop-after │ ├── stop_after_scheduling.compilers.reference │ └── stop_after_scheduling.sh │ ├── typing-misc │ ├── ranged_intf.ml │ ├── mapping.ml │ ├── typecore_empty_polyvariant_error.compilers.reference │ └── is_expansive.ml │ ├── tool-ocaml-annot │ └── check-annot.sh │ ├── typing-signatures │ ├── pr6371.ocaml.reference │ ├── pr6672.ml │ └── pr6371.ml │ ├── locale │ └── stubs.c │ ├── parse-errors │ ├── pr7847.compilers.reference │ ├── unclosed_class_simpl_expr3.ml │ ├── unclosed_paren_module_expr3.ml │ ├── unclosed_paren_module_expr4.ml │ ├── unclosed_paren_module_expr5.ml │ ├── unclosed_paren_module_type.mli │ ├── unclosed_paren_module_expr2.ml │ ├── unclosed_sig.mli │ ├── unclosed_class_simpl_expr2.ml │ ├── unclosed_paren_module_expr1.ml │ ├── unclosed_struct.ml │ ├── unclosed_class_simpl_expr1.ml │ ├── escape_error.ml │ ├── unclosed_object.ml │ ├── unclosed_sig.compilers.reference │ ├── unclosed_object.compilers.reference │ ├── unclosed_struct.compilers.reference │ ├── unclosed_class_signature.mli │ ├── unclosed_class_simpl_expr3.compilers.reference │ ├── unclosed_paren_module_expr3.compilers.reference │ ├── unclosed_paren_module_expr5.compilers.reference │ ├── unclosed_paren_module_type.compilers.reference │ ├── unclosed_class_signature.compilers.reference │ ├── unclosed_paren_module_expr2.compilers.reference │ └── unclosed_paren_module_expr4.compilers.reference │ ├── lib-sys │ └── rename.reference │ ├── typing-rectypes-bugs │ ├── pr5343_bad.compilers.reference │ ├── pr6174_bad.compilers.reference │ └── pr6870_bad.ml │ ├── prim-bigstring │ ├── bigstring_access.reference │ └── string_access.reference │ ├── afl-instrumentation │ └── has-afl-showmap.sh │ ├── lib-scanf │ └── tscanf.reference │ ├── typing-modules-bugs │ ├── pr9695_bad.compilers.reference │ ├── pr7112_bad.compilers.reference │ ├── pr9695_bad.ml │ ├── pr6899_second_bad.compilers.reference │ ├── pr6944_ok.ml │ ├── pr6899_first_bad.compilers.reference │ ├── pr7182_ok.ml │ ├── pr7112_ok.ml │ ├── pr6899_first_bad.ml │ ├── pr6899_ok.ml │ └── pr6899_second_bad.ml │ ├── match-exception-warnings │ └── pr7083.ml │ ├── typing-misc-bugs │ ├── pr6946_bad.compilers.reference │ ├── pr6946_bad.ml │ └── pr6303_bad.ml │ ├── typing-objects │ └── pr6383.ml │ ├── lib-printf │ └── pr6534.reference │ ├── typing-warnings │ ├── pr7261.ml │ └── pr7297.compilers.reference │ ├── lib-bigarray-2 │ └── call-gfortran.sh │ ├── local-functions │ └── tupled.ml │ ├── typing-ocamlc-i │ ├── pr4791.ml │ └── pervasives_leitmotiv.ml │ ├── typing-objects-bugs │ └── pr4435_bad.compilers.reference │ ├── typing-private-bugs │ └── pr5026_bad.compilers.reference │ ├── typing-gadts │ ├── pr6934.ml │ └── pr7230.ml │ ├── instrumented-runtime │ └── main.ml │ ├── tool-ocaml │ ├── t000.ml │ ├── t010-const0.ml │ ├── t010-const1.ml │ ├── t010-const2.ml │ ├── t010-const3.ml │ └── t011-constint.ml │ ├── formatting │ └── margins.ml │ └── tool-caml-tex │ └── redirections.input ├── lambda ├── .ocamlformat-enable └── .ocamlformat ├── .ocp-indent ├── manual ├── manual │ ├── refman │ │ └── .gitignore │ ├── tutorials │ │ └── .gitignore │ ├── html_processing │ │ ├── dune-project │ │ └── .gitignore │ ├── cmds │ │ └── .gitignore │ ├── macros.hva │ ├── manual.inf │ ├── textman │ │ └── .gitignore │ ├── infoman │ │ └── .gitignore │ ├── manual.hva │ ├── htmlman │ │ ├── libgraph.gif │ │ ├── next_motif.gif │ │ ├── contents_motif.gif │ │ ├── previous_motif.gif │ │ ├── fonts │ │ │ ├── fira-sans-v8-latin-regular.eot │ │ │ ├── fira-sans-v8-latin-regular.ttf │ │ │ ├── fira-sans-v8-latin-regular.woff │ │ │ └── fira-sans-v8-latin-regular.woff2 │ │ └── .gitignore │ ├── library │ │ └── .gitignore │ ├── manual.info.header │ ├── .gitignore │ └── texstuff │ │ └── .gitignore ├── tests │ └── .gitignore ├── styles │ ├── doc.tfm │ ├── docbf.tfm │ ├── docit.tfm │ ├── docmi.tfm │ ├── docrm.tfm │ ├── doctt.tfm │ ├── isolatin.sty │ ├── fullpage.sty │ └── scroll.sty └── tools │ ├── .gitignore │ └── transfmain.ml ├── tools ├── ocamldep.ml ├── ci │ └── inria │ │ └── sanitizers │ │ └── lsan-suppr.txt └── unlabel-patches │ ├── 4.mli │ ├── 1.mli │ ├── 3.mli │ └── 2.mli ├── boot ├── ocamlc └── ocamllex ├── driver ├── main.ml └── optmain.ml ├── dune-project ├── .gitmodules ├── VERSION └── utils └── int_replace_polymorphic_compare.mli /stdlib/hashbang: -------------------------------------------------------------------------------- 1 | #! -------------------------------------------------------------------------------- /otherlibs/bigarray/empty.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/main.mli: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic/arrays.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic/pr7533.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lazy/lazy1.reference: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /testsuite/tests/misc/gpr1370.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lambda/.ocamlformat-enable: -------------------------------------------------------------------------------- 1 | matching.ml 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/stringmatch.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic/trigraph.reference: -------------------------------------------------------------------------------- 1 | ??' -------------------------------------------------------------------------------- /testsuite/tests/flambda/gpr998.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-set/testmap.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-set/testset.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/utimes.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/misc/bdd.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/finaliser.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/misc/weaklifetime.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/parsetree/test.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/arch-power/exn_raise.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/ast-invariants/test.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/pr7683.reference: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /testsuite/tests/basic-private/tlength.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_2.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic/min_int.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/opt_variants.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/exotic-syntax/exotic.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/flambda/specialise.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/int64-unboxing/test.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/ref.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bool/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-filename/extension.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-filename/suffix.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-float/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-fun/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-int/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-int64/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-list/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-obj/new_obj.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-option/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-queue/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-result/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-seq/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-stack/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-stream/mpr7769.txt: -------------------------------------------------------------------------------- 1 | ab 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-string/test_string.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-uchar/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/boyer.reference: -------------------------------------------------------------------------------- 1 | Proved! 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/fib.reference: -------------------------------------------------------------------------------- 1 | 1346269 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/gcwords.reference: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/pr7168.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/takc.reference: -------------------------------------------------------------------------------- 1 | 1400 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/taku.reference: -------------------------------------------------------------------------------- 1 | 1400 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/weaktest.reference: -------------------------------------------------------------------------------- 1 | pass 2 | -------------------------------------------------------------------------------- /testsuite/tests/ppx-attributes/warning.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr8769/fortuna.ml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/tool-command-line/unknown-file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules/.gitattributes: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.ocp-indent: -------------------------------------------------------------------------------- 1 | match_clause=4 2 | strict_with=auto 3 | -------------------------------------------------------------------------------- /manual/manual/refman/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | -------------------------------------------------------------------------------- /manual/tests/.gitignore: -------------------------------------------------------------------------------- 1 | /cross-reference-checker 2 | -------------------------------------------------------------------------------- /testsuite/tests/array-functions/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/0001-test.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/main.reference: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/camlCase.ml: -------------------------------------------------------------------------------- 1 | let answer = 42 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_1.reference: -------------------------------------------------------------------------------- 1 | 1 0 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_3.reference: -------------------------------------------------------------------------------- 1 | 1 0 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/zero_divided_by_n.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/class_1.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/labels.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/lists.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/nested.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/pr4989.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lexing/comments.ocaml.reference: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr6950/byte.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr6950/native.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr9209/main.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-int64/issue9460.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-obj/with_tag.reference: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-random/rand.reference: -------------------------------------------------------------------------------- 1 | PASSED 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-stream/mpr7769.reference: -------------------------------------------------------------------------------- 1 | b 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/beat.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/pr7638.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/nucleic.reference: -------------------------------------------------------------------------------- 1 | 33.7976 2 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/a2235.ml: -------------------------------------------------------------------------------- 1 | let x = 42 2 | -------------------------------------------------------------------------------- /testsuite/tests/raise-counts/main.reference: -------------------------------------------------------------------------------- 1 | OK. 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/gpr1623/gpr1623.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7426/pr7426.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7920/pr7920.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/statmemprof/alloc_counts.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/b.ml: -------------------------------------------------------------------------------- 1 | let g = f 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-shadowing/dir1/b.ml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-shadowing/dir2/b.mli: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-shadowing/dir2/c.mli: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/unboxed-primitive-args/test.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/ocamldep.ml: -------------------------------------------------------------------------------- 1 | let () = Makedepend.main () 2 | -------------------------------------------------------------------------------- /manual/manual/tutorials/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/func_sections.arm.reference: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/func_sections.reference: -------------------------------------------------------------------------------- 1 | 17 2 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_at.native.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic-multdef/usemultdef.reference: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_6.reference: -------------------------------------------------------------------------------- 1 | 10 2 | 10 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float.reference: -------------------------------------------------------------------------------- 1 | 1./.0. = inf 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float_physical_equality.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic/localexn.reference: -------------------------------------------------------------------------------- 1 | OK 2 | KO 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic/localfunction.reference: -------------------------------------------------------------------------------- 1 | 5840 2 | -------------------------------------------------------------------------------- /testsuite/tests/flambda/approx_meet.reference: -------------------------------------------------------------------------------- 1 | -inf 2 | -------------------------------------------------------------------------------- /testsuite/tests/flambda/gpr2239.reference: -------------------------------------------------------------------------------- 1 | Hello world 2 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/generic_array.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/lazy_.reference: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr9209/ocamltests: -------------------------------------------------------------------------------- 1 | dyn.ml 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin4/chicken.mli: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin6/pheasant.mli: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-marshal/intern_final.reference: -------------------------------------------------------------------------------- 1 | OK! 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-marshal/marshal_bigarray.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-obj/reachable_words.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-stdlabels/test_stdlabels.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/prodcons.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/prodcons2.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/torture.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/test_unixlabels.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr3612/pr3612.reference: -------------------------------------------------------------------------------- 1 | -1 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7718/pr7718.reference: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7798/pr7798.reference: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-lexyacc/mpr7760.reference: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm1.reference: -------------------------------------------------------------------------------- 1 | line1 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/mod.ml: -------------------------------------------------------------------------------- 1 | let answer = 42 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi-2/foo.mli: -------------------------------------------------------------------------------- 1 | type 'a t 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/a.ml: -------------------------------------------------------------------------------- 1 | type _ t = T 2 | -------------------------------------------------------------------------------- /manual/manual/html_processing/dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.11) 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/compare.reference: -------------------------------------------------------------------------------- 1 | hello 2 | bye 3 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/simple_float_const.ml: -------------------------------------------------------------------------------- 1 | let f = 3.14 2 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_swallow.native.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic-float/zero_sized_float_arrays.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/basic/pr7657.reference: -------------------------------------------------------------------------------- 1 | OK 2 | f1 3 | f1 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic/switch_opts.reference: -------------------------------------------------------------------------------- 1 | 22 tests passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/compatibility/main.reference: -------------------------------------------------------------------------------- 1 | v is young 2 | -------------------------------------------------------------------------------- /testsuite/tests/extension-constructor/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/backreferences.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/mutual_functions.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/record_with.reference: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-init-info/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-systhreads/threadsigmask.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/pr5325.reference: -------------------------------------------------------------------------------- 1 | >>Client data 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/swapchan.reference: -------------------------------------------------------------------------------- 1 | f G 2 | g F 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/dup.reference: -------------------------------------------------------------------------------- 1 | Some output 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/pipe_eof.reference: -------------------------------------------------------------------------------- 1 | success 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/process_pid.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/wait_nohang.reference: -------------------------------------------------------------------------------- 1 | aa 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc-unsafe/quicksort.reference: -------------------------------------------------------------------------------- 1 | OK 2 | OK 3 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/c.mli: -------------------------------------------------------------------------------- 1 | val something : int 2 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/d.mli: -------------------------------------------------------------------------------- 1 | val something : int 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr6024/pr6024.reference: -------------------------------------------------------------------------------- 1 | @-@- 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr8769/rng.ml: -------------------------------------------------------------------------------- 1 | module F = Fortuna 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/no_debug_event/a.ml: -------------------------------------------------------------------------------- 1 | let x = 1 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/A.ml: -------------------------------------------------------------------------------- 1 | let f x = x +1 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm3.reference: -------------------------------------------------------------------------------- 1 | line1 2 | line2 -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm4.reference: -------------------------------------------------------------------------------- 1 | line1 2 | line2 -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/a.ml: -------------------------------------------------------------------------------- 1 | let (a : M.a) = 2 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/b.ml: -------------------------------------------------------------------------------- 1 | let (b : M.b) = 2 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/b.ml: -------------------------------------------------------------------------------- 1 | type 'a t = 'a A.t 2 | -------------------------------------------------------------------------------- /manual/manual/cmds/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | warnings.etex 4 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtraces_and_finalizers.reference: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/class_2.reference: -------------------------------------------------------------------------------- 1 | f 2 | g 3 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/mixing_value_closures_1.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/mixing_value_closures_2.reference: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/lib-digest/md5.reference: -------------------------------------------------------------------------------- 1 | Test vectors passed. 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4229/main.reference: -------------------------------------------------------------------------------- 1 | Abstract 10 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr9209/lib2.ml: -------------------------------------------------------------------------------- 1 | let test = Lib.test 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/bufchan.reference: -------------------------------------------------------------------------------- 1 | 3 2 | un 3 | deux 4 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/identifier_sharing.reference: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/weaklifetime2.reference: -------------------------------------------------------------------------------- 1 | success 2 | success 3 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/b.cmi.invalid: -------------------------------------------------------------------------------- 1 | Not a valid cmi file 2 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/lib2235.ml: -------------------------------------------------------------------------------- 1 | module A2235 = A2235 2 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/fst/regular.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = x 3 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/snd/regular.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = y 3 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6604_3.compilers.reference: -------------------------------------------------------------------------------- 1 | [] 2 | 3 | -------------------------------------------------------------------------------- /testsuite/tests/raise-counts/b.ml: -------------------------------------------------------------------------------- 1 | let bug x = A.trigger_bug x 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr5757/pr5757.reference: -------------------------------------------------------------------------------- 1 | hello world 2 | -------------------------------------------------------------------------------- /testsuite/tests/reproducibility/cmis_on_file_system_companion.mli: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-C-exceptions/test.reference: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/D.ml: -------------------------------------------------------------------------------- 1 | let z x = imp (x*2) 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-open/inner.ml: -------------------------------------------------------------------------------- 1 | 2 | type a = int 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm2.reference: -------------------------------------------------------------------------------- 1 | line1 2 | line2 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-labels/mixin.reference: -------------------------------------------------------------------------------- 1 | y 2 | -6 + x 3 | 9 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi-2/baz.ml: -------------------------------------------------------------------------------- 1 | let x = Bar.foo () 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/main.ml: -------------------------------------------------------------------------------- 1 | let _ = A.a = B.b 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/is_static_flambda_dep.ml: -------------------------------------------------------------------------------- 1 | let pair = 1, 12 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/simple_float_const_opaque.ml: -------------------------------------------------------------------------------- 1 | let f = 3.14 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/pr6216.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin.mli: -------------------------------------------------------------------------------- 1 | val facts: int list 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/sub/api.mli: -------------------------------------------------------------------------------- 1 | val f : int -> int 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4229/static.ml: -------------------------------------------------------------------------------- 1 | let f = Abstract.print 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin5/chicken.ml: -------------------------------------------------------------------------------- 1 | 2 | let x = 5 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/delayintr.reference: -------------------------------------------------------------------------------- 1 | Received signal early 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/dup2.reference: -------------------------------------------------------------------------------- 1 | --- 2 | Some output 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/isatty/isatty_tty.reference: -------------------------------------------------------------------------------- 1 | /dev/tty = true 2 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/aliases.ml: -------------------------------------------------------------------------------- 1 | module Submodule = Submodule 2 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/lib__2235.ml: -------------------------------------------------------------------------------- 1 | module A2235 = Lib__A2235 2 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/fst/opaque_impl.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = x 3 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/fst/opaque_intf.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = x 3 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/snd/opaque_impl.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = y 3 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/snd/opaque_intf.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = y 3 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7042/pr7042.reference: -------------------------------------------------------------------------------- 1 | 0 8000000000000000 2 | -------------------------------------------------------------------------------- /testsuite/tests/self-contained-toplevel/main.reference: -------------------------------------------------------------------------------- 1 | Hello, world! 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-labels/mixin2.reference: -------------------------------------------------------------------------------- 1 | y 2 | -6 + x 3 | 9 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-labels/mixin3.reference: -------------------------------------------------------------------------------- 1 | y 2 | -6 + x 3 | 9 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/e.ml: -------------------------------------------------------------------------------- 1 | open D;; let f (C {f}) = () 2 | -------------------------------------------------------------------------------- /boot/ocamlc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/boot/ocamlc -------------------------------------------------------------------------------- /testsuite/tests/basic-io/wc.reference: -------------------------------------------------------------------------------- 1 | 1232 characters, 184 words, 58 lines 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/if_in_if.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/morematch.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/opaque_prim.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/pr1271.reference: -------------------------------------------------------------------------------- 1 | 0 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/robustmatch.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/tbuffer.reference: -------------------------------------------------------------------------------- 1 | 0 1 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_4.reference: -------------------------------------------------------------------------------- 1 | x 2 | first 3 | 10foo 4 | bar 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic/pr7253.reference: -------------------------------------------------------------------------------- 1 | First 2 | Raise 3 | Last 4 | Caught 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bigarray/pr5115.reference: -------------------------------------------------------------------------------- 1 | ***EXEC*** 2 | ***EXEC*** 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4229/client.ml: -------------------------------------------------------------------------------- 1 | let () = Static.f Abstract.x 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin5/chicken.mli: -------------------------------------------------------------------------------- 1 | 2 | val x : int 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin6/partridge.ml: -------------------------------------------------------------------------------- 1 | let wings = 2 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin6/partridge.mli: -------------------------------------------------------------------------------- 1 | val wings : int 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/sockets.reference: -------------------------------------------------------------------------------- 1 | >>Client #1 2 | >>Client #2 3 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/intf/regular.mli: -------------------------------------------------------------------------------- 1 | 2 | val choose : 'a -> 'a -> 'a 3 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr9028/pr9028.reference: -------------------------------------------------------------------------------- 1 | 0 2 | -1 3 | -1 4 | -1 5 | -------------------------------------------------------------------------------- /testsuite/tests/required-external/main.reference: -------------------------------------------------------------------------------- 1 | Module `File' is linked 2 | -------------------------------------------------------------------------------- /testsuite/tests/self-contained-toplevel/foo.ml: -------------------------------------------------------------------------------- 1 | let value = "Hello, world!" 2 | -------------------------------------------------------------------------------- /testsuite/tests/self-contained-toplevel/input.ml: -------------------------------------------------------------------------------- 1 | print_endline Foo.value;; 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/no_debug_event/input_script: -------------------------------------------------------------------------------- 1 | run 2 | quit 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/B.ml: -------------------------------------------------------------------------------- 1 | open Packed 2 | let g = A.f 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/working_arg.txt: -------------------------------------------------------------------------------- 1 | -open 2 | Printf 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi-2/bar.mli: -------------------------------------------------------------------------------- 1 | val foo : unit -> 'a Foo.t 2 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/module_without_cmx.mli: -------------------------------------------------------------------------------- 1 | 2 | val id : 'a -> 'a 3 | -------------------------------------------------------------------------------- /boot/ocamllex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/boot/ocamllex -------------------------------------------------------------------------------- /testsuite/tests/basic-more/function_in_ref.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/generalized-open/accepted_batch.reference: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | hidden 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/float_block_1.reference: -------------------------------------------------------------------------------- 1 | effect 2 | effect 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test8_plugin_b.mli: -------------------------------------------------------------------------------- 1 | 2 | type t = int 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-packed/byte.reference: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-packed/native.reference: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/swapchan.run: -------------------------------------------------------------------------------- 1 | ${program} | ${SORT} > ${output} 2>&1 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/kill/unix_kill.reference: -------------------------------------------------------------------------------- 1 | true true 2 | false true true 3 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/use_in_pack.ml: -------------------------------------------------------------------------------- 1 | let _, _ = External_for_pack.frexp 12. 2 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/intf/opaque_impl.mli: -------------------------------------------------------------------------------- 1 | 2 | val choose : 'a -> 'a -> 'a 3 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/intf/opaque_intf.mli: -------------------------------------------------------------------------------- 1 | 2 | val choose : 'a -> 'a -> 'a 3 | -------------------------------------------------------------------------------- /testsuite/tests/prim-revapply/revapply.reference: -------------------------------------------------------------------------------- 1 | 6 2 | 36 3 | 18 4 | 37 5 | 260 6 | -------------------------------------------------------------------------------- /testsuite/tests/regression/missing_set_of_closures/b2.ml: -------------------------------------------------------------------------------- 1 | 2 | let f = B.g 3 3 | -------------------------------------------------------------------------------- /testsuite/tests/regression/missing_set_of_closures/dir/c.ml: -------------------------------------------------------------------------------- 1 | 2 | let f = B2.f 3 | -------------------------------------------------------------------------------- /testsuite/tests/statmemprof/custom.reference: -------------------------------------------------------------------------------- 1 | 0.01 0.0 2 | 0.50 0.5 3 | 0.17 0.2 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/error_highlighting_use2.ml: -------------------------------------------------------------------------------- 1 | let x = (1 + 2 in ();; 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/main_ok.ml: -------------------------------------------------------------------------------- 1 | let f (x : C.t1) = (x : C.t2) 2 | -------------------------------------------------------------------------------- /driver/main.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | exit (Maindriver.main Sys.argv Format.err_formatter) 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/structural_constants.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/top_level_patterns.reference: -------------------------------------------------------------------------------- 1 | 13 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/tprintf.reference: -------------------------------------------------------------------------------- 1 | 0 1 2 3 4 5 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test7_interface_only.mli: -------------------------------------------------------------------------------- 1 | 2 | type t = int 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test9_second_plugin.mli: -------------------------------------------------------------------------------- 1 | 2 | type t = int 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/sub/plugin3.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | ignore (Api.f 10) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr6950/config.ml: -------------------------------------------------------------------------------- 1 | let foo = "foo" 2 | let bar = "bar" 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr9209/test.c: -------------------------------------------------------------------------------- 1 | int testdynfail() { 2 | return 0; 3 | } 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/bank.reference: -------------------------------------------------------------------------------- 1 | Current balance: 100 2 | Final balance: 1 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/tls.run: -------------------------------------------------------------------------------- 1 | ${program} | LC_ALL=C ${SORT} > ${output} 2>&1 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/utimes.reference: -------------------------------------------------------------------------------- 1 | tm ~ tm' (true) 2 | tm ~ tm' (true) 3 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/match_failure.reference: -------------------------------------------------------------------------------- 1 | match failure, as expected 2 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/nested_handlers.reference: -------------------------------------------------------------------------------- 1 | five four three two one 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/dynlink/host.reference: -------------------------------------------------------------------------------- 1 | hello host 2 | hello plugin 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/a.ml: -------------------------------------------------------------------------------- 1 | module M = struct 2 | let f x = x +1 3 | end 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/C.ml: -------------------------------------------------------------------------------- 1 | open Lib 2 | let h x = A.f x + B.g x 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t03.ocamldoc.reference: -------------------------------------------------------------------------------- 1 | Warning: Module type not found 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/first_arg_fail.txt: -------------------------------------------------------------------------------- 1 | test.ml 2 | -I 3 | ../ 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/last_arg_fail.txt: -------------------------------------------------------------------------------- 1 | -I 2 | ../ 3 | test.ml 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi-2/test.compilers.reference: -------------------------------------------------------------------------------- 1 | val x : '_weak1 Foo.t 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/c.ml: -------------------------------------------------------------------------------- 1 | external f : unit -> unit B.t = "%identity" 2 | -------------------------------------------------------------------------------- /driver/optmain.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | exit (Optmaindriver.main Sys.argv Format.err_formatter) 3 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/pr8681.reference: -------------------------------------------------------------------------------- 1 | 200 2 | 100 3 | 206 4 | 106 5 | 13 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test1_inited_second.ml: -------------------------------------------------------------------------------- 1 | let g x = Test1_main.f x 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-packed/a.ml: -------------------------------------------------------------------------------- 1 | let nums = Sys.opaque_identity [1; 2; 3; 4; 5] 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr9209/lib.ml: -------------------------------------------------------------------------------- 1 | external test : unit -> unit = "testdynfail" 2 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/user_of_lib2235.ml: -------------------------------------------------------------------------------- 1 | open Lib2235 2 | 3 | let x = A2235.x 4 | -------------------------------------------------------------------------------- /testsuite/tests/output-complete-obj/github9344.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Not_found 2 | -------------------------------------------------------------------------------- /testsuite/tests/output-complete-obj/test2.reference: -------------------------------------------------------------------------------- 1 | Hello OCaml! 2 | Program terminated 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/dynlink/input_script: -------------------------------------------------------------------------------- 1 | r 2 | br @ Plugin 2 3 | r 4 | bt 5 | r 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/error_highlighting_use1.ml: -------------------------------------------------------------------------------- 1 | let x = (1 + 2) +. 3. in ();; 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/d.mli: -------------------------------------------------------------------------------- 1 | type _ t = C: { f: ('a -> [<`X]) t } -> [<`X] t 2 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w68.reference: -------------------------------------------------------------------------------- 1 | "noalloc" doesn't allocate 2 | "alloc" allocates 3 | -------------------------------------------------------------------------------- /dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.3) 2 | (using experimental_building_ocaml_compiler_with_dune 0.1) 3 | -------------------------------------------------------------------------------- /manual/styles/doc.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/styles/doc.tfm -------------------------------------------------------------------------------- /testsuite/tests/basic-more/div_by_zero.reference: -------------------------------------------------------------------------------- 1 | ***** OK ***** 2 | 3 | All tests succeeded. 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/evaluation_order_1.reference: -------------------------------------------------------------------------------- 1 | effect 2 | effect 3 | effect 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/evaluation_order_2.reference: -------------------------------------------------------------------------------- 1 | effect 2 | effect 3 | effect 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test3_plugin_a.ml: -------------------------------------------------------------------------------- 1 | let f x = x + 3 [@@inline never] 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test4_plugin_b.ml: -------------------------------------------------------------------------------- 1 | let f x = x + 3 [@@inline never] 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4229/abstract.mli: -------------------------------------------------------------------------------- 1 | type t 2 | val print: t -> unit 3 | val x: t 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/pig.mli: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | val p : t 4 | val oink : t -> unit 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-systhreads/eintr.reference: -------------------------------------------------------------------------------- 1 | break: ok 2 | eintr: ok 3 | chan: ok 4 | gc: ok 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/close.reference: -------------------------------------------------------------------------------- 1 | reading... 2 | closing fd... 3 | read returned 4 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/allocation.reference: -------------------------------------------------------------------------------- 1 | no allocations for multiple-value match 2 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/tail_calls.reference: -------------------------------------------------------------------------------- 1 | handler-case (match) is tail recursive 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr6024/pr6024.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | Format.printf "@[%@-@@-@]@.";; 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/print_args.reference: -------------------------------------------------------------------------------- 1 | print_args.ml 2 | foo 3 | bar 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/error_highlighting_use3.ml: -------------------------------------------------------------------------------- 1 | let x = (1 2 | + 3 | 2 in 4 | ();; 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-safe-linking/a.ml: -------------------------------------------------------------------------------- 1 | type _ t = 2 | X of string 3 | | Y : bytes t 4 | -------------------------------------------------------------------------------- /testsuite/tests/utils/test_strongly_connected_components.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /manual/manual/macros.hva: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/macros.hva -------------------------------------------------------------------------------- /manual/manual/manual.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/manual.inf -------------------------------------------------------------------------------- /manual/manual/textman/.gitignore: -------------------------------------------------------------------------------- 1 | manual.txt 2 | manual.hmanual.kwd 3 | *.haux 4 | *.hind 5 | *.htoc 6 | -------------------------------------------------------------------------------- /manual/styles/docbf.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/styles/docbf.tfm -------------------------------------------------------------------------------- /manual/styles/docit.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/styles/docit.tfm -------------------------------------------------------------------------------- /manual/styles/docmi.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/styles/docmi.tfm -------------------------------------------------------------------------------- /manual/styles/docrm.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/styles/docrm.tfm -------------------------------------------------------------------------------- /manual/styles/doctt.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/styles/doctt.tfm -------------------------------------------------------------------------------- /otherlibs/str/.depend: -------------------------------------------------------------------------------- 1 | str.cmo : \ 2 | str.cmi 3 | str.cmx : \ 4 | str.cmi 5 | str.cmi : 6 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | Printf.printf "1./.0. = %f\n" (1.0 /. 0.0);; 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test2_inited_first.ml: -------------------------------------------------------------------------------- 1 | let f x = x + 1 [@@inline never] 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/pack_client.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_endline Mypack.Packed1.mykey 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4229/sub/abstract.mli: -------------------------------------------------------------------------------- 1 | type t 2 | val print: t -> unit 3 | val x: t 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/byte.plugin1.reference: -------------------------------------------------------------------------------- 1 | API 2 | zero=0 3 | fact (zero+5) = 120 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/host/api.mli: -------------------------------------------------------------------------------- 1 | val fact : (int -> int) ref 2 | val zero : int ref 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/native.plugin1.reference: -------------------------------------------------------------------------------- 1 | API 2 | zero=0 3 | fact (zero+5) = 120 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr6950/b.ml: -------------------------------------------------------------------------------- 1 | let () = Printf.printf "%s\n%s\n" Config.foo Config.bar 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/sheep.mli: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | val s : t 4 | val baa : t -> unit 5 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/external.mli: -------------------------------------------------------------------------------- 1 | external frexp : float -> float * int = "caml_frexp_float" 2 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/test.reference: -------------------------------------------------------------------------------- 1 | linked 2 | linked external 3 | linked external from pack 4 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr8769/nocrypto.mli: -------------------------------------------------------------------------------- 1 | module Rng : sig 2 | module F : sig end 3 | end 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-command-line/test.compilers.reference: -------------------------------------------------------------------------------- 1 | don't know what to do with unknown-file 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/indirect_first_arg_fail.txt: -------------------------------------------------------------------------------- 1 | -args 2 | first_arg_fail.txt 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/indirect_last_arg_fail.txt: -------------------------------------------------------------------------------- 1 | -args 2 | last_arg_fail.txt 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi-3/original.ml: -------------------------------------------------------------------------------- 1 | type 'a t = T 2 | module type T = sig type t end 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs-2/pr3918a.mli: -------------------------------------------------------------------------------- 1 | type 'a voption = [ `None | `Some of 'a] 2 | -------------------------------------------------------------------------------- /manual/manual/infoman/.gitignore: -------------------------------------------------------------------------------- 1 | *.haux 2 | *.hind 3 | *.info*.gz 4 | *.info.body* 5 | ocaml.hocaml.kwd 6 | -------------------------------------------------------------------------------- /manual/styles/isolatin.sty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/styles/isolatin.sty -------------------------------------------------------------------------------- /testsuite/tests/basic/tailcalls.reference: -------------------------------------------------------------------------------- 1 | 10000001 2 | 10000001 3 | 10000001 4 | 11 5 | 11 6 | 10000001 7 | -------------------------------------------------------------------------------- /testsuite/tests/basic/trigraph.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | (* PR#6373 *) 4 | 5 | let () = print_string "??'" 6 | -------------------------------------------------------------------------------- /testsuite/tests/callback/tcallback.reference: -------------------------------------------------------------------------------- 1 | 7 2 | 7 3 | 7 4 | 7 5 | 7 6 | aaaaa 7 | aaaaa 8 | bbbbb 9 | -------------------------------------------------------------------------------- /testsuite/tests/formats-transition/legacy_unfinished_modifiers.ocaml.reference: -------------------------------------------------------------------------------- 1 | 3 2 | 3 3 | 3 4 | 3 5 | 6 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/evaluation_order_3.reference: -------------------------------------------------------------------------------- 1 | x 2 | x_y 3 | x_x 4 | y 5 | y_y 6 | y_x 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/labels.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let f () ~x = x () 4 | let rec x = f ~x 5 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/pr4989.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let rec f = let g = f in fun x -> g x;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test5_plugin_a.ml: -------------------------------------------------------------------------------- 1 | let x = ref 0 2 | 3 | let () = 4 | x := 1 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/byte.plugin2.reference: -------------------------------------------------------------------------------- 1 | API 2 | ERROR: interface mismatch on Packed 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/native.plugin2.reference: -------------------------------------------------------------------------------- 1 | API 2 | ERROR: interface mismatch on Packed 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin1/api.mli: -------------------------------------------------------------------------------- 1 | val fact : (int -> int) ref 2 | val zero : int ref 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin4/api.mli: -------------------------------------------------------------------------------- 1 | val fact : (int -> int) ref 2 | val zero : int ref 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin1/sheep.mli: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | val s : t 4 | val baa : t -> unit 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin2/cow.mli: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | val c : t 4 | val moo : t -> unit 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin2b/cow.mli: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | val c : t 4 | val moo : t -> unit 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin2c/cow.mli: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | val d : t 4 | val moo : t -> unit 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin3/pig.mli: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | val p : t 4 | val oink : t -> unit 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-format/pr6824.reference: -------------------------------------------------------------------------------- 1 | [1] 2 | [2] 3 | [1] 4 | [2] 5 | 6 | All tests succeeded. 7 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/exception_propagation.reference: -------------------------------------------------------------------------------- 1 | caught expected exception (Not_found) 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/find-artifacts/in/blah.ml: -------------------------------------------------------------------------------- 1 | type blah = 2 | | Foo 3 | | Bar of string 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/working_arg.txt.reference: -------------------------------------------------------------------------------- 1 | Test succeeds 2 | - : unit = () 3 | 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/error_highlighting_use4.ml: -------------------------------------------------------------------------------- 1 | let x = (1 2 | + 3 | 2) +. 4 | 3. in ();; 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs-2/pr3918b.mli: -------------------------------------------------------------------------------- 1 | type 'a vlist = ('a * 'b) Pr3918a.voption as 'b 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-shadowing-of-pervasives-submodules/largeFile.ml: -------------------------------------------------------------------------------- 1 | let message = "Hello, world!" 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-shadowing-of-pervasives-submodules/redefine_largefile.reference: -------------------------------------------------------------------------------- 1 | Hello, world! 2 | -------------------------------------------------------------------------------- /tools/ci/inria/sanitizers/lsan-suppr.txt: -------------------------------------------------------------------------------- 1 | # ocamlyacc doesn't clean memory on exit 2 | leak:ocamlyacc 3 | -------------------------------------------------------------------------------- /manual/manual/manual.hva: -------------------------------------------------------------------------------- 1 | \input{anchored_book.hva} 2 | \input{macros.hva} 3 | \newif\ifouthtml\outhtmltrue 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic-multdef/multdef.mli: -------------------------------------------------------------------------------- 1 | val f : int -> int 2 | val f : int -> int 3 | val g : string -> int 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bytes/test_bytes.reference: -------------------------------------------------------------------------------- 1 | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test2_plugin.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int (Test2_inited_first.f 42) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test3_plugin_b.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int (Test3_plugin_a.f 42) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test4_plugin_a.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int (Test4_plugin_b.f 42) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test5_second_plugin.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | assert (!Test5_plugin_a.x = 1) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test6_second_plugin.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | assert (!Test6_plugin.x = 1) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-packed/b.ml: -------------------------------------------------------------------------------- 1 | let () = List.iter (fun i -> print_endline (string_of_int i)) A.nums 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin2/api.mli: -------------------------------------------------------------------------------- 1 | val fact : (int -> int) option ref 2 | val zero : int ref 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin3/api.mli: -------------------------------------------------------------------------------- 1 | val fact : (int -> int) option ref 2 | val zero : int ref 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/unix-execvpe/subdir/nonexec: -------------------------------------------------------------------------------- 1 | echo "This script lacks the x bit and should not run!" 2 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/external_for_pack.mli: -------------------------------------------------------------------------------- 1 | external frexp : float -> float * int = "caml_frexp_float" 2 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/streams.reference: -------------------------------------------------------------------------------- 1 | iter_stream with handler case (match) is tail recursive 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/missing_set_of_closures/b.ml: -------------------------------------------------------------------------------- 1 | 2 | let g = 3 | let module X = A.F() in 4 | X.g 5 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-naked-pointers/np2.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec ${test_source_directory}/runtest.sh 4 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-naked-pointers/np3.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec ${test_source_directory}/runtest.sh 4 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-naked-pointers/np4.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec ${test_source_directory}/runtest.sh 4 | -------------------------------------------------------------------------------- /testsuite/tests/statmemprof/exception_callback.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Failure("callback failed") 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/no_debug_event/b.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int Foo.A.x; 3 | print_newline () 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/no_debug_event/noev.reference: -------------------------------------------------------------------------------- 1 | Loading program... done. 2 | 1 3 | Program exit. 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-lexyacc/main.compilers.reference: -------------------------------------------------------------------------------- 1 | 14 shift/reduce conflicts, 2 reduce/reduce conflicts. 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "flexdll"] 2 | path = flexdll 3 | url = https://github.com/alainfrisch/flexdll.git 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic-multdef/multdef.ml: -------------------------------------------------------------------------------- 1 | let f x = x + 1 2 | external g : string -> int = "caml_int_of_string" 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bigarray/weak_bigarray.reference: -------------------------------------------------------------------------------- 1 | a.(0) = 42.000000 2 | b.(0) = 42.000000 3 | b.(0) = 42.000000 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test7_plugin.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int (42 : Test7_interface_only.t) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test9_plugin.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int (42 : Test9_second_plugin.t) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/signal.run: -------------------------------------------------------------------------------- 1 | ${program} > ${output} & 2 | pid=$! 3 | sleep 2 4 | ./sigint $pid 5 | wait 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/tls.reference: -------------------------------------------------------------------------------- 1 | 1 --> un 2 | 2 --> deux 3 | 3 --> trois 4 | 4 --> quatre 5 | 5 --> cinq 6 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/submodule.ml: -------------------------------------------------------------------------------- 1 | let () = print_endline "linked"; flush stdout 2 | module M = struct end 3 | -------------------------------------------------------------------------------- /testsuite/tests/output-complete-obj/github9344.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export OCAMLRUNPARAM=b=1 3 | ./github9344 || true 4 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7426/pr7426.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | class some_class = object val some_val = 0.0 end 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/find-artifacts/input_script: -------------------------------------------------------------------------------- 1 | break @ Foo 10 2 | run 3 | print x 4 | print y 5 | quit 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/setup-links.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | for i in A B C D; do cp $i.ml Lib$i.ml; done 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-open/alias.ml: -------------------------------------------------------------------------------- 1 | module Container = struct 2 | module Aliased_inner = Inner 3 | end 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/gpr1223_foo.mli: -------------------------------------------------------------------------------- 1 | 2 | module type S = sig 3 | 4 | type t = T 5 | 6 | end 7 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/mnemonics.reference: -------------------------------------------------------------------------------- 1 | Constructors without associated mnemonic: 2 | All_clauses_guarded 3 | -------------------------------------------------------------------------------- /manual/manual/htmlman/libgraph.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/libgraph.gif -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-csharp/plugin.ml: -------------------------------------------------------------------------------- 1 | let f x = x.{2} 2 | 3 | let () = 4 | print_endline "I'm the plugin." 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/delayintr.run: -------------------------------------------------------------------------------- 1 | ${program} > ${output} & 2 | pid=$! 3 | sleep 2 4 | ./sigint $pid 5 | wait 6 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr5233/pr5233.reference: -------------------------------------------------------------------------------- 1 | checking... value found / testing... ok 2 | checking... no value 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/basic/debuggee.reference: -------------------------------------------------------------------------------- 1 | Loading program... done. 2 | arg1 3 | notbar 4 | Program exit. 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t05.reference: -------------------------------------------------------------------------------- 1 | # 2 | # module T05: 3 | # 4 | # module T05.A: 5 | # 6 | # module T05.B: 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/pr9494.reference: -------------------------------------------------------------------------------- 1 | File "pr9494.ml", line 31, characters 6-12: Undefined recursive module 2 | -------------------------------------------------------------------------------- /manual/manual/html_processing/.gitignore: -------------------------------------------------------------------------------- 1 | dune 2 | markup.ml 3 | uchar 4 | uutf 5 | lambdasoup 6 | ocaml-re 7 | .sass-cache 8 | -------------------------------------------------------------------------------- /manual/manual/htmlman/next_motif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/next_motif.gif -------------------------------------------------------------------------------- /testsuite/tests/basic/recvalues.reference: -------------------------------------------------------------------------------- 1 | Test 1: passed 2 | Test 2: passed 3 | Test 3: passed 4 | foo 5 | Test 4: passed 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test9_second_plugin.ml: -------------------------------------------------------------------------------- 1 | 2 | type t = int 3 | 4 | let () = print_endline "Second" 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/sub/api.ml: -------------------------------------------------------------------------------- 1 | let f i = 2 | Printf.printf "Sub/api: f called with %i\n" i; 3 | i + 1 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4229/abstract.ml: -------------------------------------------------------------------------------- 1 | type t = int 2 | let print i = Printf.printf "Abstract %i\n" i 3 | let x = 10 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin1/sheep.ml: -------------------------------------------------------------------------------- 1 | type t = int 2 | 3 | let s = 42 4 | let baa _t = () [@@inline never] 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin2/cow.ml: -------------------------------------------------------------------------------- 1 | type t = int 2 | 3 | let c = 42 4 | let moo _t = () [@@inline never] 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin2b/cow.ml: -------------------------------------------------------------------------------- 1 | type t = int 2 | 3 | let c = 1 4 | let moo _t = () [@@inline never] 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin2c/cow.ml: -------------------------------------------------------------------------------- 1 | type t = int 2 | 3 | let d = 4 4 | let moo _t = () [@@inline never] 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/sheep.ml: -------------------------------------------------------------------------------- 1 | type t = string 2 | 3 | let s = "baa" 4 | let baa _t = () [@@inline never] 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-str/t01.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/testsuite/tests/lib-str/t01.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-systhreads/testpreempt.reference: -------------------------------------------------------------------------------- 1 | Interaction 1 2 | Interaction 2 3 | Long computation result: 100000 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/unix-socket/recvfrom_linux.reference: -------------------------------------------------------------------------------- 1 | "\000ocaml-abstract-socket" as "\000ocaml-abstract-socket": OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/anonymous_class_parameter.compilers.reference: -------------------------------------------------------------------------------- 1 | class ['a, _] foo : object method bar : 'a -> 'a end 2 | -------------------------------------------------------------------------------- /testsuite/tests/prim-bswap/bswap.reference: -------------------------------------------------------------------------------- 1 | 4433 2 | f0f0 3 | 44332211 4 | f0f0f0f0 5 | 8877665544332211 6 | f0f0f0f0f0f0f0f0 7 | -------------------------------------------------------------------------------- /testsuite/tests/prim-revapply/apply.reference: -------------------------------------------------------------------------------- 1 | 6 2 | 36 3 | 18 4 | 37 5 | 260 6 | 6 7 | 36 8 | 18 9 | 37 10 | 260 11 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/syserror.win32.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Sys_error("titi:/toto: Invalid argument") 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/print_args.ml: -------------------------------------------------------------------------------- 1 | Array.iter (fun x -> print_endline (Filename.basename x)) Sys.argv;; 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/f.ml: -------------------------------------------------------------------------------- 1 | module A = struct end 2 | module Alias = A 3 | exception Alias 4 | let alias = Alias 5 | -------------------------------------------------------------------------------- /otherlibs/bigarray/.depend: -------------------------------------------------------------------------------- 1 | bigarray.cmo : \ 2 | bigarray.cmi 3 | bigarray.cmx : \ 4 | bigarray.cmi 5 | bigarray.cmi : 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bigarray-file/mapfile.reference: -------------------------------------------------------------------------------- 1 | 2 | map_file 3 | 1... 2... 3... 4... 4 | map_file errors 5 | 1... 2... 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test1_plugin.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int ((Test1_inited_second.g [@inlined never]) 42) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test8_plugin_b.ml: -------------------------------------------------------------------------------- 1 | type t = int 2 | 3 | let () = 4 | print_int (Test8_plugin_a.f 42) 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin2/api.ml: -------------------------------------------------------------------------------- 1 | let fact = ref None 2 | let zero = ref (-1) 3 | let _ = prerr_endline "API" 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin3/api.ml: -------------------------------------------------------------------------------- 1 | let fact = ref None 2 | let zero = ref (-1) 3 | let _ = prerr_endline "API" 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin3/pig.ml: -------------------------------------------------------------------------------- 1 | type t = string 2 | 3 | let p = "oink" 4 | let oink _t = () [@@inline never] 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-format/print_seq.reference: -------------------------------------------------------------------------------- 1 | empty 2 | 0 3 | misc 4 | 1 2 3 5 | end of tests 6 | 7 | All tests succeeded. 8 | -------------------------------------------------------------------------------- /testsuite/tests/manual-intf-c/prog2.reference: -------------------------------------------------------------------------------- 1 | File "curses_stubs.c", line 1: 2 | Error: Required module `Curses' is unavailable 3 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/syserror.unix.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Sys_error("titi:/toto: No such file or directory") 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/pr7563.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | modules = "f.ml" 3 | *) 4 | 5 | exit (if F.Alias = F.alias then 0 else 1) 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-sigsubst/test_loc_type_eq.ml: -------------------------------------------------------------------------------- 1 | module M : Test_functor.S with type elt = unit = Test_functor.Apply (String) 2 | -------------------------------------------------------------------------------- /manual/manual/htmlman/contents_motif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/contents_motif.gif -------------------------------------------------------------------------------- /manual/manual/htmlman/previous_motif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/previous_motif.gif -------------------------------------------------------------------------------- /manual/manual/library/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | arithstatus.mli 4 | ocamldoc.out 5 | ocamldoc.sty 6 | compiler_libs.txt 7 | 8 | -------------------------------------------------------------------------------- /testsuite/tests/embedded/cmcaml.reference: -------------------------------------------------------------------------------- 1 | Initializing OCaml code... 2 | Back in C code... 3 | Computing fib(20)... 4 | Result = 10946 5 | -------------------------------------------------------------------------------- /testsuite/tests/formats-transition/legacy_incompatible_flags.ocaml.reference: -------------------------------------------------------------------------------- 1 | toto 2 | toto 3 | toto 4 | toto 5 | "toto" 6 | toto 7 | 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test8_plugin_a.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_int (42 : Test8_plugin_b.t) 3 | 4 | let f x = x + 3 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/packed1_client.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Api.reg_mod "Packed1_client"; 3 | print_endline Packed1.mykey 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin4.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Printf.printf "time = %f\n" (Unix.time ()); 3 | Api.reg_mod "Plugin" 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4229/sub/abstract.ml: -------------------------------------------------------------------------------- 1 | type t = string 2 | let print i = Printf.printf "Abstract %s\n" i 3 | let x = "foo" 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/unix-socket/recvfrom_unix.reference: -------------------------------------------------------------------------------- 1 | "ocaml-test-socket-unix" as "ocaml-test-socket-unix": OK 2 | "" as "": OK 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/dynlink/plugin.ml: -------------------------------------------------------------------------------- 1 | let do_plugin () = 2 | print_endline "hello plugin" 3 | 4 | let () = do_plugin () 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/depend.mod2.reference: -------------------------------------------------------------------------------- 1 | LibA.ml: 2 | LibB.ml: A Packed 3 | LibC.ml: Lib LibA LibB 4 | LibD.ml: 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/subdir/m.ml: -------------------------------------------------------------------------------- 1 | type a = int 2 | type b = a 3 | 4 | module Foo(X : sig end) = struct type t = T end 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-shadowing-of-pervasives-submodules/redefine_largefile_top.compilers.reference: -------------------------------------------------------------------------------- 1 | Hello, world!- : unit = () 2 | 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-sigsubst/test_loc_type_subst.ml: -------------------------------------------------------------------------------- 1 | module M : Test_functor.S with type elt := unit = Test_functor.Apply (String) 2 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 4.12.0 2 | 3 | # The version string is the first line of this file. 4 | # It must be in the format described in stdlib/sys.mli 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/b.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_endline "B is running"; 3 | incr A.x; 4 | Printf.printf "A.x = %i\n" !A.x 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/c.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_endline "C is running"; 3 | incr A.x; 4 | Printf.printf "A.x = %i\n" !A.x 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-stream/count_concat_bug.reference: -------------------------------------------------------------------------------- 1 | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/win-symlink/test.reference: -------------------------------------------------------------------------------- 1 | Unix.symlink works with backwards slashes 2 | Unix.symlink works with forward slashes 3 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/raise_from_success_continuation.reference: -------------------------------------------------------------------------------- 1 | test raise from val handler 2 | raise from val handler succeeded 3 | -------------------------------------------------------------------------------- /testsuite/tests/misc/ephetest2.reference: -------------------------------------------------------------------------------- 1 | test0 check: OK 2 | test1 check: OK 3 | test2 check: OK 4 | test3 check: OK 5 | test4 check: OK 6 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/arrow_ambiguity.compilers.reference: -------------------------------------------------------------------------------- 1 | File "arrow_ambiguity.ml", line 29, characters 0-0: 2 | Error: Syntax error 3 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6604.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr6604.ml", line 9, characters 0-1: 2 | 9 | #1 3 | ^ 4 | Error: Syntax error 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/depend.mod3.reference: -------------------------------------------------------------------------------- 1 | LibA.ml: Lib 2 | LibB.ml: Lib LibA 3 | LibC.ml: Lib LibA LibB 4 | LibD.ml: Lib 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/Extensible_variant.ocamldoc.latex.reference: -------------------------------------------------------------------------------- 1 | Warning: Tag @test_types_display not handled by this generator 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-fstclassmod/fstclassmod.reference: -------------------------------------------------------------------------------- 1 | abc/def/xyz xyz/def/abc 2 | 1 3 | 2 4 | XXXXXXXX 5 | 10 6 | (123,("A",456)) 7 | 2 8 | -------------------------------------------------------------------------------- /testsuite/tests/asmgen/catch-rec-deadhandler.reference: -------------------------------------------------------------------------------- 1 | catch rec 2 | exit(1) 3 | with(1) 4 | catch rec 5 | exit(1) 6 | with(1) 7 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/pr2719.reference: -------------------------------------------------------------------------------- 1 | Value of test at the beginning : false 2 | Value of test now : false 3 | 4 | All tests succeeded. 5 | -------------------------------------------------------------------------------- /testsuite/tests/c-api/alloc_async.reference: -------------------------------------------------------------------------------- 1 | OCaml, before: 42 2 | C, before: 42 3 | C, after: 42 4 | OCaml, after: 42 5 | OCaml, after alloc: 17 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-bytecode/custom.reference: -------------------------------------------------------------------------------- 1 | This is stub2, calling stub1: 2 | This is stub1! 3 | Ok! 4 | This is stub1! 5 | ABCDEF 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-bytecode/static.reference: -------------------------------------------------------------------------------- 1 | This is stub1! 2 | ABCDEF 3 | This is stub2, calling stub1: 4 | This is stub1! 5 | Ok! 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin_simple.ml: -------------------------------------------------------------------------------- 1 | let facts = [ (Random.int 4) ] 2 | 3 | let () = print_endline "COUCOU"; print_char '\n' 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/host/api.ml: -------------------------------------------------------------------------------- 1 | let fact = ref (fun _ -> assert false) 2 | let zero = ref (-1) 3 | let _ = prerr_endline "API" 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin1/api.ml: -------------------------------------------------------------------------------- 1 | let fact = ref (fun _ -> assert false) 2 | let zero = ref (-1) 3 | let _ = prerr_endline "API" 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin4/api.ml: -------------------------------------------------------------------------------- 1 | let fact = ref (fun _ -> assert false) 2 | let zero = ref 42 3 | let _ = prerr_endline "API" 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-scanf-2/tscanf2.reference: -------------------------------------------------------------------------------- 1 | Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong! 2 | Test OK. 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/basic/input_script: -------------------------------------------------------------------------------- 1 | set arguments arg1 arg2 2 | environment foo=bar 3 | environment foo=notbar 4 | run 5 | quit 6 | -------------------------------------------------------------------------------- /tools/unlabel-patches/4.mli: -------------------------------------------------------------------------------- 1 | module Make : functor (Ord : OrderedType) -> S 2 | with type elt = Ord.t 3 | and type t = Set.Make(Ord).t 4 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_test.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | (${program} 2>&1 || true) | \ 3 | ${test_source_directory}/filter-locations.sh > ${output} 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-check/pr7231.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | let rec r = let rec x () = r and y () = x () in y () in r "oops";; 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/a.ml: -------------------------------------------------------------------------------- 1 | let x = ref 0 2 | let u = Random.int 1000 3 | 4 | let () = 5 | Printf.printf "A is running (%i)\n%!" u 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/bug.ml: -------------------------------------------------------------------------------- 1 | let () = try raise (Invalid_argument "X") with Invalid_argument s -> 2 | raise (Invalid_argument (s ^ s)) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/pr4466.reference: -------------------------------------------------------------------------------- 1 | Selected 2 | Data read: >>1111 3 | Selected 4 | Data read: >>2222 5 | Selected 6 | Data read: >>3333 7 | -------------------------------------------------------------------------------- /tools/unlabel-patches/1.mli: -------------------------------------------------------------------------------- 1 | module Make : functor (H : HashedType) -> S 2 | with type key = H.t 3 | and type 'a t = 'a Hashtbl.Make(H).t 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic-multdef/usemultdef.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | modules = "multdef.ml" 3 | *) 4 | 5 | let _ = print_int(Multdef.f 1); print_newline(); exit 0 6 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_1.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let f x y = Printf.printf "%d %d\n" x y 4 | 5 | let i = ref 0 6 | let () = f (incr i; !i) !i 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/generic_array.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let rec x = let _y = [| |] in ();; 4 | 5 | let rec x = let y = [| |] in y :: x;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/lazy_.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let rec c = lazy (0 + d) and d = 3;; 4 | 5 | let () = Printf.printf "%d\n" (Lazy.force c) 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/packed1.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Api.reg_mod "Packed1" 3 | 4 | let bla = Sys.argv.(0) ^ "XXX" 5 | let mykey = Sys.argv.(0) 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/win-env/test_env.reference: -------------------------------------------------------------------------------- 1 | Sys.getenv FOO -> Some "BAR" 2 | Unix.environment FOO -> Some "BAR" 3 | Sys.getenv FOO2 -> Some "BAR2" 4 | -------------------------------------------------------------------------------- /testsuite/tests/statmemprof/minor_no_postpone_stub.c: -------------------------------------------------------------------------------- 1 | #include "caml/alloc.h" 2 | 3 | value alloc_stub(value v) { 4 | return caml_alloc(1, 0); 5 | } 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/pr7751.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include ocamlcommon 3 | * toplevel 4 | *) 5 | 6 | Parse.expression (Lexing.from_string "1");; 7 | -------------------------------------------------------------------------------- /tools/unlabel-patches/3.mli: -------------------------------------------------------------------------------- 1 | module Make : functor (Ord : OrderedType) -> S 2 | with type key = Ord.t 3 | and type 'a t = 'a Map.Make(Ord).t 4 | -------------------------------------------------------------------------------- /lambda/.ocamlformat: -------------------------------------------------------------------------------- 1 | profile=conventional 2 | if-then-else=k-r 3 | indicate-multiline-delimiters=closing-on-separate-line 4 | break-cases=all 5 | disable=true 6 | -------------------------------------------------------------------------------- /manual/styles/fullpage.sty: -------------------------------------------------------------------------------- 1 | \marginparwidth 0pt \oddsidemargin 0pt \evensidemargin 0pt \marginparsep 0pt 2 | \topmargin 0pt \textwidth 6.5in \textheight 8.5 in 3 | -------------------------------------------------------------------------------- /testsuite/tests/asmgen/catch-rec-deadhandler.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec > "${output}" 2>&1 4 | 5 | grep -E "catch |with\(|and\(|exit\(" "${compiler_output}" 6 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_traversal_test.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | (${program} 2>&1 || true) | \ 3 | ${test_source_directory}/filter-locations.sh > ${output} 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/cmdline_prog.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | for i = 1 to (Array.length Sys.argv) - 1 do 3 | Printf.printf "%s\n" Sys.argv.(i) 4 | done 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/truncate.reference: -------------------------------------------------------------------------------- 1 | initial size: 13 2 | new size: 11 3 | final size: 0 4 | initial size: 13 5 | new size: 10 6 | final size: 0 7 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/isatty/isatty_std.reference: -------------------------------------------------------------------------------- 1 | Unix.isatty Unix.stdin = false 2 | Unix.isatty Unix.stdout = false 3 | Unix.isatty Unix.stderr = false 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/unix-execvpe/script3: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "--- ./script3" 3 | echo "FOO is $FOO, BAR is $BAR, BUZ is $BUZ" 4 | echo "$# arguments: $*" 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/unix-execvpe/subdir/script2: -------------------------------------------------------------------------------- 1 | echo "--- subdir/script2" 2 | echo "FOO is $FOO, BAR is $BAR, BUZ is $BUZ" 3 | echo "$# arguments: $*" 4 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/external.ml: -------------------------------------------------------------------------------- 1 | let () = print_endline "linked external"; flush stdout 2 | external frexp : float -> float * int = "caml_frexp_float" 3 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6604_2.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr6604_2.ml", line 9, characters 1-2: 2 | 9 | #1 "pr6604.ml" 3 | ^ 4 | Error: Syntax error 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-shadowing/a.reference: -------------------------------------------------------------------------------- 1 | a.cmo : \ 2 | dir2/c.cmi \ 3 | dir1/b.cmo 4 | a.cmx : \ 5 | dir2/c.cmi \ 6 | dir1/b.cmx 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlopt-save-ir/save_ir_after_typing.compilers.reference: -------------------------------------------------------------------------------- 1 | wrong argument 'typing'; option '-save-ir-after' expects one of: scheduling. 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/gpr1223.compilers.reference: -------------------------------------------------------------------------------- 1 | val y : Gpr1223_bar.N.O.t = Gpr1223_bar.N.O.T 2 | val x : Gpr1223_bar.M.t = Gpr1223_bar.M.T 3 | 4 | -------------------------------------------------------------------------------- /testsuite/tests/lexing/comments.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | (* "*)" *) 6 | 7 | (* {|*)|} *) 8 | 9 | (* '"' *) 10 | 11 | (* f' '"' *) 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-csharp/main.bytecode.reference: -------------------------------------------------------------------------------- 1 | Now starting the OCaml engine. 2 | Main is running. 3 | Loading plugin.cmo 4 | I'm the plugin. 5 | OK. 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-csharp/main.native.reference: -------------------------------------------------------------------------------- 1 | Now starting the OCaml engine. 2 | Main is running. 3 | Loading plugin.cmxs 4 | I'm the plugin. 5 | OK. 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-systhreads/testfork.reference: -------------------------------------------------------------------------------- 1 | Forking... 2 | In parent... 3 | In child... 4 | Child did minor GC. 5 | Child is exiting. 6 | Parent is exiting. 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-error-cleanup/check-error-cleanup.sh: -------------------------------------------------------------------------------- 1 | if [ -f test.cmo ] 2 | then 3 | exit ${TEST_FAIL} 4 | else 5 | exit ${TEST_PASS} 6 | fi 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-stop-after/stop_after_scheduling.compilers.reference: -------------------------------------------------------------------------------- 1 | wrong argument 'scheduling'; option '-stop-after' expects one of: parsing typing. 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/depend.mod.reference: -------------------------------------------------------------------------------- 1 | lib.ml: 2 | lib.mli: 3 | LibA.ml: Lib 4 | LibB.ml: Lib LibA 5 | LibC.ml: Lib LibA LibB 6 | LibD.ml: Lib 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-shadowing-of-pervasives-submodules/redefine_largefile.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | modules = "largeFile.ml" 3 | *) 4 | print_endline LargeFile.message 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-sigsubst/test_loc_modtype_type_eq.ml: -------------------------------------------------------------------------------- 1 | module type S = Test_functor.S with type elt = unit 2 | 3 | module M : S = Test_functor.Apply (String) 4 | -------------------------------------------------------------------------------- /tools/unlabel-patches/2.mli: -------------------------------------------------------------------------------- 1 | module MakeSeeded (H : SeededHashedType) : SeededS 2 | with type key = H.t 3 | and type 'a t = 'a Hashtbl.MakeSeeded(H).t 4 | -------------------------------------------------------------------------------- /manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.eot -------------------------------------------------------------------------------- /manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.ttf -------------------------------------------------------------------------------- /manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.woff -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/pr4008.ml: -------------------------------------------------------------------------------- 1 | module rec M : sig 2 | val f : int list -> int list 3 | end = struct 4 | let f = List.map succ 5 | end 6 | let v = M.f [] 7 | -------------------------------------------------------------------------------- /testsuite/tests/statmemprof/exception_callback_minor.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception File "exception_callback_minor.ml", line 16, characters 30-36: Assertion failed 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-sigsubst/test_loc_modtype_type_subst.ml: -------------------------------------------------------------------------------- 1 | module type S = Test_functor.S with type elt := unit 2 | 3 | module M : S = Test_functor.Apply (String) 4 | -------------------------------------------------------------------------------- /manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vincentdchan/ocaml/HEAD/manual/manual/htmlman/fonts/fira-sans-v8-latin-regular.woff2 -------------------------------------------------------------------------------- /manual/manual/manual.info.header: -------------------------------------------------------------------------------- 1 | INFO-DIR-SECTION OCaml Programming Language 2 | START-INFO-DIR-ENTRY 3 | * ocaml: (ocaml). OCaml Reference Manual 4 | END-INFO-DIR-ENTRY 5 | -------------------------------------------------------------------------------- /testsuite/tests/callback/signals_alloc.reference: -------------------------------------------------------------------------------- 1 | 01234 2 | 01234 3 | 01234 4 | 01234 5 | 01234 6 | 01234 7 | 01234 8 | 01234 9 | 01234 10 | 01234 11 | 01234 12 | OK 13 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bigarray/change_layout.reference: -------------------------------------------------------------------------------- 1 | Generic rank test: Ok 2 | Scalar test: Ok 3 | Rank-1 array test: Ok 4 | Rank-2 array test: Ok 5 | Rank-3 array test: Ok 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin_high_arity.ml: -------------------------------------------------------------------------------- 1 | let f x x x x x x x x x x x x x = () 2 | 3 | let g x = f x x x x x x x x 4 | 5 | let () = 6 | Api.reg_mod "HA" 7 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/byte.plugin3.reference: -------------------------------------------------------------------------------- 1 | API 2 | ERROR: The module `Packed' is already loaded (either by the main program or a previously-dynlinked library) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/byte.plugin4.reference: -------------------------------------------------------------------------------- 1 | API 2 | ERROR: The module `Packed' is already loaded (either by the main program or a previously-dynlinked library) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/unix-execvpe/subdir/script1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "--- subdir/script1" 3 | echo "FOO is $FOO, BAR is $BAR, BUZ is $BUZ" 4 | echo "$# arguments: $*" 5 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/external_for_pack.ml: -------------------------------------------------------------------------------- 1 | let () = print_endline "linked external from pack"; flush stdout 2 | external frexp : float -> float * int = "caml_frexp_float" 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/tracing.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | List.fold_left;; 6 | #trace List.fold_left;; 7 | 0;; 8 | List.fold_left (+) 0 [1;2;3];; 9 | -------------------------------------------------------------------------------- /manual/manual/.gitignore: -------------------------------------------------------------------------------- 1 | allfiles.tex 2 | biblio.tex 3 | foreword.tex 4 | version.tex 5 | warnings.etex 6 | warnings.tex 7 | foreword.htex 8 | manual.html 9 | webman 10 | -------------------------------------------------------------------------------- /manual/tools/.gitignore: -------------------------------------------------------------------------------- 1 | transf.ml 2 | texquote2 3 | htmltransf.ml 4 | transf 5 | htmlgen 6 | htmlquote 7 | latexscan.ml 8 | dvi2txt 9 | *.dSYM 10 | *.cm[io] 11 | *.o 12 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/0001-test.compilers.reference: -------------------------------------------------------------------------------- 1 | File "0001-test.ml", line 1: 2 | Warning 24 [bad-module-name]: bad source file name: "0001-test" is not a valid module name. 3 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/is_in_static_data.c: -------------------------------------------------------------------------------- 1 | #include "caml/address_class.h" 2 | 3 | value caml_is_in_static_data(value v) { 4 | return(Val_bool(Is_in_static_data(v))); 5 | } 6 | -------------------------------------------------------------------------------- /testsuite/tests/basic/maps.reference: -------------------------------------------------------------------------------- 1 | Union+concat 2 | 0 AB 3 | 3 X1 4 | 5 X2 5 | Inter 6 | 4 Y 7 | Union+concat (with Map.union) 8 | 0 AB 9 | 3 X1 10 | 5 X2 11 | Update 12 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/class_1.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | (* class expression are compiled to recursive bindings *) 4 | class test = 5 | object 6 | method x = 1 7 | end 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/native.plugin3.reference: -------------------------------------------------------------------------------- 1 | API 2 | ERROR: The module `Packed' is already loaded (either by the main program or a previously-dynlinked library) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/native.plugin4.reference: -------------------------------------------------------------------------------- 1 | API 2 | ERROR: The module `Packed' is already loaded (either by the main program or a previously-dynlinked library) 3 | -------------------------------------------------------------------------------- /testsuite/tests/raise-counts/main.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | modules = "a.ml b.ml" 3 | *) 4 | 5 | (* PR#7702 *) 6 | 7 | let () = 8 | B.bug (Some ""); 9 | print_endline "OK." 10 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/printer/debuggee.reference: -------------------------------------------------------------------------------- 1 | File printer.cmo loaded 2 | Loading program... done. 3 | Breakpoint: 1 4 | 18 <|b|>for _i = 0 to x do 5 | x: int = S S O 6 | -------------------------------------------------------------------------------- /manual/manual/htmlman/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.haux 3 | *.hind 4 | compilerlibref 5 | libref 6 | manual.hmanual 7 | manual.hmanual.kwd 8 | manual.css 9 | *.htoc 10 | *.svg 11 | -------------------------------------------------------------------------------- /manual/manual/texstuff/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.dvi 3 | *.idx 4 | *.ilg 5 | *.ind 6 | *.log 7 | *.toc 8 | *.ipr 9 | *.txt 10 | *.pdf 11 | *.ps 12 | manual.out 13 | manual.out 14 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/find-artifacts/debuggee.reference: -------------------------------------------------------------------------------- 1 | Loading program... done. 2 | Breakpoint: 1 3 | 10 <|b|>print x; 4 | x: Blah.blah = Foo 5 | y: Blah.blah = Bar "hi" 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/printer/input_script: -------------------------------------------------------------------------------- 1 | load_printer printer.cmo 2 | install_printer Printer.p 3 | set print_depth 2 4 | break @ Debuggee 18 5 | run 6 | print x 7 | quit 8 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/Loop.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * ocamldoc with html 3 | * ocamldoc with latex 4 | *) 5 | module rec A : sig type t end = B and B : sig type t = A.t end = A;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr6836.compilers.reference: -------------------------------------------------------------------------------- 1 | type t = [ `A | `B ] 2 | type 'a u = t 3 | val a : [< t > `A ] = `A 4 | type 'a s = 'a 5 | val b : [< t > `B ] = `B 6 | 7 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtrace.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run the backtrace test 3 | 4 | exec > "${output}" 2>&1 5 | 6 | for arg in a b c d ''; do 7 | "${program}" ${arg} || true 8 | done 9 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin_ext.ml: -------------------------------------------------------------------------------- 1 | external fact: int -> string = "factorial" 2 | 3 | let () = 4 | Api.reg_mod "plugin_ext"; 5 | Printf.printf "fact 10 = %s\n" (fact 10) 6 | -------------------------------------------------------------------------------- /testsuite/tests/misc-unsafe/almabench.reference: -------------------------------------------------------------------------------- 1 | 0 17.00 -26.06 2 | 1 12.34 1.29 3 | 2 6.83 22.95 4 | 3 0.04 -1.26 5 | 4 2.30 12.54 6 | 5 2.93 14.35 7 | 6 21.27 -16.57 8 | 7 20.41 -19.04 9 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/constructor_declarations.compilers.reference: -------------------------------------------------------------------------------- 1 | File "constructor_declarations.ml", line 24, characters 2-3: 2 | 24 | | A of int 3 | ^ 4 | Error: Syntax error 5 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/stackoverflow.reference: -------------------------------------------------------------------------------- 1 | x = 20000 2 | x = 10000 3 | x = 0 4 | Stack overflow caught 5 | x = 20000 6 | x = 10000 7 | x = 0 8 | second Stack overflow caught 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/Module_whitespace.ocamldoc.html.reference: -------------------------------------------------------------------------------- 1 | Warning: Module or module type Stdlib.Set.Make not found 2 | Warning: Module or module type Stdlib.Set.Make not found 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc/ranged_intf.ml: -------------------------------------------------------------------------------- 1 | module type S = sig 2 | module Endpoint : Range_intf.Endpoint_intf 3 | module Range : Range_intf.S with type Endpoint.t = Endpoint.t 4 | end 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/offset.ml: -------------------------------------------------------------------------------- 1 | module M = struct 2 | type t = string 3 | 4 | let x = 0 5 | let x = 1 6 | 7 | module Set = Set.Make(String) 8 | end 9 | 10 | include M 11 | -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/pr7427.ml: -------------------------------------------------------------------------------- 1 | module F() = struct 2 | module M = struct 3 | let aaa = assert false 4 | let bbb () = assert false 5 | end 6 | let ccc () = M.bbb () 7 | end 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/signal.check-program-output: -------------------------------------------------------------------------------- 1 | if sed -e 1q ${output} | grep -q '^[ab]*Got ctrl-C, exiting$'; 2 | then 3 | exit ${TEST_PASS} 4 | else 5 | exit ${TEST_FAIL}; 6 | fi 7 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/stackoverflow.native.reference: -------------------------------------------------------------------------------- 1 | x = 20000 2 | x = 10000 3 | x = 0 4 | Stack overflow caught 5 | x = 20000 6 | x = 10000 7 | x = 0 8 | second Stack overflow caught 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/lib_impl.ml: -------------------------------------------------------------------------------- 1 | module Packed = struct 2 | module A = LibA 3 | module B = LibB 4 | module C = LibC 5 | end 6 | include Packed 7 | 8 | let imp x = x+1 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm1.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | let () = set_binary_mode_out stdout true in 4 | (* ocamltest must normalise the \r\n *) 5 | print_string "line1\r\n"; flush stdout 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc/mapping.ml: -------------------------------------------------------------------------------- 1 | module Range_intf = Pr8548__Range_intf 2 | module Range = Pr8548__Range 3 | module Ranged_intf = Pr8548__Ranged_intf 4 | module Ranged = Pr8548__Ranged 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/pr7683.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let f () n () = 4 | n 5 | 6 | let g () = 7 | let r = ref 0 in 8 | f (incr r) !r (incr r) 9 | 10 | let () = print_int (g ()) 11 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-check/pr7706.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | let rec x = 5 | let y = if false then (fun z -> 1) else (fun z -> x 4 + 1) in 6 | y;; 7 | 8 | let () = ignore (x 42);; 9 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin1/plugin.ml: -------------------------------------------------------------------------------- 1 | let rec fact = function 2 | | 0 -> 1 3 | | n -> n * fact (n - 1) 4 | 5 | let _ = 6 | Packed.Api.zero := 0; 7 | Packed.Api.fact := fact 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-format/print_if_newline.reference: -------------------------------------------------------------------------------- 1 | 2 | test print_if_newline 3 | newline here 4 | this gets printed 5 | print_if_newline doesn't crash when last statement 6 | newline here 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml-annot/check-annot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | MODULENAME=$1 3 | if [ -f ${test_build_directory}/${MODULENAME}.annot ]; then 4 | exit ${TEST_PASS} 5 | else 6 | exit ${TEST_FAIL} 7 | fi 8 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/Module_whitespace.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * ocamldoc with html 3 | *) 4 | 5 | module M = Set.Make(struct 6 | type t = int 7 | let compare = compare 8 | end) 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm2.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | let () = set_binary_mode_out stdout true in 4 | (* ocamltest must normalise the \r\n *) 5 | print_string "line1\r\nline2\r\n"; flush stdout 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm4.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | let () = set_binary_mode_out stdout true in 4 | (* ocamltest must normalise the \r\n *) 5 | print_string "line1\r\nline2"; flush stdout 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/gpr1223_bar.mli: -------------------------------------------------------------------------------- 1 | 2 | module M : Gpr1223_foo.S 3 | 4 | module N : sig 5 | 6 | module O : sig 7 | 8 | type t = T 9 | 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr5918.compilers.reference: -------------------------------------------------------------------------------- 1 | Line 10, characters 9-19: 2 | 10 | let _ = { a = () } 3 | ^^^^^^^^^^ 4 | Error: Some record fields are undefined: b 5 | 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-signatures/pr6371.ocaml.reference: -------------------------------------------------------------------------------- 1 | module M : sig type t = int * (< m : 'a > as 'a) end 2 | module type S = sig module M : sig type t = int * (< m : 'a > as 'a) end end 3 | 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/bounds.reference: -------------------------------------------------------------------------------- 1 | 0: doesn't fail 2 | 1: doesn't fail 3 | 2: doesn't fail 4 | 3: fails 5 | 4: fails 6 | -1: fails 7 | Trail: -1 4 3 2 1 0 8 | 9 | All tests succeeded. 10 | -------------------------------------------------------------------------------- /testsuite/tests/basic/includestruct.reference: -------------------------------------------------------------------------------- 1 | 1, 2 2 | 2, 3 3 | 124, 457 4 | 0 5 | 2 6 | 2 7 | 1 8 | 3 9 | F is called 10 | A 11 | 42 12 | A 13 | 42 14 | foo1 15 | foo1 16 | 1 / 2 / 10 17 | XXX 18 | -------------------------------------------------------------------------------- /testsuite/tests/formats-transition/deprecated_unsigned_printers.ocaml.reference: -------------------------------------------------------------------------------- 1 | val test : (int -> string, unit, string) format -> string = 2 | %n: true 3 | %l: true 4 | %N: true 5 | %L: true 6 | 7 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-bytecode/registry.ml: -------------------------------------------------------------------------------- 1 | let functions = ref ([]: (int -> int) list) 2 | 3 | let register f = 4 | functions := f :: !functions 5 | 6 | let get_functions () = 7 | !functions 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin2/plugin.ml: -------------------------------------------------------------------------------- 1 | let rec fact = function 2 | | 0 -> 1 3 | | n -> n * fact (n - 1) 4 | 5 | let _ = 6 | Packed.Api.zero := 0; 7 | Packed.Api.fact := Some fact 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin3/plugin.ml: -------------------------------------------------------------------------------- 1 | let rec fact = function 2 | | 0 -> 1 3 | | n -> n * fact (n - 1) 4 | 5 | let _ = 6 | Packed.Api.zero := 0; 7 | Packed.Api.fact := Some fact 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-pr4839/plugin4/plugin.ml: -------------------------------------------------------------------------------- 1 | let rec fact = function 2 | | 0 -> 1 3 | | n -> n * fact (n - 1) 4 | 5 | let _ = 6 | (* Packed.Api.zero := 0; *) 7 | Packed.Api.fact := fact 8 | -------------------------------------------------------------------------------- /testsuite/tests/required-external/file.ml: -------------------------------------------------------------------------------- 1 | external getcwd : unit -> string = "caml_sys_getcwd" 2 | 3 | let f () = () 4 | 5 | let () = 6 | print_endline "Module `File' is linked"; 7 | flush stdout 8 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-stop-after/stop_after_scheduling.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | grep "wrong argument 'scheduling'" compiler-output.raw | grep "stop-after" | sed 's/^.*: wrong argument/wrong argument/' 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlopt-save-ir/save_ir_after_typing.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | grep "wrong argument 'typing'" compiler-output.raw | grep "save-ir-after" | sed 's/^.*: wrong argument/wrong argument/' 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/mod_use.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "mod.ml" 3 | * expect 4 | *) 5 | 6 | #mod_use "mod.ml" 7 | [%%expect {| 8 | module Mod : sig val answer : int end 9 | |}];; 10 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w60.compilers.reference: -------------------------------------------------------------------------------- 1 | File "w60.ml", line 40, characters 13-14: 2 | 40 | let module M = struct end in 3 | ^ 4 | Warning 60 [unused-module]: unused module M. 5 | -------------------------------------------------------------------------------- /manual/styles/scroll.sty: -------------------------------------------------------------------------------- 1 | % Modification to plaintext.sty to suppress page headings 2 | % and make pages contiguous when processed with dvi2txt 3 | 4 | \pagestyle{empty} 5 | \advance\voffset by -2\baselineskip 6 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/unrolling_flambda.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * flambda 3 | ** native 4 | *) 5 | 6 | let rec f x = 7 | if x > 0 then f (x - 1) 8 | else 0 9 | [@@inline] 10 | 11 | let _ = f 0 12 | -------------------------------------------------------------------------------- /testsuite/tests/basic/unit_naming.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unit_naming.ml", line 9, characters 10-25: 2 | 9 | print_int Camlcase.answer 3 | ^^^^^^^^^^^^^^^ 4 | Error: Unbound module Camlcase 5 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/nested.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | (* Mantis PR7447 *) 4 | 5 | let rec r = (let rec x = `A r and y = fun () -> x in y) 6 | 7 | let (`A x) = r () 8 | 9 | let _ = x () 10 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-bytecode/plug2.ml: -------------------------------------------------------------------------------- 1 | external stub2: unit -> unit = "stub2" 2 | 3 | let f x = print_string "This is Plug2.f\n"; x + 2 4 | 5 | let () = Registry.register f 6 | 7 | let () = stub2 () 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/win-stat/test.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | TZ=utc touch -m -t 201707011200 dst-file 3 | TZ=utc touch -m -t 201702011200 non-dst-file 4 | `cygpath -m "${program}"` > `cygpath -m "${output}"` 2>&1 5 | -------------------------------------------------------------------------------- /testsuite/tests/locale/stubs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | value ml_setlocale(value v_locale) 5 | { 6 | setlocale(LC_ALL,String_val(v_locale)); 7 | return Val_unit; 8 | } 9 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr5757/pr5757.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | Random.init 3;; 4 | for i = 0 to 100_000 do 5 | ignore (Bytes.create (Random.int 1_000_000)) 6 | done;; 7 | Printf.printf "hello world\n";; 8 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/No_preamble.mli: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * ocamldoc with html 3 | *) 4 | 5 | open String 6 | 7 | (** This is a documentation comment for [x], not a module preamble. *) 8 | val x: unit 9 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules/pr8810.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | flags = "-no-alias-deps -w -49 -c" 4 | ** ocamlc.byte 5 | ocamlc_byte_exit_status = "2" 6 | *) 7 | module Loop = Pr8810 8 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w58.native.reference: -------------------------------------------------------------------------------- 1 | File "_none_", line 1: 2 | Warning 58 [no-cmx-file]: no cmx file was found in path for module Module_without_cmx, and its interface was not compiled with -opaque 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/sub/plugin.ml: -------------------------------------------------------------------------------- 1 | let rec fact n = if n = 0 then 1 else n * fact (n - 1) 2 | 3 | let facts = [ fact 1; fact 2; fact 3; fact 4; fact 5 ] 4 | 5 | let () = 6 | Api.reg_mod "Plugin'" 7 | -------------------------------------------------------------------------------- /testsuite/tests/lib-filename/null.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | 4 | let () = 5 | let ic = open_in Filename.null in 6 | match input_char ic with 7 | | exception End_of_file -> close_in ic 8 | | _ -> assert false 9 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7042/pr7042.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let _ = 4 | let a = [| 0.0; -. 0.0 |] in 5 | Printf.printf "%Lx %Lx\n" 6 | (Int64.bits_of_float a.(0)) (Int64.bits_of_float a.(1)) 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-open/main.ocamldoc.latex.reference: -------------------------------------------------------------------------------- 1 | Warning: Module or module type Inner not found 2 | Warning: Module or module type Inner not found 3 | Warning: Module or module type Inner not found 4 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/pr7847.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr7847.ml", line 10, characters 30-31: 2 | 10 | external x : unit -> (int,int)`A.t = "x" 3 | ^ 4 | Error: Syntax error 5 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr9292/pr9292.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let () = 4 | Gc.set { (Gc.get ()) with allocation_policy = 2 }; 5 | ignore (Array.init 5_000 (fun _ -> Array.make 10_000 0)); 6 | Gc.full_major () 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/tool-ocamlc-open-error.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | flags = "-open F(" 5 | ocamlc_byte_exit_status = "2" 6 | *** check-ocamlc.byte-output 7 | *) 8 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlopt-save-ir/check_for_pack.compilers.reference: -------------------------------------------------------------------------------- 1 | File "check_for_pack.cmir-linear", line 1: 2 | Error: This input file cannot be compiled with -for-pack foo: it was generated without -for-pack. 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-sys/rename.reference: -------------------------------------------------------------------------------- 1 | Rename to nonexisting file: passed 2 | Rename to existing file: passed 3 | Renaming a nonexisting file: fails as expected 4 | Renaming to a nonexisting directory: fails as expected 5 | -------------------------------------------------------------------------------- /testsuite/tests/output-complete-obj/puts.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | value caml_puts(value s) 5 | { 6 | puts(String_val(s)); 7 | fflush(stdout); 8 | return Val_unit; 9 | } 10 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_class_simpl_expr3.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | class c = (object end 9 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr3.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M = (val 3 : 9 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr4.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M = (val 3 :> 9 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr5.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M = (val 3 9 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_type.mli: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M : (sig end 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t05.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | plugins="odoc_test.ml" 3 | * ocamldoc 4 | flags="-I ${ocamlsrcdir}/ocamldoc" 5 | *) 6 | 7 | module rec A : sig type t end = B and B : sig type t = A.t end = A;; 8 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamltest/norm3.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | let () = set_binary_mode_out stdout true in 4 | (* ocamltest must normalise the \r\n but preserve the final \r *) 5 | print_string "line1\r\nline2\r"; flush stdout 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-rectypes-bugs/pr5343_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr5343_bad.ml", line 11, characters 2-14: 2 | 11 | type u = u t and v = v t 3 | ^^^^^^^^^^^^ 4 | Error: The type abbreviation u is cyclic 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-signatures/pr6672.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | module type S = sig type 'a t end;; 6 | module type T = S with type +'a t = 'a list;; 7 | module type T = S with type -'a t = 'a list;; 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-bytecode/plug1.ml: -------------------------------------------------------------------------------- 1 | external stub1: unit -> string = "stub1" 2 | 3 | let f x = print_string "This is Plug1.f\n"; x + 1 4 | 5 | let () = Registry.register f 6 | 7 | let () = print_endline (stub1 ()) 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/rename.reference: -------------------------------------------------------------------------------- 1 | Rename to nonexisting file: passed 2 | Rename to existing file: passed 3 | Renaming a nonexisting file: fails as expected 4 | Renaming to a nonexisting directory: fails as expected 5 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr2.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M = (struct end 9 | -------------------------------------------------------------------------------- /testsuite/tests/prim-bigstring/bigstring_access.reference: -------------------------------------------------------------------------------- 1 | 1234 12 0 2 | fedc fe 0 3 | 12345678 123456 1234 4 | fedcba09 fedcba fedc 5 | 1234567890abcdef 1234567890abcd 1234567890ab 6 | fedcba0987654321 fedcba09876543 fedcba098765 7 | -------------------------------------------------------------------------------- /testsuite/tests/prim-bigstring/string_access.reference: -------------------------------------------------------------------------------- 1 | 1234 12 0 2 | fedc fe 0 3 | 12345678 123456 1234 4 | fedcba09 fedcba fedc 5 | 1234567890abcdef 1234567890abcd 1234567890ab 6 | fedcba0987654321 fedcba09876543 fedcba098765 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/lib.mli: -------------------------------------------------------------------------------- 1 | module Packed : sig 2 | module A = LibA 3 | module B = LibB 4 | module C = LibC 5 | end 6 | include (module type of struct include Packed end) 7 | 8 | val imp : int -> int 9 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/fdstatus_main.ml: -------------------------------------------------------------------------------- 1 | external process_fd : int -> string -> unit = "caml_process_fd" 2 | 3 | let () = 4 | for i = 1 to (Array.length Sys.argv) -1 5 | do 6 | process_fd i Sys.argv.(i); 7 | done 8 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_sig.mli: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M : sig 9 | type t = T 10 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/change_start_loc.reference: -------------------------------------------------------------------------------- 1 | Incomplete version: 2 | File "file.ml", line 100, characters 10--999: 3 | Error: Syntax error 4 | Good version: 5 | File "file.ml", line 100, characters 10-11: 6 | Error: Syntax error 7 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6604.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = "-dparsetree" 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | #1 10 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test5_plugin_b.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | if Dynlink.is_native then begin 3 | Dynlink.loadfile "test5_second_plugin.cmxs" 4 | end else begin 5 | Dynlink.loadfile "test5_second_plugin.cmo" 6 | end 7 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_class_simpl_expr2.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | class c = (object end : object end 9 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr1.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M = (struct end : sig end 9 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_struct.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module M = struct 9 | type t = T 10 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t02.reference: -------------------------------------------------------------------------------- 1 | # 2 | # module T02: 3 | # 4 | # module T02.Foo: 5 | # 6 | # module type T02.TFoo: 7 | # 8 | # module type T02.TBar: 9 | # 10 | # module type T02.Gee: 11 | # 12 | # module T02.Gee.M: 13 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/last_arg_fail.txt.reference: -------------------------------------------------------------------------------- 1 | For implementation reasons, the toplevel does not support having script files (here "test.ml") inside expanded arguments passed through the -args{,0} command-line option. 2 | -------------------------------------------------------------------------------- /testsuite/tests/afl-instrumentation/has-afl-showmap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if ! which afl-showmap > /dev/null 2>&1; then 3 | echo "afl-showmap not available" > ${ocamltest_response} 4 | exit ${TEST_SKIP} 5 | else 6 | exit ${TEST_PASS} 7 | fi 8 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/function_in_ref.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include testing 3 | *) 4 | 5 | let f x = x + 1 6 | let g x = x - 1 7 | 8 | let run () = 9 | let r = ref f in 10 | r := g; 11 | let n = !r 1 in 12 | assert(n = 0) 13 | -------------------------------------------------------------------------------- /testsuite/tests/basic/bigints.reference: -------------------------------------------------------------------------------- 1 | 1000000000 2 | 10000000000 3 | 100000000000 4 | 1000000000000 5 | 10000000000000 6 | 100000000000000 7 | 1000000000000000 8 | 10000000000000000 9 | 100000000000000000 10 | 1000000000000000000 11 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float_physical_equality.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let a = -0. 4 | let b = +0. 5 | 6 | let _ = 7 | assert(not (a == b)) 8 | 9 | let f () = 10 | let a = -0. in 11 | let b = +0. in 12 | assert(not (a == b)) 13 | -------------------------------------------------------------------------------- /testsuite/tests/flambda/afl_lazy.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * flambda 3 | ** native 4 | ocamlopt_flags = "-O3 -afl-instrument" 5 | *) 6 | 7 | let f l = 8 | Lazy.force l 9 | 10 | let _ = 11 | Sys.opaque_identity (f (lazy "Hello")) 12 | -------------------------------------------------------------------------------- /testsuite/tests/lexing/escape.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | (* Errors *) 6 | 7 | let invalid = "\99" ;; 8 | let invalid = "\999" ;; 9 | let invalid = "\o777" ;; 10 | let invalid = "\o77" ;; 11 | let invalid = "\o99" ;; 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bigarray/fftba.reference: -------------------------------------------------------------------------------- 1 | 16... ok 2 | 32... ok 3 | 64... ok 4 | 128... ok 5 | 256... ok 6 | 512... ok 7 | 1024... ok 8 | 2048... ok 9 | 4096... ok 10 | 8192... ok 11 | 16384... ok 12 | 32768... ok 13 | 65536... ok 14 | -------------------------------------------------------------------------------- /testsuite/tests/lib-scanf/tscanf.reference: -------------------------------------------------------------------------------- 1 | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7920/pr7920.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | module Z = struct end 4 | 5 | module type QSig = sig 6 | module Z : sig end 7 | end 8 | 9 | module Q : QSig with module Z = Z = struct 10 | module Z = Z 11 | end 12 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/first_arg_fail.txt.reference: -------------------------------------------------------------------------------- 1 | For implementation reasons, the toplevel does not support having script files (here "test.ml") inside expanded arguments passed through the -args{,0} command-line option. 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/pr7060.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | type t = A | B;; 6 | type u = C of t;; 7 | let print_t out = function A -> Format.fprintf out "A";; 8 | #install_printer print_t;; 9 | B;; 10 | C B;; 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/pr6372.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "d.mli e.ml" 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | module = "d.mli" 6 | *** ocamlc.byte 7 | module = "e.ml" 8 | **** check-ocamlc.byte-output 9 | *) 10 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/gpr1223.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -short-paths " 3 | modules = "gpr1223_foo.mli gpr1223_bar.mli" 4 | * toplevel 5 | *) 6 | 7 | let y = Gpr1223_bar.N.O.T;; 8 | 9 | let x = Gpr1223_bar.M.T;; 10 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/event_after_prim.reference: -------------------------------------------------------------------------------- 1 | Raised by primitive operation at Event_after_prim.f in file "event_after_prim.ml", line 6, characters 12-27 2 | Called from Event_after_prim in file "event_after_prim.ml", line 11, characters 8-39 3 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_traversal_test.reference: -------------------------------------------------------------------------------- 1 | File inline_traversal_test.ml:14, raise 2 | File inline_traversal_test.ml:17 3 | File inline_traversal_test.ml:20 4 | File inline_traversal_test.ml:23 5 | File inline_traversal_test.ml:27 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-stream/mpr7769.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "mpr7769.txt" 3 | *) 4 | 5 | let () = 6 | let s = Stream.of_channel (open_in "mpr7769.txt") in 7 | Stream.junk s; 8 | print_char (Stream.next s); 9 | print_newline () 10 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/test_unixlabels.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include unix 3 | flags += " -nolabels " 4 | * hasunix 5 | ** bytecode 6 | ** native 7 | *) 8 | 9 | module U : module type of Unix = UnixLabels 10 | 11 | let () = 12 | () 13 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_class_simpl_expr1.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | class c = object 9 | method x = 1 10 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6604_2.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = "-dparsetree" 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | #1 "pr6604.ml" 10 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr7165.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr7165.ml", line 12, characters 1-23: 2 | 12 | #9342101923012312312 "" 3 | ^^^^^^^^^^^^^^^^^^^^^^ 4 | Error: Invalid lexer directive "#9342101923012312312 \"\"": line number out of range 5 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr1580/pr1580.reference: -------------------------------------------------------------------------------- 1 | . 2 | .. 3 | ... 4 | .... 5 | ..... 6 | ...... 7 | ....... 8 | ........ 9 | ......... 10 | . 11 | .. 12 | ... 13 | .... 14 | ..... 15 | ...... 16 | ....... 17 | ........ 18 | ......... 19 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/indirect_first_arg_fail.txt.reference: -------------------------------------------------------------------------------- 1 | For implementation reasons, the toplevel does not support having script files (here "test.ml") inside expanded arguments passed through the -args{,0} command-line option. 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/indirect_last_arg_fail.txt.reference: -------------------------------------------------------------------------------- 1 | For implementation reasons, the toplevel does not support having script files (here "test.ml") inside expanded arguments passed through the -args{,0} command-line option. 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr9695_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr9695_bad.ml", line 10, characters 18-19: 2 | 10 | let () = let open A in x 3 | ^ 4 | Error: This is an alias for module MissingModule, which is missing 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin_ref.ml: -------------------------------------------------------------------------------- 1 | let x = ref 0 2 | 3 | let () = 4 | Api.reg_mod "Plugin_ref"; 5 | 6 | Api.add_cb 7 | (fun () -> 8 | Printf.printf "current value for ref = %i\n" !x; 9 | incr x 10 | ) 11 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/test-runtime-cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | case "$OCAMLRUNPARAM" in 3 | c=1|c=1,*|*,c=1|*,c=1,*) 4 | echo "runtime cleans up at exit" > ${ocamltest_response}; 5 | exit ${TEST_SKIP};; 6 | *) exit ${TEST_PASS};; 7 | esac 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr6836.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -short-paths " 3 | * toplevel 4 | *) 5 | 6 | type t = [`A | `B];; 7 | type 'a u = t;; 8 | let a : [< int u] = `A;; 9 | 10 | type 'a s = 'a;; 11 | let b : [< t s] = `B;; 12 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/opaque_prim.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include testing 3 | *) 4 | 5 | let f x = Sys.opaque_identity x 6 | 7 | let () = 8 | assert(f f == f); 9 | assert(Sys.opaque_identity 1 = 1); 10 | assert(Sys.opaque_identity 1. = 1.) 11 | -------------------------------------------------------------------------------- /testsuite/tests/basic/unit_naming.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | modules = "camlCase.ml" 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | ocamlc_byte_exit_status = "2" 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | print_int Camlcase.answer 10 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception-warnings/pr7083.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * expect 3 | *) 4 | 5 | let f x = 6 | match x with 7 | | `A -> () 8 | | exception Not_found -> () 9 | ;; 10 | 11 | [%%expect{| 12 | val f : [< `A ] -> unit = 13 | |}] 14 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6604_3.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = "-dparsetree" 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | # 1 "pr6604.ml" 9 | 10 | # 3 "pr6604.ml" 11 | # 4 "pr6604.ml" 12 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t03.reference: -------------------------------------------------------------------------------- 1 | # 2 | # module T03: 3 | # 4 | # module T03.Foo: 5 | # 6 | # module type T03.MT: 7 | # 8 | # module T03.Bar: 9 | # 10 | # module type T03.MT2: 11 | # 12 | # module type T03.Gee: 13 | # 14 | # module T03.T: 15 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc-bugs/pr6946_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr6946_bad.ml", line 10, characters 8-11: 2 | 10 | let _ = foo ();; 3 | ^^^ 4 | Error: This expression has type int 5 | This is not a function; it cannot be applied. 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr6383.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * expect 3 | *) 4 | 5 | let f (x: #M.foo) = 0;; 6 | [%%expect{| 7 | Line 1, characters 11-16: 8 | 1 | let f (x: #M.foo) = 0;; 9 | ^^^^^ 10 | Error: Unbound module M 11 | |}];; 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr5918.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -short-paths " 3 | * toplevel 4 | *) 5 | 6 | module rec A : sig 7 | type t 8 | end = struct 9 | type t = { a : unit; b : unit } 10 | let _ = { a = () } 11 | end 12 | ;; 13 | -------------------------------------------------------------------------------- /testsuite/tests/typing-signatures/pr6371.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | module M = struct 6 | type t = int * (< m : 'a > as 'a) 7 | end;; 8 | 9 | module type S = 10 | sig module M : sig type t end end with module M = M 11 | ;; 12 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w60.mli: -------------------------------------------------------------------------------- 1 | module type Comparable = sig 2 | val id: int 3 | end 4 | 5 | module Fold_ordered(P: sig module Id:Comparable end): sig 6 | val foo: int 7 | end 8 | 9 | 10 | 11 | module M : sig end 12 | module O : sig end 13 | -------------------------------------------------------------------------------- /manual/tools/transfmain.ml: -------------------------------------------------------------------------------- 1 | let main() = 2 | let lexbuf = Lexing.from_channel stdin in 3 | if Array.length Sys.argv >= 2 && Sys.argv.(1) = "-html" 4 | then Htmltransf.main lexbuf 5 | else Transf.main lexbuf; 6 | exit 0;; 7 | 8 | Printexc.print main ();; 9 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-initializers/test10_plugin.ml: -------------------------------------------------------------------------------- 1 | let g () = 2 | if true then failwith "Plugin error"; 3 | print_endline "xxx" 4 | 5 | let f () = 6 | g (); 7 | print_endline "xxx" 8 | 9 | let () = 10 | f (); 11 | print_endline "xxx" 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-printf/pr6534.reference: -------------------------------------------------------------------------------- 1 | 1 [ foo] 2 | 2 [ foo] 3 | 3 [foo ] 4 | 4 [foo ] 5 | 5 [foo ] 6 | 6 [foo ] 7 | 1 [ "foo"] 8 | 2 [ "foo"] 9 | 3 ["foo" ] 10 | 4 ["foo" ] 11 | 5 ["foo" ] 12 | 6 ["foo" ] 13 | 14 | All tests succeeded. 15 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc/typecore_empty_polyvariant_error.compilers.reference: -------------------------------------------------------------------------------- 1 | type t = [ ] 2 | Line 1, characters 31-32: 3 | 1 | let f: 'a. t -> 'a = function #t -> . ;; 4 | ^ 5 | Error: The type t is not a variant type 6 | 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr7261.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w A -strict-sequence " 3 | * toplevel 4 | *) 5 | 6 | type foo = 7 | Foo: [> `Bla ] as 'b ) * 'b -> foo;; 8 | type foo = 9 | Foo: 'b * 'b -> foo constraint 'b = [> `Bla ];; 10 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/deprecated_module.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | 3 | flags = "-w A" 4 | 5 | * bytecode 6 | 7 | *) 8 | 9 | module M = struct 10 | type t = int 11 | 12 | let x = 10 13 | end 14 | [@@ocaml.deprecated] 15 | 16 | let _ = M.x 17 | include M 18 | -------------------------------------------------------------------------------- /stdlib/templates/README.adoc: -------------------------------------------------------------------------------- 1 | These templates are fragments of OCaml source files, which 2 | tools/sync_stdlib_docs uses to build the full labeled and unlabeled stdlib 3 | modules. At present, tools/sync_stdlib_docs must be run manually -- it is not a 4 | build task. 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/top_level_patterns.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include testing 3 | *) 4 | 5 | type t = 6 | | A of (int * int * int) 7 | | B of int * int 8 | 9 | let (A (a, _, b) | B (b, a)) = A (1, 2, 3) 10 | 11 | let () = print_int a; print_int b 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bigarray-2/call-gfortran.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This somewhat hackily passes any extra words in CC to gfortran 4 | # This means for a 32-bit build (configured with CC="gcc -m32" the -m32 5 | # gets passed to gfortran) 6 | shift 1 7 | gfortran "$@" 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/uexit.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * hasunix 3 | include unix 4 | ** bytecode 5 | ** native 6 | *) 7 | 8 | let _ = 9 | at_exit (fun () -> print_string "B\n"; flush stdout); 10 | print_string "A\n"; (* don't flush *) 11 | Unix._exit 0 12 | -------------------------------------------------------------------------------- /testsuite/tests/local-functions/tupled.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | 4 | (* PR#8705 *) 5 | let () = 6 | let tupled (x, y) = 7 | print_string ""; 8 | fun z -> x, y, z 9 | in 10 | let a, b, c = tupled (0, 1) 2 in 11 | assert (a = 0 && b = 1 && c = 2) 12 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/escape_error.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | (* Nothing to see here, parse.ml dictates that these be printed as regular 6 | "Syntax error". *) 7 | 8 | try foo () with ;; 9 | 10 | (3 : );; 11 | 12 | (3 :> );; 13 | -------------------------------------------------------------------------------- /testsuite/tests/typing-ocamlc-i/pr4791.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = "-i -w +63" 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | type t = A 9 | module B = 10 | struct 11 | type t = B 12 | let f A = B 13 | end 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr7297.compilers.reference: -------------------------------------------------------------------------------- 1 | - : unit = () 2 | Characters 10-20: 3 | let () = raise Exit; () ;; (* warn *) 4 | ^^^^^^^^^^ 5 | Warning 21: this statement never returns (or has an unsound type.) 6 | Exception: Stdlib.Exit. 7 | 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-format/pr6824.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include testing 3 | *) 4 | 5 | let f = Format.sprintf "[%i]";; 6 | print_endline (f 1);; 7 | print_endline (f 2);; 8 | 9 | let f = Format.asprintf "[%i]";; 10 | print_endline (f 1);; 11 | print_endline (f 2);; 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/pr9971.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | 3 | * hassysthreads 4 | include systhreads 5 | ** bytecode 6 | ** native 7 | 8 | *) 9 | 10 | let t = 11 | let t = Thread.create (fun _ -> ())() in 12 | Thread.join t 13 | 14 | let () = 15 | Thread.exit () 16 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/identifier_sharing.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | 4 | exception String of string 5 | 6 | let _ = 7 | match "foo" with 8 | | str | exception (String str) -> print_endline str 9 | | exception _ -> print_endline "unexpected exception!" 10 | -------------------------------------------------------------------------------- /testsuite/tests/output-complete-obj/test.ml_stub.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char ** argv){ 7 | 8 | caml_startup(argv); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/has-stackoverflow-detection.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if grep -q "#define HAS_STACK_OVERFLOW_DETECTION" ${ocamlsrcdir}/runtime/caml/s.h; then 3 | test_result=${TEST_PASS}; 4 | else 5 | test_result=${TEST_SKIP}; 6 | fi 7 | 8 | exit ${test_result} 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/tool-ocamlc-open.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "a.ml b.ml" 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | module = "a.ml" 6 | *** ocamlc.byte 7 | module = "b.ml" 8 | flags = "-open A.M" 9 | **** check-ocamlc.byte-output 10 | *) 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/Short_description.txt: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * ocamldoc with latex 3 | *) 4 | 5 | Short global description in text mode 6 | 7 | This file tests that documentation in text mode are given 8 | a short description in the global description of modules. 9 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/pr9218.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags="-annot" 3 | modules="a.ml" 4 | *) 5 | 6 | (* Test interference between inline record path 7 | [a.A] and the [a.ml] compilation unit *) 8 | type 'x a = A of { x: int } 9 | let v = A { x = 0 } 10 | -------------------------------------------------------------------------------- /testsuite/tests/generalized-open/funct_body.compilers.reference: -------------------------------------------------------------------------------- 1 | File "funct_body.ml", line 30, characters 12-20: 2 | 30 | include (val !r) 3 | ^^^^^^^^ 4 | Error: This expression creates fresh types. 5 | It is not allowed inside applicative functors. 6 | -------------------------------------------------------------------------------- /testsuite/tests/misc-unsafe/fft.reference: -------------------------------------------------------------------------------- 1 | 16... ok 2 | 32... ok 3 | 64... ok 4 | 128... ok 5 | 256... ok 6 | 512... ok 7 | 1024... ok 8 | 2048... ok 9 | 4096... ok 10 | 8192... ok 11 | 16384... ok 12 | 32768... ok 13 | 65536... ok 14 | 131072... ok 15 | 262144... ok 16 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/latex_ref.mli: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * ocamldoc with latex 3 | *) 4 | 5 | (** Latex-only test *) 6 | 7 | (** {1:lbl Title } 8 | 9 | Check that {{!lbl}this text} is present in the generated latex 10 | with a reference to {!lbl}. 11 | *) 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc-bugs/pr6946_bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | external foo : int = "%ignore";; 10 | let _ = foo ();; 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects-bugs/pr4435_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr4435_bad.ml", line 14, characters 6-7: 2 | 14 | class c (v : int) = 3 | ^ 4 | Error: Multiple definition of the class name c. 5 | Names must be unique in a given structure or signature. 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-private-bugs/pr5026_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr5026_bad.ml", line 11, characters 0-36: 2 | 11 | type -'typing wrapped = private sexp 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | Error: The definition of wrapped contains a cycle: 5 | sexp 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t14bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "t14bad.ml", line 23, characters 2-43: 2 | 23 | module rec U : T with type D.t = U'.t = U 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | Error: The definition of U.D.t contains a cycle: 5 | U'.t 6 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w51_bis.compilers.reference: -------------------------------------------------------------------------------- 1 | File "w51_bis.ml", line 15, characters 12-48: 2 | 15 | try (foldl [@tailcall]) op (op x acc) xs 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | Warning 51 [wrong-tailcall-expectation]: expected tailcall 5 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_object.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | (* Failed to get the unclosed object error message. *) 9 | 10 | let o = object 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/pr6468.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | (* Make the test reproducible regardless of whether OCAMLRUNPARAM=b or not *) 6 | Printexc.record_backtrace true;; 7 | 8 | let f () = raise Not_found;; 9 | let g () = f (); 1;; 10 | g ();; 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc/is_expansive.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * expect *) 3 | 4 | match [] with x -> (fun x -> x);; 5 | [%%expect{| 6 | - : 'a -> 'a = 7 | |}];; 8 | 9 | match [] with x -> (fun x -> x) | _ -> .;; 10 | [%%expect{| 11 | - : 'a -> 'a = 12 | |}];; 13 | -------------------------------------------------------------------------------- /testsuite/tests/typing-sigsubst/mpr7852.mli: -------------------------------------------------------------------------------- 1 | module M : sig 2 | type t 3 | val foo : t -> int 4 | val bar : t -> int 5 | end 6 | 7 | module N : sig 8 | type outer 9 | type t 10 | val foo : t -> outer 11 | val bar : t -> outer 12 | end with type outer := int 13 | -------------------------------------------------------------------------------- /otherlibs/unix/.depend: -------------------------------------------------------------------------------- 1 | unix.cmo : \ 2 | unix.cmi 3 | unix.cmx : \ 4 | unix.cmi 5 | unix.cmi : 6 | unixLabels.cmo : \ 7 | unix.cmi \ 8 | unixLabels.cmi 9 | unixLabels.cmx : \ 10 | unix.cmx \ 11 | unixLabels.cmi 12 | unixLabels.cmi : \ 13 | unix.cmi 14 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_sig.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_sig.mli", line 10, characters 0-0: 2 | Error: Syntax error: 'end' expected 3 | File "unclosed_sig.mli", line 8, characters 11-14: 4 | 8 | module M : sig 5 | ^^^ 6 | This 'sig' might be unmatched 7 | -------------------------------------------------------------------------------- /otherlibs/win32unix/.depend: -------------------------------------------------------------------------------- 1 | unix.cmo : \ 2 | unix.cmi 3 | unix.cmx : \ 4 | unix.cmi 5 | unix.cmi : 6 | unixLabels.cmo : \ 7 | unix.cmi \ 8 | unixLabels.cmi 9 | unixLabels.cmx : \ 10 | unix.cmx \ 11 | unixLabels.cmi 12 | unixLabels.cmi : \ 13 | unix.cmi 14 | -------------------------------------------------------------------------------- /testsuite/tests/asmgen/catch-float.cmm: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "main.c" 3 | arguments = "-DFLOAT_CATCH -DFUN=catch_float main.c" 4 | * asmgen 5 | *) 6 | 7 | (function "catch_float" (b:int) 8 | (+f 10.0 9 | (catch 10 | (exit lbl 100.0) 11 | with (lbl x:float) (+f x 1000.0)))) 12 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6865.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = "-dparsetree" 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | let%foo x = 42 10 | let%foo _ = () and _ = () 11 | let%foo _ = () 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-gadts/pr6934.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * expect 3 | *) 4 | 5 | type nonrec t = A : t;; 6 | [%%expect{| 7 | Line 1, characters 16-21: 8 | 1 | type nonrec t = A : t;; 9 | ^^^^^ 10 | Error: GADT case syntax cannot be used in a 'nonrec' block. 11 | |}] 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7112_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr7112_bad.ml", line 13, characters 30-31: 2 | 13 | module G (X : F(N).S) : A.S = X 3 | ^ 4 | Error: Signature mismatch: 5 | Modules do not match: F(N).S is not included in A.S 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr9695_bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a -no-alias-deps" 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | module A = MissingModule 10 | let () = let open A in x 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t01bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "t01bad.ml", line 10, characters 0-61: 2 | 10 | module rec A : sig type t = A.t end = struct type t = A.t end;; 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | Error: The type abbreviation A.t is cyclic 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t15bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "t15bad.ml", line 11, characters 0-61: 2 | 11 | module rec M : S' with type t = M.t = struct type t = M.t end;; 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | Error: The type abbreviation M.t is cyclic 5 | -------------------------------------------------------------------------------- /testsuite/tests/instrumented-runtime/main.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * hasinstrumentedruntime 3 | ** native 4 | flags = "-runtime-variant=i" 5 | *) 6 | 7 | (* Test if the instrumented runtime is in working condition *) 8 | 9 | let _ = 10 | Gc.eventlog_pause (); 11 | Gc.eventlog_resume() 12 | -------------------------------------------------------------------------------- /testsuite/tests/self-contained-toplevel/gen_cached_cmi.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | let cmi = Cmi_format.read_cmi "foo.cmi" in 3 | let data = Marshal.to_string cmi [] in 4 | let filename = Sys.argv.(1) in 5 | let oc = open_out filename in 6 | Printf.fprintf oc "let foo = %S\n" data; 7 | close_out oc 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-gadts/pr7230.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * expect 3 | *) 4 | 5 | type _ t = T : int t;; 6 | 7 | (* Should raise Not_found *) 8 | let _ = match (raise Not_found : float t) with _ -> .;; 9 | 10 | [%%expect{| 11 | type _ t = T : int t 12 | Exception: Not_found. 13 | |}];; 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_second_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr6899_second_bad.ml", line 12, characters 6-9: 2 | 12 | let bar = wrap () 3 | ^^^ 4 | Error: The type of this expression, _[< `Test ] -> unit, 5 | contains type variables that cannot be generalized 6 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w04.compilers.reference: -------------------------------------------------------------------------------- 1 | File "w04.ml", lines 21-23, characters 10-8: 2 | 21 | ..........match x with 3 | 22 | | A -> 0 4 | 23 | | _ -> 1 5 | Warning 4 [fragile-match]: this pattern-matching is fragile. 6 | It will remain exhaustive when constructors are added to type t. 7 | -------------------------------------------------------------------------------- /testsuite/tests/asmgen/catch-try.cmm: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "main.c" 3 | arguments = "-DINT_INT -DFUN=catch_exit main.c" 4 | * asmgen 5 | *) 6 | 7 | (function "catch_exit" (b:int) 8 | (+ 33 9 | (catch 10 | (try (exit lbl 12) 11 | with var 456) 12 | with (lbl x:val) (+ x 789)))) 13 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_test.reference: -------------------------------------------------------------------------------- 1 | File "inline_test.ml", line 14, characters 2-24 2 | File "inline_test.ml", line 17, characters 2-5 3 | File "inline_test.ml", line 20, characters 12-17 4 | File "inline_test.ml", line 23, characters 5-8 5 | File "inline_test.ml", line 26, characters 2-6 6 | -------------------------------------------------------------------------------- /testsuite/tests/misc/fib.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | 4 | let rec fib n = 5 | if n < 2 then 1 else fib(n-1) + fib(n-2) 6 | 7 | let _ = 8 | let n = 9 | if Array.length Sys.argv >= 2 10 | then int_of_string Sys.argv.(1) 11 | else 30 in 12 | print_int(fib n); print_newline(); exit 0 13 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_object.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_object.ml", line 11, characters 0-0: 2 | Error: Syntax error: 'end' expected 3 | File "unclosed_object.ml", line 10, characters 8-14: 4 | 10 | let o = object 5 | ^^^^^^ 6 | This 'object' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_struct.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_struct.ml", line 10, characters 0-0: 2 | Error: Syntax error: 'end' expected 3 | File "unclosed_struct.ml", line 8, characters 11-17: 4 | 8 | module M = struct 5 | ^^^^^^ 6 | This 'struct' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr9443/pr9443.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | (* Test tail call optimisation with an elided mutable cell *) 4 | let rec loop n = 5 | if n = 0 then () else begin 6 | let last = ref 0 in 7 | last := 0; 8 | loop (n-1) 9 | end 10 | 11 | let () = loop 1_000_000 12 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t000.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include tool-ocaml-lib 3 | flags = "-w a" 4 | ocaml_script_as_argument = "true" 5 | * setup-ocaml-build-env 6 | ** ocaml 7 | *) 8 | 9 | (* empty file *) 10 | 11 | (** 12 | 0 ATOM0 13 | 1 SETGLOBAL T000 14 | 3 STOP 15 | **) 16 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6944_ok.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | let f () = 9 | let module S = String in 10 | let module N = Map.Make(S) in 11 | N.add "sum" 41 N.empty;; 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t01bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | (* Bad (t = t) *) 10 | module rec A : sig type t = A.t end = struct type t = A.t end;; 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-rectypes-bugs/pr6174_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr6174_bad.ml", line 11, characters 24-25: 2 | 11 | fun C k -> k (fun x -> x);; 3 | ^ 4 | Error: This expression has type $0 but an expression was expected of type 5 | $1 = ($2 -> $1) -> $1 6 | -------------------------------------------------------------------------------- /utils/int_replace_polymorphic_compare.mli: -------------------------------------------------------------------------------- 1 | val ( = ) : int -> int -> bool 2 | val ( <> ) : int -> int -> bool 3 | val ( < ) : int -> int -> bool 4 | val ( > ) : int -> int -> bool 5 | val ( <= ) : int -> int -> bool 6 | val ( >= ) : int -> int -> bool 7 | 8 | val compare : int -> int -> int 9 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/mixing_value_closures_2.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | (* a polymorphic variant of test3.ml; found a real bug once *) 4 | let test = 5 | let rec x = `A f 6 | and f = function 7 | | 0 -> 2 8 | | n -> match x with `A g -> g 0 9 | in 10 | assert (f 1 = 2) 11 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-bytecode/main.reference: -------------------------------------------------------------------------------- 1 | Loading plug1.cma 2 | This is stub1! 3 | ABCDEF 4 | Loading plug2.cma 5 | This is stub2, calling stub1: 6 | This is stub1! 7 | Ok! 8 | This is Plug2.f 9 | Result is: 2 10 | This is Plug1.f 11 | Result is: 1 12 | This is Main.f 13 | Result is: 0 14 | -------------------------------------------------------------------------------- /testsuite/tests/tool-lexyacc/mpr7760.mll: -------------------------------------------------------------------------------- 1 | (* TEST 2 | ocamllex_flags = " -q " 3 | *) 4 | 5 | rule read = shortest 6 | | ("aa" | "bbb") (_ as x) _? { x } 7 | | _ as y { y } 8 | 9 | { 10 | let r = read (Lexing.from_string "aasdf") in 11 | Printf.printf "<%c>\n" r ; 12 | () 13 | } 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_first_bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "pr6899_first_bad.ml", line 9, characters 4-17: 2 | 9 | let should_reject = 3 | ^^^^^^^^^^^^^ 4 | Error: The type of this expression, '_weak1 -> '_weak2 -> unit, 5 | contains type variables that cannot be generalized 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t02bad.compilers.reference: -------------------------------------------------------------------------------- 1 | File "t02bad.ml", line 10, characters 0-61: 2 | 10 | module rec A : sig type t = B.t end = struct type t = B.t end 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | Error: The definition of A.t contains a cycle: 5 | B.t 6 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_class_signature.mli: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * setup-ocamlc.byte-build-env 3 | ** ocamlc.byte 4 | ocamlc_byte_exit_status = "2" 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | (* It is apparently impossible to get the "unclosed object" message. *) 9 | 10 | class c : object 11 | -------------------------------------------------------------------------------- /testsuite/tests/raise-counts/a.ml: -------------------------------------------------------------------------------- 1 | let _unused _ = try () with _ -> () 2 | 3 | let trigger_bug x = 4 | let ok = 5 | match x with 6 | | None 7 | | Some "" -> true 8 | | Some _ -> false 9 | in 10 | if x = Some "" && not ok then 11 | failwith "impossible" 12 | [@@inline always] 13 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/dynlink/host.debug.reference: -------------------------------------------------------------------------------- 1 | Loading program... done. 2 | hello host 3 | 4 | Module(s) Plugin loaded. 5 | Breakpoint: 1 6 | 2 <|b|>print_endline "hello plugin" 7 | Backtrace: 8 | #0 Plugin plugin.ml:2:3 9 | #1 Plugin plugin.ml:4:10 10 | hello plugin 11 | Program exit. 12 | -------------------------------------------------------------------------------- /testsuite/tests/basic-private/length.mli: -------------------------------------------------------------------------------- 1 | (* 2 | 3 | A testbed file for private type abbreviation definitions. 4 | 5 | We define a Length module to implement positive integers. 6 | 7 | *) 8 | 9 | type t = private int;; 10 | 11 | val make : int -> t;; 12 | 13 | external from : t -> int = "%identity";; 14 | -------------------------------------------------------------------------------- /testsuite/tests/flambda/approx_meet.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * flambda 3 | * native 4 | *) 5 | 6 | (* from GPR#1794 *) 7 | 8 | let z = 9 | let x = -0. and y = +0. in 10 | if mod_float x 1. >= 0. then 11 | x 12 | else if false then x else y 13 | 14 | let () = 15 | Printf.printf "%g\n" (1. /. z) 16 | -------------------------------------------------------------------------------- /testsuite/tests/formatting/margins.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * toplevel 3 | *) 4 | 5 | let () = Format.pp_set_margin Format.std_formatter 20;; 6 | 7 | 1 + "foo";; 8 | 9 | let () = Format.pp_set_margin Format.std_formatter 80;; 10 | let () = Format.pp_set_max_indent Format.std_formatter 70;; 11 | 12 | 1 + "foo";; 13 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin2.ml: -------------------------------------------------------------------------------- 1 | (*external ex: int -> int = "caml_ex"*) 2 | 3 | let () = 4 | Api.reg_mod "Plugin2"; 5 | Api.add_cb (fun () -> print_endline "Callback from plugin2"); 6 | (* let i = ex 3 in*) 7 | List.iter (fun i -> Printf.printf "%i\n" i) Plugin.facts; 8 | Printf.printf "XXX\n" 9 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/dup.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | * hasunix 3 | include unix 4 | ** bytecode 5 | ** native 6 | *) 7 | 8 | let _ = 9 | let f = Unix.dup ~cloexec:true Unix.stdout in 10 | let txt = "Some output\n" in 11 | ignore (Unix.write_substring f txt 0 (String.length txt)); 12 | Unix.close f 13 | -------------------------------------------------------------------------------- /testsuite/tests/regression/missing_set_of_closures/a.ml: -------------------------------------------------------------------------------- 1 | module type Ret = sig 2 | val g : int -> int -> int 3 | end 4 | 5 | module F() : Ret = struct 6 | let n = Sys.opaque_identity 42 7 | let rec f = ((fun x -> x + n) [@inline never]) 8 | and g = ((fun x -> f) [@inline]) 9 | end [@@inline never] 10 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/find-artifacts/in/foo.ml: -------------------------------------------------------------------------------- 1 | open Blah 2 | 3 | let print = function 4 | | Foo -> print_endline "Foo"; 5 | | Bar s -> print_endline ("Bar(" ^ s ^ ")") 6 | 7 | let main () = 8 | let x = Foo in 9 | let y = Bar "hi" in 10 | print x; 11 | print y 12 | 13 | let _ = main () 14 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-open/main.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | modules = "inner.ml alias.ml" 3 | * ocamldoc 4 | ocamldoc_backend="latex" 5 | ocamldoc_flags=" -open Alias.Container -open Aliased_inner " 6 | *) 7 | 8 | (** Documentation test *) 9 | 10 | type t = a 11 | (** Alias to type Inner.a *) 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7182_ok.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module rec M 9 | : sig external f : int -> int = "%identity" end 10 | = struct external f : int -> int = "%identity" end 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t04bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | (* Bad (t = int * t) *) 10 | module rec A : sig type t = int * A.t end = struct type t = int * A.t end;; 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-sigsubst/test_functor.ml: -------------------------------------------------------------------------------- 1 | module type S = sig 2 | type elt 3 | type t 4 | 5 | val create : elt -> t 6 | end 7 | 8 | module Apply (Arg : sig type t end) : S with type elt = Arg.t = struct 9 | type elt = Arg.t 10 | type t = elt list 11 | 12 | let create x = [ x ] 13 | end 14 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/deprecated_module.compilers.reference: -------------------------------------------------------------------------------- 1 | File "deprecated_module.ml", line 16, characters 8-11: 2 | 16 | let _ = M.x 3 | ^^^ 4 | Alert deprecated: module M 5 | File "deprecated_module.ml", line 17, characters 8-9: 6 | 17 | include M 7 | ^ 8 | Alert deprecated: module M 9 | -------------------------------------------------------------------------------- /testsuite/tests/asmgen/catch-rec.cmm: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "main.c" 3 | arguments = "-DINT_INT -DFUN=catch_fact main.c" 4 | * asmgen 5 | *) 6 | 7 | (function "catch_fact" (b:int) 8 | (catch (exit fact b 1) 9 | with (fact c:val acc:val) 10 | (if (== c 0) acc 11 | (exit fact (- c 1) ( * c acc))))) 12 | -------------------------------------------------------------------------------- /testsuite/tests/basic/localexn.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | let f (type t) () = 4 | let exception E of t in 5 | (fun x -> E x), (function E _ -> print_endline "OK" | _ -> print_endline "KO") 6 | 7 | let inj1, proj1 = f () 8 | let inj2, proj2 = f () 9 | 10 | let () = proj1 (inj1 42) 11 | let () = proj1 (inj2 42) 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/win-stat/test.reference: -------------------------------------------------------------------------------- 1 | System clock: 2017/06/01 20:33 2 | Read mtime for dst-file = 2017/07/01 12:00:00 3 | Read mtime for non-dst-file = 2017/02/01 12:00:00 4 | System clock: 2017/02/01 20:33 5 | Read mtime for dst-file = 2017/07/01 12:00:00 6 | Read mtime for non-dst-file = 2017/02/01 12:00:00 7 | -------------------------------------------------------------------------------- /testsuite/tests/statmemprof/lists_in_minor.reference: -------------------------------------------------------------------------------- 1 | check_distrib 10 1000000 0.010000 2 | check_distrib 1000000 10 0.000010 3 | check_distrib 1000000 10 0.000100 4 | check_distrib 1000000 10 0.001000 5 | check_distrib 1000000 10 0.010000 6 | check_distrib 100000 10 0.100000 7 | check_distrib 100000 10 0.900000 8 | OK ! 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const0.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include tool-ocaml-lib 3 | flags = "-w a" 4 | ocaml_script_as_argument = "true" 5 | * setup-ocaml-build-env 6 | ** ocaml 7 | *) 8 | 9 | 0;; 10 | 11 | (** 12 | 0 CONST0 13 | 1 ATOM0 14 | 2 SETGLOBAL T010-const0 15 | 4 STOP 16 | **) 17 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const1.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include tool-ocaml-lib 3 | flags = "-w a" 4 | ocaml_script_as_argument = "true" 5 | * setup-ocaml-build-env 6 | ** ocaml 7 | *) 8 | 9 | 1;; 10 | 11 | (** 12 | 0 CONST1 13 | 1 ATOM0 14 | 2 SETGLOBAL T010-const1 15 | 4 STOP 16 | **) 17 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const2.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include tool-ocaml-lib 3 | flags = "-w a" 4 | ocaml_script_as_argument = "true" 5 | * setup-ocaml-build-env 6 | ** ocaml 7 | *) 8 | 9 | 2;; 10 | 11 | (** 12 | 0 CONST2 13 | 1 ATOM0 14 | 2 SETGLOBAL T010-const2 15 | 4 STOP 16 | **) 17 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const3.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include tool-ocaml-lib 3 | flags = "-w a" 4 | ocaml_script_as_argument = "true" 5 | * setup-ocaml-build-env 6 | ** ocaml 7 | *) 8 | 9 | 3;; 10 | 11 | (** 12 | 0 CONST3 13 | 1 ATOM0 14 | 2 SETGLOBAL T010-const3 15 | 4 STOP 16 | **) 17 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/tool-ocamlc-open-error.compilers.reference: -------------------------------------------------------------------------------- 1 | File "tool-ocamlc-open-error.ml", line 1: 2 | Warning 24 [bad-module-name]: bad source file name: "Tool-ocamlc-open-error" is not a valid module name. 3 | File "command line argument: -open "F("", line 1, characters 1-2: 4 | Error: Syntax error 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc-bugs/pr6303_bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | type 'a foo = {x: 'a; y: int} 10 | let r = {{x = 0; y = 0} with x = 0} 11 | let r' : string foo = r 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7112_ok.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | module F (_ : sig end) = struct module type S end 9 | module M = struct end 10 | module N = M 11 | module G (X : F(N).S) : F(M).S = X 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-ocamlc-i/pervasives_leitmotiv.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = "-i -w +63" 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | type fpclass = A 9 | 10 | module Stdlib = struct 11 | type fpclass = B 12 | end 13 | 14 | let f A Stdlib.B = FP_normal 15 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr2195-nolocs.byte.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Stdlib.Exit 2 | Raised by primitive operation at unknown location 3 | Called from unknown location 4 | (Cannot print locations: 5 | bytecode executable program file cannot be opened; 6 | -- too many open files. Try running with OCAMLRUNPARAM=b=2) 7 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-private/plugin6/pheasant.ml: -------------------------------------------------------------------------------- 1 | (* See comment in the main "test.ml" file. *) 2 | 3 | let test_pheasant () = 4 | if Dynlink.is_native then 5 | Dynlink.loadfile "plugin6/partridge.cmxs" 6 | else 7 | Dynlink.loadfile "plugin6/partridge.cmo" 8 | 9 | let () = 10 | test_pheasant () 11 | -------------------------------------------------------------------------------- /testsuite/tests/misc/takc.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | 4 | let rec tak x y z = 5 | if x > y then tak (tak (x-1) y z) (tak (y-1) z x) (tak (z-1) x y) 6 | else z 7 | 8 | let rec repeat n = 9 | if n <= 0 then 0 else tak 18 12 6 + repeat(n-1) 10 | 11 | let _ = print_int (repeat 200); print_newline(); exit 0 12 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_class_simpl_expr3.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_class_simpl_expr3.ml", line 9, characters 0-0: 2 | Error: Syntax error: ')' expected 3 | File "unclosed_class_simpl_expr3.ml", line 8, characters 10-11: 4 | 8 | class c = (object end 5 | ^ 6 | This '(' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr3.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_paren_module_expr3.ml", line 9, characters 0-0: 2 | Error: Syntax error: ')' expected 3 | File "unclosed_paren_module_expr3.ml", line 8, characters 11-12: 4 | 8 | module M = (val 3 : 5 | ^ 6 | This '(' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr5.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_paren_module_expr5.ml", line 9, characters 0-0: 2 | Error: Syntax error: ')' expected 3 | File "unclosed_paren_module_expr5.ml", line 8, characters 11-12: 4 | 8 | module M = (val 3 5 | ^ 6 | This '(' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_type.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_paren_module_type.mli", line 9, characters 0-0: 2 | Error: Syntax error: ')' expected 3 | File "unclosed_paren_module_type.mli", line 8, characters 11-12: 4 | 8 | module M : (sig end 5 | ^ 6 | This '(' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-caml-tex/redirections.input: -------------------------------------------------------------------------------- 1 | \begin{caml_example}{toplevel} 2 | [@@@warning "+A"];; 3 | 1 + 2. [@@expect error];; 4 | let f x = () [@@expect warning 27];; 5 | \end{caml_example} 6 | 7 | \begin{caml_example}{toplevel} 8 | Format.printf "Hello@."; 9 | print_endline "world";; 10 | \end{caml_example} 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_first_bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | let should_reject = 10 | let table = Hashtbl.create 1 in 11 | fun x y -> Hashtbl.add table x y 12 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr2195-locs.byte.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Stdlib.Exit 2 | Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 399, characters 28-54 3 | Called from Pr2195 in file "pr2195.ml", line 24, characters 6-19 4 | Re-raised at Pr2195 in file "pr2195.ml", line 29, characters 4-41 5 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-compilation/mixing_value_closures_1.ml: -------------------------------------------------------------------------------- 1 | (* TEST *) 2 | 3 | (* mixing values and closures may exercise interesting code paths *) 4 | type t = A of (int -> int) 5 | let test = 6 | let rec x = A f 7 | and f = function 8 | | 0 -> 2 9 | | n -> match x with A g -> g 0 10 | in assert (f 1 = 2) 11 | -------------------------------------------------------------------------------- /testsuite/tests/misc/taku.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | *) 3 | 4 | let rec tak (x, y, z) = 5 | if x > y then tak(tak (x-1, y, z), tak (y-1, z, x), tak (z-1, x, y)) 6 | else z 7 | 8 | let rec repeat n = 9 | if n <= 0 then 0 else tak(18,12,6) + repeat(n-1) 10 | 11 | let _ = print_int (repeat 200); print_newline(); exit 0 12 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_class_signature.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_class_signature.mli", line 11, characters 0-0: 2 | Error: Syntax error: 'end' expected 3 | File "unclosed_class_signature.mli", line 10, characters 10-16: 4 | 10 | class c : object 5 | ^^^^^^ 6 | This 'object' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr2.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_paren_module_expr2.ml", line 9, characters 0-0: 2 | Error: Syntax error: ')' expected 3 | File "unclosed_paren_module_expr2.ml", line 8, characters 11-12: 4 | 8 | module M = (struct end 5 | ^ 6 | This '(' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/parse-errors/unclosed_paren_module_expr4.compilers.reference: -------------------------------------------------------------------------------- 1 | File "unclosed_paren_module_expr4.ml", line 9, characters 0-0: 2 | Error: Syntax error: ')' expected 3 | File "unclosed_paren_module_expr4.ml", line 8, characters 11-12: 4 | 8 | module M = (val 3 :> 5 | ^ 6 | This '(' might be unmatched 7 | -------------------------------------------------------------------------------- /testsuite/tests/statmemprof/moved_while_blocking.reference: -------------------------------------------------------------------------------- 1 | T1: alloc 2 | major alloc 3 | T2: alloc 4 | minor alloc 5 | T2: minor GC 6 | promoting... 7 | T1: major GC 8 | major dealloc: major block 9 | ...done promoting 10 | T2: done 11 | T1: major GC 12 | major dealloc: promoted block 13 | T1: done 14 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t011-constint.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | include tool-ocaml-lib 3 | flags = "-w a" 4 | ocaml_script_as_argument = "true" 5 | * setup-ocaml-build-env 6 | ** ocaml 7 | *) 8 | 9 | 4;; 10 | 11 | (** 12 | 0 CONSTINT 4 13 | 2 ATOM0 14 | 3 SETGLOBAL T011-constint 15 | 5 STOP 16 | **) 17 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_ok.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | type 'a t = 'a option 9 | let is_some = function 10 | | None -> false 11 | | Some _ -> true 12 | 13 | let should_accept ?x () = is_some x 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_second_bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | include struct 10 | let foo `Test = () 11 | let wrap f `Test = f 12 | let bar = wrap () 13 | end 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-multifile/pr7325.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "a.ml b.ml c.ml" 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | module = "a.ml" 6 | *** ocamlc.byte 7 | module = "b.ml" 8 | **** script 9 | script = "rm a.cmi" 10 | ***** ocamlc.byte 11 | module = "c.ml" 12 | ****** check-ocamlc.byte-output 13 | *) 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t03ok.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a " 3 | * setup-ocamlc.byte-build-env 4 | ** ocamlc.byte 5 | *** check-ocamlc.byte-output 6 | *) 7 | 8 | (* OK (t = int) *) 9 | module rec A : sig type t = B.t end = struct type t = B.t end 10 | and B : sig type t = int end = struct type t = int end;; 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-rectypes-bugs/pr6870_bad.ml: -------------------------------------------------------------------------------- 1 | (* TEST 2 | flags = " -w a -rectypes " 3 | ocamlc_byte_exit_status = "2" 4 | * setup-ocamlc.byte-build-env 5 | ** ocamlc.byte 6 | *** check-ocamlc.byte-output 7 | *) 8 | 9 | module type T = sig type 'a t end 10 | module Fix (T : T) = struct type r = ('r T.t as 'r) end 11 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/deprecated_module.mli: -------------------------------------------------------------------------------- 1 | [@@@ocaml.deprecated {| 2 | As you could guess, Deprecated_module is deprecated. 3 | Please use something else! 4 | |} ] 5 | 6 | module M: sig 7 | val x: int 8 | [@@ocaml.deprecated] 9 | 10 | type t 11 | [@@ocaml.deprecated] 12 | end 13 | [@@ocaml.deprecated] 14 | -------------------------------------------------------------------------------- /testsuite/tests/asmgen/catch-try-float.cmm: -------------------------------------------------------------------------------- 1 | (* TEST 2 | files = "main.c" 3 | arguments = "-DFLOAT_CATCH -DFUN=catch_try_float main.c" 4 | * asmgen 5 | *) 6 | 7 | (function "catch_try_float" (b:float) 8 | (+f 10.0 9 | (catch 10 | (try (exit lbl 100.0) 11 | with var 456.0) 12 | with (lbl x:float) (+f x 1000.0)))) 13 | --------------------------------------------------------------------------------