├── .depend ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .mailmap ├── .merlin ├── .ocp-indent ├── .travis-ci.sh ├── .travis.yml ├── CONTRIBUTING.md ├── Changes ├── HACKING.adoc ├── INSTALL.adoc ├── LICENSE ├── Makefile ├── Makefile.nt ├── Makefile.tools ├── README.adoc ├── README.win32.adoc ├── VERSION ├── appveyor.yml ├── appveyor_build.cmd ├── appveyor_build.sh ├── asmcomp ├── CSEgen.ml ├── CSEgen.mli ├── afl_instrument.ml ├── afl_instrument.mli ├── amd64 │ ├── CSE.ml │ ├── NOTES.md │ ├── arch.ml │ ├── emit.mlp │ ├── proc.ml │ ├── reload.ml │ ├── scheduling.ml │ └── selection.ml ├── arm │ ├── CSE.ml │ ├── NOTES.md │ ├── arch.ml │ ├── emit.mlp │ ├── proc.ml │ ├── reload.ml │ ├── scheduling.ml │ └── selection.ml ├── arm64 │ ├── CSE.ml │ ├── NOTES.md │ ├── arch.ml │ ├── emit.mlp │ ├── proc.ml │ ├── reload.ml │ ├── scheduling.ml │ └── selection.ml ├── asmgen.ml ├── asmgen.mli ├── asmlibrarian.ml ├── asmlibrarian.mli ├── asmlink.ml ├── asmlink.mli ├── asmpackager.ml ├── asmpackager.mli ├── branch_relaxation.ml ├── branch_relaxation.mli ├── branch_relaxation_intf.ml ├── build_export_info.ml ├── build_export_info.mli ├── clambda.ml ├── clambda.mli ├── closure.ml ├── closure.mli ├── closure_offsets.ml ├── closure_offsets.mli ├── cmm.ml ├── cmm.mli ├── cmmgen.ml ├── cmmgen.mli ├── cmx_format.mli ├── coloring.ml ├── coloring.mli ├── comballoc.ml ├── comballoc.mli ├── compilenv.ml ├── compilenv.mli ├── deadcode.ml ├── deadcode.mli ├── debug │ ├── available_regs.ml │ ├── available_regs.mli │ ├── reg_availability_set.ml │ ├── reg_availability_set.mli │ ├── reg_with_debug_info.ml │ └── reg_with_debug_info.mli ├── emit.mli ├── emitaux.ml ├── emitaux.mli ├── export_info.ml ├── export_info.mli ├── export_info_for_pack.ml ├── export_info_for_pack.mli ├── flambda_to_clambda.ml ├── flambda_to_clambda.mli ├── i386 │ ├── CSE.ml │ ├── NOTES.md │ ├── arch.ml │ ├── emit.mlp │ ├── proc.ml │ ├── reload.ml │ ├── scheduling.ml │ └── selection.ml ├── import_approx.ml ├── import_approx.mli ├── interf.ml ├── interf.mli ├── interval.ml ├── interval.mli ├── linearize.ml ├── linearize.mli ├── linscan.ml ├── linscan.mli ├── liveness.ml ├── liveness.mli ├── mach.ml ├── mach.mli ├── power │ ├── CSE.ml │ ├── NOTES.md │ ├── arch.ml │ ├── emit.mlp │ ├── proc.ml │ ├── reload.ml │ ├── scheduling.ml │ └── selection.ml ├── printclambda.ml ├── printclambda.mli ├── printcmm.ml ├── printcmm.mli ├── printlinear.ml ├── printlinear.mli ├── printmach.ml ├── printmach.mli ├── proc.mli ├── reg.ml ├── reg.mli ├── reload.mli ├── reloadgen.ml ├── reloadgen.mli ├── s390x │ ├── CSE.ml │ ├── NOTES.md │ ├── arch.ml │ ├── emit.mlp │ ├── proc.ml │ ├── reload.ml │ ├── scheduling.ml │ └── selection.ml ├── schedgen.ml ├── schedgen.mli ├── scheduling.mli ├── selectgen.ml ├── selectgen.mli ├── selection.mli ├── spacetime_profiling.ml ├── spacetime_profiling.mli ├── spill.ml ├── spill.mli ├── split.ml ├── split.mli ├── strmatch.ml ├── strmatch.mli ├── un_anf.ml ├── un_anf.mli ├── x86_ast.mli ├── x86_dsl.ml ├── x86_dsl.mli ├── x86_gas.ml ├── x86_gas.mli ├── x86_masm.ml ├── x86_masm.mli ├── x86_proc.ml └── x86_proc.mli ├── asmrun ├── .depend ├── Makefile ├── Makefile.nt ├── amd64.S ├── amd64nt.asm ├── arm.S ├── arm64.S ├── backtrace_prim.c ├── clambda_checks.c ├── fail.c ├── i386.S ├── i386nt.asm ├── natdynlink.c ├── power.S ├── roots.c ├── s390x.S ├── signals_asm.c ├── signals_osdep.h ├── spacetime.c ├── spacetime_offline.c ├── spacetime_snapshot.c └── startup.c ├── boot ├── ocamlc ├── ocamldep └── ocamllex ├── bytecomp ├── bytegen.ml ├── bytegen.mli ├── bytelibrarian.ml ├── bytelibrarian.mli ├── bytelink.ml ├── bytelink.mli ├── bytepackager.ml ├── bytepackager.mli ├── bytesections.ml ├── bytesections.mli ├── cmo_format.mli ├── dll.ml ├── dll.mli ├── emitcode.ml ├── emitcode.mli ├── instruct.ml ├── instruct.mli ├── lambda.ml ├── lambda.mli ├── matching.ml ├── matching.mli ├── meta.ml ├── meta.mli ├── printinstr.ml ├── printinstr.mli ├── printlambda.ml ├── printlambda.mli ├── runtimedef.mli ├── semantics_of_primitives.ml ├── semantics_of_primitives.mli ├── simplif.ml ├── simplif.mli ├── switch.ml ├── switch.mli ├── symtable.ml ├── symtable.mli ├── translattribute.ml ├── translattribute.mli ├── translclass.ml ├── translclass.mli ├── translcore.ml ├── translcore.mli ├── translmod.ml ├── translmod.mli ├── translobj.ml └── translobj.mli ├── byterun ├── .depend ├── Makefile ├── Makefile.nt ├── afl.c ├── alloc.c ├── array.c ├── backtrace.c ├── backtrace_prim.c ├── bigarray.c ├── callback.c ├── caml │ ├── address_class.h │ ├── alloc.h │ ├── backtrace.h │ ├── backtrace_prim.h │ ├── bigarray.h │ ├── callback.h │ ├── compact.h │ ├── compare.h │ ├── compatibility.h │ ├── config.h │ ├── custom.h │ ├── debugger.h │ ├── dynlink.h │ ├── exec.h │ ├── fail.h │ ├── finalise.h │ ├── fix_code.h │ ├── freelist.h │ ├── gc.h │ ├── gc_ctrl.h │ ├── globroots.h │ ├── hash.h │ ├── hooks.h │ ├── instrtrace.h │ ├── instruct.h │ ├── int64_emul.h │ ├── int64_format.h │ ├── int64_native.h │ ├── interp.h │ ├── intext.h │ ├── io.h │ ├── major_gc.h │ ├── md5.h │ ├── memory.h │ ├── minor_gc.h │ ├── misc.h │ ├── mlvalues.h │ ├── osdeps.h │ ├── prims.h │ ├── printexc.h │ ├── reverse.h │ ├── roots.h │ ├── signals.h │ ├── signals_machdep.h │ ├── spacetime.h │ ├── stack.h │ ├── stacks.h │ ├── startup.h │ ├── startup_aux.h │ ├── sys.h │ ├── ui.h │ └── weak.h ├── compact.c ├── compare.c ├── custom.c ├── debugger.c ├── dynlink.c ├── extern.c ├── fail.c ├── finalise.c ├── fix_code.c ├── floats.c ├── freelist.c ├── gc_ctrl.c ├── globroots.c ├── hash.c ├── instrtrace.c ├── intern.c ├── interp.c ├── ints.c ├── io.c ├── lexing.c ├── main.c ├── major_gc.c ├── md5.c ├── memory.c ├── meta.c ├── minor_gc.c ├── misc.c ├── obj.c ├── parsing.c ├── printexc.c ├── roots.c ├── signals.c ├── signals_byt.c ├── spacetime.c ├── stacks.c ├── startup.c ├── startup_aux.c ├── str.c ├── sys.c ├── terminfo.c ├── unix.c ├── weak.c └── win32.c ├── compilerlibs └── .gitignore ├── config ├── Makefile-templ ├── Makefile.mingw ├── Makefile.mingw64 ├── Makefile.msvc ├── Makefile.msvc64 ├── auto-aux │ ├── align.c │ ├── ansi.c │ ├── async_io.c │ ├── cckind.c │ ├── cfi.S │ ├── dblalign.c │ ├── elf.c │ ├── endian.c │ ├── getgroups.c │ ├── gethostbyaddr.c │ ├── gethostbyname.c │ ├── hasgot │ ├── hasgot2 │ ├── hashbang │ ├── hashbang2 │ ├── hashbang3 │ ├── ia32sse2.c │ ├── initgroups.c │ ├── int64align.c │ ├── mmap-huge.c │ ├── nanosecond_stat.c │ ├── runtest │ ├── searchpath │ ├── setgroups.c │ ├── signals.c │ ├── sizes.c │ ├── solaris-ld │ ├── tryassemble │ └── trycompile ├── gnu │ ├── config.guess │ └── config.sub ├── m-nt.h ├── m-templ.h ├── s-nt.h └── s-templ.h ├── configure ├── debugger ├── .depend ├── Makefile ├── Makefile.nt ├── breakpoints.ml ├── breakpoints.mli ├── checkpoints.ml ├── checkpoints.mli ├── command_line.ml ├── command_line.mli ├── debugcom.ml ├── debugcom.mli ├── debugger_config.ml ├── debugger_config.mli ├── eval.ml ├── eval.mli ├── events.ml ├── events.mli ├── exec.ml ├── exec.mli ├── frames.ml ├── frames.mli ├── history.ml ├── history.mli ├── input_handling.ml ├── input_handling.mli ├── int64ops.ml ├── int64ops.mli ├── lexer.mli ├── lexer.mll ├── loadprinter.ml ├── loadprinter.mli ├── main.ml ├── parameters.ml ├── parameters.mli ├── parser.mly ├── parser_aux.mli ├── pattern_matching.ml ├── pattern_matching.mli ├── pos.ml ├── pos.mli ├── primitives.ml ├── primitives.mli ├── printval.ml ├── printval.mli ├── program_loading.ml ├── program_loading.mli ├── program_management.ml ├── program_management.mli ├── question.ml ├── question.mli ├── show_information.ml ├── show_information.mli ├── show_source.ml ├── show_source.mli ├── source.ml ├── source.mli ├── symbols.ml ├── symbols.mli ├── time_travel.ml ├── time_travel.mli ├── trap_barrier.ml ├── trap_barrier.mli ├── unix_tools.ml └── unix_tools.mli ├── driver ├── compdynlink.mlno ├── compenv.ml ├── compenv.mli ├── compile.ml ├── compile.mli ├── compmisc.ml ├── compmisc.mli ├── compplugin.ml ├── compplugin.mli ├── errors.ml ├── errors.mli ├── main.ml ├── main.mli ├── main_args.ml ├── main_args.mli ├── makedepend.ml ├── makedepend.mli ├── ocamlcomp.sh.in ├── optcompile.ml ├── optcompile.mli ├── opterrors.ml ├── opterrors.mli ├── optmain.ml ├── optmain.mli ├── pparse.ml └── pparse.mli ├── emacs ├── COPYING ├── Makefile ├── README ├── README.itz ├── caml-compat.el ├── caml-emacs.el ├── caml-font-old.el ├── caml-font.el ├── caml-help.el ├── caml-hilit.el ├── caml-types.el ├── caml-xemacs.el ├── caml.el ├── camldebug.el ├── inf-caml.el └── ocamltags.in ├── experimental ├── doligez │ ├── check-bounds.diff │ └── checkheaders ├── frisch │ ├── Makefile │ ├── copy_typedef.ml │ ├── eval.ml │ ├── extension_points.txt │ ├── ifdef.ml │ ├── js_syntax.ml │ ├── metaquot_test.ml │ ├── minidoc.ml │ ├── nomli.ml │ ├── ppx_builder.ml │ ├── ppx_matches.ml │ ├── test_builder.ml │ ├── test_copy_typedef.ml │ ├── test_copy_typedef.mli │ ├── test_eval.ml │ ├── test_ifdef.ml │ ├── test_js.ml │ ├── test_matches.ml │ ├── test_nomli.ml │ ├── testdoc.mli │ └── unused_exported_values.ml └── garrigue │ ├── .cvsignore │ ├── caml_set_oid.diff │ ├── coerce.diff │ ├── countchars.ml │ ├── dirs_multimatch │ ├── dirs_poly │ ├── fixedtypes.ml │ ├── gadt-escape-check.diff │ ├── generative-functors.diff │ ├── impure-functors.diff │ ├── marshal_objects.diff │ ├── module-errors.diff │ ├── multimatch.diff │ ├── multimatch.ml │ ├── newlabels.ps │ ├── nongeneral-let.diff │ ├── objvariant.diff │ ├── objvariant.ml │ ├── parser-lessminus.diff │ ├── pattern-local-types.diff │ ├── printers.ml │ ├── propagation-to-patterns.diff │ ├── show_types.diff │ ├── tests.ml │ ├── valvirt.diff │ ├── variable-names-Tvar.diff │ ├── variable-names.ml │ ├── varunion.ml │ └── with-module-type.diff ├── lex ├── .depend ├── Makefile ├── Makefile.nt ├── common.ml ├── common.mli ├── compact.ml ├── compact.mli ├── cset.ml ├── cset.mli ├── lexer.mli ├── lexer.mll ├── lexgen.ml ├── lexgen.mli ├── main.ml ├── output.ml ├── output.mli ├── outputbis.ml ├── outputbis.mli ├── parser.mly ├── syntax.ml ├── syntax.mli ├── table.ml └── table.mli ├── man ├── Makefile ├── ocaml.m ├── ocamlc.m ├── ocamlcp.m ├── ocamldebug.m ├── ocamldep.m ├── ocamldoc.m ├── ocamllex.m ├── ocamlmktop.m ├── ocamlopt.m ├── ocamlprof.m ├── ocamlrun.m └── ocamlyacc.m ├── manual ├── LICENSE-for-the-manual ├── Makefile ├── README.md ├── manual │ ├── .gitignore │ ├── Makefile │ ├── allfiles.etex │ ├── biblio.etex │ ├── cmds │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── afl-fuzz.etex │ │ ├── browser.etex │ │ ├── comp.etex │ │ ├── debugger.etex │ │ ├── depend.etex │ │ ├── flambda.etex │ │ ├── intf-c.etex │ │ ├── lexyacc.etex │ │ ├── native.etex │ │ ├── ocamlbuild.etex │ │ ├── ocamldoc.etex │ │ ├── plugins.etex │ │ ├── profil.etex │ │ ├── runtime.etex │ │ ├── spacetime.etex │ │ ├── top.etex │ │ └── unified-options.etex │ ├── foreword.etex │ ├── htmlman │ │ ├── .gitignore │ │ ├── contents_motif.gif │ │ ├── libgraph.gif │ │ ├── next_motif.gif │ │ └── previous_motif.gif │ ├── index.tex │ ├── infoman │ │ └── .gitignore │ ├── library │ │ ├── .cvsignore │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── builtin.etex │ │ ├── check-stdlib-modules │ │ ├── compilerlibs.etex │ │ ├── core.etex │ │ ├── libbigarray.etex │ │ ├── libdynlink.etex │ │ ├── libgraph.etex │ │ ├── libgraph.fig │ │ ├── libgraph.png │ │ ├── libnum.etex │ │ ├── libstr.etex │ │ ├── libthreads.etex │ │ ├── libunix.etex │ │ └── stdlib.etex │ ├── macros.hva │ ├── macros.tex │ ├── manual.hva │ ├── manual.inf │ ├── manual.info.header │ ├── manual.tex │ ├── pdfmanual.tex │ ├── plaintext.tex │ ├── refman │ │ ├── .cvsignore │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── classes.etex │ │ ├── compunit.etex │ │ ├── const.etex │ │ ├── expr.etex │ │ ├── exten.etex │ │ ├── lex.etex │ │ ├── modtypes.etex │ │ ├── modules.etex │ │ ├── names.etex │ │ ├── patterns.etex │ │ ├── refman.etex │ │ ├── typedecl.etex │ │ ├── types.etex │ │ └── values.etex │ ├── style.css │ ├── texstuff │ │ ├── .cvsignore │ │ └── .gitignore │ ├── textman │ │ ├── .cvsignore │ │ └── .gitignore │ └── tutorials │ │ ├── .cvsignore │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── advexamples.etex │ │ ├── coreexamples.etex │ │ ├── lablexamples.etex │ │ ├── moduleexamples.etex │ │ ├── objectexamples.etex │ │ └── polymorphism.etex ├── styles │ ├── altindex.sty │ ├── caml-sl.sty │ ├── caml.sty │ ├── doc.tfm │ ├── docbf.tfm │ ├── docit.tfm │ ├── docmi.tfm │ ├── docrm.tfm │ ├── doctt.tfm │ ├── fullpage.sty │ ├── html.sty │ ├── isolatin.sty │ ├── multicols.sty │ ├── multind.sty │ ├── ocamldoc.hva │ ├── ocamldoc.sty │ ├── plaintext.sty │ ├── scroll.sty │ ├── syntaxdef.hva │ ├── syntaxdef.sty │ └── syntaxdeftxt.sty └── tools │ ├── .gitignore │ ├── .ignore │ ├── Makefile │ ├── caml-tex │ ├── caml_tex2.ml │ ├── dvi_to_txt │ ├── Makefile │ ├── dvi.h │ ├── interp.c │ ├── io.c │ ├── io.h │ ├── main.c │ ├── output.c │ ├── output.h │ ├── print.c │ ├── print_rtf.c │ └── print_styl.c │ ├── fix_index.sh │ ├── format-intf │ ├── htmlcut │ ├── htmlquote.c │ ├── htmltbl │ ├── htmlthread │ ├── htmltransf.mll │ ├── latexmacros.ml │ ├── latexmacros.mli │ ├── latexmain.ml │ ├── latexscan.mll │ ├── texexpand │ ├── texquote2.c │ ├── transf.mll │ └── transfmain.ml ├── middle_end ├── alias_analysis.ml ├── alias_analysis.mli ├── allocated_const.ml ├── allocated_const.mli ├── augment_specialised_args.ml ├── augment_specialised_args.mli ├── backend_intf.mli ├── base_types │ ├── closure_element.ml │ ├── closure_element.mli │ ├── closure_id.ml │ ├── closure_id.mli │ ├── compilation_unit.ml │ ├── compilation_unit.mli │ ├── export_id.ml │ ├── export_id.mli │ ├── id_types.ml │ ├── id_types.mli │ ├── linkage_name.ml │ ├── linkage_name.mli │ ├── mutable_variable.ml │ ├── mutable_variable.mli │ ├── set_of_closures_id.ml │ ├── set_of_closures_id.mli │ ├── set_of_closures_origin.ml │ ├── set_of_closures_origin.mli │ ├── static_exception.ml │ ├── static_exception.mli │ ├── symbol.ml │ ├── symbol.mli │ ├── tag.ml │ ├── tag.mli │ ├── var_within_closure.ml │ ├── var_within_closure.mli │ ├── variable.ml │ └── variable.mli ├── closure_conversion.ml ├── closure_conversion.mli ├── closure_conversion_aux.ml ├── closure_conversion_aux.mli ├── debuginfo.ml ├── debuginfo.mli ├── effect_analysis.ml ├── effect_analysis.mli ├── extract_projections.ml ├── extract_projections.mli ├── find_recursive_functions.ml ├── find_recursive_functions.mli ├── flambda.ml ├── flambda.mli ├── flambda_invariants.ml ├── flambda_invariants.mli ├── flambda_iterators.ml ├── flambda_iterators.mli ├── flambda_utils.ml ├── flambda_utils.mli ├── freshening.ml ├── freshening.mli ├── inconstant_idents.ml ├── inconstant_idents.mli ├── initialize_symbol_to_let_symbol.ml ├── initialize_symbol_to_let_symbol.mli ├── inline_and_simplify.ml ├── inline_and_simplify.mli ├── inline_and_simplify_aux.ml ├── inline_and_simplify_aux.mli ├── inlining_cost.ml ├── inlining_cost.mli ├── inlining_decision.ml ├── inlining_decision.mli ├── inlining_decision_intf.mli ├── inlining_stats.ml ├── inlining_stats.mli ├── inlining_stats_types.ml ├── inlining_stats_types.mli ├── inlining_transforms.ml ├── inlining_transforms.mli ├── invariant_params.ml ├── invariant_params.mli ├── lift_code.ml ├── lift_code.mli ├── lift_constants.ml ├── lift_constants.mli ├── lift_let_to_initialize_symbol.ml ├── lift_let_to_initialize_symbol.mli ├── middle_end.ml ├── middle_end.mli ├── parameter.ml ├── parameter.mli ├── pass_wrapper.ml ├── pass_wrapper.mli ├── projection.ml ├── projection.mli ├── ref_to_variables.ml ├── ref_to_variables.mli ├── remove_free_vars_equal_to_args.ml ├── remove_free_vars_equal_to_args.mli ├── remove_unused_arguments.ml ├── remove_unused_arguments.mli ├── remove_unused_closure_vars.ml ├── remove_unused_closure_vars.mli ├── remove_unused_program_constructs.ml ├── remove_unused_program_constructs.mli ├── share_constants.ml ├── share_constants.mli ├── simple_value_approx.ml ├── simple_value_approx.mli ├── simplify_boxed_integer_ops.ml ├── simplify_boxed_integer_ops.mli ├── simplify_boxed_integer_ops_intf.mli ├── simplify_common.ml ├── simplify_common.mli ├── simplify_primitives.ml ├── simplify_primitives.mli ├── unbox_closures.ml ├── unbox_closures.mli ├── unbox_free_vars_of_closures.ml ├── unbox_free_vars_of_closures.mli ├── unbox_specialised_args.ml └── unbox_specialised_args.mli ├── ocamldoc ├── .depend ├── Changes.txt ├── Makefile ├── Makefile.nt ├── generators │ ├── odoc_literate.ml │ └── odoc_todo.ml ├── ocamldoc.hva ├── ocamldoc.sty ├── odoc.ml ├── odoc_analyse.ml ├── odoc_analyse.mli ├── odoc_args.ml ├── odoc_args.mli ├── odoc_ast.ml ├── odoc_ast.mli ├── odoc_class.ml ├── odoc_comments.ml ├── odoc_comments.mli ├── odoc_comments_global.ml ├── odoc_comments_global.mli ├── odoc_config.ml ├── odoc_config.mli ├── odoc_control.ml ├── odoc_cross.ml ├── odoc_cross.mli ├── odoc_dag2html.ml ├── odoc_dag2html.mli ├── odoc_dep.ml ├── odoc_dot.ml ├── odoc_env.ml ├── odoc_env.mli ├── odoc_exception.ml ├── odoc_extension.ml ├── odoc_gen.ml ├── odoc_gen.mli ├── odoc_global.ml ├── odoc_global.mli ├── odoc_html.ml ├── odoc_info.ml ├── odoc_info.mli ├── odoc_inherit.ml ├── odoc_latex.ml ├── odoc_latex_style.ml ├── odoc_lexer.mll ├── odoc_man.ml ├── odoc_merge.ml ├── odoc_merge.mli ├── odoc_messages.ml ├── odoc_misc.ml ├── odoc_misc.mli ├── odoc_module.ml ├── odoc_name.ml ├── odoc_name.mli ├── odoc_ocamlhtml.mll ├── odoc_parameter.ml ├── odoc_parser.mly ├── odoc_print.ml ├── odoc_print.mli ├── odoc_scan.ml ├── odoc_search.ml ├── odoc_search.mli ├── odoc_see_lexer.mll ├── odoc_sig.ml ├── odoc_sig.mli ├── odoc_str.ml ├── odoc_str.mli ├── odoc_test.ml ├── odoc_texi.ml ├── odoc_text.ml ├── odoc_text.mli ├── odoc_text_lexer.mll ├── odoc_text_parser.mly ├── odoc_to_text.ml ├── odoc_type.ml ├── odoc_types.ml ├── odoc_types.mli ├── odoc_value.ml └── remove_DEBUG ├── ocamltest ├── .depend ├── Makefile ├── README ├── actions.ml ├── actions.mli ├── backends.ml ├── backends.mli ├── builtin_actions.ml ├── builtin_actions.mli ├── builtin_modifiers.ml ├── builtin_modifiers.mli ├── builtin_tests.ml ├── builtin_tests.mli ├── builtin_variables.ml ├── builtin_variables.mli ├── environments.ml ├── environments.mli ├── filecompare.ml ├── filecompare.mli ├── filetype.ml ├── filetype.mli ├── getocamloptdefaultflags ├── main.ml ├── main.mli ├── ocamltest_config.ml.in ├── ocamltest_config.mli ├── options.ml ├── options.mli ├── run.h ├── run_command.ml ├── run_command.mli ├── run_common.h ├── run_stubs.c ├── run_unix.c ├── run_win32.c ├── testlib.ml ├── testlib.mli ├── tests.ml ├── tests.mli ├── tsl_ast.ml ├── tsl_ast.mli ├── tsl_lexer.mli ├── tsl_lexer.mll ├── tsl_parser.mly ├── tsl_semantics.ml ├── tsl_semantics.mli ├── variables.ml └── variables.mli ├── otherlibs ├── Makefile ├── bigarray │ ├── .depend │ ├── Makefile │ ├── Makefile.nt │ ├── bigarray.ml │ ├── bigarray.mli │ └── bigarray_stubs.c ├── dynlink │ ├── Makefile │ ├── Makefile.nt │ ├── dynlink.ml │ ├── dynlink.mli │ ├── extract_crc.ml │ └── natdynlink.ml ├── graph │ ├── .depend │ ├── Makefile │ ├── color.c │ ├── draw.c │ ├── dump_img.c │ ├── events.c │ ├── fill.c │ ├── graphics.ml │ ├── graphics.mli │ ├── graphicsX11.ml │ ├── graphicsX11.mli │ ├── image.c │ ├── image.h │ ├── libgraph.h │ ├── make_img.c │ ├── open.c │ ├── point_col.c │ ├── sound.c │ ├── subwindow.c │ └── text.c ├── raw_spacetime_lib │ ├── .depend │ ├── Makefile │ ├── Makefile.nt │ ├── raw_spacetime_lib.ml │ └── raw_spacetime_lib.mli ├── str │ ├── .depend │ ├── Makefile │ ├── Makefile.nt │ ├── str.ml │ ├── str.mli │ └── strstubs.c ├── systhreads │ ├── .depend │ ├── Makefile │ ├── Makefile.nt │ ├── condition.ml │ ├── condition.mli │ ├── event.ml │ ├── event.mli │ ├── mutex.ml │ ├── mutex.mli │ ├── st_posix.h │ ├── st_stubs.c │ ├── st_win32.h │ ├── thread.ml │ ├── thread.mli │ ├── threadUnix.ml │ ├── threadUnix.mli │ └── threads.h ├── threads │ ├── .depend │ ├── Makefile │ ├── condition.ml │ ├── condition.mli │ ├── event.ml │ ├── event.mli │ ├── marshal.ml │ ├── mutex.ml │ ├── mutex.mli │ ├── pervasives.ml │ ├── scheduler.c │ ├── thread.ml │ ├── thread.mli │ ├── threadUnix.ml │ ├── threadUnix.mli │ └── unix.ml ├── unix │ ├── .depend │ ├── Makefile │ ├── accept.c │ ├── access.c │ ├── addrofstr.c │ ├── alarm.c │ ├── bind.c │ ├── chdir.c │ ├── chmod.c │ ├── chown.c │ ├── chroot.c │ ├── close.c │ ├── closedir.c │ ├── connect.c │ ├── cst2constr.c │ ├── cst2constr.h │ ├── cstringv.c │ ├── dup.c │ ├── dup2.c │ ├── envir.c │ ├── errmsg.c │ ├── execv.c │ ├── execve.c │ ├── execvp.c │ ├── exit.c │ ├── fchmod.c │ ├── fchown.c │ ├── fcntl.c │ ├── fork.c │ ├── ftruncate.c │ ├── getaddrinfo.c │ ├── getcwd.c │ ├── getegid.c │ ├── geteuid.c │ ├── getgid.c │ ├── getgr.c │ ├── getgroups.c │ ├── gethost.c │ ├── gethostname.c │ ├── getlogin.c │ ├── getnameinfo.c │ ├── getpeername.c │ ├── getpid.c │ ├── getppid.c │ ├── getproto.c │ ├── getpw.c │ ├── getserv.c │ ├── getsockname.c │ ├── gettimeofday.c │ ├── getuid.c │ ├── gmtime.c │ ├── initgroups.c │ ├── isatty.c │ ├── itimer.c │ ├── kill.c │ ├── link.c │ ├── listen.c │ ├── lockf.c │ ├── lseek.c │ ├── mkdir.c │ ├── mkfifo.c │ ├── mmap.c │ ├── mmap_ba.c │ ├── nanosecond_stat.h │ ├── nice.c │ ├── open.c │ ├── opendir.c │ ├── pipe.c │ ├── putenv.c │ ├── read.c │ ├── readdir.c │ ├── readlink.c │ ├── rename.c │ ├── rewinddir.c │ ├── rmdir.c │ ├── select.c │ ├── sendrecv.c │ ├── setgid.c │ ├── setgroups.c │ ├── setsid.c │ ├── setuid.c │ ├── shutdown.c │ ├── signals.c │ ├── sleep.c │ ├── socket.c │ ├── socketaddr.c │ ├── socketaddr.h │ ├── socketpair.c │ ├── sockopt.c │ ├── stat.c │ ├── strofaddr.c │ ├── symlink.c │ ├── termios.c │ ├── time.c │ ├── times.c │ ├── truncate.c │ ├── umask.c │ ├── unix.ml │ ├── unix.mli │ ├── unixLabels.ml │ ├── unixLabels.mli │ ├── unixsupport.c │ ├── unixsupport.h │ ├── unlink.c │ ├── utimes.c │ ├── wait.c │ └── write.c ├── win32graph │ ├── Makefile │ ├── Makefile.nt │ ├── draw.c │ ├── events.c │ ├── libgraph.h │ └── open.c └── win32unix │ ├── .depend │ ├── Makefile │ ├── Makefile.nt │ ├── accept.c │ ├── bind.c │ ├── channels.c │ ├── close.c │ ├── close_on.c │ ├── connect.c │ ├── createprocess.c │ ├── dup.c │ ├── dup2.c │ ├── envir.c │ ├── errmsg.c │ ├── getpeername.c │ ├── getpid.c │ ├── getsockname.c │ ├── gettimeofday.c │ ├── isatty.c │ ├── link.c │ ├── listen.c │ ├── lockf.c │ ├── lseek.c │ ├── mkdir.c │ ├── mmap.c │ ├── nonblock.c │ ├── open.c │ ├── pipe.c │ ├── read.c │ ├── readlink.c │ ├── rename.c │ ├── select.c │ ├── sendrecv.c │ ├── shutdown.c │ ├── sleep.c │ ├── socket.c │ ├── socketaddr.h │ ├── sockopt.c │ ├── startup.c │ ├── stat.c │ ├── symlink.c │ ├── system.c │ ├── times.c │ ├── unix.ml │ ├── unixsupport.c │ ├── unixsupport.h │ ├── windbug.c │ ├── windbug.h │ ├── windir.c │ ├── winlist.c │ ├── winlist.h │ ├── winwait.c │ ├── winworker.c │ ├── winworker.h │ └── write.c ├── parsing ├── HACKING.adoc ├── ast_helper.ml ├── ast_helper.mli ├── ast_invariants.ml ├── ast_invariants.mli ├── ast_iterator.ml ├── ast_iterator.mli ├── ast_mapper.ml ├── ast_mapper.mli ├── asttypes.mli ├── attr_helper.ml ├── attr_helper.mli ├── builtin_attributes.ml ├── builtin_attributes.mli ├── depend.ml ├── depend.mli ├── docstrings.ml ├── docstrings.mli ├── lexer.mli ├── lexer.mll ├── location.ml ├── location.mli ├── longident.ml ├── longident.mli ├── parse.ml ├── parse.mli ├── parser.mly ├── parsetree.mli ├── pprintast.ml ├── pprintast.mli ├── printast.ml ├── printast.mli ├── syntaxerr.ml └── syntaxerr.mli ├── stdlib ├── .depend ├── Compflags ├── Makefile ├── Makefile.nt ├── StdlibModules ├── arg.ml ├── arg.mli ├── array.ml ├── array.mli ├── arrayLabels.ml ├── arrayLabels.mli ├── buffer.ml ├── buffer.mli ├── bytes.ml ├── bytes.mli ├── bytesLabels.ml ├── bytesLabels.mli ├── callback.ml ├── callback.mli ├── camlinternalBigarray.ml ├── camlinternalFormat.ml ├── camlinternalFormat.mli ├── camlinternalFormatBasics.ml ├── camlinternalFormatBasics.mli ├── camlinternalLazy.ml ├── camlinternalLazy.mli ├── camlinternalMod.ml ├── camlinternalMod.mli ├── camlinternalOO.ml ├── camlinternalOO.mli ├── char.ml ├── char.mli ├── complex.ml ├── complex.mli ├── digest.ml ├── digest.mli ├── ephemeron.ml ├── ephemeron.mli ├── filename.ml ├── filename.mli ├── format.ml ├── format.mli ├── gc.ml ├── gc.mli ├── genlex.ml ├── genlex.mli ├── hashbang ├── hashtbl.ml ├── hashtbl.mli ├── header.c ├── headernt.c ├── int32.ml ├── int32.mli ├── int64.ml ├── int64.mli ├── lazy.ml ├── lazy.mli ├── lexing.ml ├── lexing.mli ├── list.ml ├── list.mli ├── listLabels.ml ├── listLabels.mli ├── map.ml ├── map.mli ├── marshal.ml ├── marshal.mli ├── moreLabels.ml ├── moreLabels.mli ├── nativeint.ml ├── nativeint.mli ├── obj.ml ├── obj.mli ├── oo.ml ├── oo.mli ├── parsing.ml ├── parsing.mli ├── pervasives.ml ├── pervasives.mli ├── printexc.ml ├── printexc.mli ├── printf.ml ├── printf.mli ├── queue.ml ├── queue.mli ├── random.ml ├── random.mli ├── scanf.ml ├── scanf.mli ├── set.ml ├── set.mli ├── sort.ml ├── sort.mli ├── spacetime.ml ├── spacetime.mli ├── stack.ml ├── stack.mli ├── stdLabels.ml ├── stdLabels.mli ├── std_exit.ml ├── stream.ml ├── stream.mli ├── string.ml ├── string.mli ├── stringLabels.ml ├── stringLabels.mli ├── sys.mli ├── sys.mlp ├── uchar.ml ├── uchar.mli ├── weak.ml └── weak.mli ├── testsuite ├── HACKING.adoc ├── Makefile ├── interactive │ ├── lib-gc │ │ ├── Makefile │ │ └── alloc.ml │ ├── lib-graph-2 │ │ ├── Makefile │ │ ├── graph_test.ml │ │ └── graph_test.reference │ ├── lib-graph-3 │ │ ├── Makefile │ │ ├── sorts.ml │ │ └── sorts.reference │ ├── lib-graph │ │ ├── Makefile │ │ ├── graph_example.ml │ │ └── graph_example.reference │ └── lib-signals │ │ ├── Makefile │ │ └── signals.ml ├── lib │ ├── Makefile │ ├── testing.ml │ └── testing.mli ├── makefiles │ ├── Makefile.common │ ├── Makefile.dlambda │ ├── Makefile.dparsetree │ ├── Makefile.expect │ ├── Makefile.okbad │ ├── Makefile.one │ ├── Makefile.several │ ├── Makefile.toplevel │ └── summarize.awk ├── tests │ ├── afl-instrumentation │ │ ├── Makefile │ │ ├── harness.ml │ │ ├── test.ml │ │ └── test.sh │ ├── array-functions │ │ ├── ocamltests │ │ ├── test.ml │ │ └── test.reference │ ├── asmcomp │ │ ├── Makefile │ │ ├── alpha.S │ │ ├── amd64.S │ │ ├── arith.cmm │ │ ├── arm.S │ │ ├── arm64.S │ │ ├── bind_tuples.ml │ │ ├── catch-rec.cmm │ │ ├── catch-try.cmm │ │ ├── checkbound.cmm │ │ ├── even-odd-spill.cmm │ │ ├── even-odd.cmm │ │ ├── fib.cmm │ │ ├── hppa.S │ │ ├── i386.S │ │ ├── i386nt.asm │ │ ├── ia64.S │ │ ├── integr.cmm │ │ ├── is_in_static_data.c │ │ ├── is_static.ml │ │ ├── is_static_flambda.ml │ │ ├── is_static_flambda_dep.ml │ │ ├── lexcmm.mli │ │ ├── lexcmm.mll │ │ ├── m68k.S │ │ ├── main.c │ │ ├── main.ml │ │ ├── mainarith.c │ │ ├── mips.s │ │ ├── optargs.ml │ │ ├── parsecmm.mly │ │ ├── parsecmmaux.ml │ │ ├── parsecmmaux.mli │ │ ├── pgcd.cmm │ │ ├── power.S │ │ ├── quicksort.cmm │ │ ├── quicksort2.cmm │ │ ├── register_typing.ml │ │ ├── register_typing_switch.ml │ │ ├── s390x.S │ │ ├── simple_float_const.ml │ │ ├── simple_float_const_opaque.ml │ │ ├── soli.cmm │ │ ├── sparc.S │ │ ├── static_float_array_flambda.ml │ │ ├── static_float_array_flambda_opaque.ml │ │ ├── staticalloc.ml │ │ ├── tagged-fib.cmm │ │ ├── tagged-integr.cmm │ │ ├── tagged-quicksort.cmm │ │ ├── tagged-tak.cmm │ │ ├── tak.cmm │ │ ├── unrolling_flambda.ml │ │ └── unrolling_flambda2.ml │ ├── ast-invariants │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.reference │ ├── backtrace │ │ ├── Makefile │ │ ├── backtrace..byte.reference │ │ ├── backtrace..native.reference │ │ ├── backtrace.a.byte.reference │ │ ├── backtrace.a.native.reference │ │ ├── backtrace.b.byte.reference │ │ ├── backtrace.b.native.reference │ │ ├── backtrace.c.byte.reference │ │ ├── backtrace.c.native.reference │ │ ├── backtrace.d.byte.reference │ │ ├── backtrace.d.native.reference │ │ ├── backtrace.ml │ │ ├── backtrace2.byte.reference │ │ ├── backtrace2.ml │ │ ├── backtrace2.native.reference │ │ ├── backtrace3.byte.reference │ │ ├── backtrace3.ml │ │ ├── backtrace3.native.reference │ │ ├── backtrace_deprecated.byte.reference │ │ ├── backtrace_deprecated.ml │ │ ├── backtrace_deprecated.native.reference │ │ ├── backtrace_slots.byte.reference │ │ ├── backtrace_slots.ml │ │ ├── backtrace_slots.native.reference │ │ ├── backtraces_and_finalizers.ml │ │ ├── backtraces_and_finalizers.native.reference │ │ ├── inline_test.byte.reference │ │ ├── inline_test.ml │ │ ├── inline_test.native.reference │ │ ├── inline_traversal_test.byte.reference │ │ ├── inline_traversal_test.ml │ │ ├── inline_traversal_test.native.reference │ │ ├── pr6920_why_at.byte.reference │ │ ├── pr6920_why_at.ml │ │ ├── pr6920_why_at.native.reference │ │ ├── pr6920_why_swallow.byte.reference │ │ ├── pr6920_why_swallow.ml │ │ ├── pr6920_why_swallow.native.reference │ │ ├── raw_backtrace.byte.reference │ │ ├── raw_backtrace.ml │ │ └── raw_backtrace.native.reference │ ├── basic-float │ │ ├── Makefile │ │ ├── float_compare.ml │ │ ├── float_compare.reference │ │ ├── tfloat_hex.ml │ │ ├── tfloat_hex.reference │ │ ├── tfloat_record.ml │ │ ├── tfloat_record.reference │ │ ├── zero_sized_float_arrays.ml │ │ └── zero_sized_float_arrays.reference │ ├── basic-io-2 │ │ ├── io.ml │ │ ├── io.reference │ │ ├── ocamltests │ │ └── test-file-short-lines │ ├── basic-io │ │ ├── ocamltests │ │ ├── wc.ml │ │ └── wc.reference │ ├── basic-manyargs │ │ ├── Makefile │ │ ├── manyargs.ml │ │ ├── manyargs.reference │ │ └── manyargsprim.c │ ├── basic-modules │ │ ├── main.ml │ │ ├── main.mli │ │ ├── main.reference │ │ ├── ocamltests │ │ ├── offset.ml │ │ ├── pr6726.ml │ │ └── pr7427.ml │ ├── basic-more │ │ ├── Makefile │ │ ├── bounds.ml │ │ ├── bounds.reference │ │ ├── div_by_zero.ml │ │ ├── div_by_zero.reference │ │ ├── function_in_ref.ml │ │ ├── function_in_ref.reference │ │ ├── if_in_if.ml │ │ ├── if_in_if.reference │ │ ├── morematch.ml │ │ ├── morematch.reference │ │ ├── opaque_prim.ml │ │ ├── opaque_prim.reference │ │ ├── pr1271.ml │ │ ├── pr1271.reference │ │ ├── pr2719.ml │ │ ├── pr2719.reference │ │ ├── pr6216.ml │ │ ├── pr6216.reference │ │ ├── record_evaluation_order.ml │ │ ├── record_evaluation_order.reference │ │ ├── robustmatch.compilers.reference │ │ ├── robustmatch.ml │ │ ├── robustmatch.reference │ │ ├── sequential_and_or.ml │ │ ├── sequential_and_or.reference │ │ ├── structural_constants.ml │ │ ├── structural_constants.reference │ │ ├── tbuffer.ml │ │ ├── tbuffer.reference │ │ ├── testrandom.ml │ │ ├── testrandom.reference │ │ ├── top_level_patterns.ml │ │ ├── top_level_patterns.reference │ │ ├── tprintf.ml │ │ └── tprintf.reference │ ├── basic-multdef │ │ ├── multdef.ml │ │ ├── multdef.mli │ │ ├── ocamltests │ │ ├── usemultdef.ml │ │ └── usemultdef.reference │ ├── basic-private │ │ ├── length.ml │ │ ├── length.mli │ │ ├── ocamltests │ │ ├── tlength.ml │ │ └── tlength.reference │ ├── basic │ │ ├── Makefile │ │ ├── arrays.ml │ │ ├── arrays.reference │ │ ├── bigints.ml │ │ ├── bigints.reference │ │ ├── boxedints.ml │ │ ├── boxedints.reference │ │ ├── constprop.ml │ │ ├── constprop.mlp │ │ ├── constprop.reference │ │ ├── divint.ml │ │ ├── divint.reference │ │ ├── equality.ml │ │ ├── equality.reference │ │ ├── eval_order_1.ml │ │ ├── eval_order_1.reference │ │ ├── eval_order_2.ml │ │ ├── eval_order_2.reference │ │ ├── eval_order_3.ml │ │ ├── eval_order_3.reference │ │ ├── eval_order_4.ml │ │ ├── eval_order_4.reference │ │ ├── eval_order_6.ml │ │ ├── eval_order_6.reference │ │ ├── float.ml │ │ ├── float.reference │ │ ├── float_physical_equality.ml │ │ ├── float_physical_equality.reference │ │ ├── includestruct.ml │ │ ├── includestruct.reference │ │ ├── localexn.ml │ │ ├── localexn.reference │ │ ├── maps.ml │ │ ├── maps.reference │ │ ├── min_int.ml │ │ ├── min_int.reference │ │ ├── opt_variants.ml │ │ ├── opt_variants.reference │ │ ├── patmatch.ml │ │ ├── patmatch.reference │ │ ├── pr7533.ml │ │ ├── pr7533.reference │ │ ├── pr7657.ml │ │ ├── pr7657.reference │ │ ├── recvalues.ml │ │ ├── recvalues.reference │ │ ├── sets.ml │ │ ├── sets.reference │ │ ├── stringmatch.ml │ │ ├── stringmatch.reference │ │ ├── switch_opts.ml │ │ ├── switch_opts.reference │ │ ├── tailcalls.ml │ │ ├── tailcalls.reference │ │ ├── trigraph.ml │ │ ├── trigraph.ml.silent-compilation │ │ ├── trigraph.reference │ │ ├── zero_divided_by_n.ml │ │ └── zero_divided_by_n.reference │ ├── callback │ │ ├── Makefile │ │ ├── callbackprim.c │ │ ├── reference │ │ └── tcallback.ml │ ├── docstrings │ │ ├── Makefile │ │ ├── empty.ml │ │ └── empty.ml.reference │ ├── embedded │ │ ├── Makefile │ │ ├── cmcaml.ml │ │ ├── cmmain.c │ │ ├── cmstub.c │ │ └── program.reference │ ├── exotic-syntax │ │ ├── Makefile │ │ ├── exotic.ml │ │ └── exotic.reference │ ├── extension-constructor │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.reference │ ├── flambda │ │ ├── Makefile │ │ ├── gpr998.ml │ │ └── gpr998.reference │ ├── float-unboxing │ │ ├── Makefile │ │ ├── float_flambda.ml │ │ ├── float_subst_boxed_number.ml │ │ └── float_subst_boxed_number.reference │ ├── formats-transition │ │ ├── Makefile │ │ ├── deprecated_unsigned_printers.ml │ │ ├── deprecated_unsigned_printers.ml.reference │ │ ├── ignored_scan_counters.ml │ │ ├── ignored_scan_counters.ml.reference │ │ ├── legacy_incompatible_flags.ml │ │ ├── legacy_incompatible_flags.ml.reference │ │ ├── legacy_unfinished_modifiers.ml │ │ └── legacy_unfinished_modifiers.ml.reference │ ├── formatting │ │ ├── Makefile │ │ ├── margins.ml │ │ └── margins.ml.reference │ ├── functors │ │ ├── Makefile │ │ ├── functors.ml │ │ └── functors.ml.reference │ ├── gc-roots │ │ ├── Makefile │ │ ├── globroots.ml │ │ ├── globroots.reference │ │ └── globrootsprim.c │ ├── int64-unboxing │ │ ├── Makefile │ │ ├── stubs.c │ │ ├── test.ml │ │ └── test.reference │ ├── lazy │ │ ├── Makefile │ │ ├── lazy1.ml │ │ └── lazy1.reference │ ├── letrec-disallowed │ │ ├── Makefile │ │ ├── disallowed.ml │ │ ├── disallowed.ml.reference │ │ ├── extension_constructor.ml │ │ ├── extension_constructor.ml.reference │ │ ├── float_block.ml │ │ ├── float_block.ml.reference │ │ ├── generic_arrays.ml │ │ ├── generic_arrays.ml.reference │ │ ├── lazy_.ml │ │ ├── lazy_.ml.reference │ │ ├── module_constraints.ml │ │ ├── module_constraints.ml.reference │ │ ├── pr7215.ml │ │ ├── pr7215.ml.reference │ │ ├── pr7231.ml │ │ ├── pr7231.ml.reference │ │ ├── unboxed.ml │ │ └── unboxed.ml.reference │ ├── letrec │ │ ├── Makefile │ │ ├── allowed.ml │ │ ├── allowed.reference │ │ ├── backreferences.ml │ │ ├── backreferences.reference │ │ ├── class_1.ml │ │ ├── class_1.reference │ │ ├── class_2.ml │ │ ├── class_2.reference │ │ ├── disallowed.reference │ │ ├── evaluation_order_1.ml │ │ ├── evaluation_order_1.reference │ │ ├── evaluation_order_2.ml │ │ ├── evaluation_order_2.reference │ │ ├── evaluation_order_3.ml │ │ ├── evaluation_order_3.reference │ │ ├── float_block_1.ml │ │ ├── float_block_1.reference │ │ ├── float_block_2.reference │ │ ├── generic_array.ml │ │ ├── generic_array.reference │ │ ├── lazy_.ml │ │ ├── lazy_.reference │ │ ├── lists.ml │ │ ├── lists.reference │ │ ├── mixing_value_closures_1.ml │ │ ├── mixing_value_closures_1.reference │ │ ├── mixing_value_closures_2.ml │ │ ├── mixing_value_closures_2.reference │ │ ├── mutual_functions.ml │ │ ├── mutual_functions.reference │ │ ├── nested.ml │ │ ├── nested.reference │ │ ├── pr4989.ml │ │ ├── pr4989.reference │ │ ├── record_with.ml │ │ ├── record_with.reference │ │ ├── ref.ml │ │ └── ref.reference │ ├── lexing │ │ ├── Makefile │ │ ├── uchar_esc.ml │ │ └── uchar_esc.ml.reference │ ├── lib-arg │ │ ├── Makefile │ │ ├── testarg.ml │ │ ├── testarg.reference │ │ ├── testerror.ml │ │ └── testerror.reference │ ├── lib-bigarray-2 │ │ ├── Makefile │ │ ├── bigarrf.f │ │ ├── bigarrfml.ml │ │ ├── bigarrfml.reference │ │ └── bigarrfstub.c │ ├── lib-bigarray-file │ │ ├── Makefile │ │ ├── mapfile.ml │ │ └── mapfile.reference │ ├── lib-bigarray │ │ ├── Makefile │ │ ├── bigarrays.ml │ │ ├── bigarrays.reference │ │ ├── change_layout.ml │ │ ├── change_layout.reference │ │ ├── fftba.ml │ │ ├── fftba.reference │ │ ├── pr5115.ml │ │ ├── pr5115.reference │ │ ├── weak_bigarray.ml │ │ └── weak_bigarray.reference │ ├── lib-buffer │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.reference │ ├── lib-bytes │ │ ├── Makefile │ │ ├── test_bytes.ml │ │ └── test_bytes.reference │ ├── lib-digest │ │ ├── Makefile │ │ ├── md5.ml │ │ └── md5.reference │ ├── lib-dynlink-bytecode │ │ ├── Makefile │ │ ├── custom.reference │ │ ├── main.ml │ │ ├── main.reference │ │ ├── plug1.ml │ │ ├── plug2.ml │ │ ├── registry.ml │ │ ├── static.reference │ │ ├── stub1.c │ │ └── stub2.c │ ├── lib-dynlink-csharp │ │ ├── Makefile │ │ ├── bytecode.reference │ │ ├── entry.c │ │ ├── main.cs │ │ ├── main.ml │ │ ├── native.reference │ │ └── plugin.ml │ ├── lib-dynlink-native │ │ ├── Makefile │ │ ├── a.ml │ │ ├── api.ml │ │ ├── b.ml │ │ ├── bug.ml │ │ ├── c.ml │ │ ├── factorial.c │ │ ├── main.ml │ │ ├── pack_client.ml │ │ ├── packed1.ml │ │ ├── packed1_client.ml │ │ ├── plugin.ml │ │ ├── plugin.mli │ │ ├── plugin2.ml │ │ ├── plugin4.ml │ │ ├── plugin_ext.ml │ │ ├── plugin_high_arity.ml │ │ ├── plugin_ref.ml │ │ ├── plugin_simple.ml │ │ ├── plugin_thread.ml │ │ ├── reference │ │ └── sub │ │ │ ├── api.ml │ │ │ ├── api.mli │ │ │ ├── plugin.ml │ │ │ └── plugin3.ml │ ├── lib-filename │ │ ├── Makefile │ │ ├── extension.ml │ │ └── extension.reference │ ├── lib-format │ │ ├── Makefile │ │ ├── pr6824.ml │ │ ├── pr6824.reference │ │ ├── tformat.ml │ │ └── tformat.reference │ ├── lib-hashtbl │ │ ├── Makefile │ │ ├── hfun.ml │ │ ├── hfun.reference │ │ ├── htbl.ml │ │ └── htbl.reference │ ├── lib-list │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.reference │ ├── lib-marshal │ │ ├── Makefile │ │ ├── intext.ml │ │ ├── intext.reference │ │ └── intextaux.c │ ├── lib-obj │ │ ├── Makefile │ │ ├── reachable_words.ml │ │ └── reachable_words.reference │ ├── lib-printf │ │ ├── Makefile │ │ ├── pr6534.ml │ │ ├── pr6534.reference │ │ ├── pr6938.ml │ │ ├── pr6938.reference │ │ ├── tprintf.ml │ │ └── tprintf.reference │ ├── lib-queue │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.reference │ ├── lib-random │ │ ├── Makefile │ │ ├── rand.ml │ │ └── rand.reference │ ├── lib-scanf-2 │ │ ├── Makefile │ │ ├── reference │ │ ├── tscanf2_io.ml │ │ ├── tscanf2_master.ml │ │ └── tscanf2_slave.ml │ ├── lib-scanf │ │ ├── Makefile │ │ ├── tscanf.ml │ │ └── tscanf.reference │ ├── lib-set │ │ ├── Makefile │ │ ├── testmap.ml │ │ ├── testmap.reference │ │ ├── testset.ml │ │ └── testset.reference │ ├── lib-stack │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.reference │ ├── lib-stdlabels │ │ ├── Makefile │ │ ├── test_stdlabels.ml │ │ └── test_stdlabels.reference │ ├── lib-str │ │ ├── Makefile │ │ ├── t01.ml │ │ └── t01.reference │ ├── lib-stream │ │ ├── Makefile │ │ ├── count_concat_bug.ml │ │ └── count_concat_bug.reference │ ├── lib-string │ │ ├── Makefile │ │ ├── test_string.ml │ │ └── test_string.reference │ ├── lib-sys │ │ ├── Makefile │ │ ├── rename.ml │ │ └── rename.reference │ ├── lib-systhreads │ │ ├── Makefile │ │ ├── testfork.ml │ │ ├── testfork.precheck │ │ └── testfork.reference │ ├── lib-threads │ │ ├── Makefile │ │ ├── backtrace_threads.ml │ │ ├── backtrace_threads.reference │ │ ├── bank.ml │ │ ├── bank.reference │ │ ├── beat.ml │ │ ├── beat.reference │ │ ├── bufchan.ml │ │ ├── bufchan.reference │ │ ├── close.ml │ │ ├── close.reference │ │ ├── fileio.ml │ │ ├── fileio.reference │ │ ├── pr4466.ml │ │ ├── pr4466.reference │ │ ├── pr5325.ml │ │ ├── pr5325.reference │ │ ├── pr7638.ml │ │ ├── pr7638.reference │ │ ├── prodcons.ml │ │ ├── prodcons.reference │ │ ├── prodcons2.ml │ │ ├── prodcons2.reference │ │ ├── sieve.ml │ │ ├── sieve.reference │ │ ├── sigint.c │ │ ├── signal.checker │ │ ├── signal.ml │ │ ├── signal.precheck │ │ ├── signal.runner │ │ ├── sockets.ml │ │ ├── sockets.reference │ │ ├── socketsbuf.ml │ │ ├── socketsbuf.reference │ │ ├── swapchan.checker │ │ ├── swapchan.ml │ │ ├── swapchan.reference │ │ ├── tls.checker │ │ ├── tls.ml │ │ ├── tls.reference │ │ ├── token1.reference │ │ ├── token2.reference │ │ ├── torture.ml │ │ └── torture.reference │ ├── lib-uchar │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.reference │ ├── lib-unix │ │ ├── common │ │ │ ├── Makefile │ │ │ ├── cloexec.ml │ │ │ ├── cloexec.reference │ │ │ ├── cmdline_prog.c │ │ │ ├── dup.ml │ │ │ ├── dup.reference │ │ │ ├── dup2.ml │ │ │ ├── dup2.reference │ │ │ ├── fdstatus.c │ │ │ ├── pipe_eof.ml │ │ │ ├── pipe_eof.reference │ │ │ ├── redirections.ml │ │ │ ├── redirections.reference │ │ │ ├── reflector.c │ │ │ ├── rename.ml │ │ │ ├── rename.reference │ │ │ ├── test_unix_cmdline.ml │ │ │ ├── test_unix_cmdline.reference │ │ │ ├── wait_nohang.ml │ │ │ └── wait_nohang.reference │ │ ├── isatty │ │ │ ├── Makefile │ │ │ ├── isatty_std.ml │ │ │ ├── isatty_std.reference │ │ │ ├── isatty_tty.ml │ │ │ ├── isatty_tty.precheck │ │ │ └── isatty_tty.reference │ │ ├── unix-execvpe │ │ │ ├── Makefile │ │ │ ├── exec.ml │ │ │ ├── exec.reference │ │ │ ├── exec.run │ │ │ ├── script3 │ │ │ └── subdir │ │ │ │ ├── nonexec │ │ │ │ ├── script1 │ │ │ │ └── script2 │ │ ├── win-env │ │ │ ├── Makefile │ │ │ ├── stubs.c │ │ │ ├── test_env.ml │ │ │ ├── test_env.reference │ │ │ ├── test_env2.ml │ │ │ ├── test_env2.precheck │ │ │ └── test_env2.reference │ │ ├── win-stat │ │ │ ├── Makefile │ │ │ ├── fakeclock.c │ │ │ ├── test.ml │ │ │ └── test.reference │ │ └── win-symlink │ │ │ ├── Makefile │ │ │ ├── precheck.ml │ │ │ ├── test.ml │ │ │ └── test.reference │ ├── link-test │ │ ├── Makefile │ │ ├── aliases.ml │ │ ├── external.ml │ │ ├── external.mli │ │ ├── external_for_pack.ml │ │ ├── external_for_pack.mli │ │ ├── submodule.ml │ │ ├── test.ml │ │ ├── test.reference │ │ └── use_in_pack.ml │ ├── manual-intf-c │ │ ├── Makefile │ │ ├── curses.ml │ │ ├── curses_stubs.c │ │ ├── prog.ml │ │ └── prog2.reference │ ├── match-exception-warnings │ │ ├── Makefile │ │ ├── exhaustiveness_warnings.ml │ │ └── exhaustiveness_warnings.ml.reference │ ├── match-exception │ │ ├── Makefile │ │ ├── allocation.ml │ │ ├── allocation.reference │ │ ├── exception_propagation.ml │ │ ├── exception_propagation.reference │ │ ├── match_failure.ml │ │ ├── match_failure.reference │ │ ├── nested_handlers.ml │ │ ├── nested_handlers.reference │ │ ├── raise_from_success_continuation.ml │ │ ├── raise_from_success_continuation.reference │ │ ├── streams.ml │ │ ├── streams.reference │ │ ├── tail_calls.ml │ │ └── tail_calls.reference │ ├── messages │ │ ├── Makefile │ │ └── precise_locations.ml │ ├── misc-kb │ │ ├── Makefile │ │ ├── equations.ml │ │ ├── equations.mli │ │ ├── kb.ml │ │ ├── kb.mli │ │ ├── kbmain.ml │ │ ├── kbmain.reference │ │ ├── orderings.ml │ │ ├── orderings.mli │ │ ├── terms.ml │ │ └── terms.mli │ ├── misc-unsafe │ │ ├── Makefile │ │ ├── almabench.ml │ │ ├── almabench.reference │ │ ├── fft.ml │ │ ├── fft.reference │ │ ├── quicksort.ml │ │ ├── quicksort.reference │ │ ├── soli.ml │ │ └── soli.reference │ ├── misc │ │ ├── Makefile │ │ ├── bdd.ml │ │ ├── bdd.reference │ │ ├── boyer.ml │ │ ├── boyer.reference │ │ ├── ephetest.ml │ │ ├── ephetest.reference │ │ ├── ephetest2.ml │ │ ├── ephetest2.reference │ │ ├── ephetest3.ml │ │ ├── ephetest3.reference │ │ ├── fib.ml │ │ ├── fib.reference │ │ ├── finaliser.ml │ │ ├── finaliser.reference │ │ ├── gcwords.ml │ │ ├── gcwords.reference │ │ ├── hamming.ml │ │ ├── hamming.reference │ │ ├── nucleic.ml │ │ ├── nucleic.reference │ │ ├── pr7168.ml │ │ ├── pr7168.reference │ │ ├── sieve.ml │ │ ├── sieve.reference │ │ ├── sorts.ml │ │ ├── sorts.reference │ │ ├── takc.ml │ │ ├── takc.reference │ │ ├── taku.ml │ │ ├── taku.reference │ │ ├── weaklifetime.ml │ │ ├── weaklifetime.reference │ │ ├── weaklifetime2.ml │ │ ├── weaklifetime2.reference │ │ ├── weaktest.ml │ │ └── weaktest.reference │ ├── no-alias-deps │ │ ├── Makefile │ │ ├── aliases.cmo.reference │ │ ├── aliases.ml │ │ ├── aliases.ml.reference │ │ ├── b.cmi.pre │ │ ├── c.mli │ │ └── d.mli │ ├── opaque │ │ ├── Makefile │ │ ├── fst │ │ │ ├── opaque_impl.ml │ │ │ ├── opaque_intf.ml │ │ │ └── regular.ml │ │ ├── intf │ │ │ ├── opaque_impl.mli │ │ │ ├── opaque_intf.mli │ │ │ └── regular.mli │ │ ├── snd │ │ │ ├── opaque_impl.ml │ │ │ ├── opaque_intf.ml │ │ │ └── regular.ml │ │ └── test.ml │ ├── output_obj │ │ ├── Makefile.disabled │ │ ├── test.ml │ │ └── test.ml_stub.c │ ├── parsetree │ │ ├── Makefile │ │ ├── source.ml │ │ ├── test.ml │ │ └── test.reference │ ├── parsing │ │ ├── Makefile │ │ ├── attributes.ml │ │ ├── attributes.ml.reference │ │ ├── docstrings.ml │ │ ├── docstrings.ml.reference │ │ ├── extended_indexoperators.ml │ │ ├── extended_indexoperators.ml.reference │ │ ├── extensions.ml │ │ ├── extensions.ml.reference │ │ ├── int_and_float_with_modifier.ml │ │ ├── int_and_float_with_modifier.ml.reference │ │ ├── pr6865.ml │ │ ├── pr6865.ml.reference │ │ ├── pr7165.ml │ │ ├── pr7165.ml.reference │ │ ├── shortcut_ext_attr.ml │ │ └── shortcut_ext_attr.ml.reference │ ├── ppx-attributes │ │ ├── Makefile │ │ ├── warning.ml │ │ └── warning.reference │ ├── ppx-contexts │ │ ├── Makefile │ │ ├── program.ml │ │ ├── test.ml │ │ └── test.reference │ ├── prim-bigstring │ │ ├── Makefile │ │ ├── bigstring_access.ml │ │ ├── bigstring_access.reference │ │ ├── string_access.ml │ │ └── string_access.reference │ ├── prim-bswap │ │ ├── Makefile │ │ ├── bswap.ml │ │ └── bswap.reference │ ├── prim-revapply │ │ ├── Makefile │ │ ├── apply.ml │ │ ├── apply.reference │ │ ├── revapply.ml │ │ └── revapply.reference │ ├── printing-types │ │ ├── Makefile │ │ ├── pr248.ml │ │ └── pr248.ml.reference │ ├── raise-counts │ │ ├── a.ml │ │ ├── b.ml │ │ ├── main.ml │ │ ├── main.reference │ │ └── ocamltests │ ├── regression │ │ ├── missing_set_of_closures │ │ │ ├── Makefile │ │ │ ├── a.ml │ │ │ ├── b.ml │ │ │ ├── b2.ml │ │ │ └── dir │ │ │ │ └── c.ml │ │ ├── pr3612 │ │ │ ├── Makefile │ │ │ ├── custom_finalize.c │ │ │ ├── pr3612.ml │ │ │ └── pr3612.reference │ │ ├── pr5080-notes │ │ │ ├── Makefile │ │ │ └── pr5080_notes_ok.ml │ │ ├── pr5233 │ │ │ ├── Makefile │ │ │ ├── pr5233.ml │ │ │ └── pr5233.reference │ │ ├── pr5757 │ │ │ ├── Makefile │ │ │ ├── pr5757.ml │ │ │ └── pr5757.reference │ │ ├── pr6024 │ │ │ ├── Makefile │ │ │ ├── pr6024.ml │ │ │ └── pr6024.reference │ │ ├── pr7042 │ │ │ ├── Makefile │ │ │ ├── pr7042.ml │ │ │ └── pr7042.reference │ │ └── pr7426 │ │ │ ├── Makefile │ │ │ ├── pr7426.ml │ │ │ └── pr7426.reference │ ├── required-external │ │ ├── Makefile │ │ ├── file.ml │ │ ├── main.ml │ │ └── main.reference │ ├── runtime-C-exceptions │ │ ├── Makefile │ │ ├── stub_test.c │ │ ├── test.ml │ │ └── test.reference │ ├── runtime-errors │ │ ├── Makefile │ │ ├── stackoverflow.bytecode.checker │ │ ├── stackoverflow.bytecode.reference │ │ ├── stackoverflow.ml │ │ ├── stackoverflow.native.checker │ │ ├── stackoverflow.native.reference │ │ ├── syserror.bytecode.checker │ │ ├── syserror.bytecode.reference │ │ ├── syserror.ml │ │ ├── syserror.native.checker │ │ └── syserror.native.reference │ ├── self-contained-toplevel │ │ ├── Makefile │ │ ├── foo.ml │ │ ├── gen_cached_cmi.ml │ │ ├── input.ml │ │ ├── main.ml │ │ └── main.reference │ ├── tool-command-line │ │ ├── Makefile │ │ ├── unknown-file │ │ ├── unknown-file.byte.reference │ │ └── unknown-file.opt.reference │ ├── tool-debugger │ │ ├── basic │ │ │ ├── Makefile │ │ │ ├── debuggee.ml │ │ │ ├── debuggee.reference │ │ │ └── input_script │ │ ├── find-artifacts │ │ │ ├── Makefile │ │ │ ├── debuggee.reference │ │ │ ├── in │ │ │ │ ├── blah.ml │ │ │ │ └── foo.ml │ │ │ └── input_script │ │ └── no_debug_event │ │ │ ├── Makefile │ │ │ ├── a.ml │ │ │ ├── b.ml │ │ │ ├── input_script │ │ │ └── noev.reference │ ├── tool-lexyacc │ │ ├── Makefile │ │ ├── gram_aux.ml │ │ ├── grammar.mly │ │ ├── input │ │ ├── lexgen.ml │ │ ├── main.ml │ │ ├── main.reference │ │ ├── output.ml │ │ ├── scan_aux.ml │ │ ├── scanner.mll │ │ └── syntax.ml │ ├── tool-ocaml │ │ ├── Makefile │ │ ├── lib.ml │ │ ├── t000.ml │ │ ├── t010-const0.ml │ │ ├── t010-const1.ml │ │ ├── t010-const2.ml │ │ ├── t010-const3.ml │ │ ├── t011-constint.ml │ │ ├── t020.ml │ │ ├── t021-pushconst1.ml │ │ ├── t021-pushconst2.ml │ │ ├── t021-pushconst3.ml │ │ ├── t022-pushconstint.ml │ │ ├── t040-makeblock1.ml │ │ ├── t040-makeblock2.ml │ │ ├── t040-makeblock3.ml │ │ ├── t041-makeblock.ml │ │ ├── t050-getglobal.ml │ │ ├── t050-pushgetglobal.ml │ │ ├── t051-getglobalfield.ml │ │ ├── t051-pushgetglobalfield.ml │ │ ├── t060-raise.ml │ │ ├── t070-branch.ml │ │ ├── t070-branchif.ml │ │ ├── t070-branchifnot.ml │ │ ├── t071-boolnot.ml │ │ ├── t080-eq.ml │ │ ├── t080-geint.ml │ │ ├── t080-gtint.ml │ │ ├── t080-leint.ml │ │ ├── t080-ltint.ml │ │ ├── t080-neq.ml │ │ ├── t090-acc0.ml │ │ ├── t090-acc1.ml │ │ ├── t090-acc2.ml │ │ ├── t090-acc3.ml │ │ ├── t090-acc4.ml │ │ ├── t090-acc5.ml │ │ ├── t090-acc6.ml │ │ ├── t090-acc7.ml │ │ ├── t091-acc.ml │ │ ├── t092-pushacc.ml │ │ ├── t092-pushacc0.ml │ │ ├── t092-pushacc1.ml │ │ ├── t092-pushacc2.ml │ │ ├── t092-pushacc3.ml │ │ ├── t092-pushacc4.ml │ │ ├── t092-pushacc5.ml │ │ ├── t092-pushacc6.ml │ │ ├── t092-pushacc7.ml │ │ ├── t093-pushacc.ml │ │ ├── t100-pushtrap.ml │ │ ├── t101-poptrap.ml │ │ ├── t110-addint.ml │ │ ├── t110-andint.ml │ │ ├── t110-asrint-1.ml │ │ ├── t110-asrint-2.ml │ │ ├── t110-divint-1.ml │ │ ├── t110-divint-2.ml │ │ ├── t110-divint-3.ml │ │ ├── t110-lslint.ml │ │ ├── t110-lsrint.ml │ │ ├── t110-modint-1.ml │ │ ├── t110-modint-2.ml │ │ ├── t110-mulint.ml │ │ ├── t110-negint.ml │ │ ├── t110-offsetint.ml │ │ ├── t110-orint.ml │ │ ├── t110-subint.ml │ │ ├── t110-xorint.ml │ │ ├── t120-getstringchar.ml │ │ ├── t121-setstringchar.ml │ │ ├── t130-getvectitem.ml │ │ ├── t130-vectlength.ml │ │ ├── t131-setvectitem.ml │ │ ├── t140-switch-1.ml │ │ ├── t140-switch-2.ml │ │ ├── t140-switch-3.ml │ │ ├── t140-switch-4.ml │ │ ├── t141-switch-5.ml │ │ ├── t141-switch-6.ml │ │ ├── t141-switch-7.ml │ │ ├── t142-switch-8.ml │ │ ├── t142-switch-9.ml │ │ ├── t142-switch-A.ml │ │ ├── t150-push-1.ml │ │ ├── t150-push-2.ml │ │ ├── t160-closure.ml │ │ ├── t161-apply1.ml │ │ ├── t162-return.ml │ │ ├── t163.ml │ │ ├── t164-apply2.ml │ │ ├── t164-apply3.ml │ │ ├── t165-apply.ml │ │ ├── t170-envacc2.ml │ │ ├── t170-envacc3.ml │ │ ├── t170-envacc4.ml │ │ ├── t171-envacc.ml │ │ ├── t172-pushenvacc1.ml │ │ ├── t172-pushenvacc2.ml │ │ ├── t172-pushenvacc3.ml │ │ ├── t172-pushenvacc4.ml │ │ ├── t173-pushenvacc.ml │ │ ├── t180-appterm1.ml │ │ ├── t180-appterm2.ml │ │ ├── t180-appterm3.ml │ │ ├── t181-appterm.ml │ │ ├── t190-makefloatblock-1.ml │ │ ├── t190-makefloatblock-2.ml │ │ ├── t190-makefloatblock-3.ml │ │ ├── t191-vectlength.ml │ │ ├── t192-getfloatfield-1.ml │ │ ├── t192-getfloatfield-2.ml │ │ ├── t193-setfloatfield-1.ml │ │ ├── t193-setfloatfield-2.ml │ │ ├── t200-getfield0.ml │ │ ├── t200-getfield1.ml │ │ ├── t200-getfield2.ml │ │ ├── t200-getfield3.ml │ │ ├── t201-getfield.ml │ │ ├── t210-setfield0.ml │ │ ├── t210-setfield1.ml │ │ ├── t210-setfield2.ml │ │ ├── t210-setfield3.ml │ │ ├── t211-setfield.ml │ │ ├── t220-assign.ml │ │ ├── t230-check_signals.ml │ │ ├── t240-c_call1.ml │ │ ├── t240-c_call2.ml │ │ ├── t240-c_call3.ml │ │ ├── t240-c_call4.ml │ │ ├── t240-c_call5.ml │ │ ├── t250-closurerec-1.ml │ │ ├── t250-closurerec-2.ml │ │ ├── t251-pushoffsetclosure0.ml │ │ ├── t251-pushoffsetclosure2.ml │ │ ├── t251-pushoffsetclosurem2.ml │ │ ├── t252-pushoffsetclosure.ml │ │ ├── t253-offsetclosure0.ml │ │ ├── t253-offsetclosure2.ml │ │ ├── t253-offsetclosurem2.ml │ │ ├── t254-offsetclosure.ml │ │ ├── t260-offsetref.ml │ │ ├── t270-push_retaddr.ml │ │ ├── t300-getmethod.ml │ │ ├── t301-object.ml │ │ ├── t310-alloc-1.ml │ │ ├── t310-alloc-2.ml │ │ ├── t320-gc-1.ml │ │ ├── t320-gc-2.ml │ │ ├── t320-gc-3.ml │ │ ├── t330-compact-1.ml │ │ ├── t330-compact-2.ml │ │ ├── t330-compact-3.ml │ │ ├── t330-compact-4.ml │ │ ├── t340-weak.ml │ │ ├── t350-heapcheck.ml │ │ ├── t360-stacks-1.ml │ │ └── t360-stacks-2.ml │ ├── tool-ocamlc-compat32 │ │ ├── Makefile │ │ ├── a.ml │ │ └── test.reference │ ├── tool-ocamlc-open │ │ ├── Makefile │ │ ├── a.ml │ │ └── b.ml │ ├── tool-ocamldep-modalias │ │ ├── A.ml │ │ ├── B.ml │ │ ├── C.ml │ │ ├── D.ml │ │ ├── Makefile │ │ ├── Makefile.build │ │ ├── Makefile.build2 │ │ ├── depend.mk.reference │ │ ├── depend.mk2.reference │ │ ├── depend.mod.reference │ │ ├── depend.mod2.reference │ │ ├── depend.mod3.reference │ │ ├── lib.mli │ │ ├── lib_impl.ml │ │ └── main.ml │ ├── tool-ocamldoc-2 │ │ ├── Makefile │ │ ├── extensible_variant.ml │ │ ├── extensible_variant.reference │ │ ├── inline_records.mli │ │ ├── inline_records.reference │ │ ├── inline_records_bis.ml │ │ ├── inline_records_bis.reference │ │ ├── level_0.mli │ │ ├── level_0.reference │ │ ├── loop.ml │ │ ├── loop.reference │ │ ├── short_description.reference │ │ ├── short_description.txt │ │ ├── test.mli │ │ ├── test.reference │ │ ├── variants.mli │ │ └── variants.reference │ ├── tool-ocamldoc-html │ │ ├── Documentation_tags.mli │ │ ├── Documentation_tags.reference │ │ ├── Inline_records.mli │ │ ├── Inline_records.reference │ │ ├── Item_ids.mli │ │ ├── Item_ids.reference │ │ ├── Linebreaks.mli │ │ ├── Linebreaks.reference │ │ ├── Loop.ml │ │ ├── Loop.reference │ │ ├── Makefile │ │ ├── Module_whitespace.ml │ │ ├── Module_whitespace.reference │ │ ├── No_preamble.mli │ │ ├── No_preamble.reference │ │ ├── Paragraph.mli │ │ ├── Paragraph.reference │ │ ├── Variants.mli │ │ ├── Variants.reference │ │ └── type_Linebreaks.reference │ ├── tool-ocamldoc-man │ │ ├── Inline_records.mli │ │ ├── Inline_records.reference │ │ └── Makefile │ ├── tool-ocamldoc-open │ │ ├── Makefile │ │ ├── Readme │ │ ├── alias.ml │ │ ├── doc.reference │ │ ├── inner.ml │ │ └── main.ml │ ├── tool-ocamldoc │ │ ├── Makefile │ │ ├── odoc_test.ml │ │ ├── t01.ml │ │ ├── t01.reference │ │ ├── t02.ml │ │ ├── t02.reference │ │ ├── t03.ml │ │ ├── t03.reference │ │ ├── t04.ml │ │ ├── t04.reference │ │ ├── t05.ml │ │ └── t05.reference │ ├── tool-ocamlobjinfo │ │ ├── Makefile │ │ ├── question.ml │ │ └── test.reference │ ├── tool-toplevel-invocation │ │ ├── Makefile │ │ ├── first_arg_fail.txt │ │ ├── first_arg_fail.txt.reference │ │ ├── indirect_first_arg_fail.txt │ │ ├── indirect_first_arg_fail.txt.reference │ │ ├── indirect_last_arg_fail.txt │ │ ├── indirect_last_arg_fail.txt.reference │ │ ├── last_arg_fail.txt │ │ ├── last_arg_fail.txt.reference │ │ ├── test.ml │ │ ├── working_arg.txt │ │ └── working_arg.txt.reference │ ├── tool-toplevel │ │ ├── Makefile │ │ ├── exotic_lists.ml │ │ ├── exotic_lists.ml.reference │ │ ├── pr7060.ml │ │ ├── pr7060.ml.reference │ │ ├── strings.ml │ │ ├── strings.ml.reference │ │ ├── tracing.ml │ │ └── tracing.ml.reference │ ├── translprim │ │ ├── Makefile │ │ ├── array_spec.ml │ │ ├── array_spec.ml.reference-flat │ │ ├── array_spec.ml.reference-noflat │ │ ├── comparison_table.ml │ │ ├── comparison_table.ml.reference │ │ ├── module_coercion.ml │ │ ├── module_coercion.ml.reference-flat │ │ ├── module_coercion.ml.reference-noflat │ │ ├── ref_spec.ml │ │ └── ref_spec.ml.reference │ ├── typing-deprecated │ │ ├── Makefile │ │ └── deprecated.ml │ ├── typing-extension-constructor │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.ml.reference │ ├── typing-extensions │ │ ├── Makefile │ │ ├── cast.ml │ │ ├── cast.ml.reference │ │ ├── extensions.ml │ │ ├── extensions.ml.reference │ │ ├── msg.ml │ │ ├── msg.ml.reference │ │ ├── open_types.ml │ │ └── open_types.ml.reference │ ├── typing-fstclassmod │ │ ├── Makefile │ │ ├── fstclassmod.ml │ │ └── fstclassmod.reference │ ├── typing-gadts │ │ ├── Makefile │ │ ├── didier.ml │ │ ├── dynamic_frisch.ml │ │ ├── nested_equations.ml │ │ ├── omega07.ml │ │ ├── pr5332.ml │ │ ├── pr5689.ml │ │ ├── pr5785.ml │ │ ├── pr5848.ml │ │ ├── pr5906.ml │ │ ├── pr5948.ml │ │ ├── pr5981.ml │ │ ├── pr5985.ml │ │ ├── pr5989.ml │ │ ├── pr5997.ml │ │ ├── pr6158.ml │ │ ├── pr6163.ml │ │ ├── pr6174.ml │ │ ├── pr6241.ml │ │ ├── pr6690.ml │ │ ├── pr6817.ml │ │ ├── pr6934.ml │ │ ├── pr6980.ml │ │ ├── pr6993_bad.ml │ │ ├── pr7016.ml │ │ ├── pr7160.ml │ │ ├── pr7214.ml │ │ ├── pr7222.ml │ │ ├── pr7230.ml │ │ ├── pr7234.ml │ │ ├── pr7260.ml │ │ ├── pr7269.ml │ │ ├── pr7298.ml │ │ ├── pr7374.ml │ │ ├── pr7378.ml │ │ ├── pr7381.ml │ │ ├── pr7390.ml │ │ ├── pr7391.ml │ │ ├── pr7397.ml │ │ ├── pr7421.ml │ │ ├── pr7432.ml │ │ ├── pr7518.ml │ │ ├── term-conv.ml │ │ ├── test.ml │ │ ├── unify_mb.ml │ │ └── yallop_bugs.ml │ ├── typing-immediate │ │ ├── Makefile │ │ └── immediate.ml │ ├── typing-implicit_unpack │ │ ├── Makefile │ │ ├── implicit_unpack.ml │ │ └── implicit_unpack.ml.reference │ ├── typing-labels │ │ ├── Makefile │ │ ├── mixin.ml │ │ ├── mixin.reference │ │ ├── mixin2.ml │ │ ├── mixin2.reference │ │ ├── mixin3.ml │ │ └── mixin3.reference │ ├── typing-misc-bugs │ │ ├── Makefile │ │ ├── core_array_reduced_ok.ml │ │ ├── pr6303_bad.ml │ │ └── pr6946_bad.ml │ ├── typing-misc │ │ ├── Makefile │ │ ├── constraints.ml │ │ ├── labels.ml │ │ ├── occur_check.ml │ │ ├── polyvars.ml │ │ ├── pr6939.ml-flat │ │ ├── pr6939.ml-noflat │ │ ├── pr7103.ml │ │ ├── pr7228.ml │ │ ├── printing.ml │ │ ├── records.ml │ │ ├── variant.ml │ │ └── wellfounded.ml │ ├── typing-missing-cmi │ │ ├── Makefile │ │ ├── a.ml │ │ ├── b.ml │ │ ├── c.ml │ │ ├── main.ml │ │ ├── main.ml.reference │ │ ├── main_ok.ml │ │ └── subdir │ │ │ └── m.ml │ ├── typing-modules-bugs │ │ ├── Makefile │ │ ├── gatien_baron_20131019_ok.ml │ │ ├── pr5164_ok.ml │ │ ├── pr51_ok.ml │ │ ├── pr5663_ok.ml │ │ ├── pr5914_ok.ml │ │ ├── pr6240_ok.ml │ │ ├── pr6293_bad.ml │ │ ├── pr6427_bad.ml │ │ ├── pr6485_ok.ml │ │ ├── pr6513_ok.ml │ │ ├── pr6572_ok.ml │ │ ├── pr6651_ok.ml │ │ ├── pr6752_bad.ml │ │ ├── pr6752_ok.ml │ │ ├── pr6899_first_bad.ml │ │ ├── pr6899_ok.ml │ │ ├── pr6899_second_bad.ml │ │ ├── pr6944_ok.ml │ │ ├── pr6954_ok.ml │ │ ├── pr6981_ok.ml │ │ ├── pr6982_ok.ml │ │ ├── pr6985_ok.ml │ │ ├── pr6992_bad.ml │ │ ├── pr7036_ok.ml │ │ ├── pr7082_ok.ml │ │ ├── pr7112_bad.ml │ │ ├── pr7112_ok.ml │ │ ├── pr7152_ok.ml │ │ ├── pr7182_ok.ml │ │ ├── pr7305_principal.ml │ │ ├── pr7321_ok.ml │ │ ├── pr7414_bad.ml │ │ ├── pr7519_ok.ml │ │ ├── pr7601_ok.ml │ │ └── pr7601a_ok.ml │ ├── typing-modules │ │ ├── Makefile │ │ ├── Test.ml │ │ ├── aliases.ml │ │ ├── firstclass.ml │ │ ├── generative.ml │ │ ├── pr5911.ml │ │ ├── pr7207.ml │ │ ├── pr7348.ml │ │ ├── printing.ml │ │ └── recursive.ml │ ├── typing-multifile │ │ └── Makefile │ ├── typing-objects-bugs │ │ ├── Makefile │ │ ├── pr3968_bad.ml │ │ ├── pr4018_bad.ml │ │ ├── pr4435_bad.ml │ │ ├── pr4766_ok.ml │ │ ├── pr4824_ok.ml │ │ ├── pr4824a_bad.ml │ │ ├── pr5156_ok.ml │ │ ├── pr7284_bad.ml │ │ ├── pr7293_ok.ml │ │ ├── woodyatt_ok.ml │ │ └── yamagata021012_ok.ml │ ├── typing-objects │ │ ├── Exemples.ml │ │ ├── Exemples.ml.principal.reference │ │ ├── Exemples.ml.reference │ │ ├── Makefile │ │ ├── Tests.ml │ │ ├── Tests.ml.principal.reference │ │ ├── Tests.ml.reference │ │ ├── open_in_classes.ml │ │ ├── open_in_classes.ml.reference │ │ ├── pr5545.ml │ │ ├── pr5545.ml.principal.reference │ │ ├── pr5545.ml.reference │ │ ├── pr5619_bad.ml │ │ ├── pr5619_bad.ml.principal.reference │ │ ├── pr5619_bad.ml.reference │ │ ├── pr5858.ml │ │ ├── pr5858.ml.reference │ │ ├── pr6123_bad.ml │ │ ├── pr6123_bad.ml.principal.reference │ │ ├── pr6123_bad.ml.reference │ │ ├── pr6383.ml │ │ ├── pr6383.ml.reference │ │ ├── pr6907_bad.ml │ │ └── pr6907_bad.ml.reference │ ├── typing-ocamlc-i │ │ ├── Makefile │ │ └── pr7620_bad.ml │ ├── typing-pattern_open │ │ ├── Makefile │ │ ├── pattern_open.ml │ │ └── pattern_open.ml.reference │ ├── typing-poly-bugs │ │ ├── Makefile │ │ ├── pr5322_ok.ml │ │ ├── pr5673_bad.ml │ │ └── pr5673_ok.ml │ ├── typing-poly │ │ ├── Makefile │ │ └── poly.ml │ ├── typing-polyvariants-bugs-2 │ │ ├── Makefile │ │ ├── pr3918a.mli │ │ ├── pr3918b.mli │ │ └── pr3918c.ml │ ├── typing-polyvariants-bugs │ │ ├── Makefile │ │ ├── pr4775_ok.ml │ │ ├── pr4933_ok.ml │ │ ├── pr5057_ok.ml │ │ ├── pr5057a_bad.ml │ │ ├── pr7199_ok.ml │ │ └── privrowsabate_ok.ml │ ├── typing-private-bugs │ │ ├── Makefile │ │ ├── pr5026_bad.ml │ │ └── pr5469_ok.ml │ ├── typing-private │ │ ├── Makefile │ │ ├── private.ml │ │ ├── private.ml.principal.reference │ │ └── private.ml.reference │ ├── typing-recmod │ │ ├── Makefile │ │ ├── t01bad.ml │ │ ├── t02bad.ml │ │ ├── t03ok.ml │ │ ├── t04bad.ml │ │ ├── t05bad.ml │ │ ├── t06ok.ml │ │ ├── t07bad.ml │ │ ├── t08bad.ml │ │ ├── t09bad.ml │ │ ├── t10ok.ml │ │ ├── t11bad.ml │ │ ├── t12bad.ml │ │ ├── t13ok.ml │ │ ├── t14bad.ml │ │ ├── t15bad.ml │ │ ├── t16ok.ml │ │ ├── t17ok.ml │ │ ├── t18ok.ml │ │ ├── t19ok.ml │ │ ├── t20ok.ml │ │ ├── t21ok.ml │ │ ├── t22ok.ml │ │ └── t22ok.mli │ ├── typing-recordarg │ │ ├── Makefile │ │ ├── recordarg.ml │ │ └── recordarg.ml.reference │ ├── typing-rectypes-bugs │ │ ├── Makefile │ │ ├── pr5343_bad.ml │ │ ├── pr6174_bad.ml │ │ └── pr6870_bad.ml │ ├── typing-safe-linking │ │ ├── Makefile │ │ ├── a.ml │ │ └── b_bad.ml │ ├── typing-short-paths │ │ ├── Makefile │ │ ├── gpr1223.ml │ │ ├── gpr1223.ml.reference │ │ ├── gpr1223_bar.mli │ │ ├── gpr1223_foo.mli │ │ ├── pr5918.ml │ │ ├── pr5918.ml.reference │ │ ├── pr6836.ml │ │ ├── pr6836.ml.reference │ │ ├── pr7543.ml │ │ ├── pr7543.ml.reference │ │ ├── short-paths.ml │ │ └── short-paths.ml.reference │ ├── typing-signatures │ │ ├── Makefile │ │ ├── els.ml │ │ ├── els.ml.reference │ │ ├── pr6371.ml │ │ ├── pr6371.ml.reference │ │ ├── pr6672.ml │ │ └── pr6672.ml.reference │ ├── typing-sigsubst │ │ ├── Makefile │ │ └── sigsubst.ml │ ├── typing-typeparam │ │ ├── Makefile │ │ ├── newtype.ml │ │ └── newtype.ml.reference │ ├── typing-unboxed-types │ │ ├── Makefile │ │ ├── test.ml │ │ ├── test.ml.reference-flat │ │ └── test.ml.reference-noflat │ ├── typing-unboxed │ │ ├── Makefile │ │ ├── test.ml │ │ └── test.ml.reference │ ├── typing-warnings │ │ ├── Makefile │ │ ├── ambiguous_guarded_disjunction.ml │ │ ├── ambiguous_guarded_disjunction.ml.reference │ │ ├── application.ml │ │ ├── application.ml.reference │ │ ├── coercions.ml │ │ ├── coercions.ml.principal.reference │ │ ├── coercions.ml.reference │ │ ├── exhaustiveness.ml │ │ ├── exhaustiveness.ml.reference │ │ ├── pr5892.ml │ │ ├── pr5892.ml.reference │ │ ├── pr6587.ml │ │ ├── pr6587.ml.reference │ │ ├── pr6872.ml │ │ ├── pr6872.ml.principal.reference │ │ ├── pr6872.ml.reference │ │ ├── pr7085.ml │ │ ├── pr7085.ml.reference │ │ ├── pr7115.ml │ │ ├── pr7115.ml.reference │ │ ├── pr7261.ml │ │ ├── pr7261.ml.reference │ │ ├── pr7297.ml │ │ ├── pr7297.ml.reference │ │ ├── pr7553.ml │ │ ├── pr7553.ml.reference │ │ ├── records.ml │ │ ├── records.ml.principal.reference │ │ ├── records.ml.reference │ │ ├── unused_types.ml │ │ └── unused_types.ml.reference │ ├── unboxed-primitive-args │ │ ├── Makefile │ │ ├── README │ │ ├── common.ml │ │ ├── common.mli │ │ ├── gen_test.ml │ │ ├── main.reference │ │ ├── test_common.c │ │ └── test_common.h │ ├── unwind │ │ ├── Makefile │ │ ├── README │ │ ├── driver.ml │ │ ├── mylib.ml │ │ ├── mylib.mli │ │ └── stack_walker.c │ ├── utils │ │ ├── Makefile │ │ ├── edit_distance.ml │ │ ├── edit_distance.reference │ │ ├── test_strongly_connected_components.ml │ │ └── test_strongly_connected_components.reference │ ├── warnings │ │ ├── Makefile │ │ ├── deprecated_module.ml │ │ ├── deprecated_module.mli │ │ ├── deprecated_module.reference │ │ ├── deprecated_module_assigment.ml │ │ ├── deprecated_module_assigment.reference │ │ ├── deprecated_module_use.ml │ │ ├── deprecated_module_use.reference │ │ ├── module_without_cmx.mli │ │ ├── w01.ml │ │ ├── w01.reference │ │ ├── w04.ml │ │ ├── w04.reference │ │ ├── w04_failure.ml │ │ ├── w04_failure.reference │ │ ├── w06.ml │ │ ├── w06.reference │ │ ├── w32.ml │ │ ├── w32.mli │ │ ├── w32.reference │ │ ├── w33.ml │ │ ├── w33.reference │ │ ├── w45.ml │ │ ├── w45.reference │ │ ├── w47_inline.ml │ │ ├── w47_inline.reference │ │ ├── w50.ml │ │ ├── w50.reference │ │ ├── w51.ml │ │ ├── w51.reference │ │ ├── w51_bis.ml │ │ ├── w51_bis.reference │ │ ├── w53.ml │ │ ├── w53.reference │ │ ├── w54.ml │ │ ├── w54.reference │ │ ├── w55.opt_backend.clambda.opt_reference │ │ ├── w55.opt_backend.flambda.opt_reference │ │ ├── w55.opt_backend.ml │ │ ├── w55.opt_backend.reference │ │ ├── w58.opt.ml │ │ ├── w58.opt.opt_reference │ │ ├── w58.opt.reference │ │ ├── w59.opt_backend.clambda.opt_reference │ │ ├── w59.opt_backend.flambda.opt_reference │ │ ├── w59.opt_backend.ml │ │ ├── w59.opt_backend.reference │ │ ├── w60.ml │ │ ├── w60.mli │ │ └── w60.reference │ └── win-unicode │ │ ├── Makefile │ │ ├── exec_tests.ml │ │ ├── exec_tests.precheck │ │ ├── exec_tests.reference │ │ ├── mkfiles.c │ │ ├── mltest.ml │ │ ├── mltest.reference │ │ ├── printargv.c │ │ ├── printenv.c │ │ ├── symlink_tests.ml │ │ └── symlink_tests.reference ├── tools │ ├── Makefile │ └── expect_test.ml └── typing ├── tools ├── .depend ├── Makefile ├── Makefile.nt ├── addlabels.ml ├── check-symbol-names ├── check-typo ├── checkstack.c ├── ci-build ├── ci-build-other-configs ├── cmpbyt.ml ├── cmt2annot.ml ├── cvt_emit.mll ├── dumpobj.ml ├── eqparsetree.ml ├── gdb-macros ├── lexer299.mll ├── lexer301.mll ├── lintapidiff.ml ├── magic ├── make-package-macosx ├── make-version-header.sh ├── make_opcodes.mll ├── msvs-promote-path ├── objinfo.ml ├── objinfo_helper.c ├── ocaml-instr-graph ├── ocaml-instr-report ├── ocaml-objcopy-macosx ├── ocaml299to3.ml ├── ocamlcp.ml ├── ocamldep.ml ├── ocamlmklib.ml ├── ocamlmktop.ml ├── ocamloptp.ml ├── ocamlprof.ml ├── ocamlsize ├── primreq.ml ├── profiling.ml ├── profiling.mli ├── read_cmt.ml ├── scrapelabels.ml └── stripdebug.ml ├── toplevel ├── expunge.ml ├── genprintval.ml ├── genprintval.mli ├── opttopdirs.ml ├── opttopdirs.mli ├── opttoploop.ml ├── opttoploop.mli ├── opttopmain.ml ├── opttopmain.mli ├── opttopstart.ml ├── topdirs.ml ├── topdirs.mli ├── toploop.ml ├── toploop.mli ├── topmain.ml ├── topmain.mli ├── topstart.ml ├── trace.ml └── trace.mli ├── typing ├── HACKING.adoc ├── annot.mli ├── btype.ml ├── btype.mli ├── cmi_format.ml ├── cmi_format.mli ├── cmt_format.ml ├── cmt_format.mli ├── ctype.ml ├── ctype.mli ├── datarepr.ml ├── datarepr.mli ├── env.ml ├── env.mli ├── envaux.ml ├── envaux.mli ├── ident.ml ├── ident.mli ├── includeclass.ml ├── includeclass.mli ├── includecore.ml ├── includecore.mli ├── includemod.ml ├── includemod.mli ├── mtype.ml ├── mtype.mli ├── oprint.ml ├── oprint.mli ├── outcometree.mli ├── parmatch.ml ├── parmatch.mli ├── path.ml ├── path.mli ├── predef.ml ├── predef.mli ├── primitive.ml ├── primitive.mli ├── printtyp.ml ├── printtyp.mli ├── printtyped.ml ├── printtyped.mli ├── stypes.ml ├── stypes.mli ├── subst.ml ├── subst.mli ├── tast_mapper.ml ├── tast_mapper.mli ├── typeclass.ml ├── typeclass.mli ├── typecore.ml ├── typecore.mli ├── typedecl.ml ├── typedecl.mli ├── typedtree.ml ├── typedtree.mli ├── typedtreeIter.ml ├── typedtreeIter.mli ├── typedtreeMap.ml ├── typedtreeMap.mli ├── typemod.ml ├── typemod.mli ├── typeopt.ml ├── typeopt.mli ├── types.ml ├── types.mli ├── typetexp.ml ├── typetexp.mli ├── untypeast.ml └── untypeast.mli ├── utils ├── arg_helper.ml ├── arg_helper.mli ├── ccomp.ml ├── ccomp.mli ├── clflags.ml ├── clflags.mli ├── config.mli ├── config.mlp ├── consistbl.ml ├── consistbl.mli ├── identifiable.ml ├── identifiable.mli ├── misc.ml ├── misc.mli ├── numbers.ml ├── numbers.mli ├── profile.ml ├── profile.mli ├── strongly_connected_components.ml ├── strongly_connected_components.mli ├── targetint.ml ├── targetint.mli ├── tbl.ml ├── tbl.mli ├── terminfo.ml ├── terminfo.mli ├── warnings.ml └── warnings.mli └── yacc ├── Makefile ├── Makefile.nt ├── closure.c ├── defs.h ├── error.c ├── lalr.c ├── lr0.c ├── main.c ├── mkpar.c ├── output.c ├── reader.c ├── skeleton.c ├── symtab.c ├── verbose.c └── warshall.c /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "flexdll"] 2 | path = flexdll 3 | url = https://github.com/alainfrisch/flexdll.git 4 | -------------------------------------------------------------------------------- /.ocp-indent: -------------------------------------------------------------------------------- 1 | match_clause=4 2 | strict_with=auto 3 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 4.06.2+dev0-2018-02-16 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 | -------------------------------------------------------------------------------- /asmcomp/afl_instrument.mli: -------------------------------------------------------------------------------- 1 | (* Instrumentation for afl-fuzz *) 2 | 3 | val instrument_function : Cmm.expression -> Cmm.expression 4 | val instrument_initialiser : Cmm.expression -> Cmm.expression 5 | -------------------------------------------------------------------------------- /asmcomp/arm64/NOTES.md: -------------------------------------------------------------------------------- 1 | # Supported platforms 2 | 3 | ARMv8 in 64-bit mode (AArch64). 4 | 5 | Debian architecture name: `arm64`. 6 | 7 | # Reference documents 8 | 9 | * Instruction set architecture: 10 | _ARM Architecture Reference Manual, ARMv8_, restricted to the AArch64 subset. 11 | * Application binary interface: 12 | _Procedure Call Standard for the ARM 64-bit Architecture (AArch64)_ 13 | -------------------------------------------------------------------------------- /boot/ocamlc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/boot/ocamlc -------------------------------------------------------------------------------- /boot/ocamldep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/boot/ocamldep -------------------------------------------------------------------------------- /boot/ocamllex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/boot/ocamllex -------------------------------------------------------------------------------- /compilerlibs/.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore is here to force git to create the compilerlibs directory 2 | # because git doesn't create empty directories. 3 | # The lines tell git to ignore everything in this directory except 4 | # the .gitignore file itself. 5 | 6 | * 7 | !.gitignore 8 | -------------------------------------------------------------------------------- /config/auto-aux/cfi.S: -------------------------------------------------------------------------------- 1 | camlPervasives__loop_1128: 2 | .file 1 "pervasives.ml" 3 | .loc 1 193 4 | .cfi_startproc 5 | .cfi_adjust_cfa_offset 8 6 | .cfi_endproc 7 | -------------------------------------------------------------------------------- /config/auto-aux/hashbang: -------------------------------------------------------------------------------- 1 | #! /bin/cat 2 | exit 1 3 | -------------------------------------------------------------------------------- /config/auto-aux/hashbang2: -------------------------------------------------------------------------------- 1 | #! /usr/bin/cat 2 | exit 1 3 | -------------------------------------------------------------------------------- /config/auto-aux/hashbang3: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env cat 2 | exit 1 3 | -------------------------------------------------------------------------------- /experimental/frisch/test_copy_typedef.ml: -------------------------------------------------------------------------------- 1 | module type S = [%copy_typedef] 2 | 3 | module type T = sig 4 | type t 5 | 6 | module type M = [%copy_typedef] 7 | end 8 | 9 | module M = struct 10 | type t = [%copy_typedef] 11 | end 12 | 13 | type t = [%copy_typedef] 14 | 15 | let _x = M.A 16 | let _y : t = [1; 2] 17 | 18 | 19 | type _loc = [%copy_typedef "../../parsing/location.mli" t] 20 | -------------------------------------------------------------------------------- /experimental/frisch/test_copy_typedef.mli: -------------------------------------------------------------------------------- 1 | module type S = sig 2 | type t 3 | val x: int 4 | end 5 | 6 | module type T = sig 7 | type t 8 | 9 | module type M = sig 10 | type t = A | B of t 11 | end 12 | end 13 | 14 | module M : sig 15 | type t = 16 | | A 17 | | B of string 18 | end 19 | 20 | type t = int list 21 | -------------------------------------------------------------------------------- /experimental/frisch/test_matches.ml: -------------------------------------------------------------------------------- 1 | let l = List.filter [%matches ? 'a'..'z'] ['a';'A';'X';'x'] 2 | 3 | let f = [%matches ? Some i when i >= 0] 4 | -------------------------------------------------------------------------------- /experimental/garrigue/.cvsignore: -------------------------------------------------------------------------------- 1 | *.out 2 | *.out2 3 | -------------------------------------------------------------------------------- /experimental/garrigue/dirs_multimatch: -------------------------------------------------------------------------------- 1 | parsing typing bytecomp driver toplevel 2 | -------------------------------------------------------------------------------- /experimental/garrigue/dirs_poly: -------------------------------------------------------------------------------- 1 | bytecomp byterun driver parsing stdlib tools toplevel typing utils 2 | -------------------------------------------------------------------------------- /experimental/garrigue/printers.ml: -------------------------------------------------------------------------------- 1 | (* $Id$ *) 2 | 3 | open Types 4 | 5 | let ignore_abbrevs ppf ab = 6 | let s = match ab with 7 | Mnil -> "Mnil" 8 | | Mlink _ -> "Mlink _" 9 | | Mcons _ -> "Mcons _" 10 | in 11 | Format.pp_print_string ppf s 12 | -------------------------------------------------------------------------------- /experimental/garrigue/variable-names.ml: -------------------------------------------------------------------------------- 1 | let f (x : < a:int; .. > as 'me1) = (x : < b:bool; .. > as 'me2);; 2 | let f (x : < a:int; .. > as 'me1) = (x : < a:int; b:bool; .. > as 'me2);; 3 | let f (x : [> `A of int] as 'me1) = (x : [> `B of bool] as 'me2);; 4 | let f (x : [> `A of int] as 'me1) = (x : [`A of int | `B of 'me2] as 'me2);; 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /manual/manual/allfiles.etex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/allfiles.etex -------------------------------------------------------------------------------- /manual/manual/biblio.etex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/biblio.etex -------------------------------------------------------------------------------- /manual/manual/cmds/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | warnings.etex 4 | -------------------------------------------------------------------------------- /manual/manual/cmds/browser.etex: -------------------------------------------------------------------------------- 1 | \chapter{The browser/editor (ocamlbrowser)} \label{c:browser} 2 | \pdfchapter{The browser/editor (ocamlbrowser)} 3 | %HEVEA\cutname{browser.html} 4 | 5 | Since OCaml version 4.02, the OCamlBrowser tool and the Labltk library 6 | are distributed separately from the OCaml compiler. The project is now 7 | hosted at \url{https://forge.ocamlcore.org/projects/labltk/}. 8 | -------------------------------------------------------------------------------- /manual/manual/cmds/ocamlbuild.etex: -------------------------------------------------------------------------------- 1 | \chapter{The ocamlbuild compilation manager} \label{c:ocamlbuild} 2 | \pdfchapter{The ocamlbuild compilation manager} 3 | 4 | Since OCaml version 4.03, the ocamlbuild compilation manager is 5 | distributed separately from the OCaml compiler. The project is now 6 | hosted at \url{https://github.com/ocaml/ocamlbuild/}. 7 | -------------------------------------------------------------------------------- /manual/manual/htmlman/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.haux 3 | *.hind 4 | libref 5 | manual.hmanual 6 | manual.hmanual.kwd 7 | manual.css 8 | *.htoc 9 | -------------------------------------------------------------------------------- /manual/manual/htmlman/contents_motif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/htmlman/contents_motif.gif -------------------------------------------------------------------------------- /manual/manual/htmlman/libgraph.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/htmlman/libgraph.gif -------------------------------------------------------------------------------- /manual/manual/htmlman/next_motif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/htmlman/next_motif.gif -------------------------------------------------------------------------------- /manual/manual/htmlman/previous_motif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/htmlman/previous_motif.gif -------------------------------------------------------------------------------- /manual/manual/infoman/.gitignore: -------------------------------------------------------------------------------- 1 | *.haux 2 | *.hind 3 | *.info*.gz 4 | *.info.body* 5 | ocaml.hocaml.kwd 6 | -------------------------------------------------------------------------------- /manual/manual/library/.cvsignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | arithstatus.mli 4 | ocamldoc.out 5 | ocamldoc.sty 6 | -------------------------------------------------------------------------------- /manual/manual/library/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | arithstatus.mli 4 | ocamldoc.out 5 | ocamldoc.sty 6 | -------------------------------------------------------------------------------- /manual/manual/library/libgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/library/libgraph.png -------------------------------------------------------------------------------- /manual/manual/macros.hva: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/macros.hva -------------------------------------------------------------------------------- /manual/manual/manual.hva: -------------------------------------------------------------------------------- 1 | \input{book.hva} 2 | \input{fancysection.hva} 3 | \input{macros.hva} 4 | \newif\ifouthtml\outhtmltrue -------------------------------------------------------------------------------- /manual/manual/manual.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/manual.inf -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /manual/manual/plaintext.tex: -------------------------------------------------------------------------------- 1 | \documentclass[11pt]{report} 2 | 3 | \usepackage{plaintext} 4 | \usepackage[latin1]{inputenc} 5 | \usepackage{alltt} 6 | \usepackage{fullpage} 7 | \usepackage{syntaxdef} 8 | \usepackage{multind} 9 | \usepackage{html} 10 | \usepackage{caml-sl} 11 | 12 | \newif\ifplaintext 13 | \plaintexttrue 14 | %\newif\ifpdf 15 | %\pdffalse 16 | \input macros.tex 17 | \input allfiles.tex 18 | -------------------------------------------------------------------------------- /manual/manual/refman/.cvsignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | -------------------------------------------------------------------------------- /manual/manual/refman/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | -------------------------------------------------------------------------------- /manual/manual/texstuff/.cvsignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.dvi 3 | *.idx 4 | *.ilg 5 | *.ind 6 | *.log 7 | *.toc 8 | *.ipr 9 | *.txt 10 | *.pdf 11 | *.ps 12 | pdfmanual.out 13 | manual.out 14 | -------------------------------------------------------------------------------- /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 | pdfmanual.out 13 | manual.out 14 | -------------------------------------------------------------------------------- /manual/manual/textman/.cvsignore: -------------------------------------------------------------------------------- 1 | manual.txt 2 | manual.hmanual.kwd 3 | *.haux 4 | *.hind 5 | *.htoc 6 | -------------------------------------------------------------------------------- /manual/manual/textman/.gitignore: -------------------------------------------------------------------------------- 1 | manual.txt 2 | manual.hmanual.kwd 3 | *.haux 4 | *.hind 5 | *.htoc 6 | -------------------------------------------------------------------------------- /manual/manual/tutorials/.cvsignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | -------------------------------------------------------------------------------- /manual/manual/tutorials/.gitignore: -------------------------------------------------------------------------------- 1 | *.tex 2 | *.htex 3 | -------------------------------------------------------------------------------- /manual/manual/tutorials/advexamples.etex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/tutorials/advexamples.etex -------------------------------------------------------------------------------- /manual/manual/tutorials/objectexamples.etex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/manual/tutorials/objectexamples.etex -------------------------------------------------------------------------------- /manual/styles/doc.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/styles/doc.tfm -------------------------------------------------------------------------------- /manual/styles/docbf.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/styles/docbf.tfm -------------------------------------------------------------------------------- /manual/styles/docit.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/styles/docit.tfm -------------------------------------------------------------------------------- /manual/styles/docmi.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/styles/docmi.tfm -------------------------------------------------------------------------------- /manual/styles/docrm.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/styles/docrm.tfm -------------------------------------------------------------------------------- /manual/styles/doctt.tfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/styles/doctt.tfm -------------------------------------------------------------------------------- /manual/styles/fullpage.sty: -------------------------------------------------------------------------------- 1 | \marginparwidth 0pt \oddsidemargin 0pt \evensidemargin 0pt \marginparsep 0pt 2 | \topmargin 0pt \textwidth 6.5in \textheight 8.5 in 3 | -------------------------------------------------------------------------------- /manual/styles/isolatin.sty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/manual/styles/isolatin.sty -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /manual/tools/.gitignore: -------------------------------------------------------------------------------- 1 | transf.ml 2 | texquote2 3 | htmltransf.ml 4 | transf 5 | htmlgen 6 | htmlquote 7 | latexscan.ml 8 | dvi2txt 9 | caml-tex2 10 | *.dSYM 11 | *.cm[io] 12 | *.o 13 | -------------------------------------------------------------------------------- /manual/tools/.ignore: -------------------------------------------------------------------------------- 1 | transf.ml 2 | texquote2 3 | htmltransf.ml 4 | transf 5 | htmlgen 6 | htmlquote 7 | latexscan.ml 8 | dvi2txt 9 | caml-tex2 10 | *.dSYM 11 | *.cm[io] 12 | -------------------------------------------------------------------------------- /manual/tools/dvi_to_txt/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=io.o interp.o output.o main.o print.o print_rtf.o print_styl.o 2 | CFLAGS=-g 3 | 4 | ../dvi2txt: $(OBJS) 5 | $(CC) $(CFLAGS) -o ../dvi2txt $(OBJS) 6 | 7 | clean: 8 | rm -f ../dvi2txt *.o *~ #*# 9 | -------------------------------------------------------------------------------- /manual/tools/dvi_to_txt/io.h: -------------------------------------------------------------------------------- 1 | #ifdef __STDC__ 2 | typedef signed char schar; 3 | #else 4 | typedef char schar; 5 | #endif 6 | 7 | #define get8u(input) getc(input) 8 | #define get8s(input) (schar) getc(input) 9 | 10 | int get16u(), get16s(), get24u(), get24s(), get32u(), get32s(); 11 | -------------------------------------------------------------------------------- /manual/tools/latexmacros.mli: -------------------------------------------------------------------------------- 1 | type action = 2 | Print of string 3 | | Print_arg 4 | | Skip_arg;; 5 | 6 | val find_macro: string -> action list;; 7 | 8 | val def_macro: string -> action list -> unit;; 9 | -------------------------------------------------------------------------------- /manual/tools/latexmain.ml: -------------------------------------------------------------------------------- 1 | let main () = 2 | Latexscan.main (Lexing.from_channel stdin);; 3 | 4 | Printexc.print main (); exit 0;; 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /otherlibs/graph/.depend: -------------------------------------------------------------------------------- 1 | graphics.cmo : graphics.cmi 2 | graphics.cmx : graphics.cmi 3 | graphics.cmi : 4 | graphicsX11.cmo : graphics.cmi graphicsX11.cmi 5 | graphicsX11.cmx : graphics.cmx graphicsX11.cmi 6 | graphicsX11.cmi : 7 | -------------------------------------------------------------------------------- /otherlibs/raw_spacetime_lib/.depend: -------------------------------------------------------------------------------- 1 | raw_spacetime_lib.cmo : raw_spacetime_lib.cmi 2 | raw_spacetime_lib.cmx : raw_spacetime_lib.cmi 3 | raw_spacetime_lib.cmi : 4 | -------------------------------------------------------------------------------- /otherlibs/str/.depend: -------------------------------------------------------------------------------- 1 | strstubs.$(O): strstubs.c ../../byterun/caml/mlvalues.h \ 2 | ../../byterun/caml/config.h ../../byterun/caml/m.h \ 3 | ../../byterun/caml/s.h ../../byterun/caml/misc.h \ 4 | ../../byterun/caml/alloc.h ../../byterun/caml/memory.h \ 5 | ../../byterun/caml/fail.h 6 | str.cmo : str.cmi 7 | str.cmx : str.cmi 8 | str.cmi : 9 | -------------------------------------------------------------------------------- /stdlib/hashbang: -------------------------------------------------------------------------------- 1 | #! -------------------------------------------------------------------------------- /testsuite/interactive/lib-graph-2/graph_test.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/interactive/lib-graph-2/graph_test.reference -------------------------------------------------------------------------------- /testsuite/interactive/lib-graph-3/sorts.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/interactive/lib-graph-3/sorts.reference -------------------------------------------------------------------------------- /testsuite/interactive/lib-graph/graph_example.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/interactive/lib-graph/graph_example.reference -------------------------------------------------------------------------------- /testsuite/tests/array-functions/ocamltests: -------------------------------------------------------------------------------- 1 | test.ml 2 | -------------------------------------------------------------------------------- /testsuite/tests/array-functions/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/catch-rec.cmm: -------------------------------------------------------------------------------- 1 | (function "catch_fact" (b:int) 2 | (catch (exit fact b 1) 3 | with (fact c acc) 4 | (if (== c 0) acc 5 | (exit fact (- c 1) ( * c acc))))) 6 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/catch-try.cmm: -------------------------------------------------------------------------------- 1 | 2 | (function "catch_exit" (b:int) 3 | (+ 33 4 | (catch 5 | (try (exit lbl 12) 6 | with var 456) 7 | with (lbl x) (+ x 789)))) 8 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/even-odd.cmm: -------------------------------------------------------------------------------- 1 | (function "is_even" (b:int) 2 | (catch (exit even b) 3 | with (odd v) 4 | (if (== v 0) 0 5 | (exit even (- v 1))) 6 | and (even v) 7 | (if (== v 0) 1 8 | (exit odd (- v 1))))) -------------------------------------------------------------------------------- /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/asmcomp/is_static_flambda_dep.ml: -------------------------------------------------------------------------------- 1 | let pair = 1, 12 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/lexcmm.mli: -------------------------------------------------------------------------------- 1 | val token: Lexing.lexbuf -> Parsecmm.token 2 | 3 | type error = 4 | Illegal_character 5 | | Unterminated_comment 6 | | Unterminated_string 7 | 8 | exception Error of error 9 | 10 | val report_error: Lexing.lexbuf -> error -> unit 11 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/parsecmmaux.mli: -------------------------------------------------------------------------------- 1 | (* Auxiliary functions for parsing *) 2 | 3 | val bind_ident: string -> Ident.t 4 | val find_ident: string -> Ident.t 5 | val unbind_ident: Ident.t -> unit 6 | 7 | val find_label: string -> int 8 | 9 | val debuginfo: ?loc:Location.t -> unit -> Debuginfo.t 10 | 11 | type error = 12 | Unbound of string 13 | 14 | exception Error of error 15 | 16 | val report_error: error -> unit 17 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/pgcd.cmm: -------------------------------------------------------------------------------- 1 | (function "pgcd_30030" (a:int) 2 | (catch (exit pgcd a 30030) 3 | with (pgcd n m) 4 | (if (> n m) 5 | (exit pgcd m n) 6 | (if (== n 0) 7 | m 8 | (let (r (mod m n)) 9 | (exit pgcd r n)))))) -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/simple_float_const.ml: -------------------------------------------------------------------------------- 1 | let f = 3.14 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/simple_float_const_opaque.ml: -------------------------------------------------------------------------------- 1 | let f = 3.14 2 | -------------------------------------------------------------------------------- /testsuite/tests/asmcomp/unrolling_flambda.ml: -------------------------------------------------------------------------------- 1 | 2 | let rec f x = 3 | if x > 0 then f (x - 1) 4 | else 0 5 | [@@inline] 6 | 7 | let _ = f 0 8 | -------------------------------------------------------------------------------- /testsuite/tests/ast-invariants/test.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/ast-invariants/test.reference -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtrace..byte.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Invalid_argument("index out of bounds") 2 | Raised by primitive operation at file "backtrace.ml", line 18, characters 12-24 3 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtrace..native.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Invalid_argument("index out of bounds") 2 | Raised by primitive operation at file "backtrace.ml", line 18, characters 12-24 3 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtrace.a.byte.reference: -------------------------------------------------------------------------------- 1 | a 2 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtrace.a.native.reference: -------------------------------------------------------------------------------- 1 | a 2 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtrace.c.byte.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Backtrace.Error("c") 2 | Raised at file "backtrace.ml", line 14, characters 26-37 3 | Called from file "backtrace.ml", line 18, characters 9-25 4 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtrace.c.native.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Backtrace.Error("c") 2 | Raised at file "backtrace.ml", line 14, characters 20-37 3 | Called from file "backtrace.ml", line 18, characters 9-25 4 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/backtraces_and_finalizers.native.reference: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_test.byte.reference: -------------------------------------------------------------------------------- 1 | inline_test.ml 2 | line 5 3 | characters 8-24 4 | inline_test.ml 5 | line 8 6 | characters 2-5 7 | inline_test.ml 8 | line 11 9 | characters 12-17 10 | inline_test.ml 11 | line 14 12 | characters 5-8 13 | inline_test.ml 14 | line 18 15 | characters 2-6 16 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_test.ml: -------------------------------------------------------------------------------- 1 | 2 | (* A test for inlined stack backtraces *) 3 | 4 | let f x = 5 | raise (Failure "test") + 1 6 | 7 | let g x = 8 | f x + 1 9 | 10 | let h x = 11 | print_int (g x); print_endline "h" 12 | 13 | let i x = 14 | if h x = () then () 15 | 16 | let () = 17 | Printexc.record_backtrace true; 18 | i () 19 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_test.native.reference: -------------------------------------------------------------------------------- 1 | inline_test.ml 2 | line 5 3 | characters 2-24 4 | inline_test.ml 5 | line 8 6 | characters 2-5 7 | inline_test.ml 8 | line 11 9 | characters 12-17 10 | inline_test.ml 11 | line 14 12 | characters 5-8 13 | inline_test.ml 14 | line 18 15 | characters 2-6 16 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_traversal_test.byte.reference: -------------------------------------------------------------------------------- 1 | inline_traversal_test.ml:5 2 | inline_traversal_test.ml:8 3 | inline_traversal_test.ml:11 4 | inline_traversal_test.ml:14 5 | inline_traversal_test.ml:19 6 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/inline_traversal_test.native.reference: -------------------------------------------------------------------------------- 1 | inline_traversal_test.ml:5 2 | inline_traversal_test.ml:8 3 | inline_traversal_test.ml:11 4 | inline_traversal_test.ml:14 5 | inline_traversal_test.ml:19 6 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_at.byte.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Pervasives.Exit 2 | Raised at file "pr6920_why_at.ml", line 1, characters 41-45 3 | Called from file "pr6920_why_at.ml", line 3, characters 2-11 4 | Called from file "pr6920_why_at.ml", line 9, characters 2-6 5 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_at.ml: -------------------------------------------------------------------------------- 1 | let why : unit -> unit = fun () -> raise Exit [@@inline never] 2 | let f () = 3 | why @@ (); 4 | ignore (3 + 2); 5 | () [@@inline never] 6 | 7 | let () = 8 | Printexc.record_backtrace true; 9 | f () 10 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_at.native.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Pervasives.Exit 2 | Raised at file "pr6920_why_at.ml", line 1, characters 35-45 3 | Called from file "pr6920_why_at.ml", line 3, characters 2-11 4 | Called from file "pr6920_why_at.ml", line 9, characters 2-6 5 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_swallow.byte.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Pervasives.Exit 2 | Raised at file "pr6920_why_swallow.ml", line 1, characters 41-45 3 | Called from file "pr6920_why_swallow.ml", line 4, characters 4-13 4 | Called from file "pr6920_why_swallow.ml", line 11, characters 2-6 5 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_swallow.ml: -------------------------------------------------------------------------------- 1 | let why : unit -> unit = fun () -> raise Exit [@@inline never] 2 | let f () = 3 | for i = 1 to 10 do 4 | why @@ (); 5 | done; 6 | ignore (3 + 2); 7 | () [@@inline never] 8 | 9 | let () = 10 | Printexc.record_backtrace true; 11 | f () 12 | -------------------------------------------------------------------------------- /testsuite/tests/backtrace/pr6920_why_swallow.native.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Pervasives.Exit 2 | Raised at file "pr6920_why_swallow.ml", line 1, characters 35-45 3 | Called from file "pr6920_why_swallow.ml", line 4, characters 4-13 4 | Called from file "pr6920_why_swallow.ml", line 11, characters 2-6 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic-float/float_compare.ml: -------------------------------------------------------------------------------- 1 | 2 | let compare_nan () = 3 | not (nan < 0.0) 4 | [@@inline never] 5 | 6 | let x = print_endline (string_of_bool (compare_nan ())) 7 | -------------------------------------------------------------------------------- /testsuite/tests/basic-float/float_compare.reference: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-float/tfloat_hex.reference: -------------------------------------------------------------------------------- 1 | 26. 2 | 208. 3 | Failure("float_of_string") 4 | Failure("float_of_string") 5 | Failure("float_of_string") 6 | Failure("float_of_string") 7 | -------------------------------------------------------------------------------- /testsuite/tests/basic-float/tfloat_record.reference: -------------------------------------------------------------------------------- 1 | 1. 2 | 1. 3 | 2. 4 | 3. 5 | 6 | 1. 7 | 2. 8 | 3. 9 | 4. 10 | 5. 11 | 6. 12 | 7. 13 | 8. 14 | 9. 15 | 0. 16 | 1. 17 | 2. 18 | 3. 19 | 4. 20 | 5. 21 | 6. 22 | 7. 23 | 8. 24 | 9. 25 | 0. 26 | 1. 27 | 2. 28 | 3. 29 | 4. 30 | 5. 31 | 6. 32 | 7. 33 | 8. 34 | 9. 35 | 0. 36 | 1. 37 | 2. 38 | 3. 39 | 4. 40 | 5. 41 | 6. 42 | 7. 43 | 8. 44 | 9. 45 | 0. 46 | 47 | -------------------------------------------------------------------------------- /testsuite/tests/basic-float/zero_sized_float_arrays.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic-float/zero_sized_float_arrays.reference -------------------------------------------------------------------------------- /testsuite/tests/basic-io-2/ocamltests: -------------------------------------------------------------------------------- 1 | io.ml 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-io-2/test-file-short-lines: -------------------------------------------------------------------------------- 1 | ## 2 | # Host Database 3 | # 4 | # localhost is used to configure the loopback interface 5 | # when the system is booting. Do not change this entry. 6 | ## 7 | 127.0.0.1 localhost 8 | 255.255.255.255 broadcasthost 9 | ::1 localhost 10 | fe80::1%lo0 localhost 11 | -------------------------------------------------------------------------------- /testsuite/tests/basic-io/ocamltests: -------------------------------------------------------------------------------- 1 | wc.ml 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-io/wc.reference: -------------------------------------------------------------------------------- 1 | 1232 characters, 184 words, 58 lines 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/main.mli: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic-modules/main.mli -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/main.reference: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-modules/ocamltests: -------------------------------------------------------------------------------- 1 | main.ml 2 | -------------------------------------------------------------------------------- /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/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-more/div_by_zero.reference: -------------------------------------------------------------------------------- 1 | ***** OK ***** 2 | 3 | All tests succeeded. 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/function_in_ref.ml: -------------------------------------------------------------------------------- 1 | 2 | let f x = x + 1 3 | let g x = x - 1 4 | 5 | let run () = 6 | let r = ref f in 7 | r := g; 8 | let n = !r 1 in 9 | assert(n = 0) 10 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/function_in_ref.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /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.ml: -------------------------------------------------------------------------------- 1 | let f x = Sys.opaque_identity x 2 | 3 | let () = 4 | assert(f f == f); 5 | assert(Sys.opaque_identity 1 = 1); 6 | assert(Sys.opaque_identity 1. = 1.) 7 | -------------------------------------------------------------------------------- /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/pr2719.reference: -------------------------------------------------------------------------------- 1 | Value of test at the beginning : false 2 | Value of test now : false 3 | 4 | All tests succeeded. 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/pr6216.ml: -------------------------------------------------------------------------------- 1 | (* PR6216: wrong inlining of GADT match *) 2 | 3 | type _ t = 4 | | Float : float t 5 | | String : string t 6 | 7 | let f : type a . a t -> a -> unit = fun t a -> 8 | match t with 9 | | Float -> () 10 | | String -> ignore (String.length a : int) 11 | 12 | let _g (kind : float t) (x : float) : unit = f kind (x *. 13.) 13 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/pr6216.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/record_evaluation_order.reference: -------------------------------------------------------------------------------- 1 | d1 2 | c1 3 | b1 4 | a1 5 | d2 6 | c2 7 | b2 8 | a2 9 | default 10 | d3 11 | c3 12 | a3 13 | 14 | x9 15 | x8 16 | x7 17 | x6 18 | x5 19 | x4 20 | x3 21 | x2 22 | x1 23 | 24 | x7 25 | x2 26 | 27 | x7 28 | x2 29 | 30 | x7 31 | x5 32 | x2 33 | 34 | x7 35 | x5 36 | x2 37 | 38 | All tests succeeded. 39 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/robustmatch.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/structural_constants.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/tbuffer.reference: -------------------------------------------------------------------------------- 1 | 0 1 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/testrandom.ml: -------------------------------------------------------------------------------- 1 | open Random 2 | 3 | let _ = 4 | for i = 0 to 20 do 5 | print_char ' '; print_int (int 1000); 6 | done; 7 | print_newline (); print_newline (); 8 | for i = 0 to 20 do 9 | print_char ' '; print_float (float 1000.); 10 | done 11 | 12 | let _ = exit 0 13 | -------------------------------------------------------------------------------- /testsuite/tests/basic-more/top_level_patterns.ml: -------------------------------------------------------------------------------- 1 | 2 | type t = 3 | | A of (int * int * int) 4 | | B of int * int 5 | 6 | let (A (a, _, b) | B (b, a)) = A (1, 2, 3) 7 | 8 | let () = print_int a; print_int b 9 | -------------------------------------------------------------------------------- /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/basic-multdef/multdef.ml: -------------------------------------------------------------------------------- 1 | let f x = x + 1 2 | external g : string -> int = "caml_int_of_string" 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic-multdef/multdef.mli: -------------------------------------------------------------------------------- 1 | val f : int -> int 2 | val f : int -> int 3 | val g : string -> int 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic-multdef/ocamltests: -------------------------------------------------------------------------------- 1 | usemultdef.ml 2 | -------------------------------------------------------------------------------- /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-multdef/usemultdef.reference: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-private/length.ml: -------------------------------------------------------------------------------- 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 = int;; 10 | 11 | let make x = 12 | if x >= 0 then x else 13 | failwith (Printf.sprintf "cannot build negative length : %i" x) 14 | ;; 15 | 16 | external from : t -> int = "%identity";; 17 | -------------------------------------------------------------------------------- /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/basic-private/ocamltests: -------------------------------------------------------------------------------- 1 | tlength.ml 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic-private/tlength.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic-private/tlength.reference -------------------------------------------------------------------------------- /testsuite/tests/basic/arrays.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/arrays.reference -------------------------------------------------------------------------------- /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/constprop.reference: -------------------------------------------------------------------------------- 1 | booleans: passed 2 | integers: passed 3 | floats: passed 4 | 32-bit integers: passed 5 | native integers: passed 6 | 64-bit integers: passed 7 | integer conversions: passed 8 | 32-bit integer conversions: passed 9 | native integer conversions: passed 10 | 64-bit integer conversions: passed 11 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_1.ml: -------------------------------------------------------------------------------- 1 | let f x y = Printf.printf "%d %d\n" x y 2 | 3 | let i = ref 0 4 | let () = f (incr i; !i) !i 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_1.reference: -------------------------------------------------------------------------------- 1 | 1 0 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_2.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/eval_order_2.reference -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_3.reference: -------------------------------------------------------------------------------- 1 | 1 0 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_4.ml: -------------------------------------------------------------------------------- 1 | (* PR#7531 *) 2 | 3 | let f = 4 | (let _i = print_endline "first" 5 | in fun q -> fun i -> "") (print_endline "x") 6 | 7 | let _ = 8 | let k = 9 | (let _i = print_int 1 10 | in fun q -> fun i -> "") () 11 | in k (print_int 0) 12 | 13 | let () = 14 | print_endline "foo"; 15 | ignore ((f ()) : string); 16 | ignore ((f ()) : string); 17 | print_endline "bar" 18 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_4.reference: -------------------------------------------------------------------------------- 1 | x 2 | first 3 | 10foo 4 | bar 5 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_6.ml: -------------------------------------------------------------------------------- 1 | type t = 2 | { mutable x : int; 3 | y : int } 4 | 5 | let f { x = c } = 6 | fun () -> c;; 7 | 8 | let r = { x = 10; y = 20 };; 9 | 10 | let h = f r;; 11 | 12 | print_endline (string_of_int (h ()));; 13 | 14 | r.x <- 20;; 15 | 16 | print_endline (string_of_int (h ()));; 17 | 18 | -------------------------------------------------------------------------------- /testsuite/tests/basic/eval_order_6.reference: -------------------------------------------------------------------------------- 1 | 10 2 | 10 3 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float.ml: -------------------------------------------------------------------------------- 1 | Printf.printf "1./.0. = %f\n" (1.0 /. 0.0);; 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float.reference: -------------------------------------------------------------------------------- 1 | 1./.0. = inf 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float_physical_equality.ml: -------------------------------------------------------------------------------- 1 | let a = -0. 2 | let b = +0. 3 | 4 | let _ = 5 | assert(not (a == b)) 6 | 7 | let f () = 8 | let a = -0. in 9 | let b = +0. in 10 | assert(not (a == b)) 11 | -------------------------------------------------------------------------------- /testsuite/tests/basic/float_physical_equality.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/float_physical_equality.reference -------------------------------------------------------------------------------- /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/basic/localexn.ml: -------------------------------------------------------------------------------- 1 | let f (type t) () = 2 | let exception E of t in 3 | (fun x -> E x), (function E _ -> print_endline "OK" | _ -> print_endline "KO") 4 | 5 | let inj1, proj1 = f () 6 | let inj2, proj2 = f () 7 | 8 | let () = proj1 (inj1 42) 9 | let () = proj1 (inj2 42) 10 | -------------------------------------------------------------------------------- /testsuite/tests/basic/localexn.reference: -------------------------------------------------------------------------------- 1 | OK 2 | KO 3 | -------------------------------------------------------------------------------- /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/basic/min_int.ml: -------------------------------------------------------------------------------- 1 | (* This will test the parsing of the smallest integer on 32-bit architectures. 2 | It doesn't do much on 64-bit but at least it doesn't crash. 3 | *) 4 | 5 | let min_int = -1073741824 6 | let () = match min_int with 7 | | -1073741824 as i -> 8 | assert (string_of_int i = "-1073741824"); 9 | print_endline "OK" 10 | | _ -> assert false 11 | -------------------------------------------------------------------------------- /testsuite/tests/basic/min_int.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/opt_variants.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/opt_variants.reference -------------------------------------------------------------------------------- /testsuite/tests/basic/pr7533.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/pr7533.reference -------------------------------------------------------------------------------- /testsuite/tests/basic/pr7657.ml: -------------------------------------------------------------------------------- 1 | [@@@ocaml.warning "-21-5"] 2 | 3 | let foo g () = g 1; () 4 | let f1 ?x y = print_endline "f1" 5 | let f2 ?x y = print_endline "f2" 6 | 7 | let () = 8 | try foo (raise Exit; f1); print_endline "FAIL" 9 | with Exit -> print_endline "OK" 10 | 11 | let r : (?x:unit -> int -> unit) ref = ref f1 12 | let h = foo r.contents 13 | let () = h (); r := f2; h () 14 | -------------------------------------------------------------------------------- /testsuite/tests/basic/pr7657.reference: -------------------------------------------------------------------------------- 1 | OK 2 | f1 3 | f1 4 | -------------------------------------------------------------------------------- /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/basic/stringmatch.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/stringmatch.reference -------------------------------------------------------------------------------- /testsuite/tests/basic/switch_opts.reference: -------------------------------------------------------------------------------- 1 | 16 tests passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/basic/tailcalls.reference: -------------------------------------------------------------------------------- 1 | 10000001 2 | 10000001 3 | 10000001 4 | 11 5 | 11 6 | 10000001 7 | -------------------------------------------------------------------------------- /testsuite/tests/basic/trigraph.ml: -------------------------------------------------------------------------------- 1 | (* PR#6373 *) 2 | 3 | let () = print_string "??'" 4 | -------------------------------------------------------------------------------- /testsuite/tests/basic/trigraph.ml.silent-compilation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/trigraph.ml.silent-compilation -------------------------------------------------------------------------------- /testsuite/tests/basic/trigraph.reference: -------------------------------------------------------------------------------- 1 | ??' -------------------------------------------------------------------------------- /testsuite/tests/basic/zero_divided_by_n.ml: -------------------------------------------------------------------------------- 1 | (* Mantis 7201 *) 2 | 3 | let f () = 0 [@@inline never] 4 | 5 | let () = 6 | try 7 | ignore ((0 / f ()) : int); 8 | assert false 9 | with Division_by_zero -> () 10 | 11 | (* Not in Mantis 7201, but related: *) 12 | 13 | let () = 14 | try 15 | ignore ((0 mod f ()) : int); 16 | assert false 17 | with Division_by_zero -> () 18 | -------------------------------------------------------------------------------- /testsuite/tests/basic/zero_divided_by_n.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/basic/zero_divided_by_n.reference -------------------------------------------------------------------------------- /testsuite/tests/callback/reference: -------------------------------------------------------------------------------- 1 | 7 2 | 7 3 | 7 4 | 7 5 | 7 6 | aaaaa 7 | aaaaa 8 | bbbbb 9 | -------------------------------------------------------------------------------- /testsuite/tests/docstrings/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BASEDIR=../.. 3 | include $(BASEDIR)/makefiles/Makefile.dparsetree 4 | include $(BASEDIR)/makefiles/Makefile.common 5 | -------------------------------------------------------------------------------- /testsuite/tests/docstrings/empty.ml: -------------------------------------------------------------------------------- 1 | type t = Label (**) 2 | (** attached to t *) 3 | 4 | (**) 5 | 6 | (** Empty docstring comments should not generate attributes *) 7 | 8 | type w (**) 9 | -------------------------------------------------------------------------------- /testsuite/tests/embedded/program.reference: -------------------------------------------------------------------------------- 1 | Initializing OCaml code... 2 | Back in C code... 3 | Computing fib(20)... 4 | Result = 10946 5 | -------------------------------------------------------------------------------- /testsuite/tests/exotic-syntax/exotic.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/exotic-syntax/exotic.reference -------------------------------------------------------------------------------- /testsuite/tests/extension-constructor/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/flambda/gpr998.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/flambda/gpr998.reference -------------------------------------------------------------------------------- /testsuite/tests/float-unboxing/float_flambda.ml: -------------------------------------------------------------------------------- 1 | let eliminate_intermediate_float_record () = 2 | let r = ref 0. in 3 | for n = 1 to 1000 do 4 | let open Complex in 5 | let c = { re = float n; im = 0. } in 6 | r := !r +. (norm [@inlined]) ((add [@inlined]) c i); 7 | done; 8 | ignore (Sys.opaque_identity !r) 9 | 10 | -------------------------------------------------------------------------------- /testsuite/tests/float-unboxing/float_subst_boxed_number.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/float-unboxing/float_subst_boxed_number.reference -------------------------------------------------------------------------------- /testsuite/tests/formats-transition/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | include $(BASEDIR)/makefiles/Makefile.toplevel 3 | include $(BASEDIR)/makefiles/Makefile.common 4 | -------------------------------------------------------------------------------- /testsuite/tests/formats-transition/deprecated_unsigned_printers.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # * * val test : (int -> string, unit, string) format -> string = 3 | # %n: true 4 | # %l: true 5 | # %N: true 6 | # %L: true 7 | # 8 | -------------------------------------------------------------------------------- /testsuite/tests/formats-transition/legacy_incompatible_flags.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # * toto 3 | # toto 4 | # toto 5 | # toto 6 | # "toto" 7 | # toto 8 | # * * * 9 | -------------------------------------------------------------------------------- /testsuite/tests/formats-transition/legacy_unfinished_modifiers.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # * * * * * * * * 3 3 | # 3 4 | # 3 5 | # 3 6 | # 7 | -------------------------------------------------------------------------------- /testsuite/tests/formatting/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | MAIN_MODULE=margins 3 | 4 | include $(BASEDIR)/makefiles/Makefile.toplevel 5 | include $(BASEDIR)/makefiles/Makefile.common 6 | -------------------------------------------------------------------------------- /testsuite/tests/formatting/margins.ml: -------------------------------------------------------------------------------- 1 | let () = Format.pp_set_margin Format.std_formatter 20;; 2 | 3 | 1 + "foo";; 4 | 5 | let () = Format.pp_set_margin Format.std_formatter 80;; 6 | 7 | 1 + "foo";; 8 | -------------------------------------------------------------------------------- /testsuite/tests/formatting/margins.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # # Characters 5-10: 3 | 1 + "foo";; 4 | ^^^^^ 5 | Error: This expression has type 6 | string 7 | but an expression was expected of type 8 | int 9 | # # Characters 5-10: 10 | 1 + "foo";; 11 | ^^^^^ 12 | Error: This expression has type string but an expression was expected of type 13 | int 14 | # 15 | -------------------------------------------------------------------------------- /testsuite/tests/functors/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | TOPFLAGS+=-dlambda 3 | include $(BASEDIR)/makefiles/Makefile.dlambda 4 | include $(BASEDIR)/makefiles/Makefile.common 5 | -------------------------------------------------------------------------------- /testsuite/tests/int64-unboxing/test.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/int64-unboxing/test.reference -------------------------------------------------------------------------------- /testsuite/tests/lazy/lazy1.ml: -------------------------------------------------------------------------------- 1 | (* Mantis 7301, due to A. Frisch *) 2 | 3 | let foo () = 4 | (fun xs0 () -> Lazy.force (List.hd xs0) ()) 5 | (List.map (fun g -> lazy g) 6 | [Lazy.force ( lazy ( let _ = () in fun () -> () ) )] 7 | ) 8 | 9 | let () = 10 | let gen = foo () in 11 | gen (); 12 | Gc.compact (); 13 | print_char 'A'; flush stdout; 14 | gen () 15 | -------------------------------------------------------------------------------- /testsuite/tests/lazy/lazy1.reference: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/extension_constructor.ml: -------------------------------------------------------------------------------- 1 | (* Example from Stephen Dolan. 2 | Accessing an extension constructor involves accessing the module 3 | in which it's defined. 4 | *) 5 | module type T = 6 | sig exception A of int end;; 7 | 8 | let rec x = 9 | let module M = (val m) in 10 | M.A 42 11 | and (m : (module T)) = 12 | (module (struct exception A of int end));; 13 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/extension_constructor.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # * * * module type T = sig exception A of int end 3 | # Characters 15-49: 4 | ..let module M = (val m) in 5 | M.A 42 6 | Error: This kind of expression is not allowed as right-hand side of `let rec' 7 | # 8 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/float_block.ml: -------------------------------------------------------------------------------- 1 | let test = 2 | let rec x = [| y; y |] and y = 1. in 3 | assert (x = [| 1.; 1. |]); 4 | assert (y = 1.); 5 | () 6 | ;; 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/float_block.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # Characters 25-35: 3 | let rec x = [| y; y |] and y = 1. in 4 | ^^^^^^^^^^ 5 | Error: This kind of expression is not allowed as right-hand side of `let rec' 6 | # 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/generic_arrays.ml: -------------------------------------------------------------------------------- 1 | (* This is not allowed because constructing the generic array 'x' involves 2 | inspecting 'y', which is bound in the same recursive group *) 3 | let f z = let rec x = [| y; z |] and y = z in x;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/generic_arrays.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # * Characters 162-172: 3 | let f z = let rec x = [| y; z |] and y = z in x;; 4 | ^^^^^^^^^^ 5 | Error: This kind of expression is not allowed as right-hand side of `let rec' 6 | # 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/lazy_.ml: -------------------------------------------------------------------------------- 1 | let rec a = lazy b and b = 3;; 2 | 3 | let rec e = lazy (fun _ -> f) and f = ();; 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/lazy_.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # Characters 12-18: 3 | let rec a = lazy b and b = 3;; 4 | ^^^^^^ 5 | Error: This kind of expression is not allowed as right-hand side of `let rec' 6 | # val e : ('a -> unit) lazy_t = lazy 7 | val f : unit = () 8 | # 9 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/module_constraints.ml: -------------------------------------------------------------------------------- 1 | module type S = sig val y : float end;; 2 | module type T = sig val x : float val y : float end;; 3 | type t = T : (module S) -> t;; 4 | 5 | let rec x = let module M = (val m) in T (module M) 6 | and (m : (module T)) = (module (struct let x = 10.0 and y = 20.0 end));; 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/pr7215.ml: -------------------------------------------------------------------------------- 1 | (* From Stephen Dolan *) 2 | type (_,_) eq = Refl : ('a, 'a) eq;; 3 | let cast (type a) (type b) (Refl : (a, b) eq) (x : a) = (x : b);; 4 | 5 | let is_int (type a) = 6 | let rec (p : (int, a) eq) = match p with Refl -> Refl in 7 | p 8 | 9 | let bang = print_string (cast (is_int : (int, string) eq) 42);; 10 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/pr7215.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # type (_, _) eq = Refl : ('a, 'a) eq 3 | # val cast : ('a, 'b) eq -> 'a -> 'b = 4 | # Characters 53-78: 5 | let rec (p : (int, a) eq) = match p with Refl -> Refl in 6 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 7 | Error: This kind of expression is not allowed as right-hand side of `let rec' 8 | # 9 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/pr7231.ml: -------------------------------------------------------------------------------- 1 | let rec r = let rec x () = r and y () = x () in y () in r "oops";; 2 | -------------------------------------------------------------------------------- /testsuite/tests/letrec-disallowed/unboxed.ml: -------------------------------------------------------------------------------- 1 | type t = {x: int64} [@@unboxed];; 2 | let rec x = {x = y} and y = 3L;; 3 | 4 | type r = A of r [@@unboxed];; 5 | let rec y = A y;; 6 | 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/allowed.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/allowed.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/backreferences.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/backreferences.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/class_1.ml: -------------------------------------------------------------------------------- 1 | (* class expression are compiled to recursive bindings *) 2 | class test = 3 | object 4 | method x = 1 5 | end 6 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/class_1.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/class_1.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/class_2.ml: -------------------------------------------------------------------------------- 1 | (* class expressions may also contain local recursive bindings *) 2 | class test = 3 | let rec f = print_endline "f"; fun x -> g x 4 | and g = print_endline "g"; fun x -> f x in 5 | object 6 | method f : 'a 'b. 'a -> 'b = f 7 | method g : 'a 'b. 'a -> 'b = g 8 | end 9 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/class_2.reference: -------------------------------------------------------------------------------- 1 | f 2 | g 3 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/evaluation_order_1.reference: -------------------------------------------------------------------------------- 1 | effect 2 | effect 3 | effect 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/evaluation_order_2.reference: -------------------------------------------------------------------------------- 1 | effect 2 | effect 3 | effect 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/evaluation_order_3.ml: -------------------------------------------------------------------------------- 1 | type t = { x : t; y : t } 2 | 3 | let p = print_endline 4 | 5 | let test = 6 | let rec x = p "x"; { x = (p "x_x"; x); y = (p "x_y"; y) } 7 | and y = p "y"; { x = (p "y_x"; x); y = (p "y_y"; y) } 8 | in 9 | assert (x.x == x); assert (x.y == y); 10 | assert (y.x == x); assert (y.y == y); 11 | () 12 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/evaluation_order_3.reference: -------------------------------------------------------------------------------- 1 | x 2 | x_y 3 | x_x 4 | y 5 | y_y 6 | y_x 7 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/float_block_1.ml: -------------------------------------------------------------------------------- 1 | (* Effect are not named to allow different evaluation orders (flambda 2 | and clambda differ on this point). 3 | *) 4 | let test = 5 | let rec x = print_endline "effect"; [| 1; 2; 3 |] 6 | and y = print_endline "effect"; [| 1.; 2.; 3. |] 7 | in 8 | assert (x = [| 1; 2; 3 |]); 9 | assert (y = [| 1.; 2.; 3. |]); 10 | () 11 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/float_block_1.reference: -------------------------------------------------------------------------------- 1 | effect 2 | effect 3 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/float_block_2.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/float_block_2.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/generic_array.ml: -------------------------------------------------------------------------------- 1 | let rec x = let _y = [| |] in ();; 2 | 3 | let rec x = let y = [| |] in y :: x;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/generic_array.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/generic_array.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/lazy_.ml: -------------------------------------------------------------------------------- 1 | let rec c = lazy (0 + d) and d = 3;; 2 | 3 | let () = Printf.printf "%d\n" (Lazy.force c) 4 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/lazy_.reference: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/lists.ml: -------------------------------------------------------------------------------- 1 | (* a test with lists, because cyclic lists are fun *) 2 | let test = 3 | let rec li = 0::1::2::3::4::5::6::7::8::9::li in 4 | match li with 5 | | 0::1::2::3::4::5::6::7::8::9:: 6 | 0::1::2::3::4::5::6::7::8::9::li' -> 7 | assert (li == li') 8 | | _ -> assert false 9 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/lists.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/lists.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/mixing_value_closures_1.ml: -------------------------------------------------------------------------------- 1 | (* mixing values and closures may exercise interesting code paths *) 2 | type t = A of (int -> int) 3 | let test = 4 | let rec x = A f 5 | and f = function 6 | | 0 -> 2 7 | | n -> match x with A g -> g 0 8 | in assert (f 1 = 2) 9 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/mixing_value_closures_1.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/mixing_value_closures_1.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/mixing_value_closures_2.ml: -------------------------------------------------------------------------------- 1 | (* a polymorphic variant of test3.ml; found a real bug once *) 2 | let test = 3 | let rec x = `A f 4 | and f = function 5 | | 0 -> 2 6 | | n -> match x with `A g -> g 0 7 | in 8 | assert (f 1 = 2) 9 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/mixing_value_closures_2.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/mixing_value_closures_2.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/mutual_functions.ml: -------------------------------------------------------------------------------- 1 | (* a simple test with mutually recursive functions *) 2 | let test = 3 | let rec even = function 4 | | 0 -> true 5 | | n -> odd (n - 1) 6 | and odd = function 7 | | 0 -> false 8 | | n -> even (n - 1) 9 | in 10 | List.iter (fun i -> assert (even i <> odd i && even i = (i mod 2 = 0))) 11 | [0;1;2;3;4;5;6] 12 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/mutual_functions.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/mutual_functions.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/nested.ml: -------------------------------------------------------------------------------- 1 | (* Mantis PR7447 *) 2 | 3 | let rec r = (let rec x = `A r and y = fun () -> x in y) 4 | 5 | let (`A x) = r () 6 | 7 | let _ = x () 8 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/nested.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/nested.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/pr4989.ml: -------------------------------------------------------------------------------- 1 | let rec f = let g = f in fun x -> g x;; 2 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/pr4989.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/pr4989.reference -------------------------------------------------------------------------------- /testsuite/tests/letrec/record_with.reference: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/ref.ml: -------------------------------------------------------------------------------- 1 | (* Test construction of cyclic values where the cycles pass through references *) 2 | 3 | type t = { mutable next : t; mutable inst : n ref } 4 | and n = T of t 5 | 6 | let rec d = { next = d; inst = ref (T d) } 7 | 8 | let f t1 t2 = 9 | let rec self = ref init 10 | and init () = t1 (function () -> self := t2; t2 ()) 11 | in fun () -> !self () 12 | ;; 13 | -------------------------------------------------------------------------------- /testsuite/tests/letrec/ref.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/letrec/ref.reference -------------------------------------------------------------------------------- /testsuite/tests/lexing/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | include $(BASEDIR)/makefiles/Makefile.toplevel 3 | include $(BASEDIR)/makefiles/Makefile.common 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-arg/testarg.reference: -------------------------------------------------------------------------------- 1 | 2 | -foo FOO Do foo with FOO 3 | -bar FOO BAR Do bar with FOO and BAR 4 | -cha Another option 5 | -sym {a|b} 6 | y foo 7 | -sym2 {a|b} 8 | x bar 9 | -help Display this list of options 10 | --help Display this list of options 11 | 12 | -------------------------------------------------------------------------------- /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-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-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-bigarray/pr5115.ml: -------------------------------------------------------------------------------- 1 | (* PR#5115 - multiple evaluation of bigarray expr *) 2 | 3 | open Bigarray 4 | 5 | let f y0 = 6 | Printf.printf "***EXEC***\n%!"; 7 | y0 8 | 9 | let _ = 10 | let y = Array1.of_array float64 fortran_layout [| 1. |] in 11 | ignore ((f y).{1}); 12 | (f y).{1} <- 3.14 13 | -------------------------------------------------------------------------------- /testsuite/tests/lib-bigarray/pr5115.reference: -------------------------------------------------------------------------------- 1 | ***EXEC*** 2 | ***EXEC*** 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-buffer/test.reference: -------------------------------------------------------------------------------- 1 | Standard Library: Module Buffer 2 | Buffer truncate: negative passed 3 | Buffer truncate: large passed 4 | Buffer truncate: in-range passed 5 | Buffer reset: non-zero passed 6 | Buffer reset: zero passed 7 | Buffer add_utf_8_uchar: test against spec passed 8 | Buffer add_utf_16be_uchar: test against spec passed 9 | Buffer add_utf_16le_uchar: test against spec passed 10 | -------------------------------------------------------------------------------- /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-digest/md5.reference: -------------------------------------------------------------------------------- 1 | Test vectors passed. 2 | -------------------------------------------------------------------------------- /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/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/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-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-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-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-csharp/bytecode.reference: -------------------------------------------------------------------------------- 1 | Now starting the OCaml engine. 2 | Main is running. 3 | Loading ../../../otherlibs/win32unix/unix.cma 4 | Loading ../../../otherlibs/bigarray/bigarray.cma 5 | Loading plugin.cmo 6 | I'm the plugin. 7 | OK. 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-csharp/main.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | public class M { 4 | [DllImport("main.dll")] 5 | public static extern void start_caml_engine(); 6 | 7 | public static void Main() { 8 | System.Console.WriteLine("Now starting the OCaml engine."); 9 | start_caml_engine(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-csharp/native.reference: -------------------------------------------------------------------------------- 1 | Now starting the OCaml engine. 2 | Main is running. 3 | Loading ../../../otherlibs/win32unix/unix.cmxs 4 | Loading ../../../otherlibs/bigarray/bigarray.cmxs 5 | Loading plugin.cmxs 6 | I'm the plugin. 7 | OK. 8 | -------------------------------------------------------------------------------- /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-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/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/bug.ml: -------------------------------------------------------------------------------- 1 | let () = try raise (Invalid_argument "X") with Invalid_argument s -> 2 | raise (Invalid_argument (s ^ s)) 3 | -------------------------------------------------------------------------------- /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-dynlink-native/pack_client.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | print_endline Mypack.Packed1.mykey 3 | -------------------------------------------------------------------------------- /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-dynlink-native/packed1_client.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Api.reg_mod "Packed1_client"; 3 | print_endline Packed1.mykey 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin.ml: -------------------------------------------------------------------------------- 1 | let rec f x = ignore ([x]); f x 2 | 3 | let rec fact n = if n = 0 then 1 else n * fact (n - 1) 4 | 5 | let facts = [ fact 1; fact 2; fact 3; fact (Random.int 4) ] 6 | 7 | let () = 8 | Api.reg_mod "Plugin"; 9 | Api.add_cb (fun () -> print_endline "Callback from plugin"); 10 | print_endline "COUCOU"; 11 | () 12 | -------------------------------------------------------------------------------- /testsuite/tests/lib-dynlink-native/plugin.mli: -------------------------------------------------------------------------------- 1 | val facts: int list 2 | -------------------------------------------------------------------------------- /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-dynlink-native/plugin4.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Printf.printf "time = %f\n" (Unix.time ()); 3 | Api.reg_mod "Plugin" 4 | -------------------------------------------------------------------------------- /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/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-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-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-native/plugin_thread.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Api.reg_mod "Plugin_thread"; 3 | let _t = 4 | Thread.create 5 | (fun () -> 6 | for i = 1 to 5 do 7 | print_endline "Thread"; flush stdout; 8 | Thread.delay 1.; 9 | done 10 | ) () 11 | in 12 | for i = 1 to 10 do 13 | print_endline "Thread"; flush stdout; 14 | Thread.delay 0.50; 15 | done 16 | -------------------------------------------------------------------------------- /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-native/sub/api.mli: -------------------------------------------------------------------------------- 1 | val f : int -> int 2 | -------------------------------------------------------------------------------- /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-dynlink-native/sub/plugin3.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | ignore (Api.f 10) 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-filename/extension.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-filename/extension.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-format/pr6824.ml: -------------------------------------------------------------------------------- 1 | let f = Format.sprintf "[%i]";; 2 | print_endline (f 1);; 3 | print_endline (f 2);; 4 | 5 | let f = Format.asprintf "[%i]";; 6 | print_endline (f 1);; 7 | print_endline (f 2);; 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-format/pr6824.reference: -------------------------------------------------------------------------------- 1 | [1] 2 | [2] 3 | [1] 4 | [2] 5 | 6 | All tests succeeded. 7 | -------------------------------------------------------------------------------- /testsuite/tests/lib-list/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | include $(BASEDIR)/makefiles/Makefile.several 3 | include $(BASEDIR)/makefiles/Makefile.common 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-list/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-obj/reachable_words.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /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/lib-queue/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-random/rand.reference: -------------------------------------------------------------------------------- 1 | PASSED 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-scanf-2/reference: -------------------------------------------------------------------------------- 1 | Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong Ping-pong! 2 | Test OK. 3 | -------------------------------------------------------------------------------- /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 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-set/testmap.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-set/testmap.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-set/testset.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-set/testset.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-stack/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-stdlabels/test_stdlabels.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-stdlabels/test_stdlabels.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-str/t01.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-str/t01.reference -------------------------------------------------------------------------------- /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-string/test_string.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-string/test_string.reference -------------------------------------------------------------------------------- /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/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/lib-threads/backtrace_threads.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-threads/backtrace_threads.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/bank.reference: -------------------------------------------------------------------------------- 1 | Current balance: 100 2 | Final balance: 1 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/beat.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/bufchan.reference: -------------------------------------------------------------------------------- 1 | 3 2 | un 3 | deux 4 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/close.reference: -------------------------------------------------------------------------------- 1 | reading... 2 | closing fd... 3 | read returned 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/pr5325.reference: -------------------------------------------------------------------------------- 1 | >>Client data 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/pr7638.ml: -------------------------------------------------------------------------------- 1 | (* MPR#7638 repro case *) 2 | 3 | let crashme v = 4 | match Sys.getenv v with 5 | | exception Not_found -> print_string "OK\n" 6 | | s -> print_string "Surprising but OK\n" 7 | 8 | let _ = 9 | let th = Thread.create crashme "no such variable" in 10 | Thread.join th 11 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/pr7638.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/prodcons.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/prodcons2.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/signal.precheck: -------------------------------------------------------------------------------- 1 | test "$TOOLCHAIN" != "msvc" -a "$TOOLCHAIN" != "mingw" 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/sockets.reference: -------------------------------------------------------------------------------- 1 | >>Client #1 2 | >>Client #2 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/socketsbuf.reference: -------------------------------------------------------------------------------- 1 | >>Client #1 2 | >>Client #2 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/swapchan.reference: -------------------------------------------------------------------------------- 1 | f G 2 | g F 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/tls.reference: -------------------------------------------------------------------------------- 1 | 1 --> un 2 | 2 --> deux 3 | 3 --> trois 4 | 4 --> quatre 5 | 5 --> cinq 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/token1.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-threads/token1.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/token2.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/lib-threads/token2.reference -------------------------------------------------------------------------------- /testsuite/tests/lib-threads/torture.reference: -------------------------------------------------------------------------------- 1 | passed 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-uchar/test.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/cloexec.reference: -------------------------------------------------------------------------------- 1 | #1: open 2 | #2: open 3 | #3: closed 4 | #4: open 5 | #5: open 6 | #6: closed 7 | #7: open 8 | #8: open 9 | #9: open 10 | #10: open 11 | #11: closed 12 | #12: closed 13 | #13: open 14 | #14: open 15 | #15: closed 16 | #16: open 17 | #17: open 18 | #18: open 19 | #19: open 20 | #20: closed 21 | #21: closed 22 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/cmdline_prog.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main (int argc, char *argv[]) 4 | { 5 | int i; 6 | for (i = 1; i < argc; i ++) { 7 | printf ("%s\n", argv[i]); 8 | } 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/dup.ml: -------------------------------------------------------------------------------- 1 | let _ = 2 | let f = Unix.dup ~cloexec:true Unix.stdout in 3 | let txt = "Some output\n" in 4 | ignore (Unix.write_substring f txt 0 (String.length txt)); 5 | Unix.close f 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/dup.reference: -------------------------------------------------------------------------------- 1 | Some output 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/dup2.reference: -------------------------------------------------------------------------------- 1 | --- 2 | Some output 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/pipe_eof.reference: -------------------------------------------------------------------------------- 1 | success 2 | -------------------------------------------------------------------------------- /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/lib-unix/common/test_unix_cmdline.reference: -------------------------------------------------------------------------------- 1 | "" -> "" [OK] 2 | "" -> "" [OK] 3 | "\t \011" -> "\t \011" [OK] 4 | "a" -> "a" [OK] 5 | "b" -> "b" [OK] 6 | "c.txt@!" -> "c.txt@!" [OK] 7 | "\"" -> "\"" [OK] 8 | " " -> " " [OK] 9 | " a " -> " a " [OK] 10 | " \" \\\" " -> " \" \\\" " [OK] 11 | " \\ \\ \\\\\\" -> " \\ \\ \\\\\\" [OK] 12 | " \"hola \"" -> " \"hola \"" [OK] 13 | "a\tb" -> "a\tb" [OK] 14 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/common/wait_nohang.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/isatty/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../../.. 2 | LIBRARIES=unix 3 | ADD_COMPFLAGS=-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix 4 | LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix 5 | MAIN_MODULE=isatty 6 | PROGRAM_ARGS=2>/dev/null 5 | Unix.(openfile "CONIN$" [O_RDWR] 0) 6 | in 7 | Printf.printf "/dev/tty = %b\n" (Unix.isatty console) 8 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/isatty/isatty_tty.precheck: -------------------------------------------------------------------------------- 1 | test "$TOOLCHAIN" = "msvc" || test "$TOOLCHAIN" = "mingw" 2 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/isatty/isatty_tty.reference: -------------------------------------------------------------------------------- 1 | /dev/tty = true 2 | -------------------------------------------------------------------------------- /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 | 6 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/unix-execvpe/subdir/nonexec: -------------------------------------------------------------------------------- 1 | echo "This script lacks the x bit and should not run!" 2 | 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/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/lib-unix/win-env/test_env.reference: -------------------------------------------------------------------------------- 1 | Sys.getenv FOO -> None 2 | Unix.environment FOO -> None 3 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/win-env/test_env2.precheck: -------------------------------------------------------------------------------- 1 | # test_env2.ml disabled because it fails due to the fact that 2 | # Windows POSIX environment is not updated when using the native 3 | # API SetEnvironmentVariable (see MPR#4499) 4 | exit 1 5 | -------------------------------------------------------------------------------- /testsuite/tests/lib-unix/win-env/test_env2.reference: -------------------------------------------------------------------------------- 1 | Sys.getenv FOO -> Some "BAR" 2 | -------------------------------------------------------------------------------- /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/lib-unix/win-symlink/precheck.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | exit (if Sys.win32 && Unix.has_symlink () then 0 else 1) 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/link-test/aliases.ml: -------------------------------------------------------------------------------- 1 | module Submodule = Submodule 2 | -------------------------------------------------------------------------------- /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/link-test/external.mli: -------------------------------------------------------------------------------- 1 | external frexp : float -> float * int = "caml_frexp_float" 2 | -------------------------------------------------------------------------------- /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/link-test/external_for_pack.mli: -------------------------------------------------------------------------------- 1 | external frexp : float -> float * int = "caml_frexp_float" 2 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/submodule.ml: -------------------------------------------------------------------------------- 1 | let () = print_endline "linked"; flush stdout 2 | module M = struct end 3 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/test.ml: -------------------------------------------------------------------------------- 1 | include Aliases.Submodule.M 2 | let _, _ = External.frexp 3. 3 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/test.reference: -------------------------------------------------------------------------------- 1 | linked 2 | linked external 3 | linked external from pack 4 | -------------------------------------------------------------------------------- /testsuite/tests/link-test/use_in_pack.ml: -------------------------------------------------------------------------------- 1 | let _, _ = External_for_pack.frexp 12. 2 | -------------------------------------------------------------------------------- /testsuite/tests/manual-intf-c/prog.ml: -------------------------------------------------------------------------------- 1 | (* File prog.ml -- main program using curses *) 2 | open Curses;; 3 | let main_window = initscr () in 4 | let small_window = newwin 10 5 20 10 in 5 | mvwaddstr main_window 10 2 "Hello"; 6 | mvwaddstr small_window 4 3 "world"; 7 | refresh(); 8 | Unix.sleep 5; 9 | endwin() 10 | -------------------------------------------------------------------------------- /testsuite/tests/manual-intf-c/prog2.reference: -------------------------------------------------------------------------------- 1 | File "curses_stubs.c", line 1: 2 | Error: Required module `Curses' is unavailable 3 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml: -------------------------------------------------------------------------------- 1 | (** Test exhaustiveness. 2 | 3 | match clauses should continue to give warnings about inexhaustive 4 | value-matching clauses when there is an exception-matching clause 5 | *) 6 | 7 | let test_match_exhaustiveness () = 8 | match None with 9 | | exception e -> () 10 | | Some false -> () 11 | | None -> () 12 | ;; 13 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # * * * * Characters 210-289: 3 | ....match None with 4 | | exception e -> () 5 | | Some false -> () 6 | | None -> () 7 | Warning 8: this pattern-matching is not exhaustive. 8 | Here is an example of a case that is not matched: 9 | Some true 10 | val test_match_exhaustiveness : unit -> unit = 11 | # 12 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/allocation.reference: -------------------------------------------------------------------------------- 1 | no allocations for multiple-value match 2 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/exception_propagation.reference: -------------------------------------------------------------------------------- 1 | caught expected exception (Not_found) 2 | -------------------------------------------------------------------------------- /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/match-exception/raise_from_success_continuation.reference: -------------------------------------------------------------------------------- 1 | test raise from val handler 2 | raise from val handler succeeded 3 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/streams.reference: -------------------------------------------------------------------------------- 1 | iter_stream with handler case (match) is tail recursive 2 | -------------------------------------------------------------------------------- /testsuite/tests/match-exception/tail_calls.reference: -------------------------------------------------------------------------------- 1 | handler-case (match) is tail recursive 2 | -------------------------------------------------------------------------------- /testsuite/tests/messages/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | include $(BASEDIR)/makefiles/Makefile.expect 3 | include $(BASEDIR)/makefiles/Makefile.common 4 | -------------------------------------------------------------------------------- /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/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/misc-unsafe/quicksort.reference: -------------------------------------------------------------------------------- 1 | OK 2 | OK 3 | -------------------------------------------------------------------------------- /testsuite/tests/misc/bdd.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/boyer.reference: -------------------------------------------------------------------------------- 1 | Proved! 2 | -------------------------------------------------------------------------------- /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/misc/fib.ml: -------------------------------------------------------------------------------- 1 | let rec fib n = 2 | if n < 2 then 1 else fib(n-1) + fib(n-2) 3 | 4 | let _ = 5 | let n = 6 | if Array.length Sys.argv >= 2 7 | then int_of_string Sys.argv.(1) 8 | else 30 in 9 | print_int(fib n); print_newline(); exit 0 10 | -------------------------------------------------------------------------------- /testsuite/tests/misc/fib.reference: -------------------------------------------------------------------------------- 1 | 1346269 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/finaliser.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/misc/finaliser.reference -------------------------------------------------------------------------------- /testsuite/tests/misc/gcwords.reference: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/nucleic.reference: -------------------------------------------------------------------------------- 1 | 33.7976 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/pr7168.reference: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/takc.ml: -------------------------------------------------------------------------------- 1 | let rec tak x y z = 2 | if x > y then tak (tak (x-1) y z) (tak (y-1) z x) (tak (z-1) x y) 3 | else z 4 | 5 | let rec repeat n = 6 | if n <= 0 then 0 else tak 18 12 6 + repeat(n-1) 7 | 8 | let _ = print_int (repeat 200); print_newline(); exit 0 9 | -------------------------------------------------------------------------------- /testsuite/tests/misc/takc.reference: -------------------------------------------------------------------------------- 1 | 1400 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/taku.ml: -------------------------------------------------------------------------------- 1 | let rec tak (x, y, z) = 2 | if x > y then tak(tak (x-1, y, z), tak (y-1, z, x), tak (z-1, x, y)) 3 | else z 4 | 5 | let rec repeat n = 6 | if n <= 0 then 0 else tak(18,12,6) + repeat(n-1) 7 | 8 | let _ = print_int (repeat 200); print_newline(); exit 0 9 | -------------------------------------------------------------------------------- /testsuite/tests/misc/taku.reference: -------------------------------------------------------------------------------- 1 | 1400 2 | -------------------------------------------------------------------------------- /testsuite/tests/misc/weaklifetime.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/misc/weaklifetime.reference -------------------------------------------------------------------------------- /testsuite/tests/misc/weaklifetime2.reference: -------------------------------------------------------------------------------- 1 | success 2 | success 3 | -------------------------------------------------------------------------------- /testsuite/tests/misc/weaktest.reference: -------------------------------------------------------------------------------- 1 | pass 2 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/aliases.ml: -------------------------------------------------------------------------------- 1 | module A' = A (* missing a.cmi *) 2 | module B' = B (* broken b.cmi *) 3 | module C' = C (* valid c.cmi *) 4 | module D' = D (* valid d.cmi *) 5 | let () = print_int D'.something 6 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/aliases.ml.reference: -------------------------------------------------------------------------------- 1 | File "_none_", line 1: 2 | Warning 49: no cmi file was found in path for module A 3 | File "_none_", line 1: 4 | Warning 49: no valid cmi file was found in path for module B. b.cmi 5 | is not a compiled interface 6 | -------------------------------------------------------------------------------- /testsuite/tests/no-alias-deps/b.cmi.pre: -------------------------------------------------------------------------------- 1 | Not a valid cmi file 2 | -------------------------------------------------------------------------------- /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/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/fst/regular.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = x 3 | -------------------------------------------------------------------------------- /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/opaque/intf/regular.mli: -------------------------------------------------------------------------------- 1 | 2 | val choose : 'a -> 'a -> 'a 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/opaque/snd/regular.ml: -------------------------------------------------------------------------------- 1 | 2 | let choose x y = y 3 | -------------------------------------------------------------------------------- /testsuite/tests/opaque/test.ml: -------------------------------------------------------------------------------- 1 | 2 | let () = 3 | print_endline (Opaque_intf.choose "Opaque_intf: First" "Opaque_intf: Second") 4 | 5 | let () = 6 | print_endline (Opaque_impl.choose "Opaque_impl: First" "Opaque_impl: Second") 7 | 8 | let () = 9 | print_endline (Regular.choose "Regular: First" "Regular: Second") 10 | -------------------------------------------------------------------------------- /testsuite/tests/output_obj/test.ml: -------------------------------------------------------------------------------- 1 | let () = Printf.printf "Test!!\n%!" 2 | -------------------------------------------------------------------------------- /testsuite/tests/output_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/parsetree/test.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/parsetree/test.reference -------------------------------------------------------------------------------- /testsuite/tests/parsing/docstrings.ml: -------------------------------------------------------------------------------- 1 | type 'a with_default 2 | = ?size:int (** default [42] *) 3 | -> ?resizable:bool (** default [true] *) 4 | -> 'a 5 | 6 | type obj = < 7 | meth1 : int -> int; 8 | (** method 1 *) 9 | 10 | meth2: unit -> float (** method 2 *); 11 | > 12 | 13 | type var = [ 14 | | `Foo (** foo *) 15 | | `Bar of int * string (** bar *) 16 | ] 17 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr6865.ml: -------------------------------------------------------------------------------- 1 | let%foo x = 42 2 | let%foo _ = () and _ = () 3 | let%foo _ = () 4 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr7165.ml: -------------------------------------------------------------------------------- 1 | (* this is a lexer directive with an out-of-bound integer; 2 | it should result in a lexing error instead of an 3 | uncaught exception as in PR#7165 *) 4 | #9342101923012312312 5 | -------------------------------------------------------------------------------- /testsuite/tests/parsing/pr7165.ml.reference: -------------------------------------------------------------------------------- 1 | File "pr7165.ml", line 4, characters 0-21: 2 | Error: Invalid lexer directive "#9342101923012312312": line number out of range 3 | -------------------------------------------------------------------------------- /testsuite/tests/ppx-attributes/warning.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/ppx-attributes/warning.reference -------------------------------------------------------------------------------- /testsuite/tests/ppx-contexts/program.ml: -------------------------------------------------------------------------------- 1 | (* A simple PPX *) 2 | 3 | open Ast_mapper 4 | 5 | let () = 6 | register "test" (fun _ -> 7 | Printf.eprintf "use_threads=%b\n" !Clflags.use_threads; 8 | Printf.eprintf "use_vmthreads=%b\n" !Clflags.use_vmthreads; 9 | default_mapper); 10 | 11 | -------------------------------------------------------------------------------- /testsuite/tests/ppx-contexts/test.ml: -------------------------------------------------------------------------------- 1 | (* empty *) 2 | -------------------------------------------------------------------------------- /testsuite/tests/ppx-contexts/test.reference: -------------------------------------------------------------------------------- 1 | use_threads=true 2 | use_vmthreads=false 3 | use_threads=false 4 | use_vmthreads=true 5 | -------------------------------------------------------------------------------- /testsuite/tests/prim-bigstring/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | LIBRARIES=unix bigarray 3 | ADD_COMPFLAGS=-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix \ 4 | -I $(OTOPDIR)/otherlibs/bigarray 5 | LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(TOPDIR)/otherlibs/bigarray 6 | 7 | include $(BASEDIR)/makefiles/Makefile.several 8 | include $(BASEDIR)/makefiles/Makefile.common 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/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/prim-revapply/revapply.reference: -------------------------------------------------------------------------------- 1 | 6 2 | 36 3 | 18 4 | 37 5 | 260 6 | -------------------------------------------------------------------------------- /testsuite/tests/printing-types/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | include $(BASEDIR)/makefiles/Makefile.toplevel 3 | include $(BASEDIR)/makefiles/Makefile.common 4 | -------------------------------------------------------------------------------- /testsuite/tests/printing-types/pr248.ml: -------------------------------------------------------------------------------- 1 | (** Test that weak variables keep their names long enough *) 2 | 3 | let f y = fun x -> x 4 | let blah = f 0 5 | let splash () = blah (failwith "coucou") 6 | let blurp = f 0;; 7 | 8 | blah 1;; 9 | 10 | let g = f ();; 11 | 12 | g (fun x -> x);; 13 | let h = g (f ());; 14 | -------------------------------------------------------------------------------- /testsuite/tests/printing-types/pr248.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # val f : 'a -> 'b -> 'b = 3 | val blah : '_weak1 -> '_weak1 = 4 | val splash : unit -> '_weak1 = 5 | val blurp : '_weak2 -> '_weak2 = 6 | # - : int = 1 7 | # val g : '_weak3 -> '_weak3 = 8 | # - : '_weak4 -> '_weak4 = 9 | # val h : '_weak4 -> '_weak4 = 10 | # 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/raise-counts/b.ml: -------------------------------------------------------------------------------- 1 | let bug x = A.trigger_bug x 2 | -------------------------------------------------------------------------------- /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/raise-counts/main.reference: -------------------------------------------------------------------------------- 1 | OK. 2 | -------------------------------------------------------------------------------- /testsuite/tests/raise-counts/ocamltests: -------------------------------------------------------------------------------- 1 | main.ml 2 | -------------------------------------------------------------------------------- /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/regression/missing_set_of_closures/b.ml: -------------------------------------------------------------------------------- 1 | 2 | let g = 3 | let module X = A.F() in 4 | X.g 5 | -------------------------------------------------------------------------------- /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/regression/pr3612/pr3612.reference: -------------------------------------------------------------------------------- 1 | -1 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr5080-notes/pr5080_notes_ok.ml: -------------------------------------------------------------------------------- 1 | let marshal_int f = 2 | match [] with 3 | | _ :: `INT n :: _ -> f n 4 | | _ -> failwith "marshal_int" 5 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr5233/pr5233.reference: -------------------------------------------------------------------------------- 1 | checking... value found / testing... ok 2 | checking... no value 3 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr5757/pr5757.ml: -------------------------------------------------------------------------------- 1 | Random.init 3;; 2 | for i = 0 to 100_000 do 3 | ignore (Bytes.create (Random.int 1_000_000)) 4 | done;; 5 | Printf.printf "hello world\n";; 6 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr5757/pr5757.reference: -------------------------------------------------------------------------------- 1 | hello world 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr6024/pr6024.ml: -------------------------------------------------------------------------------- 1 | Format.printf "@[%@-@@-@]@.";; 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr6024/pr6024.reference: -------------------------------------------------------------------------------- 1 | @-@- 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7042/pr7042.ml: -------------------------------------------------------------------------------- 1 | let _ = 2 | let a = [| 0.0; -. 0.0 |] in 3 | Printf.printf "%Lx %Lx\n" 4 | (Int64.bits_of_float a.(0)) (Int64.bits_of_float a.(1)) 5 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7042/pr7042.reference: -------------------------------------------------------------------------------- 1 | 0 8000000000000000 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7426/pr7426.ml: -------------------------------------------------------------------------------- 1 | class some_class = object val some_val = 0.0 end 2 | -------------------------------------------------------------------------------- /testsuite/tests/regression/pr7426/pr7426.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/regression/pr7426/pr7426.reference -------------------------------------------------------------------------------- /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/required-external/main.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | ignore (File.getcwd ()) 3 | -------------------------------------------------------------------------------- /testsuite/tests/required-external/main.reference: -------------------------------------------------------------------------------- 1 | Module `File' is linked 2 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-C-exceptions/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | #MODULES= 3 | MAIN_MODULE=test 4 | C_FILES=stub_test 5 | 6 | include $(BASEDIR)/makefiles/Makefile.one 7 | include $(BASEDIR)/makefiles/Makefile.common 8 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-C-exceptions/test.ml: -------------------------------------------------------------------------------- 1 | external failwith_from_ocaml : string -> 'a = "caml_failwith_value" 2 | 3 | external dynamic_invalid_argument : unit -> 'a = "dynamic_invalid_argument" 4 | 5 | let () = 6 | try failwith_from_ocaml ("fo" ^ "o") 7 | with Failure foo -> print_endline foo 8 | 9 | let () = 10 | try dynamic_invalid_argument () 11 | with Invalid_argument bar -> print_endline bar 12 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-C-exceptions/test.reference: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/stackoverflow.bytecode.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/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/runtime-errors/syserror.bytecode.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Sys_error("titi:/toto: No such file or directory") 2 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/syserror.ml: -------------------------------------------------------------------------------- 1 | let channel = open_out "titi:/toto" 2 | -------------------------------------------------------------------------------- /testsuite/tests/runtime-errors/syserror.native.reference: -------------------------------------------------------------------------------- 1 | Fatal error: exception Sys_error("titi:/toto: No such file or directory") 2 | -------------------------------------------------------------------------------- /testsuite/tests/self-contained-toplevel/foo.ml: -------------------------------------------------------------------------------- 1 | let value = "Hello, world!" 2 | -------------------------------------------------------------------------------- /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 | Printf.printf "let foo = %S\n" data 5 | -------------------------------------------------------------------------------- /testsuite/tests/self-contained-toplevel/input.ml: -------------------------------------------------------------------------------- 1 | print_endline Foo.value;; 2 | -------------------------------------------------------------------------------- /testsuite/tests/self-contained-toplevel/main.reference: -------------------------------------------------------------------------------- 1 | Hello, world! 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-command-line/unknown-file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/tool-command-line/unknown-file -------------------------------------------------------------------------------- /testsuite/tests/tool-command-line/unknown-file.byte.reference: -------------------------------------------------------------------------------- 1 | don't know what to do with unknown-file 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-command-line/unknown-file.opt.reference: -------------------------------------------------------------------------------- 1 | don't know what to do with unknown-file 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/basic/debuggee.ml: -------------------------------------------------------------------------------- 1 | print_endline Sys.argv.(1);; 2 | print_endline (Sys.getenv "foo");; 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/basic/debuggee.reference: -------------------------------------------------------------------------------- 1 | 2 | (ocd) Loading program... done. 3 | arg1 4 | notbar 5 | Program exit. 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/find-artifacts/debuggee.reference: -------------------------------------------------------------------------------- 1 | 2 | (ocd) Loading program... done. 3 | Breakpoint: 1 4 | 10 <|b|>print x; 5 | x: Blah.blah = Foo 6 | y: Blah.blah = Bar "hi" 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/find-artifacts/in/blah.ml: -------------------------------------------------------------------------------- 1 | type blah = 2 | | Foo 3 | | Bar of string 4 | -------------------------------------------------------------------------------- /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-debugger/find-artifacts/input_script: -------------------------------------------------------------------------------- 1 | break @ Foo 10 2 | run 3 | print x 4 | print y 5 | quit 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/no_debug_event/a.ml: -------------------------------------------------------------------------------- 1 | let x = 1 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/input_script: -------------------------------------------------------------------------------- 1 | run 2 | quit 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-debugger/no_debug_event/noev.reference: -------------------------------------------------------------------------------- 1 | 2 | (ocd) Loading program... done. 3 | 1 4 | Program exit. 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t000.ml: -------------------------------------------------------------------------------- 1 | (* empty file *) 2 | 3 | (** 4 | 0 ATOM0 5 | 1 SETGLOBAL T000 6 | 3 STOP 7 | **) 8 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const0.ml: -------------------------------------------------------------------------------- 1 | 0;; 2 | 3 | (** 4 | 0 CONST0 5 | 1 ATOM0 6 | 2 SETGLOBAL T010-const0 7 | 4 STOP 8 | **) 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const1.ml: -------------------------------------------------------------------------------- 1 | 1;; 2 | 3 | (** 4 | 0 CONST1 5 | 1 ATOM0 6 | 2 SETGLOBAL T010-const1 7 | 4 STOP 8 | **) 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const2.ml: -------------------------------------------------------------------------------- 1 | 2;; 2 | 3 | (** 4 | 0 CONST2 5 | 1 ATOM0 6 | 2 SETGLOBAL T010-const2 7 | 4 STOP 8 | **) 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t010-const3.ml: -------------------------------------------------------------------------------- 1 | 3;; 2 | 3 | (** 4 | 0 CONST3 5 | 1 ATOM0 6 | 2 SETGLOBAL T010-const3 7 | 4 STOP 8 | **) 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t011-constint.ml: -------------------------------------------------------------------------------- 1 | 4;; 2 | 3 | (** 4 | 0 CONSTINT 4 5 | 2 ATOM0 6 | 3 SETGLOBAL T011-constint 7 | 5 STOP 8 | **) 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t020.ml: -------------------------------------------------------------------------------- 1 | let _ = () in ();; 2 | 3 | (** 4 | 0 CONST0 5 | 1 PUSHCONST0 6 | 2 POP 1 7 | 4 ATOM0 8 | 5 SETGLOBAL T020 9 | 7 STOP 10 | **) 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t021-pushconst1.ml: -------------------------------------------------------------------------------- 1 | let _ = () in 1;; 2 | 3 | (** 4 | 0 CONST0 5 | 1 PUSHCONST1 6 | 2 POP 1 7 | 4 ATOM0 8 | 5 SETGLOBAL T021-pushconst1 9 | 7 STOP 10 | **) 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t021-pushconst2.ml: -------------------------------------------------------------------------------- 1 | let _ = () in 2;; 2 | 3 | (** 4 | 0 CONST0 5 | 1 PUSHCONST2 6 | 2 POP 1 7 | 4 ATOM0 8 | 5 SETGLOBAL T021-pushconst2 9 | 7 STOP 10 | **) 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t021-pushconst3.ml: -------------------------------------------------------------------------------- 1 | let _ = () in 3;; 2 | 3 | (** 4 | 0 CONST0 5 | 1 PUSHCONST3 6 | 2 POP 1 7 | 4 ATOM0 8 | 5 SETGLOBAL T021-pushconst3 9 | 7 STOP 10 | **) 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t022-pushconstint.ml: -------------------------------------------------------------------------------- 1 | let _ = () in -1;; 2 | 3 | (** 4 | 0 CONST0 5 | 1 PUSHCONSTINT -1 6 | 3 POP 1 7 | 5 ATOM0 8 | 6 SETGLOBAL T022-pushconstint 9 | 8 STOP 10 | **) 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t040-makeblock1.ml: -------------------------------------------------------------------------------- 1 | type t = { 2 | mutable a : int; 3 | };; 4 | 5 | { a = 0 };; 6 | 7 | (** 8 | 0 CONST0 9 | 1 MAKEBLOCK1 0 10 | 3 ATOM0 11 | 4 SETGLOBAL T040-makeblock1 12 | 6 STOP 13 | **) 14 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t040-makeblock2.ml: -------------------------------------------------------------------------------- 1 | type t = { 2 | mutable a : int; 3 | mutable b : int; 4 | };; 5 | 6 | { a = 0; b = 0 };; 7 | 8 | (** 9 | 0 CONST0 10 | 1 PUSHCONST0 11 | 2 MAKEBLOCK2 0 12 | 4 ATOM0 13 | 5 SETGLOBAL T040-makeblock2 14 | 7 STOP 15 | **) 16 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t040-makeblock3.ml: -------------------------------------------------------------------------------- 1 | type t = { 2 | mutable a : int; 3 | mutable b : int; 4 | mutable c : int; 5 | };; 6 | 7 | { a = 0; b = 0; c = 0 };; 8 | 9 | (** 10 | 0 CONST0 11 | 1 PUSHCONST0 12 | 2 PUSHCONST0 13 | 3 MAKEBLOCK3 0 14 | 5 ATOM0 15 | 6 SETGLOBAL T040-makeblock3 16 | 8 STOP 17 | **) 18 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t041-makeblock.ml: -------------------------------------------------------------------------------- 1 | type t = { 2 | mutable a : int; 3 | mutable b : int; 4 | mutable c : int; 5 | mutable d : int; 6 | };; 7 | 8 | { a = 0; b = 0; c = 0; d = 0 };; 9 | 10 | (** 11 | 0 CONST0 12 | 1 PUSHCONST0 13 | 2 PUSHCONST0 14 | 3 PUSHCONST0 15 | 4 MAKEBLOCK 4, 0 16 | 7 ATOM0 17 | 8 SETGLOBAL T041-makeblock 18 | 10 STOP 19 | **) 20 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t050-getglobal.ml: -------------------------------------------------------------------------------- 1 | [1];; 2 | 3 | (** 4 | 0 GETGLOBAL <0>(1, 0) 5 | 2 ATOM0 6 | 3 SETGLOBAL T050-getglobal 7 | 5 STOP 8 | **) 9 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t050-pushgetglobal.ml: -------------------------------------------------------------------------------- 1 | let _ = () in 0.01;; 2 | 3 | (** 4 | 0 CONST0 5 | 1 PUSHGETGLOBAL 0.01 6 | 3 POP 1 7 | 5 ATOM0 8 | 6 SETGLOBAL T050-pushgetglobal 9 | 8 STOP 10 | **) 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t051-getglobalfield.ml: -------------------------------------------------------------------------------- 1 | Lib.x;; 2 | 3 | (** 4 | 0 CONSTINT 42 5 | 2 PUSHACC0 6 | 3 MAKEBLOCK1 0 7 | 5 POP 1 8 | 7 SETGLOBAL Lib 9 | 9 GETGLOBALFIELD Lib, 0 10 | 12 ATOM0 11 | 13 SETGLOBAL T051-getglobalfield 12 | 15 STOP 13 | **) 14 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t051-pushgetglobalfield.ml: -------------------------------------------------------------------------------- 1 | let _ = () in Lib.x;; 2 | 3 | (** 4 | 0 CONSTINT 42 5 | 2 PUSHACC0 6 | 3 MAKEBLOCK1 0 7 | 5 POP 1 8 | 7 SETGLOBAL Lib 9 | 9 CONST0 10 | 10 PUSHGETGLOBALFIELD Lib, 0 11 | 13 POP 1 12 | 15 ATOM0 13 | 16 SETGLOBAL T051-pushgetglobalfield 14 | 18 STOP 15 | **) 16 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t060-raise.ml: -------------------------------------------------------------------------------- 1 | open Lib;; 2 | raise End_of_file;; 3 | 4 | (** 5 | 0 CONSTINT 42 6 | 2 PUSHACC0 7 | 3 MAKEBLOCK1 0 8 | 5 POP 1 9 | 7 SETGLOBAL Lib 10 | 9 GETGLOBAL End_of_file 11 | 11 MAKEBLOCK1 0 12 | 13 RAISE 13 | 14 SETGLOBAL T060-raise 14 | 16 STOP 15 | **) 16 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t190-makefloatblock-1.ml: -------------------------------------------------------------------------------- 1 | open Lib;; 2 | let x = 0.0 in [| x |];; 3 | 4 | (** 5 | 0 CONSTINT 42 6 | 2 PUSHACC0 7 | 3 MAKEBLOCK1 0 8 | 5 POP 1 9 | 7 SETGLOBAL Lib 10 | 9 GETGLOBAL 0 11 | 11 PUSHACC0 12 | 12 MAKEFLOATBLOCK 1 13 | 14 POP 1 14 | 16 ATOM0 15 | 17 SETGLOBAL T190-makefloatblock-1 16 | 19 STOP 17 | **) 18 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocaml/t330-compact-1.ml: -------------------------------------------------------------------------------- 1 | open Lib;; 2 | Gc.compact ();; 3 | 4 | (** 5 | 0 CONSTINT 42 6 | 2 PUSHACC0 7 | 3 MAKEBLOCK1 0 8 | 5 POP 1 9 | 7 SETGLOBAL Lib 10 | 9 CONST0 11 | 10 C_CALL1 gc_compaction 12 | 12 ATOM0 13 | 13 SETGLOBAL T330-compact-1 14 | 15 STOP 15 | **) 16 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-compat32/a.ml: -------------------------------------------------------------------------------- 1 | let a = 0xffffffffffff 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-compat32/test.reference: -------------------------------------------------------------------------------- 1 | File "a.ml", line 1: 2 | Error: Generated bytecode unit "a.cmo" cannot be used on a 32-bit platform 3 | File "_none_", line 1: 4 | Error: Generated bytecode library "a.cma" cannot be used on a 32-bit platform 5 | File "_none_", line 1: 6 | Error: Generated bytecode executable "a.byte" cannot be used on a 32-bit platform 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | 3 | compile: 4 | @printf " ... testing 'foo.ml'" 5 | @$(OCAMLC) -c a.ml 6 | @$(OCAMLC) -open A.M -c b.ml \ 7 | && echo " => passed" || echo " => failed" 8 | 9 | promote: 10 | 11 | clean: 12 | @rm -f a.cmi a.cmo b.cmi b.cmo 13 | 14 | include $(BASEDIR)/makefiles/Makefile.common 15 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/a.ml: -------------------------------------------------------------------------------- 1 | module M = struct 2 | let f x = x +1 3 | end 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlc-open/b.ml: -------------------------------------------------------------------------------- 1 | let g = f 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/A.ml: -------------------------------------------------------------------------------- 1 | let f x = x +1 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/B.ml: -------------------------------------------------------------------------------- 1 | open Packed 2 | let g = A.f 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/C.ml: -------------------------------------------------------------------------------- 1 | open Lib 2 | let h x = A.f x + B.g x 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/D.ml: -------------------------------------------------------------------------------- 1 | let z x = imp (x*2) 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/depend.mk.reference: -------------------------------------------------------------------------------- 1 | lib.cmo : lib.cmi 2 | lib.cmx : lib.cmi 3 | lib.cmi : 4 | LibA.cmo : lib.cmi 5 | LibA.cmx : lib.cmx 6 | LibB.cmo : LibA.cmo lib.cmi 7 | LibB.cmx : LibA.cmx lib.cmx 8 | LibC.cmo : LibB.cmo LibA.cmo lib.cmi 9 | LibC.cmx : LibB.cmx LibA.cmx lib.cmx 10 | LibD.cmo : lib.cmi 11 | LibD.cmx : lib.cmx 12 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldep-modalias/depend.mk2.reference: -------------------------------------------------------------------------------- 1 | LibA.cmo : lib.cmi 2 | LibA.cmx : lib.cmi 3 | LibB.cmo : LibA.cmo lib.cmi 4 | LibB.cmx : LibA.cmx lib.cmi 5 | LibC.cmo : LibB.cmo LibA.cmo lib.cmi 6 | LibC.cmx : LibB.cmx LibA.cmx lib.cmi 7 | LibD.cmo : lib.cmi 8 | LibD.cmx : lib.cmi 9 | -------------------------------------------------------------------------------- /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/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/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-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/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-ocamldep-modalias/main.ml: -------------------------------------------------------------------------------- 1 | open Lib 2 | 3 | let () = Printf.printf "B.g 3 = %d\n%!" (B.g 3) 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-2/loop.ml: -------------------------------------------------------------------------------- 1 | 2 | module rec A : sig type t end = B and B : sig type t = A.t end = A;; 3 | 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-2/short_description.txt: -------------------------------------------------------------------------------- 1 | Short global description in text mode 2 | 3 | This file tests that documentation in text mode are given 4 | a short description in the global description of modules. 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-html/Item_ids.mli: -------------------------------------------------------------------------------- 1 | (** Check that all toplevel items are given a unique id. *) 2 | 3 | exception Ex 4 | type t 5 | val x: t 6 | type ext = .. 7 | type ext += A 8 | class c: object end 9 | class type ct= object end 10 | [@@@attribute] 11 | module M: sig end 12 | module type s = sig end 13 | 14 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-html/Loop.ml: -------------------------------------------------------------------------------- 1 | 2 | module rec A : sig type t end = B and B : sig type t = A.t end = A;; 3 | 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-html/Module_whitespace.ml: -------------------------------------------------------------------------------- 1 | module M = Set.Make(struct 2 | type t = int 3 | let compare = compare 4 | end) 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-html/No_preamble.mli: -------------------------------------------------------------------------------- 1 | 2 | open String 3 | 4 | (** This is a documentation comment for [x], not a module preamble. *) 5 | val x: unit 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-open/alias.ml: -------------------------------------------------------------------------------- 1 | module Container = struct 2 | module Aliased_inner = Inner 3 | end 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-open/inner.ml: -------------------------------------------------------------------------------- 1 | 2 | type a = int 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc-open/main.ml: -------------------------------------------------------------------------------- 1 | 2 | (** Documentation test *) 3 | 4 | type t = a 5 | (** Alias to type Inner.a *) 6 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t02.ml: -------------------------------------------------------------------------------- 1 | module Foo = struct type u type t = int let x = 1 end;; 2 | module type TFoo = module type of Foo;; 3 | 4 | module type TBar = TFoo with type u := float;; 5 | 6 | module type Gee = 7 | sig 8 | module M : module type of Foo 9 | include module type of Foo 10 | end 11 | -------------------------------------------------------------------------------- /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-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/tool-ocamldoc/t04.ml: -------------------------------------------------------------------------------- 1 | (** Testing display of inline record. 2 | 3 | @test_types_display 4 | *) 5 | 6 | 7 | module A = struct 8 | type a = A of {lbl:int} 9 | 10 | end 11 | 12 | module type E = sig 13 | exception E of {lbl:int} 14 | 15 | end 16 | 17 | 18 | module E_bis= struct 19 | exception E of {lbl:int} 20 | end 21 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t05.ml: -------------------------------------------------------------------------------- 1 | 2 | module rec A : sig type t end = B and B : sig type t = A.t end = A;; 3 | 4 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamldoc/t05.reference: -------------------------------------------------------------------------------- 1 | # 2 | # module T05: 3 | # 4 | # module T05.A: 5 | # 6 | # module T05.B: 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlobjinfo/question.ml: -------------------------------------------------------------------------------- 1 | let answer = 42 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-ocamlobjinfo/test.reference: -------------------------------------------------------------------------------- 1 | File question.cmxs 2 | Name: Question 3 | CRC of implementation: 4 | Globals defined: 5 | Question 6 | Interfaces imported: 7 | Question 8 | Pervasives 9 | CamlinternalFormatBasics 10 | Implementations imported: 11 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/first_arg_fail.txt: -------------------------------------------------------------------------------- 1 | test.ml 2 | -I 3 | ../ 4 | -------------------------------------------------------------------------------- /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-invocation/indirect_first_arg_fail.txt: -------------------------------------------------------------------------------- 1 | -args 2 | first_arg_fail.txt 3 | -------------------------------------------------------------------------------- /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: -------------------------------------------------------------------------------- 1 | -args 2 | last_arg_fail.txt 3 | -------------------------------------------------------------------------------- /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/tool-toplevel-invocation/last_arg_fail.txt: -------------------------------------------------------------------------------- 1 | -I 2 | ../ 3 | test.ml 4 | -------------------------------------------------------------------------------- /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/tool-toplevel-invocation/test.ml: -------------------------------------------------------------------------------- 1 | printf "Test succeeds\n";; 2 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/working_arg.txt: -------------------------------------------------------------------------------- 1 | -open 2 | Printf 3 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel-invocation/working_arg.txt.reference: -------------------------------------------------------------------------------- 1 | 2 | # Test succeeds 3 | - : unit = () 4 | # 5 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/exotic_lists.ml: -------------------------------------------------------------------------------- 1 | module L = struct 2 | type ('a,'b) t = [] | (::) of 'a * ('b,'a) t 3 | end;; 4 | L.[([1;2]:int list);"2";[3;4];"4";[5]];; 5 | open L;; 6 | [1;"2";3;"4";5];; 7 | 8 | module L = struct 9 | type 'a t = 'a list = [] | (::) of 'a * 'a t 10 | end;; 11 | L.[[1];[2];[3];[4];[5]];; 12 | open L;; 13 | [1;2;3;4;5];; 14 | 15 | 16 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/pr7060.ml: -------------------------------------------------------------------------------- 1 | type t = A | B;; 2 | type u = C of t;; 3 | let print_t out = function A -> Format.fprintf out "A";; 4 | #install_printer print_t;; 5 | B;; 6 | C B;; 7 | -------------------------------------------------------------------------------- /testsuite/tests/tool-toplevel/tracing.ml: -------------------------------------------------------------------------------- 1 | List.fold_left;; 2 | #trace List.fold_left;; 3 | 0;; 4 | List.fold_left (+) 0 [1;2;3];; 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-extension-constructor/test.ml: -------------------------------------------------------------------------------- 1 | 2 | type t = ..;; 3 | type t += A;; 4 | 5 | [%extension_constructor A];; 6 | ([%extension_constructor A] : extension_constructor);; 7 | 8 | module M = struct 9 | type extension_constructor = int 10 | end;; 11 | 12 | open M;; 13 | 14 | ([%extension_constructor A] : extension_constructor);; 15 | -------------------------------------------------------------------------------- /testsuite/tests/typing-extensions/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | include $(BASEDIR)/makefiles/Makefile.toplevel 3 | include $(BASEDIR)/makefiles/Makefile.common 4 | -------------------------------------------------------------------------------- /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/typing-gadts/pr6174.ml: -------------------------------------------------------------------------------- 1 | type _ t = C : ((('a -> 'o) -> 'o) -> ('b -> 'o) -> 'o) t 2 | let f : type a o. ((a -> o) -> o) t -> (a -> o) -> o = 3 | fun C k -> k (fun x -> x);; 4 | [%%expect{| 5 | type _ t = C : ((('a -> 'o) -> 'o) -> ('b -> 'o) -> 'o) t 6 | Line _, characters 24-25: 7 | Error: This expression has type $0 but an expression was expected of type 8 | $1 = ($2 -> $1) -> $1 9 | |}];; 10 | -------------------------------------------------------------------------------- /testsuite/tests/typing-gadts/pr6934.ml: -------------------------------------------------------------------------------- 1 | type nonrec t = A : t;; 2 | [%%expect{| 3 | Line _, characters 16-21: 4 | Error: GADT case syntax cannot be used in a 'nonrec' block. 5 | |}] 6 | 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-gadts/pr7230.ml: -------------------------------------------------------------------------------- 1 | type _ t = T : int t;; 2 | 3 | (* Should raise Not_found *) 4 | let _ = match (raise Not_found : float t) with _ -> .;; 5 | 6 | [%%expect{| 7 | type _ t = T : int t 8 | Exception: Not_found. 9 | |}];; 10 | -------------------------------------------------------------------------------- /testsuite/tests/typing-gadts/pr7298.ml: -------------------------------------------------------------------------------- 1 | type t = T : t;; 2 | 3 | module M : sig 4 | type free = < bar : t -> unit; foo : free -> unit > 5 | end = struct 6 | class free = object (self : 'self) 7 | method foo self = () 8 | method bar T = self#foo self 9 | end 10 | end;; 11 | [%%expect{| 12 | type t = T : t 13 | module M : sig type free = < bar : t -> unit; foo : free -> unit > end 14 | |}] 15 | -------------------------------------------------------------------------------- /testsuite/tests/typing-labels/mixin.reference: -------------------------------------------------------------------------------- 1 | y 2 | -6 + x 3 | 9 4 | -------------------------------------------------------------------------------- /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-misc-bugs/pr6303_bad.ml: -------------------------------------------------------------------------------- 1 | type 'a foo = {x: 'a; y: int} 2 | let r = {{x = 0; y = 0} with x = 0} 3 | let r' : string foo = r 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc-bugs/pr6946_bad.ml: -------------------------------------------------------------------------------- 1 | external foo : int = "%ignore";; 2 | let _ = foo ();; 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc/pr6939.ml-noflat: -------------------------------------------------------------------------------- 1 | let rec x = [| x |]; 1.;; 2 | [%%expect{| 3 | Line _, characters 12-19: 4 | Warning 10: this expression should have type unit. 5 | val x : float = 1. 6 | |}];; 7 | 8 | let rec x = let u = [|y|] in 10. and y = 1.;; 9 | [%%expect{| 10 | Line _, characters 16-17: 11 | Warning 26: unused variable u. 12 | val x : float = 10. 13 | val y : float = 1. 14 | |}];; 15 | -------------------------------------------------------------------------------- /testsuite/tests/typing-misc/wellfounded.ml: -------------------------------------------------------------------------------- 1 | (* PR#6768 *) 2 | 3 | type _ prod = Prod : ('a * 'y) prod;; 4 | 5 | let f : type t. t prod -> _ = function Prod -> 6 | let module M = 7 | struct 8 | type d = d * d 9 | end 10 | in () 11 | ;; 12 | [%%expect{| 13 | type _ prod = Prod : ('a * 'y) prod 14 | Line _, characters 6-20: 15 | Error: The type abbreviation d is cyclic 16 | |}];; 17 | -------------------------------------------------------------------------------- /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-missing-cmi/c.ml: -------------------------------------------------------------------------------- 1 | (* GPR#816 *) 2 | (* This PR means that Foo(Bar).t is known to be equal to Foo(Baz).t 3 | when Bar is an alias for Baz, even when the definition for Foo is unknown. 4 | This can happen when .cmi files depend on other .cmi files not in the path 5 | -- a situation that is partially supported. *) 6 | 7 | module A = M 8 | 9 | type t1 = M.Foo(M).t 10 | type t2 = A.Foo(A).t 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/main.ml: -------------------------------------------------------------------------------- 1 | let _ = A.a = B.b 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/main.ml.reference: -------------------------------------------------------------------------------- 1 | File "main.ml", line 1, characters 14-17: 2 | Error: This expression has type M.b but an expression was expected of type 3 | M.a 4 | M.b is abstract because no corresponding cmi file was found in path. 5 | M.a is abstract because no corresponding cmi file was found in path. 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-missing-cmi/main_ok.ml: -------------------------------------------------------------------------------- 1 | let f (x : C.t1) = (x : C.t2) 2 | -------------------------------------------------------------------------------- /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-modules-bugs/pr5164_ok.ml: -------------------------------------------------------------------------------- 1 | module type INCLUDING = sig 2 | include module type of List 3 | include module type of ListLabels 4 | end 5 | 6 | module Including_typed: INCLUDING = struct 7 | include List 8 | include ListLabels 9 | end 10 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr5663_ok.ml: -------------------------------------------------------------------------------- 1 | module F (M : sig 2 | type 'a t 3 | type 'a u = string 4 | val f : unit -> _ u t 5 | end) = struct 6 | let t = M.f () 7 | end 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6240_ok.ml: -------------------------------------------------------------------------------- 1 | module M : sig 2 | module type T 3 | module F (X : T) : sig end 4 | end = struct 5 | module type T = sig end 6 | module F (X : T) = struct end 7 | end 8 | 9 | module type T = M.T 10 | 11 | module F : functor (X : T) -> sig end = M.F 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6293_bad.ml: -------------------------------------------------------------------------------- 1 | module type S = sig type t = { a : int; b : int; } end;; 2 | let f (module M : S with type t = int) = { M.a = 0 };; 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6651_ok.ml: -------------------------------------------------------------------------------- 1 | module type S = sig 2 | module type T 3 | module X : T 4 | end 5 | 6 | module F (X : S) = X.X 7 | 8 | module M = struct 9 | module type T = sig type t end 10 | module X = struct type t = int end 11 | end 12 | 13 | type t = F(M).t 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_first_bad.ml: -------------------------------------------------------------------------------- 1 | let should_reject = 2 | let table = Hashtbl.create 1 in 3 | fun x y -> Hashtbl.add table x y 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_ok.ml: -------------------------------------------------------------------------------- 1 | type 'a t = 'a option 2 | let is_some = function 3 | | None -> false 4 | | Some _ -> true 5 | 6 | let should_accept ?x () = is_some x 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6899_second_bad.ml: -------------------------------------------------------------------------------- 1 | include struct 2 | let foo `Test = () 3 | let wrap f `Test = f 4 | let bar = wrap () 5 | end 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6944_ok.ml: -------------------------------------------------------------------------------- 1 | let f () = 2 | let module S = String in 3 | let module N = Map.Make(S) in 4 | N.add "sum" 41 N.empty;; 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6954_ok.ml: -------------------------------------------------------------------------------- 1 | module X = struct module Y = struct module type S = sig type t end end end 2 | 3 | (* open X (* works! *) *) 4 | module Y = X.Y 5 | 6 | type 'a arg_t = 'at constraint 'a = (module Y.S with type t = 'at) 7 | type t = (module X.Y.S with type t = unit) 8 | 9 | let f (x : t arg_t) = () 10 | 11 | let () = f () 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6981_ok.ml: -------------------------------------------------------------------------------- 1 | module type S = 2 | sig 3 | type a 4 | type b 5 | end 6 | module Foo 7 | (Bar : S with type a = private [> `A]) 8 | (Baz : S with type b = private < b : Bar.b ; .. >) = 9 | struct 10 | end 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr6985_ok.ml: -------------------------------------------------------------------------------- 1 | module Foo 2 | (Bar : sig type a = private [> `A ] end) 3 | (Baz : module type of struct include Bar end) = 4 | struct 5 | end 6 | module Bazoinks = struct type a = [ `A ] end 7 | module Bug = Foo(Bazoinks)(Bazoinks) 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7082_ok.ml: -------------------------------------------------------------------------------- 1 | module type FOO = sig type t end 2 | module type BAR = 3 | sig 4 | (* Works: module rec A : (sig include FOO with type t = < b:B.t > end) *) 5 | module rec A : (FOO with type t = < b:B.t >) 6 | and B : FOO 7 | end 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7112_bad.ml: -------------------------------------------------------------------------------- 1 | module A = struct module type S module S = struct end end 2 | module F (_ : sig end) = struct module type S module S = A.S end 3 | module M = struct end 4 | module N = M 5 | module G (X : F(N).S) : A.S = X 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7112_ok.ml: -------------------------------------------------------------------------------- 1 | module F (_ : sig end) = struct module type S end 2 | module M = struct end 3 | module N = M 4 | module G (X : F(N).S) : F(M).S = X 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7182_ok.ml: -------------------------------------------------------------------------------- 1 | module rec M 2 | : sig external f : int -> int = "%identity" end 3 | = struct external f : int -> int = "%identity" end 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules-bugs/pr7321_ok.ml: -------------------------------------------------------------------------------- 1 | module type S = sig type 'a t end 2 | module type Sp = sig type 'a t = private 'a array end 3 | 4 | module Id (S : S) = S 5 | 6 | module M : Sp = struct 7 | include Id (struct type 'a t = 'a array end) 8 | end 9 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules/pr7207.ml: -------------------------------------------------------------------------------- 1 | module F (X : sig end) = struct type t = int end;; 2 | type t = F(Does_not_exist).t;; 3 | [%%expect{| 4 | module F : functor (X : sig end) -> sig type t = int end 5 | Line _, characters 9-28: 6 | Error: Unbound module Does_not_exist 7 | |}];; 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-modules/recursive.ml: -------------------------------------------------------------------------------- 1 | (* PR#7324 *) 2 | 3 | module rec T : sig type t = T.t end = T;; 4 | [%%expect{| 5 | Line _, characters 15-35: 6 | Error: The type abbreviation T.t is cyclic 7 | |}] 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects-bugs/pr4435_bad.ml: -------------------------------------------------------------------------------- 1 | (* Two v's in the same class *) 2 | class c v = object initializer print_endline v val v = 42 end;; 3 | new c "42";; 4 | 5 | (* Two hidden v's in the same class! *) 6 | class c (v : int) = 7 | object 8 | method v0 = v 9 | inherit ((fun v -> object method v : string = v end) "42") 10 | end;; 11 | (new c 42)#v0;; 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects-bugs/pr4766_ok.ml: -------------------------------------------------------------------------------- 1 | class virtual ['a] c = 2 | object (s : 'a) 3 | method virtual m : 'b 4 | end 5 | 6 | let o = 7 | object (s :'a) 8 | inherit ['a] c 9 | method m = 42 10 | end 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects-bugs/pr4824_ok.ml: -------------------------------------------------------------------------------- 1 | module M : 2 | sig 3 | class x : int -> object method m : int end 4 | end 5 | = 6 | struct 7 | class x _ = object 8 | method m = 42 9 | end 10 | end;; 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects-bugs/pr4824a_bad.ml: -------------------------------------------------------------------------------- 1 | module M : sig class c : 'a -> object val x : 'b end end = 2 | struct class c x = object val x = x end end 3 | 4 | class c (x : int) = object inherit M.c x method x : bool = x end 5 | 6 | let r = (new c 2)#x;; 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects-bugs/pr7293_ok.ml: -------------------------------------------------------------------------------- 1 | type t = T : t 2 | type s = T 3 | 4 | class c = object (self : 'self) 5 | 6 | method foo : s -> 'self = function 7 | | T -> self#bar () 8 | 9 | method bar : unit -> 'self = fun () -> self 10 | 11 | end 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects-bugs/woodyatt_ok.ml: -------------------------------------------------------------------------------- 1 | (* test.ml *) 2 | class alfa = object(_:'self) 3 | method x: 'a. ('a, out_channel, unit) format -> 'a = Printf.printf 4 | end 5 | 6 | class bravo a = object 7 | val y = (a :> alfa) 8 | initializer y#x "bravo initialized" 9 | end 10 | 11 | class charlie a = object 12 | inherit bravo a 13 | initializer y#x "charlie initialized" 14 | end 15 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/open_in_classes.ml: -------------------------------------------------------------------------------- 1 | module M = struct 2 | type t = int 3 | let x = 42 4 | end 5 | ;; 6 | class c = 7 | let open M in 8 | object 9 | method f : t = x 10 | end 11 | ;; 12 | class type ct = 13 | let open M in 14 | object 15 | method f : t 16 | end 17 | ;; 18 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/open_in_classes.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # module M : sig type t = int val x : int end 3 | # class c : object method f : M.t end 4 | # class type ct = object method f : M.t end 5 | # 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr5545.ml.principal.reference: -------------------------------------------------------------------------------- 1 | 2 | # type foo = int 3 | # class o : object method x : foo method y : int end 4 | # class o : object method x : foo method y : int end 5 | # class o : object method x : int method y : foo end 6 | # 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr5545.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # type foo = int 3 | # class o : object method x : foo method y : int end 4 | # class o : object method x : foo method y : int end 5 | # class o : object method x : int method y : foo end 6 | # 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr5858.ml: -------------------------------------------------------------------------------- 1 | class type c = object end;; 2 | module type S = sig class c: c end;; 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr5858.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # class type c = object end 3 | # Characters 29-30: 4 | module type S = sig class c: c end;; 5 | ^ 6 | Error: The class type c is not yet completely defined 7 | # 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr6123_bad.ml.principal.reference: -------------------------------------------------------------------------------- 1 | 2 | # Characters 253-257: 3 | let args = List.map (fun ty -> new argument(self, ty)) args_ty in 4 | ^^^^ 5 | Error: This expression has type < arguments : 'a; .. > 6 | but an expression was expected of type 'b 7 | Self type cannot escape its class 8 | # 9 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr6123_bad.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # Characters 253-257: 3 | let args = List.map (fun ty -> new argument(self, ty)) args_ty in 4 | ^^^^ 5 | Error: This expression has type < arguments : 'a; .. > 6 | but an expression was expected of type 'b 7 | Self type cannot escape its class 8 | # 9 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr6383.ml: -------------------------------------------------------------------------------- 1 | let f (x: #M.foo) = 0;; 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr6383.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # Characters 11-16: 3 | let f (x: #M.foo) = 0;; 4 | ^^^^^ 5 | Error: Unbound module M 6 | # 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr6907_bad.ml: -------------------------------------------------------------------------------- 1 | class type ['e] t = object('s) 2 | method update : 'e -> 's 3 | end;; 4 | 5 | module type S = sig 6 | class base : 'e -> ['e] t 7 | end;; 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-objects/pr6907_bad.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # class type ['e] t = object ('a) method update : 'e -> 'a end 3 | # Characters 23-48: 4 | class base : 'e -> ['e] t 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | Error: Some type variables are unbound in this type: 7 | class base : 'e -> ['e] t 8 | The method update has type 'e -> < update : 'a; .. > as 'a where 'e 9 | is unbound 10 | # 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-ocamlc-i/Makefile: -------------------------------------------------------------------------------- 1 | # Check ocamlc -i 2 | 3 | SOURCES = pr7620_bad.ml 4 | 5 | all: 6 | @printf " ... testing '$(SOURCES)'" 7 | @$(OCAMLC) -i $(SOURCES) 2> /dev/null \ 8 | && echo " => failed" || echo " => passed" 9 | 10 | clean: defaultclean 11 | @rm -f *~ 12 | 13 | BASEDIR=../.. 14 | include $(BASEDIR)/makefiles/Makefile.common 15 | 16 | -------------------------------------------------------------------------------- /testsuite/tests/typing-ocamlc-i/pr7620_bad.ml: -------------------------------------------------------------------------------- 1 | let t = 2 | (function `A | `B -> () : 'a) (`A : [`A]); 3 | (failwith "dummy" : 'a) (* to know how 'a is unified *) 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-pattern_open/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR=../.. 2 | include $(BASEDIR)/makefiles/Makefile.toplevel 3 | include $(BASEDIR)/makefiles/Makefile.common 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-poly-bugs/pr5322_ok.ml: -------------------------------------------------------------------------------- 1 | type 'par t = 'par 2 | module M : sig val x : end = 3 | struct let x : = Obj.magic () end 4 | 5 | let ident v = v 6 | class alias = object method alias : 'a . 'a t -> 'a = ident end 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs-2/pr3918a.mli: -------------------------------------------------------------------------------- 1 | type 'a voption = [ `None | `Some of 'a] 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs-2/pr3918b.mli: -------------------------------------------------------------------------------- 1 | type 'a vlist = ('a * 'b) Pr3918a.voption as 'b 2 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs-2/pr3918c.ml: -------------------------------------------------------------------------------- 1 | (* 2 | ocamlc -c pr3918a.mli pr3918b.mli 3 | rm -f pr3918a.cmi 4 | ocamlc -c pr3918c.ml 5 | *) 6 | 7 | open Pr3918b 8 | 9 | let f x = (x : 'a vlist :> 'b vlist) 10 | let f (x : 'a vlist) = (x : 'b vlist) 11 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs/pr4775_ok.ml: -------------------------------------------------------------------------------- 1 | module type Poly = sig 2 | type 'a t = 'a constraint 'a = [> ] 3 | end 4 | 5 | module Combine (A : Poly) (B : Poly) = struct 6 | type ('a, 'b) t = 'a A.t constraint 'a = 'b B.t 7 | end 8 | 9 | module C = Combine 10 | (struct type 'a t = 'a constraint 'a = [> ] end) 11 | (struct type 'a t = 'a constraint 'a = [> ] end) 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs/pr4933_ok.ml: -------------------------------------------------------------------------------- 1 | module type Priv = sig 2 | type t = private int 3 | end 4 | 5 | module Make (Unit:sig end): Priv = struct type t = int end 6 | 7 | module A = Make (struct end) 8 | 9 | module type Priv' = sig 10 | type t = private [> `A] 11 | end 12 | 13 | module Make' (Unit:sig end): Priv' = struct type t = [`A] end 14 | 15 | module A' = Make' (struct end) 16 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs/pr5057_ok.ml: -------------------------------------------------------------------------------- 1 | (* PR5057 *) 2 | 3 | module TT = struct 4 | module IntSet = Set.Make(struct type t = int let compare = compare end) 5 | end 6 | 7 | let () = 8 | let f flag = 9 | let module T = TT in 10 | let _ = match flag with `A -> 0 | `B r -> r in 11 | let _ = match flag with `A -> T.IntSet.mem | `B r -> r in 12 | () 13 | in 14 | f `A 15 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs/pr5057a_bad.ml: -------------------------------------------------------------------------------- 1 | (* This one should fail *) 2 | 3 | let f flag = 4 | let module T = Set.Make(struct type t = int let compare = compare end) in 5 | let _ = match flag with `A -> 0 | `B r -> r in 6 | let _ = match flag with `A -> T.mem | `B r -> r in 7 | () 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-polyvariants-bugs/pr7199_ok.ml: -------------------------------------------------------------------------------- 1 | module type S = sig 2 | type +'a t 3 | 4 | val foo : [`A] t -> unit 5 | val bar : [< `A | `B] t -> unit 6 | end 7 | 8 | module Make(T : S) = struct 9 | let f x = 10 | T.foo x; 11 | T.bar x; 12 | (x :> [`A | `C] T.t) 13 | end 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-private-bugs/pr5026_bad.ml: -------------------------------------------------------------------------------- 1 | type untyped;; 2 | type -'a typed = private untyped;; 3 | type -'typing wrapped = private sexp 4 | and +'a t = 'a typed wrapped 5 | and sexp = private untyped wrapped;; 6 | class type ['a] s3 = object 7 | val underlying : 'a t 8 | end;; 9 | class ['a] s3object r : ['a] s3 = object 10 | val underlying = r 11 | end;; 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-private-bugs/pr5469_ok.ml: -------------------------------------------------------------------------------- 1 | module M (T:sig type t end) 2 | = struct type t = private { t : T.t } end 3 | module P 4 | = struct 5 | module T = struct type t end 6 | module R = M(T) 7 | end 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t01bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (t = t) *) 2 | module rec A : sig type t = A.t end = struct type t = A.t end;; 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t02bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (t = t) *) 2 | module rec A : sig type t = B.t end = struct type t = B.t end 3 | and B : sig type t = A.t end = struct type t = A.t end;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t03ok.ml: -------------------------------------------------------------------------------- 1 | (* OK (t = int) *) 2 | module rec A : sig type t = B.t end = struct type t = B.t end 3 | and B : sig type t = int end = struct type t = int end;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t04bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (t = int * t) *) 2 | module rec A : sig type t = int * A.t end = struct type t = int * A.t end;; 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t05bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (t = t -> int) *) 2 | module rec A : sig type t = B.t -> int end = struct type t = B.t -> int end 3 | and B : sig type t = A.t end = struct type t = A.t end;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t06ok.ml: -------------------------------------------------------------------------------- 1 | (* OK (t = ) *) 2 | module rec A : sig type t = end = struct type t = end 3 | and B : sig type t = A.t end = struct type t = A.t end;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t07bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (not regular) *) 2 | module rec A : sig type 'a t = end 3 | = struct type 'a t = end;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t08bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (not regular) *) 2 | module rec A : sig type 'a t = end 3 | = struct type 'a t = end 4 | and B : sig type 'a t = 'a A.t end = struct type 'a t = 'a A.t end;; 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t09bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (not regular) *) 2 | module rec A : sig type 'a t = 'a B.t end 3 | = struct type 'a t = 'a B.t end 4 | and B : sig type 'a t = end 5 | = struct type 'a t = end;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t10ok.ml: -------------------------------------------------------------------------------- 1 | (* OK *) 2 | module rec A : sig type 'a t = 'a array B.t * 'a list B.t end 3 | = struct type 'a t = 'a array B.t * 'a list B.t end 4 | and B : sig type 'a t = end 5 | = struct type 'a t = end;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t11bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (not regular) *) 2 | module rec A : sig type 'a t = 'a list B.t end 3 | = struct type 'a t = 'a list B.t end 4 | and B : sig type 'a t = end 5 | = struct type 'a t = end;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t12bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad (not regular) *) 2 | module rec M : 3 | sig 4 | class ['a] c : 'a -> object 5 | method map : ('a -> 'b) -> 'b M.c 6 | end 7 | end 8 | = struct 9 | class ['a] c (x : 'a) = object 10 | method map : 'b. ('a -> 'b) -> 'b M.c 11 | = fun f -> new M.c (f x) 12 | end 13 | end;; 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t13ok.ml: -------------------------------------------------------------------------------- 1 | (* OK *) 2 | class type [ 'node ] extension = object method node : 'node end 3 | class type [ 'ext ] node = object constraint 'ext = 'ext node #extension end 4 | class x = object method node : x node = assert false end 5 | type t = x node;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t14bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad - PR 4261 *) 2 | 3 | module PR_4261 = struct 4 | module type S = 5 | sig 6 | type t 7 | end 8 | 9 | module type T = 10 | sig 11 | module D : S 12 | type t = D.t 13 | end 14 | 15 | module rec U : T with module D = U' = U 16 | and U' : S with type t = U'.t = U 17 | end;; 18 | -------------------------------------------------------------------------------- /testsuite/tests/typing-recmod/t15bad.ml: -------------------------------------------------------------------------------- 1 | (* Bad - PR 4512 *) 2 | module type S' = sig type t = int end 3 | module rec M : S' with type t = M.t = struct type t = M.t end;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-rectypes-bugs/pr5343_bad.ml: -------------------------------------------------------------------------------- 1 | module M : sig 2 | type 'a t 3 | type u = u t and v = v t 4 | val f : int -> u 5 | val g : v -> bool 6 | end = struct 7 | type 'a t = 'a 8 | type u = int and v = bool 9 | let f x = x 10 | let g x = x 11 | end;; 12 | 13 | let h (x : int) : bool = M.g (M.f x);; 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-rectypes-bugs/pr6174_bad.ml: -------------------------------------------------------------------------------- 1 | type _ t = C : ((('a -> 'o) -> 'o) -> ('b -> 'o) -> 'o) t 2 | let f : type a o. ((a -> o) -> o) t -> (a -> o) -> o = 3 | fun C k -> k (fun x -> x);; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-rectypes-bugs/pr6870_bad.ml: -------------------------------------------------------------------------------- 1 | module type T = sig type 'a t end 2 | module Fix (T : T) = struct type r = ('r T.t as 'r) end 3 | -------------------------------------------------------------------------------- /testsuite/tests/typing-safe-linking/a.ml: -------------------------------------------------------------------------------- 1 | type _ t = 2 | X of string 3 | | Y : bytes t 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-safe-linking/b_bad.ml: -------------------------------------------------------------------------------- 1 | let f : string A.t -> unit = function 2 | A.X s -> print_endline s 3 | 4 | (* It is important that the line below is the last line of the file (see Makefile) *) 5 | let () = f A.y 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/gpr1223.ml: -------------------------------------------------------------------------------- 1 | 2 | let y = Gpr1223_bar.N.O.T;; 3 | 4 | let x = Gpr1223_bar.M.T;; 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/gpr1223.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # val y : Gpr1223_bar.N.O.t = Gpr1223_bar.N.O.T 3 | # val x : Gpr1223_bar.M.t = Gpr1223_bar.M.T 4 | # 5 | -------------------------------------------------------------------------------- /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/gpr1223_foo.mli: -------------------------------------------------------------------------------- 1 | 2 | module type S = sig 3 | 4 | type t = T 5 | 6 | end 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr5918.ml: -------------------------------------------------------------------------------- 1 | module rec A : sig 2 | type t 3 | end = struct 4 | type t = { a : unit; b : unit } 5 | let _ = { a = () } 6 | end 7 | ;; 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr5918.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # Characters 82-92: 3 | let _ = { a = () } 4 | ^^^^^^^^^^ 5 | Error: Some record fields are undefined: b 6 | # 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr6836.ml: -------------------------------------------------------------------------------- 1 | type t = [`A | `B];; 2 | type 'a u = t;; 3 | let a : [< int u] = `A;; 4 | 5 | type 'a s = 'a;; 6 | let b : [< t s] = `B;; 7 | -------------------------------------------------------------------------------- /testsuite/tests/typing-short-paths/pr6836.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # type t = [ `A | `B ] 3 | # type 'a u = t 4 | # val a : [< t > `A ] = `A 5 | # type 'a s = 'a 6 | # val b : [< t > `B ] = `B 7 | # 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-signatures/pr6371.ml: -------------------------------------------------------------------------------- 1 | module M = struct 2 | type t = int * (< m : 'a > as 'a) 3 | end;; 4 | 5 | module type S = 6 | sig module M : sig type t end end with module M = M 7 | ;; 8 | -------------------------------------------------------------------------------- /testsuite/tests/typing-signatures/pr6371.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # module M : sig type t = int * (< m : 'a > as 'a) end 3 | # module type S = sig module M : sig type t = int * (< m : 'a > as 'a) end end 4 | # 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-signatures/pr6672.ml: -------------------------------------------------------------------------------- 1 | module type S = sig type 'a t end;; 2 | module type T = S with type +'a t = 'a list;; 3 | module type T = S with type -'a t = 'a list;; 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/application.ml: -------------------------------------------------------------------------------- 1 | (* Ignore OCAMLRUNPARAM=b to be reproducible *) 2 | Printexc.record_backtrace false;; 3 | 4 | let _ = ignore (+);; 5 | let _ = raise Exit 3;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr5892.ml: -------------------------------------------------------------------------------- 1 | open CamlinternalOO;; 2 | type _ choice = Left : label choice | Right : tag choice;; 3 | let f : label choice -> bool = function Left -> true;; (* warn *) 4 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr6587.ml: -------------------------------------------------------------------------------- 1 | 2 | module A: sig val f: fpclass -> fpclass end = 3 | struct 4 | let f _ = FP_normal 5 | end;; 6 | 7 | type fpclass = A ;; 8 | 9 | module B: sig val f: fpclass -> fpclass end = 10 | struct 11 | let f A = FP_normal 12 | end 13 | ;; 14 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr6872.ml: -------------------------------------------------------------------------------- 1 | (* Ignore OCAMLRUNPARAM=b to be reproducible *) 2 | Printexc.record_backtrace false;; 3 | 4 | exception A;; 5 | type a = A;; 6 | 7 | A;; 8 | raise A;; 9 | fun (A : a) -> ();; 10 | function Not_found -> 1 | A -> 2 | _ -> 3;; 11 | try raise A with A -> 2;; 12 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr7261.ml: -------------------------------------------------------------------------------- 1 | type foo = 2 | Foo: [> `Bla ] as 'b ) * 'b -> foo;; 3 | type foo = 4 | Foo: 'b * 'b -> foo constraint 'b = [> `Bla ];; 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr7297.ml: -------------------------------------------------------------------------------- 1 | (* Ignore OCAMLRUNPARAM=b to be reproducible *) 2 | Printexc.record_backtrace false;; 3 | 4 | let () = raise Exit; () ;; (* warn *) 5 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr7297.ml.reference: -------------------------------------------------------------------------------- 1 | 2 | # - : unit = () 3 | # Characters 10-20: 4 | let () = raise Exit; () ;; (* warn *) 5 | ^^^^^^^^^^ 6 | Warning 21: this statement never returns (or has an unsound type.) 7 | Exception: Pervasives.Exit. 8 | # 9 | -------------------------------------------------------------------------------- /testsuite/tests/typing-warnings/pr7553.ml: -------------------------------------------------------------------------------- 1 | module A = struct type foo end;; 2 | 3 | module rec B : sig 4 | open A 5 | type bar = Bar of foo 6 | end = B;; 7 | 8 | module rec C : sig 9 | open A 10 | end = C;; 11 | 12 | module rec D : sig 13 | module M : module type of struct 14 | module X : sig end = struct 15 | open A 16 | let None = None 17 | end 18 | end 19 | end = D;; 20 | 21 | -------------------------------------------------------------------------------- /testsuite/tests/unboxed-primitive-args/main.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/unboxed-primitive-args/main.reference -------------------------------------------------------------------------------- /testsuite/tests/unwind/driver.ml: -------------------------------------------------------------------------------- 1 | let () = 2 | Mylib.foo1 Mylib.bar 1 2 3 4 5 6 7 8 9 10; 3 | Mylib.foo2 Mylib.baz 1 2 3 4 5 6 7 8 9 10 4 | -------------------------------------------------------------------------------- /testsuite/tests/utils/test_strongly_connected_components.reference: -------------------------------------------------------------------------------- 1 | 2 | All tests succeeded. 3 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/deprecated_module.ml: -------------------------------------------------------------------------------- 1 | module M = struct 2 | type t = int 3 | 4 | let x = 10 5 | end 6 | [@@ocaml.deprecated] 7 | 8 | let _ = M.x 9 | include M 10 | -------------------------------------------------------------------------------- /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/warnings/deprecated_module.reference: -------------------------------------------------------------------------------- 1 | File "deprecated_module.ml", line 8, characters 8-11: 2 | Warning 3: deprecated: module M 3 | File "deprecated_module.ml", line 9, characters 8-9: 4 | Warning 3: deprecated: module M 5 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/deprecated_module_use.ml: -------------------------------------------------------------------------------- 1 | open Deprecated_module 2 | 3 | type s = M.t 4 | 5 | open M 6 | let _ = x 7 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/module_without_cmx.mli: -------------------------------------------------------------------------------- 1 | 2 | val id : 'a -> 'a 3 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w04.ml: -------------------------------------------------------------------------------- 1 | [@@@ocaml.warning "+4"] 2 | 3 | type expr = E of int [@@unboxed] 4 | 5 | 6 | let f x = match x with (E e) -> e 7 | 8 | type t = A | B 9 | 10 | let g x = match x with 11 | | A -> 0 12 | | _ -> 1 13 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w04.reference: -------------------------------------------------------------------------------- 1 | File "w04.ml", line 10, characters 10-40: 2 | Warning 4: this pattern-matching is fragile. 3 | It will remain exhaustive when constructors are added to type t. 4 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w06.ml: -------------------------------------------------------------------------------- 1 | let foo ~bar = ignore bar (* one label *) 2 | 3 | let bar ~foo ~baz = ignore (foo, baz) (* two labels *) 4 | 5 | let () = foo 2 6 | let () = bar 4 2 7 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w06.reference: -------------------------------------------------------------------------------- 1 | File "w06.ml", line 5, characters 9-12: 2 | Warning 6: label bar was omitted in the application of this function. 3 | File "w06.ml", line 6, characters 9-12: 4 | Warning 6: labels foo, baz were omitted in the application of this function. 5 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w32.mli: -------------------------------------------------------------------------------- 1 | (* from MPR#7624 *) 2 | 3 | val g : 'a -> 'a 4 | 5 | 6 | (* multiple bindings *) 7 | val n : 'a -> 'a 8 | 9 | val o : 'a -> 'a 10 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w33.reference: -------------------------------------------------------------------------------- 1 | File "w33.ml", line 8, characters 6-11: 2 | Warning 33: unused open M. 3 | File "w33.ml", line 16, characters 0-6: 4 | Warning 33: unused open M. 5 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w45.ml: -------------------------------------------------------------------------------- 1 | module T1 = struct 2 | type t = A 3 | type s = X 4 | end 5 | 6 | module T2 = struct 7 | type t = T1.t = A 8 | type s = X 9 | end 10 | 11 | module T3 = struct 12 | open T1 (* unused open *) 13 | open T2 (* shadow X, which is later used; but not A, see #6762 *) 14 | 15 | let _ = (A, X) (* X belongs to several types *) 16 | end 17 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w45.reference: -------------------------------------------------------------------------------- 1 | File "w45.ml", line 13, characters 2-9: 2 | Warning 45: this open statement shadows the constructor X (which is later used) 3 | File "w45.ml", line 15, characters 14-15: 4 | Warning 41: X belongs to several types: T2.s T1.s 5 | The first one was selected. Please disambiguate if this is wrong. 6 | File "w45.ml", line 12, characters 2-9: 7 | Warning 33: unused open T1. 8 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w50.ml: -------------------------------------------------------------------------------- 1 | module A : sig end = struct 2 | module L = List 3 | 4 | module X1 = struct end 5 | 6 | module Y1 = X1 7 | end 8 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w50.reference: -------------------------------------------------------------------------------- 1 | File "w50.ml", line 2, characters 2-17: 2 | Warning 60: unused module L. 3 | File "w50.ml", line 6, characters 2-16: 4 | Warning 60: unused module Y1. 5 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w51.ml: -------------------------------------------------------------------------------- 1 | 2 | let rec fact = function 3 | | 1 -> 1 4 | | n -> n * (fact [@tailcall]) (n-1) 5 | ;; 6 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w51.reference: -------------------------------------------------------------------------------- 1 | File "w51.ml", line 4, characters 13-37: 2 | Warning 51: expected tailcall 3 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w51_bis.ml: -------------------------------------------------------------------------------- 1 | let rec foldl op acc = function 2 | [] -> acc 3 | | x :: xs -> 4 | try (foldl [@tailcall]) op (op x acc) xs 5 | with Not_found -> assert false 6 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w51_bis.reference: -------------------------------------------------------------------------------- 1 | File "w51_bis.ml", line 4, characters 12-48: 2 | Warning 51: expected tailcall 3 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w54.ml: -------------------------------------------------------------------------------- 1 | 2 | let f = (fun x -> x) [@inline] [@inline never] 3 | let g = (fun x -> x) [@inline] [@something_else] [@ocaml.inline] 4 | 5 | let h x = (g [@inlined] [@ocaml.inlined never]) x 6 | 7 | let v = ((fun x -> x) [@inline] [@inlined]) 1 (* accepted *) 8 | 9 | let i = ((fun x -> x) [@inline]) [@@inline] 10 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w55.opt_backend.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/warnings/w55.opt_backend.reference -------------------------------------------------------------------------------- /testsuite/tests/warnings/w58.opt.ml: -------------------------------------------------------------------------------- 1 | 2 | let () = print_endline (Module_without_cmx.id "Hello World") 3 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w58.opt.opt_reference: -------------------------------------------------------------------------------- 1 | File "_none_", line 1: 2 | Warning 58: no cmx file was found in path for module Module_without_cmx, and its interface was not compiled with -opaque 3 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w58.opt.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/warnings/w58.opt.reference -------------------------------------------------------------------------------- /testsuite/tests/warnings/w59.opt_backend.clambda.opt_reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/warnings/w59.opt_backend.clambda.opt_reference -------------------------------------------------------------------------------- /testsuite/tests/warnings/w59.opt_backend.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/warnings/w59.opt_backend.reference -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /testsuite/tests/warnings/w60.reference: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rescript-lang/ocaml/1559b1d73e5fb725cabd4f90dd9a076172833558/testsuite/tests/warnings/w60.reference -------------------------------------------------------------------------------- /testsuite/tests/win-unicode/exec_tests.precheck: -------------------------------------------------------------------------------- 1 | # exec_tests.ml disabled because it fails non-deterministically (at least under CI) 2 | # seems to be a problem redirecting handles 3 | exit 1 4 | -------------------------------------------------------------------------------- /testsuite/tests/win-unicode/exec_tests.reference: -------------------------------------------------------------------------------- 1 | test0 2 | OK 3 | test_environment 4 | test1 5 | test_argv 6 | OK 7 | -------------------------------------------------------------------------------- /testsuite/tests/win-unicode/symlink_tests.reference: -------------------------------------------------------------------------------- 1 | OK. 2 | -------------------------------------------------------------------------------- /tools/ocamldep.ml: -------------------------------------------------------------------------------- 1 | let () = Makedepend.main () 2 | --------------------------------------------------------------------------------