Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and new tests #87

Merged
merged 16 commits into from
Jul 16, 2024
Merged

Cleanup and new tests #87

merged 16 commits into from
Jul 16, 2024

Commits on Jul 6, 2024

  1. Cppo_eval.mli: make the type [env] abstract.

    Cppo_eval.ml:  make the type [env] an algebraic data type.
    
    This avoids some confusion, as the constructors [`Def] and [`Defun]
    were previously used in two different types, namely [node] and [env],
    with different arguments.
    fpottier committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    6acbb18 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32f6e24 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    937f1bd View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2024

  1. Configuration menu
    Copy the full SHA
    5a6208d View commit details
    Browse the repository at this point in the history
  2. Cppo_eval: remove a dead test.

    Here, [args] is never empty, so [n] is never zero,
    so this test is useless.
    fpottier committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    cf90d41 View commit details
    Browse the repository at this point in the history
  3. Cppo_types, cppo_parser, cppo_eval: simplify the type of [`Ident].

    In the definition of [`Ident] in the type [node],
    the third parameter used to have type [actuals option]:
    it was either [None]
    or [Some args] where [args] was a nonempty list of actuals.
    
    It is simpler to let this parameter have type [actuals].
    There is no need for an option.
    fpottier committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    e15d4d0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b503c97 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1a7a2bd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c6889b9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4b746a4 View commit details
    Browse the repository at this point in the history
  8. Switch to dune 2.0.

    The file test/dune is modified to use more modern rule syntax.
    This changes the generated .opam files.
    
    The purpose of this change is to allow negative tests.
    `with-accepted-exit-codes` requires dune 2.0.
    fpottier committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    8b0bceb View commit details
    Browse the repository at this point in the history
  9. Add new tests.

    New positive tests:
      lexical.cppo
    
    New negative tests:
      arity_mismatch.cppo
      applied_to_none.cppo
      expects_no_args.cppo
      already_defined.cppo
      at_least_one_arg.cppo
    fpottier committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    c9d8738 View commit details
    Browse the repository at this point in the history
  10. Cppo_eval: remove the distinction between [EDef] and [EDefun].

    There was no strong reason for this distinction to exist.
    
    A few new auxiliary functions are isolated: [bind_one], [bind_many].
    
    A few error messages change slightly (they become more uniform).
    The expected test output is adjusted in a separate commit.
    fpottier committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    d2f93b8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    794fd2c View commit details
    Browse the repository at this point in the history
  12. Remove the distinction between [Def] and [Defun].

    There was no strong reason for this distinction to exist.
    fpottier committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    4c94688 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2024

  1. dune-project: records that cppo_ocamlbuild needs dune 2.0 too.

    Maybe this is not necessary, but it seems safer.
    fpottier committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    f9f246d View commit details
    Browse the repository at this point in the history