From d3ee6b2fbcd0fbb666af7f1920446e809e8d6e1e Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Sun, 17 Jan 2016 01:58:05 +0100 Subject: Getting rid of the awkward unpack mechanism from Genarg. --- lib/genarg.ml | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib/genarg.ml') diff --git a/lib/genarg.ml b/lib/genarg.ml index 6c10dee2ae..58d83ce7ae 100644 --- a/lib/genarg.ml +++ b/lib/genarg.ml @@ -203,14 +203,6 @@ let raw : ('a, 'b, 'c, rlevel) cast -> _ = function Rcast x -> x let glb : ('a, 'b, 'c, glevel) cast -> _ = function Gcast x -> x let top : ('a, 'b, 'c, tlevel) cast -> _ = function Tcast x -> x -type ('r, 'l) unpacker = - { unpacker : 'a 'b 'c. ('a, 'b, 'c) genarg_type -> ('a, 'b, 'c, 'l) cast -> 'r } - -let unpack (type l) (pack : (_, l) unpacker) (GenArg (t, obj) : l generic_argument) = match t with -| Rawwit t -> pack.unpacker t (Rcast obj) -| Glbwit t -> pack.unpacker t (Gcast obj) -| Topwit t -> pack.unpacker t (Tcast obj) - (** Type transformers *) type ('r, 'l) list_unpacker = -- cgit v1.2.3