diff options
author | Daniel Peukert | 2021-02-18 19:29:23 +0100 |
---|---|---|
committer | Daniel Peukert | 2021-02-18 19:29:23 +0100 |
commit | 21e075435f07e02f84db5967d7fa6e367d0c8e86 (patch) | |
tree | c604b9865405da6a2548257d68eddc32a64e0dea | |
parent | 670658097e7169f18796f096cf2e6b4fc6069f60 (diff) | |
download | aur-21e075435f07e02f84db5967d7fa6e367d0c8e86.tar.gz |
Add ppxlib 0.22.0 compatibility patch to ocaml-ppx_typerep_conv
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | ppxlib.diff | 22 |
3 files changed, 39 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = ocaml-ppx_typerep_conv pkgdesc = Generation of runtime types from type declarations pkgver = 0.14.1 - pkgrel = 2 + pkgrel = 3 epoch = 1 url = https://github.com/janestreet/ppx_typerep_conv arch = x86_64 @@ -17,7 +17,9 @@ pkgbase = ocaml-ppx_typerep_conv depends = ocaml-typerep>=0.14.0 depends = ocaml-ppxlib>=0.14.0 options = !strip - source = ocaml-ppx_typerep_conv-1:0.14.1-2.tar.gz::https://github.com/janestreet/ppx_typerep_conv/archive/v0.14.1.tar.gz + source = ocaml-ppx_typerep_conv-1:0.14.1-3.tar.gz::https://github.com/janestreet/ppx_typerep_conv/archive/v0.14.1.tar.gz + source = ppxlib.diff sha256sums = 92e58fec59e83b972b53b4c72b1202192beaf83c53560357d05c948e4867dc14 + sha256sums = cc1f89a36a0965124b12f732a69a5121b88a0e8148f848c164ca733068c6287b pkgname = ocaml-ppx_typerep_conv @@ -1,9 +1,9 @@ -# Maintainer: Daniel Peukert <dan.peukert@gmail.com> +# Maintainer: Daniel Peukert <daniel@peukert.cc> # Contributor: Jakob Gahde <j5lx@fmail.co.uk> _projectname='ppx_typerep_conv' pkgname="ocaml-$_projectname" pkgver='0.14.1' -pkgrel='2' +pkgrel='3' epoch='1' pkgdesc='Generation of runtime types from type declarations' arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64') @@ -12,11 +12,20 @@ license=('MIT') depends=('ocaml>=4.04.2' 'ocaml-base>=0.14.0' 'ocaml-typerep>=0.14.0' 'ocaml-ppxlib>=0.14.0') makedepends=('dune>=2.0.0') options=('!strip') -source=("$pkgname-$epoch:$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz") -sha256sums=('92e58fec59e83b972b53b4c72b1202192beaf83c53560357d05c948e4867dc14') +source=( + "$pkgname-$epoch:$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz" + "ppxlib.diff" +) +sha256sums=('92e58fec59e83b972b53b4c72b1202192beaf83c53560357d05c948e4867dc14' + 'cc1f89a36a0965124b12f732a69a5121b88a0e8148f848c164ca733068c6287b') _sourcedirectory="$_projectname-$pkgver" +prepare() { + cd "$srcdir/$_sourcedirectory/" + patch --forward -p1 < '../ppxlib.diff' +} + build() { cd "$srcdir/$_sourcedirectory/" dune build --release --verbose diff --git a/ppxlib.diff b/ppxlib.diff new file mode 100644 index 000000000000..25013c466fa7 --- /dev/null +++ b/ppxlib.diff @@ -0,0 +1,22 @@ +diff --git a/src/ppx_typerep_conv.ml b/src/ppx_typerep_conv.ml +index 6e92817..15fa079 100644 +--- a/src/ppx_typerep_conv.ml ++++ b/src/ppx_typerep_conv.ml +@@ -184,7 +184,7 @@ module Typerep_implementation = struct + + val arg_of_param : string -> string + +- val params_names : params:(core_type * variance) list -> string list ++ val params_names : params:(core_type * (variance * injectivity)) list -> string list + val params_patts : loc:Location.t -> params_names:string list -> pattern list + + val type_name_module_definition : loc:Location.t -> path:string -> +@@ -233,7 +233,7 @@ module Typerep_implementation = struct + let str_item_type_and_name ~loc ~path ~params_names ~type_name = + let params = + List.map params_names +- ~f:(fun name -> (ptyp_var ~loc name, Invariant)) ++ ~f:(fun name -> (ptyp_var ~loc name, (NoVariance, NoInjectivity))) + in + let td = + let manifest = |