aboutsummaryrefslogtreecommitdiff
path: root/devel/ocaml-extlib
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2007-03-11 12:36:47 +0000
committerStanislav Sedov <stas@FreeBSD.org>2007-03-11 12:36:47 +0000
commit75172661bec881a501d95bb672ebda0f63aa4cdd (patch)
tree0b3ec7a5211ba247e25c08ae344a0185ca498093 /devel/ocaml-extlib
parent40be6e91795dab8a486cc08d9e750f60578b870a (diff)
downloadports-75172661bec881a501d95bb672ebda0f63aa4cdd.tar.gz
ports-75172661bec881a501d95bb672ebda0f63aa4cdd.zip
- Add ExtArray.Array.iter2 from CVS
- Bump portrevision. Requested by: skv
Notes
Notes: svn path=/head/; revision=187128
Diffstat (limited to 'devel/ocaml-extlib')
-rw-r--r--devel/ocaml-extlib/Makefile3
-rw-r--r--devel/ocaml-extlib/files/patch-extArray.ml14
-rw-r--r--devel/ocaml-extlib/files/patch-extArray.mli16
3 files changed, 32 insertions, 1 deletions
diff --git a/devel/ocaml-extlib/Makefile b/devel/ocaml-extlib/Makefile
index a95e7310afae..a4b004e58b54 100644
--- a/devel/ocaml-extlib/Makefile
+++ b/devel/ocaml-extlib/Makefile
@@ -7,12 +7,13 @@
PORTNAME= extlib
PORTVERSION= 1.5
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ocaml-lib
PKGNAMEPREFIX= ocaml-
-MAINTAINER= ssedov@mbsd.msk.ru
+MAINTAINER= stas@FreeBSD.org
COMMENT= A complete - yet small - standard library for OCaml
BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml \
diff --git a/devel/ocaml-extlib/files/patch-extArray.ml b/devel/ocaml-extlib/files/patch-extArray.ml
new file mode 100644
index 000000000000..b0fcdfc3ef7a
--- /dev/null
+++ b/devel/ocaml-extlib/files/patch-extArray.ml
@@ -0,0 +1,14 @@
+--- extArray.ml 2005/11/25 10:22:10 1.8
++++ extArray.ml 2006/10/11 16:24:42 1.9
+@@ -162,4 +162,11 @@
+ | Some x -> x
+ | None -> assert false)
+
++let iter2 f a1 a2 =
++ if Array.length a1 <> Array.length a2
++ then raise (Invalid_argument "Array.iter2");
++ for i = 0 to Array.length a1 - 1 do
++ f a1.(i) a2.(i);
++ done;;
++
+ end
diff --git a/devel/ocaml-extlib/files/patch-extArray.mli b/devel/ocaml-extlib/files/patch-extArray.mli
new file mode 100644
index 000000000000..a0a99a8582f7
--- /dev/null
+++ b/devel/ocaml-extlib/files/patch-extArray.mli
@@ -0,0 +1,16 @@
+--- extArray.mli 2005/11/25 10:22:10 1.11
++++ extArray.mli 2006/10/11 16:24:42 1.12
+@@ -35,6 +35,13 @@
+ val rev_in_place : 'a array -> unit
+ (** In-place array reversal. The array argument is updated. *)
+
++ val iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit
++ (** [Array.iter2 f [|a1; ...; an|] [|b1; ...; bn|]] performs
++ calls [f a1 b1; ...; f an bn] in that order.
++
++ @raise Invalid_argument if the length of [a1] does not equal the
++ length of [a2]. *)
++
+ val for_all : ('a -> bool) -> 'a array -> bool
+ (** [for_all p [a1; ...; an]] checks if all elements of the array
+ satisfy the predicate [p]. That is, it returns