Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka committed Dec 16, 2019
1 parent 30558a9 commit 1017f45
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.t
script: bash -ex .travis-opam.sh
env:
matrix:
- OCAML_VERSION=4.02 # we require >=4.02.2 but this picks 4.02.3
- OCAML_VERSION=4.03
- OCAML_VERSION=4.04
- OCAML_VERSION=4.05
- OCAML_VERSION=4.06
- OCAML_VERSION=4.07
- OCAML_VERSION=4.08
- OCAML_VERSION=4.09
os:
- linux
5 changes: 2 additions & 3 deletions ppx_deriving.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ build: [
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
]
depends: [
"dune" {build >= "1.6.3"}
"cppo" {build}
"dune" { >= "1.6.3"}
"ppxfind" {build}
"ocaml-migrate-parsetree"
"ppx_derivers"
"ppxlib" {>= "0.9.0"}
"result"
"ounit" {with-test}
"ocaml" {>= "4.04.1"}
"ocaml" {>= "4.05.0"}
]
synopsis: "Type-driven code generation for OCaml >=4.04.1"
description: """
Expand Down
9 changes: 4 additions & 5 deletions src/api/ppx_deriving.cppo.ml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
open Ppxlib

#define Attribute_expr(loc_, txt_, payload) { attr_name = \
{ txt = txt_; loc = loc_ }; \
attr_payload = payload; \
attr_loc = loc_ }
#define Attribute_patt(loc_, txt_, payload) { attr_name = \
{ txt = txt_; loc = loc_ }; \
attr_payload = payload; \
Expand Down Expand Up @@ -301,7 +297,10 @@ end
let attr_warning expr =
let loc = !default_loc in
let structure = {pstr_desc = Pstr_eval (expr, []); pstr_loc = loc} in
Attribute_expr(loc, "ocaml.warning", PStr [structure])
{ attr_name = { txt = "ocaml.warning"; loc; };
attr_payload = PStr [structure];
attr_loc = loc;
}

type quoter = {
mutable next_id : int;
Expand Down
4 changes: 0 additions & 4 deletions src_test/api/test_api.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ open Parsetree
open OUnit2

let string_of_tyvar tyvar =
#if OCAML_VERSION >= (4, 05, 0)
tyvar.Location.txt
#else
tyvar
#endif

let test_free_vars ctxt =
let loc = !Ast_helper.default_loc in
Expand Down

0 comments on commit 1017f45

Please sign in to comment.