Skip to content

Commit

Permalink
Merge pull request #95 from gpetiot/fix-compil-old-versions
Browse files Browse the repository at this point in the history
Fix compilation with old OCaml versions
  • Loading branch information
samoht committed Jan 8, 2019
2 parents 733a56c + 036587f commit e95444e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ env:
# Check build and unit tests
# NOTE: testing needs OPAMBUILDTEST=true so that test deps are installed
- TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.02.3
- TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.03.0
- TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.04.2
- TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.05.0
- TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.06.1
- TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.07.0
before_install:
Expand Down
2 changes: 1 addition & 1 deletion lib/compat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ end
module Env = struct
include Env

#if OCAML_MAJOR = 4 && OCAML_MINOR < 3
#if OCAML_MAJOR = 4 && OCAML_MINOR < 4
(* Can't be overriden *)
let without_cmis f x = f x
#endif
Expand Down
2 changes: 1 addition & 1 deletion lib/top/mdx_top.ml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ module Phrase = struct
| exception exn ->
let exn = match Location.error_of_exn exn with
| None -> raise exn
#if OCAML_MAJOR >= 4 && OCAML_MINOR > 2
#if OCAML_MAJOR >= 4 && OCAML_MINOR > 5
| Some `Already_displayed -> raise exn
| Some (`Ok error) ->
Location.Error (Lexbuf.shift_location_error startpos error)
Expand Down

0 comments on commit e95444e

Please sign in to comment.