Skip to content

Commit 028e123

Browse files
committed
Simplify Longident versioning for 5.4.0 support
Signed-off-by: Patrick Ferris <patrick@sirref.org>
1 parent dbb5f50 commit 028e123

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+68
-187
lines changed

ast/ast.ml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -663,25 +663,30 @@ and type_exception = Parsetree.type_exception = {
663663

664664
and extension_constructor_kind = Parsetree.extension_constructor_kind =
665665
| Pext_decl of string loc list * constructor_arguments * core_type option
666-
(** [Pext_decl(existentials, c_args, t_opt)]
667-
describes a new extension constructor. It can be:
668-
- [C of T1 * ... * Tn] when:
669-
{ul {- [existentials] is [[]],}
670-
{- [c_args] is [[T1; ...; Tn]],}
671-
{- [t_opt] is [None]}.}
672-
- [C: T0] when
673-
{ul {- [existentials] is [[]],}
674-
{- [c_args] is [[]],}
675-
{- [t_opt] is [Some T0].}}
676-
- [C: T1 * ... * Tn -> T0] when
677-
{ul {- [existentials] is [[]],}
678-
{- [c_args] is [[T1; ...; Tn]],}
679-
{- [t_opt] is [Some T0].}}
680-
- [C: 'a... . T1 * ... * Tn -> T0] when
681-
{ul {- [existentials] is [['a;...]],}
682-
{- [c_args] is [[T1; ... ; Tn]],}
683-
{- [t_opt] is [Some T0].}}
684-
*)
666+
(** [Pext_decl(existentials, c_args, t_opt)] describes a new extension
667+
constructor. It can be:
668+
{ul
669+
{- [C of T1 * ... * Tn] when:
670+
- [existentials] is [[]],
671+
- [c_args] is [[T1; ...; Tn]],
672+
- [t_opt] is [None]
673+
}
674+
{- [C: T0] when
675+
- [existentials] is [[]],
676+
- [c_args] is [[]],
677+
- [t_opt] is [Some T0].
678+
}
679+
{- [C: T1 * ... * Tn -> T0] when
680+
- [existentials] is [[]],
681+
- [c_args] is [[T1; ...; Tn]],
682+
- [t_opt] is [Some T0].
683+
}
684+
{- [C: 'a... . T1 * ... * Tn -> T0] when
685+
- [existentials] is [['a;...]],
686+
- [c_args] is [[T1; ... ; Tn]],
687+
- [t_opt] is [Some T0].
688+
}
689+
} *)
685690
| Pext_rebind of longident_loc
686691
(** [Pext_rebind(D)] re-export the constructor [D] with the new name [C]
687692
*)

ast/ast_helper_lite.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
(* TODO: remove this open *)
1717
open Stdlib0
1818
module Location = Astlib.Location
19-
module Longident = Astlib.Legacy_longident
19+
module Longident = Astlib.Longident
2020
open Astlib.Ast_503
2121

2222
[@@@warning "-9"]

ast/ast_helper_lite.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ open Parsetree
2121

2222
type 'a with_loc = 'a Astlib.Location.loc
2323
type loc = Astlib.Location.t
24-
type lid = Astlib.Legacy_longident.t with_loc
24+
type lid = Astlib.Longident.t with_loc
2525
type str = string with_loc
2626
type str_opt = string option with_loc
2727
type attrs = attribute list

ast/import.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ module Asttypes = Selected_ast.Ast.Asttypes
193193

194194
(* Other Astlib modules *)
195195
module Location = Astlib.Location
196-
module Longident = Astlib.Legacy_longident
196+
module Longident = Astlib.Longident
197197

198198
module Parse = struct
199199
include Astlib.Parse

astlib/ast_407.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
2626
change VERSION for 4.07.0+beta2
2727
*)
28-
module Longident = Legacy_longident
29-
3028
module Asttypes = struct
3129
(** Auxiliary AST types used by parsetree and typedtree. *)
3230

astlib/ast_408.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
2828
Actually run all lib-unix tests [4.08]
2929
*)
30-
module Longident = Legacy_longident
31-
3230
module Asttypes = struct
3331

3432
type constant (*IF_CURRENT = Asttypes.constant *) =

astlib/ast_409.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
(* special exception on linking described in the file LICENSE. *)
1717
(* *)
1818
(**************************************************************************)
19-
module Longident = Legacy_longident
20-
2119
module Asttypes = struct
2220

2321
type constant (*IF_CURRENT = Asttypes.constant *) =

astlib/ast_410.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
(* special exception on linking described in the file LICENSE. *)
1717
(* *)
1818
(**************************************************************************)
19-
module Longident = Legacy_longident
20-
2119
module Asttypes = struct
2220
type constant (*IF_CURRENT = Asttypes.constant *) =
2321
Const_int of int

astlib/ast_411.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
(* special exception on linking described in the file LICENSE. *)
1717
(* *)
1818
(**************************************************************************)
19-
module Longident = Legacy_longident
20-
2119
module Asttypes = struct
2220
type constant (*IF_CURRENT = Asttypes.constant *) =
2321
Const_int of int

astlib/ast_412.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
(* special exception on linking described in the file LICENSE. *)
1717
(* *)
1818
(**************************************************************************)
19-
module Longident = Legacy_longident
20-
2119
module Asttypes = struct
2220
type constant (*IF_CURRENT = Asttypes.constant *) =
2321
Const_int of int

0 commit comments

Comments
 (0)