From 85b17f192800acae49d51f17339d51aa3bd374e0 Mon Sep 17 00:00:00 2001 From: Bertrand Bonnefoy-Claudet Date: Fri, 11 Oct 2024 00:04:35 +0200 Subject: [PATCH] Add compatibility with OCaml 5.3 This makes this package compatible with compilers which have the `effect` keyword. I could test it locally with the 5.3 alpha. --- .github/workflows/main.yml | 6 +++--- src/mock.ml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5984ddc..505c33f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,16 +13,16 @@ jobs: - ubuntu-latest ocaml-compiler: - 4.07.x - - 5.0.x + - 5.2.x package: - mock - mock-ounit runs-on: ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use OCaml ${{ matrix.ocaml-compiler }} - uses: ocaml/setup-ocaml@v2 + uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} - run: opam install "${{ matrix.package }}.dev" --with-doc --with-test diff --git a/src/mock.ml b/src/mock.ml index 5a64a08..3c57e0b 100644 --- a/src/mock.ml +++ b/src/mock.ml @@ -40,11 +40,11 @@ let call mock args = | None -> Stdlib.raise (Mock_not_configured mock.name) - | Some effect + | Some side_effect -> begin mock.params := args :: !(mock.params); - eval_side_effect effect + eval_side_effect side_effect end let recorded_calls mock =