Skip to content

Commit

Permalink
Revert "Fix build with 4.05"
Browse files Browse the repository at this point in the history
In order to reduce the difference between the 4.1 maintenance branch and
master, revert the old 4.05 fixes and apply the one's from the 4.1
branch instead

This reverts commit b6b02c2.
  • Loading branch information
copy committed Nov 14, 2017
1 parent c3a7c26 commit d4ae4bd
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/ppx_deriving.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ open Parsetree
open Ast_helper
open Ast_convenience

#if OCAML_VERSION >= (4, 05, 0)
module Typ = struct
include Typ

let poly ?(loc= !Ast_helper.default_loc) ?attrs vars ty =
let vars = List.map (fun txt -> { Asttypes.loc; txt }) vars in
Typ.poly ~loc ?attrs vars ty
end

let rm_poly_locs =
List.map (fun x -> x.Asttypes.txt)
#else
let rm_poly_locs x = x
#endif

type deriver = {
name : string ;
core_type : (core_type -> expression) option;
Expand Down Expand Up @@ -340,7 +325,6 @@ let free_vars_in_core_type typ =
List.map free_in xs |> List.concat
| { ptyp_desc = Ptyp_alias (x, name) } -> [name] @ free_in x
| { ptyp_desc = Ptyp_poly (bound, x) } ->
let bound = rm_poly_locs bound in
List.filter (fun y -> not (List.mem y bound)) (free_in x)
| { ptyp_desc = Ptyp_variant (rows, _, _) } ->
List.map (
Expand Down

0 comments on commit d4ae4bd

Please sign in to comment.