Commits

ysulsky  committed 43389a4

upgrade to type_conv 3.0.5 and oasis 0.3

  • Participants
  • Parent commits 0b375f2

Comments (0)

Files changed (37)

 mycaml$
 \.DS_Store$
 tmtags$
-\.rnc$
 
 ^\.git/.*$
 ^\.transdeps/.*$
 *.rej
 *.spot
 *.toc
+*.cmp
 .*.sw[pabcdef]
 .mydeps
 inline_tests.ml
 order_file_*_common.ml
 *_db_pnl_common.ml
 order_file_*_eval.ml
-
+_build
 
 # for new omake rules
 *.deps
 *.hg_version.c
 *.build_info.c
 hg_version.out
+stub.names
 
 # specific files
 .last_build_env
 libdeps.corrected
 ocaml_path
 .ocaml-3.10
+bisect{.itarget,.mlpack,.odocl,_pp.mlpack}
+bisect-1.1/Makefile.config
 \#*
 .\#*
 
 glob:base/async/lib/async.odocl
 glob:base/async/lib/libasync.clib
 glob:base/async/myocamlbuild.ml
-glob:base/async/scheduler/INSTALL
-glob:base/async/scheduler/Makefile
-glob:base/async/scheduler/_build
-glob:base/async/scheduler/_oasis
-glob:base/async/scheduler/_tags
-glob:base/async/scheduler/configure
-glob:base/async/scheduler/lib/META
-glob:base/async/scheduler/lib/async_scheduler.mlpack
-glob:base/async/scheduler/lib/config.mlh
-glob:base/async/scheduler/myocamlbuild.ml
-glob:base/async/scheduler/setup.data
-glob:base/async/scheduler/setup.ml
+glob:base/async/scheduler
 glob:base/async/setup.data
 glob:base/async/setup.log
 glob:base/async/setup.ml
+glob:base/async/unix/INSTALL
+glob:base/async/unix/Makefile
+glob:base/async/unix/_build
+glob:base/async/unix/_oasis
+glob:base/async/unix/_tags
+glob:base/async/unix/configure
+glob:base/async/unix/lib/META
+glob:base/async/unix/lib/async_unix.mlpack
+glob:base/async/unix/lib/config.mlh
+glob:base/async/unix/myocamlbuild.ml
+glob:base/async/unix/setup.data
+glob:base/async/unix/setup.ml
 glob:base/bin-prot/INSTALL
 glob:base/bin-prot/Makefile
 glob:base/bin-prot/_build
 glob:base/sexplib/setup.ml
 glob:base/sexplib/syntax/pa_sexp_conv.mllib
 glob:base/sexplib/top/sexplib_top.mllib
-glob:base/type-conv/INSTALL
-glob:base/type-conv/Makefile
-glob:base/type-conv/_build
-glob:base/type-conv/_oasis
-glob:base/type-conv/_tags
-glob:base/type-conv/configure
-glob:base/type-conv/lib/META
-glob:base/type-conv/lib/core.mlpack
-glob:base/type-conv/lib/libcore.clib
-glob:base/type-conv/myocamlbuild.ml
-glob:base/type-conv/setup.data
-glob:base/type-conv/setup.log
-glob:base/type-conv/setup.ml
+glob:base/type_conv/INSTALL
+glob:base/type_conv/Makefile
+glob:base/type_conv/_build
+glob:base/type_conv/_oasis
+glob:base/type_conv/_tags
+glob:base/type_conv/configure
+glob:base/type_conv/lib/META
+glob:base/type_conv/lib/core.mlpack
+glob:base/type_conv/lib/libpa_type_conv.clib
+glob:base/type_conv/lib/type_conv.odocl
+glob:base/type_conv/myocamlbuild.ml
+glob:base/type_conv/setup.data
+glob:base/type_conv/setup.log
+glob:base/type_conv/setup.ml
 glob:base/typehash/INSTALL
 glob:base/typehash/Makefile
 glob:base/typehash/_build

File base/async/core/oasis.sh

 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
 
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         async_core
 Version:      107.01
 Copyrights:   (C) 2008-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild
 Description:  Jane Street Capital's asynchronous execution library
 FindlibVersion: >= 1.2.7
 Library async_core
   Path:               lib
   FindlibName:        async_core
-  #Pack:               true
+  Pack:               true
   Modules:            ${MODULES}
   BuildDepends:       sexplib.syntax,
                       sexplib,
 EOF
 
 make_tags "$HERE/_tags" <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Async_core $HERE/lib/*.ml)
-
 <lib/*.ml{,i}>: syntax_camlp4o
 EOF
 
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml async_core
 
 ./configure "$@"
 

File base/async/extra/oasis.sh

 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
 
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         async
 Version:      107.01
 Copyrights:   (C) 2008-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild
 Description:  Jane Street Capital's asynchronous execution library
 FindlibVersion: >= 1.2.7
 Library async_extra
   Path:               lib
   FindlibName:        async_extra
-  #Pack:               true
+  Pack:               true
   Modules:            ${MODULES}
   BuildDepends:       sexplib.syntax,
                       sexplib,
 EOF
 
 make_tags "$HERE/_tags" <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Async_extra $HERE/lib/*.ml)
-
 <lib/*.ml{,i}>: syntax_camlp4o
 EOF
 
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml async_extra
 
 ./configure "$@"
 

File base/async/oasis.sh

 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
 
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         async
 Version:      107.01
 Copyrights:   (C) 2008-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild
 Description:  Jane Street Capital's asynchronous execution library
 FindlibVersion: >= 1.2.7
 Library async
   Path:               lib
   FindlibName:        async
-  #Pack:               true
+  Pack:               true
   Modules:            ${MODULES}
   BuildDepends:       async_core,
                       async_unix,
 
 Document "async"
   Title:                Jane street's async library
-  Type:                 ocamlbuild (0.2)
+  Type:                 ocamlbuild (0.3)
   BuildTools+:          ocamldoc
   XOCamlbuildPath:      lib
   XOCamlbuildLibraries: async
 EOF
 
 make_tags $HERE/_tags <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Async $HERE/lib/*.ml)
-
 # <lib_test/*.ml{,i}>: syntax_camlp4o
 EOF
 
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml async
 
 ./configure "$@"
 

File base/async/unix/oasis.sh

 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
 
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         async_unix
 Version:      107.01
 Copyrights:   (C) 2008-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild
 Description:  Jane Street Capital's asynchronous execution library
 FindlibVersion: >= 1.2.7
 Library async_unix
   Path:               lib
   FindlibName:        async_unix
-  #Pack:               true
+  Pack:               true
   Modules:            ${MODULES}
   BuildDepends:       sexplib.syntax,
                       sexplib,
 EOF
 
 make_tags "$HERE/_tags" <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Async_unix $HERE/lib/*.ml)
-
 <lib/*.ml{,i}>: syntax_camlp4o
 EOF
 
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml async_unix
 
 ./configure "$@"
 

File base/bin-prot/oasis.sh

 
 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         bin_prot
 Version:      2.0.7
 Copyrights:   (C) 2008-2011 Jane Street Holding LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild, camlp4o
 Description:  binary protocol generator
 XStdFilesAUTHORS: false
 
 Library bin_prot
   Path:               lib
-  #Pack:               true
+  Pack:               true
   Modules:            Binable,
                       Nat0,
                       Common,
   FindlibName:        syntax
   FindlibParent:      bin_prot
   Modules:            Pa_bin_prot
-  BuildDepends:       camlp4.quotations,camlp4.extend,type-conv (>= 3.0.4)
+  BuildDepends:       camlp4.quotations,camlp4.extend,type_conv (>= 3.0.5)
   CompiledObject:     byte
   XMETAType:          syntax
-  XMETARequires:      type-conv,bin_prot
+  XMETARequires:      type_conv,bin_prot
   XMETADescription:   Syntax extension for binary protocol generator
 
-$(declare_tests_flag)
-
 Executable test_runner
   Path:               lib_test
   MainIs:             test_runner.ml
 
 Document "bin-prot"
   Title:                API reference for bin-prot
-  Type:                 ocamlbuild (0.2)
+  Type:                 ocamlbuild (0.3)
   BuildTools+:          ocamldoc
   XOCamlbuildPath:      lib
   XOCamlbuildLibraries: bin_prot
 EOF
 
 make_tags $HERE/_tags <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Bin_prot $HERE/lib/*.ml)
-
 <lib/{size,write_ml,read_ml,unsafe_read_c,type_class}.ml{i,}>: pp(cpp -undef -traditional -Werror -I.)
 <lib/{write,read}_ml.ml{,i}>:mlh
-<lib_test/*.ml{,i}>: syntax_camlp4o,pkg_type-conv.syntax
+<lib_test/*.ml{,i}>: syntax_camlp4o,pkg_type_conv.syntax
 <syntax/pa_bin_prot.ml>: syntax_camlp4o
 EOF
 
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml bin_prot
 
 ./configure "$@"

File base/compare/oasis.sh

 
 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         comparelib
 Version:      0.1.1
 Copyrights:   (C) 2009-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 XStdFilesREADME: false
 XStdFilesAUTHORS: false
 XStdFilesINSTALLFilename: INSTALL
   FindlibName:        syntax
   BuildDepends:       camlp4.lib,
                       camlp4.quotations,
-                      type-conv (>= 2.0.1)
+                      type_conv (>= 3.0.5)
   CompiledObject:     byte
   XMETAType:          syntax
-  XMETARequires:      camlp4,type-conv,comparelib
+  XMETARequires:      camlp4,type_conv,comparelib
   XMETADescription:   Syntax extension for "with compare"
 EOF
 

File base/core/extended/oasis.sh

 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
 
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         core_extended
 Version:      107.01
 Copyrights:   (C) 2008-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild
 Description:  Jane Street Capital's standard library overlay
 FindlibVersion : >= 1.2.7
 Library core_extended
   Path:               lib
   FindlibName:        core_extended
-  #Pack:               true
+  Pack:               true
   Modules:            ${MODULES}
   CSources:           ${CSOURCES}
   CCOpt+:             -Ilib
 
 Document "core-extended"
   Title:                Jane street's core extended library
-  Type:                 ocamlbuild (0.2)
+  Type:                 ocamlbuild (0.3)
   BuildTools+:          ocamldoc
   XOCamlbuildPath:      lib
   XOCamlbuildLibraries: core_extended
 EOF
 
 make_tags "$HERE/_tags" <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Core_extended $HERE/lib/*.ml)
-
 <lib/*.ml{,i}>: syntax_camlp4o
 "lib/std.ml": pkg_camlp4.macro
 "lib/command.ml": pkg_camlp4.macro
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml core_extended
 
 ./configure "$enable_timers_default" "$enable_linux_default" "$@"

File base/core/oasis.sh

 cat >$HERE/_oasis<<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
 
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         core
 Version:      107.01
 Copyrights:   (C) 2008-2010 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild
 Description:  Jane Street Capital's standard library overlay
 FindlibVersion: >= 1.2.7
 Library core
   Path:               lib
   FindlibName:        core
-  #Pack:               true
+  Pack:               true
   Modules:${MODULES}
   CCOpt:              $(getconf LFS64_CFLAGS 2>/dev/null)
   CSources:           ${CSOURCES}
                       unix,
                       threads
 
-$(declare_tests_flag)
-
 Executable test_runner
   Path:               lib_test
   MainIs:             test_runner.ml
 
 Document "core"
   Title:                Jane street's core library
-  Type:                 ocamlbuild (0.2)
+  Type:                 ocamlbuild (0.3)
   BuildTools+:          ocamldoc
   XOCamlbuildPath:      lib
   XOCamlbuildLibraries: core
 EOF
 
 make_tags "$HERE/_tags" <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Core $HERE/lib/*.ml)
-
 <lib{,_test}/*.ml{,i}>: syntax_camlp4o
 <lib/{core_int63,bigstring,core_mutex,core_unix,bigstring_marshal,linux_ext,backtrace}.ml{,i}>:pkg_camlp4.macro
 EOF
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml core
 
 ./configure "$enable_linux_default" "$enable_timers_default" "$@"

File base/fieldslib/oasis.sh

 
 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         fieldslib
 Version:      107.01
 Copyrights:   (C) 2009-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 XStdFilesREADME: false
 XStdFilesAUTHORS: false
 XStdFilesINSTALLFilename: INSTALL
 Library fieldslib
   Path:               lib
   FindlibName:        fieldslib
-  #Pack:               true
+  Pack:               true
   Modules:            Field
   XMETAType:          library
 
   FindlibName:        syntax
   BuildDepends:       camlp4.lib,
                       camlp4.quotations,
-                      type-conv (>= 2.0.1)
+                      type_conv (>= 3.0.5)
   CompiledObject:     byte
   XMETAType:          syntax
-  XMETARequires:      camlp4,type-conv,fieldslib
+  XMETARequires:      camlp4,type_conv,fieldslib
   XMETADescription:   Syntax extension for Fieldslib
 
 Document "fieldslib"
   Title:                API reference for fieldslib
-  Type:                 ocamlbuild (0.2)
+  Type:                 ocamlbuild (0.3)
   BuildTools+:          ocamldoc
   XOCamlbuildPath:      lib
   XOCamlbuildLibraries: fieldslib
 EOF
 
 make_tags $HERE/_tags <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Fieldslib $HERE/lib/*.ml)
-
 <syntax/pa_fields_conv.ml>: syntax_camlp4o
 EOF
 
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml fieldslib
 
 ./configure "$@"
 

File base/pa_ounit/oasis.sh

 
 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         pa_ounit
 Version:      0.1.1
 Copyrights:   (C) 2009-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 XStdFilesREADME: false
 XStdFilesAUTHORS: false
 XStdFilesINSTALLFilename: INSTALL
   FindlibName:        pa_ounit
   BuildDepends:       camlp4.lib,
                       camlp4.quotations,
-                      type-conv (>= 2.0.1)
+                      type_conv (>= 3.0.5)
   CompiledObject:     byte
   XMETAType:          syntax
-  XMETARequires:      camlp4,type-conv,oUnit
+  XMETARequires:      camlp4,type_conv,oUnit
   XMETADescription:   Syntax extension writing inline tests
 EOF
 

File base/pipebang/oasis.sh

 
 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         pipebang
 Version:      0.1.1
 Copyrights:   (C) 2009-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 XStdFilesREADME: false
 XStdFilesAUTHORS: false
 XStdFilesINSTALLFilename: INSTALL
   FindlibName:        pa_pipebang
   BuildDepends:       camlp4.lib,
                       camlp4.quotations,
-                      type-conv (>= 2.0.1)
+                      type_conv (>= 3.0.5)
   CompiledObject:     byte
   XMETAType:          syntax
-  XMETARequires:      camlp4,type-conv,oUnit
+  XMETARequires:      camlp4,type_conv,oUnit
   XMETADescription:   Syntax extension writing inline tests
 EOF
 

File base/sexplib/oasis.sh

 
 cat >$HERE/_oasis <<EOF
 #AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
-OASISFormat:  0.2
+OASISFormat:  0.3
 OCamlVersion: >= 3.12
 Name:         sexplib
 Version:      7.0.4
 Copyrights:   (C) 2005-2011 Jane Street Capital LLC
 License:      LGPL-2.1 with OCaml linking exception
 LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
+Plugins:      StdFiles (0.3), DevFiles (0.3), META (0.3)
 BuildTools:   ocamlbuild
 XStdFilesAUTHORS: false
 XStdFilesINSTALLFilename: INSTALL
 Library sexplib
   Path:               lib
   FindlibName:        sexplib
-  #Pack:               true
+  Pack:               true
   Modules:            Type,
                       Parser,
                       Lexer,
   FindlibName:        syntax
   FindlibParent:      sexplib
   Modules:            Pa_sexp_conv
-  BuildDepends:       camlp4.quotations,camlp4.extend,type-conv (>= 3.0.4)
+  BuildDepends:       camlp4.quotations,camlp4.extend,type_conv (>= 3.0.5)
   CompiledObject:     byte
   XMETAType:          syntax
-  XMETARequires:      camlp4,type-conv,sexplib
+  XMETARequires:      camlp4,type_conv,sexplib
   XMETADescription:   Syntax extension for Sexplib
 
 Library sexplib_top
   XMETARequires:      sexplib
   XMETADescription:   Toplevel printers for S-expressions
 
-# TODO: figure out how to build tests without installing sexplib
-$(declare_tests_flag)
-
 Executable sexp_test
   Path:               lib_test
   MainIs:             sexp_test.ml
 
 Document "sexplib"
   Title:                API reference for sexplib
-  Type:                 ocamlbuild (0.2)
+  Type:                 ocamlbuild (0.3)
   BuildTools+:          ocamldoc
   XOCamlbuildPath:      lib
   XOCamlbuildLibraries: sexplib
 EOF
 
 make_tags $HERE/_tags <<EOF
-# remove this part when oasis supports Pack: true
-$(tag_for_pack Sexplib $HERE/lib/*.ml{,l,y})
-
 <lib/pre_sexp.ml>: pp(cpp -undef -traditional -Werror -I$HERE/syntax)
-<lib_test/*.ml{,i}>: syntax_camlp4o, pkg_type-conv.syntax
+<lib_test/*.ml{,i}>: syntax_camlp4o, pkg_type_conv.syntax
 <lib_test/conv_test.byte>: use_sexplib, pkg_unix, pkg_num, pkg_bigarray
 <syntax/pa_sexp_conv.ml>: syntax_camlp4o
 EOF
 cd $HERE
 rm -f setup.ml
 oasis setup
-enable_pack_in_setup_ml sexplib
 
 ./configure "$@"

File base/type-conv/.hgignore.in

-INSTALL
-Makefile
-myocamlbuild.ml
-configure
-lib/core.mlpack
-setup.ml
-setup.log
-setup.data
-_oasis
-_build
-_tags
-lib/META
-lib/libcore.clib

File base/type-conv/COPYRIGHT

-Most of this library was written by:
-
-  Markus Mottl          <markus.mottl@gmail.com>
-
-This work is derived from the library "Tywith", version 0.45.  The library
-"Tywith" was written and is distributed by:
-
-  Martin Sandin         <msandin@hotmail.com>
-
-The original license of "Tywith" can be found in the file
-"LICENSE.Tywith".  Files that were derived from "Tywith" contain a
-reference to the original author.
-
-The following company has sponsored and has copyright in part of this work:
-
-  Jane Street Holding, LLC
-  1 New York Plaza, 33rd Floor 
-  New York, NY 10004
-  USA

File base/type-conv/Changelog

-2011-09-15:  Fixes to improve package dependency resolution.
-
-2011-08-02:  Added missing module type case for "module type of".
-
-2011-07-04:  Merged with Jane Street version.  API changes:
-
-             Removed functions:
-
-               * Gen.ide
-               * Gen.idp
-
-             Removed location arguments from:
-
-               * type_is_recursive
-               * drop_variance_annotations
-
-2010-12-22:  Merged with Jane Street version.  No code changes.
-
-2010-09-25:  Added a missing type case to type_is_recursive.
-             Thanks to Michael Wawrzoniak <mhw@cs.princeton.edu> for this
-             patch!
-
-2010-07-07:  Major changes for compatibility with OCaml 3.12.
-
-2010-06-03:  Improved determination of type-conv paths.
-             Thanks to Jacques Le Normand <rathereasy@gmail.com> for this
-             patch!
-
-2009-09-19:  Added missing type cases for supporting variant types.
-
-2009-01-14:  Added support for type converters that take arguments.
-             Thanks to Jérémie Dimino <jeremie@dimino.org> for this
-             patch!
-
-             Added support for deprecated OCaml syntax, since the compiler
-             still supports it, too.
-
-2008-10-22:  Fixed bug preprocessing labeled arguments in function types.
-
-2008-10-18:  Fix for upcoming OCaml release 3.11.
-
-2008-10-07:  Added a patch to improve handling of type conversion paths.
-
-             Thanks to David Rajchenbach-Teller
-             <David.Teller@ens-lyon.org> for the patch!
-
-2008-08-20:  Added support for exception converters.
-
-2008-07-25:  Fixed bug concerning variance annotations in type
-             definitions within structures.
-
-2008-03-17:  Improved META file and support of toplevel interpreter.
-
-2008-02-11:  Added support for handling variance annotations in
-             signatures, and for empty types.
-
-2007-10-14:  Initial release.

File base/type-conv/LICENSE.Tywith

----------------------------------------------------------------------------
-Copyright (c) 2004 Martin Sandin
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------

File base/type-conv/README

-The type-conv mini library factors out functionality needed by different
-preprocessors that generate code from type specifications, because this
-functionality cannot be duplicated without losing the ability to use
-these preprocessors simultaneously.

File base/type-conv/lib/type-conv.odocl

-# OASIS_START
-# DO NOT EDIT (digest: 871b646cd26bfbac67d5d74fa892e38e)
-../syntax/Pa_type_conv
-# OASIS_STOP

File base/type-conv/oasis.sh

-#!/usr/bin/env bash
-set -e -u -o pipefail
-
-source ../../build-common.sh
-
-cat >$HERE/_oasis <<EOF
-#AUTOGENERATED FILE; EDIT oasis.sh INSTEAD
-OASISFormat:  0.2
-OCamlVersion: >= 3.12
-Name:         type-conv
-Version:      3.0.4
-Synopsis:     support library for preprocessor type conversions
-Authors:      Martin Sandin,
-              Markus Mottl,
-              Jane Street Capital, LLC
-License:      LGPL-2.1 with OCaml linking exception
-LicenseFile:  LICENSE
-Plugins:      StdFiles (0.2),
-              DevFiles (0.2),
-              META (0.2)
-BuildTools:   ocamlbuild, camlp4o
-XStdFilesAUTHORS: false
-XStdFilesINSTALLFilename: INSTALL
-XStdFilesREADME: false
-
-Library pa_type_conv
-  Path:               syntax
-  Modules:            Pa_type_conv
-  FindlibName:        type-conv
-  BuildDepends:       camlp4.quotations, camlp4.extend
-  CompiledObject:     byte
-  XMETAType:          syntax
-  XMETARequires:      camlp4
-  XMETADescription:   Syntax extension for type-conv
-
-Document "type-conv"
-  Title:                API reference for Type-conv
-  Type:                 ocamlbuild (0.2)
-  BuildTools+:          ocamldoc
-  XOCamlbuildPath:      lib
-  XOCamlbuildLibraries: type-conv
-EOF
-
-make_tags $HERE/_tags <<EOF
-<syntax/pa_type_conv.ml>: syntax_camlp4o
-EOF
-
-cd $HERE
-oasis setup
-./configure "$@"
-

File base/type-conv/syntax/META

-# OASIS_START
-# DO NOT EDIT (digest: f1c75f691f33f8ee2a4b69f96a169153)
-version = "3.0.4"
-description = "Syntax extension for type-conv"
-requires = "camlp4"
-archive(syntax, preprocessor) = "pa_type_conv.cma"
-archive(syntax, toploop) = "pa_type_conv.cma"
-exists_if = "pa_type_conv.cma"
-# OASIS_STOP
-

File base/type-conv/syntax/pa_type_conv.ml

-(* Pa_type_conv: Preprocessing Module for Registering Type Conversions *)
-
-open Printf
-open Lexing
-
-open Camlp4
-open PreCast
-open Ast
-
-(* Utility functions *)
-
-let both fa fb (a, b) = fa a, fb b
-
-let get_loc_err loc msg =
-  sprintf "File \"%s\", line %d, characters %d-%d: %s"
-    (Loc.file_name loc) (Loc.start_line loc)
-    (Loc.start_off loc - Loc.start_bol loc)
-    (Loc.stop_off loc - Loc.stop_bol loc)
-    msg
-
-(* To be deleted once the OCaml team fixes Mantis issue #4751. *)
-let hash_variant str =
-  let acc_ref = ref 0 in
-  for i = 0 to String.length str - 1 do
-    acc_ref := 223 * !acc_ref + Char.code str.[i]
-  done;
-  if Sys.word_size = 32 then !acc_ref
-  else !acc_ref land int_of_string "0x7FFFFFFF"
-
-
-(* Module/File path management *)
-
-type path =
-  | Not_initialized  (* Initial state *)
-  | Too_late  (* already in a submodule, too late to initialize *)
-  | Path of string * string list  (* Actually initialized *)
-
-(* Reference storing the path to the currently preprocessed module *)
-let conv_path_ref = ref Not_initialized
-
-let get_conv_path_el () =
-  match !conv_path_ref with
-  | Path (e, el) -> e, el
-  | _ -> failwith "Pa_type_conv: path not set"
-
-(* Get path to the currently preprocessed module *)
-let get_conv_path () = fst (get_conv_path_el ())
-
-(* Set path to the currently preprocessed module *)
-let set_conv_path conv_path =
-  if !conv_path_ref = Not_initialized || !Sys.interactive then
-    conv_path_ref := Path (conv_path, [conv_path])
-  else failwith "Pa_type_conv: module name set twice"
-
-let () = if !Sys.interactive then set_conv_path "Toplevel"
-
-let push_conv_path mod_name =
-  match !conv_path_ref with
-  | Not_initialized -> conv_path_ref := Too_late (* Entered a submodule *)
-  | Too_late -> ()
-  | Path (str, rev_lst) ->
-      conv_path_ref := Path (str ^ "." ^ mod_name, mod_name :: rev_lst)
-
-let pop_conv_path () =
-  match !conv_path_ref with
-  | Path (_, _ :: rev_lst) ->
-      conv_path_ref := Path (String.concat "." (List.rev rev_lst), rev_lst)
-  | _ -> ()
-
-
-(* Generator registration *)
-
-
-(* Map of "with"-generators for types in structures *)
-let generators = Hashtbl.create 0
-
-(* Map of "with"-generators for types in signatures *)
-let sig_generators = Hashtbl.create 0
-
-(* Map of "with"-generators for exceptions in structures *)
-let exn_generators = Hashtbl.create 0
-
-(* Map of "with"-generators for exceptions in signatures *)
-let sig_exn_generators = Hashtbl.create 0
-
-(* Check that there is no argument for generators that do not expect
-   arguments *)
-let no_arg id e typ arg =
-  if arg = None then e typ
-  else
-    failwith (
-      "Pa_type_conv: generator '" ^ id ^ "' does not expect an argument")
-
-(* Parse a list of tokens with the given grammar entry *)
-let parse_with entry = function
-  | Some tokens ->
-      Some (Gram.parse_tokens_after_filter entry (Stream.of_list tokens))
-  | None -> None
-
-(* Entry which ignores its input *)
-let ignore_tokens = Gram.Entry.of_parser "ignore_tokens" ignore
-
-(* Add new generator, fail if already defined *)
-let safe_add_gen gens id entry e =
-  if Hashtbl.mem gens id then
-    failwith ("Pa_type_conv: generator '" ^ id ^ "' defined multiple times")
-  else Hashtbl.add gens id (fun typ arg -> e typ (parse_with entry arg))
-
-(* Register a "with"-generator for types in structures *)
-let add_generator_with_arg ?(is_exn = false) id entry e =
-  let gens = if is_exn then exn_generators else generators in
-  safe_add_gen gens id entry e
-
-let add_generator ?is_exn id e =
-  add_generator_with_arg ?is_exn id ignore_tokens (no_arg id e)
-
-(* Removes a "with"-generator for types in structures *)
-let rm_generator ?(is_exn = false) id =
-  let gens = if is_exn then exn_generators else generators in
-  Hashtbl.remove gens id
-
-(* Register a "with"-generator for types in signatures *)
-let add_sig_generator_with_arg ?(is_exn = false) id entry e =
-  let gens = if is_exn then sig_exn_generators else sig_generators in
-  safe_add_gen gens id entry e
-
-let add_sig_generator ?is_exn id e =
-  add_sig_generator_with_arg ?is_exn id ignore_tokens (no_arg id e)
-
-(* Removes a "with"-generator for types in signatures *)
-let rm_sig_generator ?(is_exn = false) id =
-  let gens = if is_exn then sig_exn_generators else sig_generators in
-  Hashtbl.remove gens id
-
-
-(* General purpose code generation module *)
-
-module Gen = struct
-  let gensym =
-    let cnt = ref 0 in
-    fun ?(prefix = "_x") () ->
-      incr cnt;
-      sprintf "%s__%03i_" prefix !cnt
-
-  (* Like Ast.exSem_of_list but for application *)
-  let exApp_of_list l =
-    let rec aux = function
-      | [] -> Ast.ExNil Loc.ghost
-      | [x] -> x
-      | x :: xs ->
-        let loc = Ast.loc_of_expr x in
-        <:expr@loc< $aux xs$ $x$ >>
-    in
-    aux (List.rev l)
-
-  let rec tyArr_of_list = function
-    | [] -> Ast.TyNil Loc.ghost
-    | [x] -> x
-    | x :: xs ->
-      let loc = loc_of_ctyp x in
-      <:ctyp@loc< $x$ -> $tyArr_of_list xs$ >>
-
-  let rec paOr_of_list = function
-    | [] -> Ast.PaNil Loc.ghost
-    | [x] -> x
-    | x :: xs ->
-      let loc = loc_of_patt x in
-      <:patt@loc< $x$ | $paOr_of_list xs$ >>
-
-  module PP = Camlp4.Printers.OCaml.Make (Syntax)
-  let conv_ctyp = (new PP.printer ())#ctyp
-
-  let string_of_ctyp ctyp =
-    try
-      let buffer = Buffer.create 32 in
-      Format.bprintf buffer "%a@?" conv_ctyp ctyp;
-      Some (Buffer.contents buffer)
-    with _ -> None
-
-  let error tp ~fn ~msg =
-    let loc = Ast.loc_of_ctyp tp in
-    let failure =
-      match string_of_ctyp tp with
-      | Some tp_str -> sprintf "%s: %s\n%s" fn msg tp_str
-      | None -> sprintf "%s: %s" fn msg
-    in
-    Loc.raise loc (Failure failure)
-
-  let unknown_type tp fn = error tp ~fn ~msg:"unknown type"
-
-  let rec ty_var_list_of_ctyp tp acc =
-    match tp with
-    | <:ctyp< $tp1$ $tp2$ >> ->
-        ty_var_list_of_ctyp tp1 (ty_var_list_of_ctyp tp2 acc)
-    | <:ctyp< '$param$ >> -> param :: acc
-    | _ -> invalid_arg "ty_var_list_of_ctyp"
-
-  let rec get_rev_id_path tp acc =
-    match tp with
-    | <:ident< $id1$ . $id2$ >> -> get_rev_id_path id2 (get_rev_id_path id1 acc)
-    | <:ident< $lid:id$ >> | <:ident< $uid:id$ >> -> id :: acc
-    | _ -> invalid_arg "get_rev_id_path"
-
-  let mk_ident _loc str =
-    let first = str.[0] in
-    if first >= 'A' && first <= 'Z' then <:ident< $uid:str$ >>
-    else <:ident< $lid:str$ >>
-
-  let rec ident_of_rev_path _loc = function
-    | [str] -> mk_ident _loc str
-    | str :: strs ->
-        <:ident< $ident_of_rev_path _loc strs$ . $mk_ident _loc str$ >>
-    | _ -> invalid_arg "ident_of_rev_path"
-
-  let rec get_appl_path _loc = function
-    | <:ctyp< $id:id$ >> -> id
-    | <:ctyp< $tp$ $_$ >> -> get_appl_path _loc tp
-    | _ -> failwith "get_appl_path: unknown type"
-
-  let abstract _loc = List.fold_right (fun p e -> <:expr< fun $p$ -> $e$ >>)
-  let apply _loc = List.fold_left (fun f arg -> <:expr< $f$ $arg$ >>)
-
-  let switch_tp_def ~alias ~sum ~record ~variants ~mani ~nil tp =
-    let rec loop = function
-      | <:ctyp< private $tp$ >> -> loop tp
-      | <:ctyp@loc< [ $alts$ ] >> -> sum loc alts
-      | <:ctyp@loc< [< $row_fields$ ] >> | <:ctyp@loc< [> $row_fields$ ] >>
-      | <:ctyp@loc< [= $row_fields$ ] >> -> variants loc row_fields
-      | <:ctyp@loc< $id:_$ >>
-      | <:ctyp@loc< ( $tup:_$ ) >>
-      | <:ctyp@loc< $_$ -> $_$ >>
-      | <:ctyp@loc< '$_$ >>
-      | <:ctyp@loc< $_$ $_$ >> as tp_def -> alias loc tp_def
-      | <:ctyp@loc< { $flds$ } >> -> record loc flds
-      | <:ctyp@loc< $tp1$ == $tp2$ >> -> mani loc tp1 tp2
-      | <:ctyp@loc< >> -> nil loc
-      | tp -> unknown_type tp "switch_tp_def"
-    in
-    loop tp
-
-  let rec mk_expr_lst _loc = function
-    | [] -> <:expr< [] >>
-    | e :: es -> <:expr< [$e$ :: $mk_expr_lst _loc es$] >>
-
-  let rec mk_patt_lst _loc = function
-    | [] -> <:patt< [] >>
-    | p :: ps -> <:patt< [$p$ :: $mk_patt_lst _loc ps$] >>
-
-  let get_tparam_id = function
-    | <:ctyp< '$id$ >> | <:ctyp< +'$id$ >> | <:ctyp< -'$id$ >> -> id
-    | tp -> error tp ~fn:"get_tparam_id" ~msg:"not a type parameter"
-
-  let type_is_recursive type_name tp =
-    let bad_type tp = unknown_type tp "type_is_recursive" in
-    let rec loop = function
-      | <:ctyp< private $tp$>> -> loop tp
-      | <:ctyp< $tp1$ $tp2$ >>
-      | <:ctyp< $tp1$ * $tp2$ >>
-      | <:ctyp< $tp1$; $tp2$ >>
-      | <:ctyp< $tp1$ -> $tp2$ >>
-      | <:ctyp< $tp1$ == $tp2$ >>
-      | <:ctyp< $tp1$ and $tp2$ >>
-      | <:ctyp< $tp1$ & $tp2$ >>
-      | <:ctyp< $tp1$, $tp2$ >>
-      | <:ctyp< [ < $tp1$ > $tp2$ ] >>
-      | <:ctyp< $tp1$ | $tp2$ >> -> loop tp1 || loop tp2
-      | <:ctyp< ( $tup:tp$ ) >> | <:ctyp< { $tp$ } >>
-      | <:ctyp< [ $tp$ ] >>
-      | <:ctyp< $_$ : $tp$ >>
-      | <:ctyp< ~ $_$ : $tp$ >>
-      | <:ctyp< ? $_$ : $tp$ >>
-      | <:ctyp< < $tp$; $..:_$ > >>
-      | <:ctyp< mutable $tp$ >>
-      | <:ctyp< $_$ of & $tp$ >>
-      | <:ctyp< $_$ of $tp$ >>
-      | <:ctyp< $tp$ as $_$ >>
-      | <:ctyp< [< $tp$ ] >> | <:ctyp< [> $tp$ ] >> | <:ctyp< [= $tp$ ] >>
-      | <:ctyp< ! $_$ . $tp$ >> -> loop tp
-      | <:ctyp< $lid:id$ >> -> id = type_name
-      | <:ctyp< $id:_$ >>
-      | <:ctyp< #$id:_$ >>
-      | <:ctyp< `$_$ >>
-      | <:ctyp< '$_$ >>
-      | <:ctyp< -'$_$ >>
-      | <:ctyp< +'$_$ >>
-      | <:ctyp< _ >>
-      | <:ctyp< >> -> false
-      | <:ctyp< (module $module_type$) >> -> loop_module_type module_type
-      | Ast.TyDcl _
-      | Ast.TyAnt _ as tp -> bad_type tp
-    and loop_module_type = function
-      | <:module_type< $module_type$ with $with_constr$ >> ->
-          let rec loop_with_constr = function
-            | <:with_constr< type $_$ = $tp$ >>
-            | <:with_constr< type $_$ := $tp$ >> -> loop tp
-            | <:with_constr< $wc1$ and $wc2$ >> ->
-                loop_with_constr wc1 || loop_with_constr wc2
-            | <:with_constr< module $_$ = $_$ >>
-            | <:with_constr< module $_$ := $_$ >>
-            | <:with_constr< >> -> false
-            | Ast.WcAnt _ -> bad_type tp
-          in
-          loop_with_constr with_constr || loop_module_type module_type
-      | <:module_type< $id:_$ >>
-      | <:module_type< '$_$ >>
-      | <:module_type< >> -> false
-      | <:module_type< functor ($_$ : $_$) -> $_$ >>
-      | <:module_type< sig $_$ end >>
-      | <:module_type< module type of $_$ >>
-      | Ast.MtAnt _ -> bad_type tp
-    in
-    loop tp
-
-  let drop_variance_annotations =
-    (map_ctyp (function
-      | <:ctyp@loc< +'$var$ >> | <:ctyp@loc< -'$var$ >> -> <:ctyp@loc< '$var$ >>
-      | tp -> tp))#ctyp
-end
-
-
-(* Functions for interpreting derivation types *)
-
-let find_generator ~name haystack = (); fun tp (needle, arg) ->
-  let genf =
-    try Hashtbl.find haystack needle
-    with Not_found ->
-      let keys = Hashtbl.fold (fun key _ acc -> key :: acc) haystack [] in
-      let gen_names = String.concat ", " keys in
-      let msg =
-        Printf.sprintf
-          "Pa_type_conv: \
-          %S is not a supported %s generator. (supported generators: %s)"
-          needle
-          name
-          gen_names
-      in
-      failwith msg
-  in
-  genf tp arg
-
-let generate = find_generator ~name:"type" generators
-
-let gen_derived_defs _loc tp drvs =
-  let coll drv der_sis = <:str_item< $der_sis$; $generate tp drv$ >> in
-  List.fold_right coll drvs <:str_item< >>
-
-let generate_exn = find_generator ~name:"exception" exn_generators
-
-let gen_derived_exn_defs _loc tp drvs =
-  let coll drv der_sis = <:str_item< $der_sis$; $generate_exn tp drv$ >> in
-  List.fold_right coll drvs <:str_item< >>
-
-let sig_generate = find_generator ~name:"signature" sig_generators
-
-let gen_derived_sigs _loc tp drvs =
-  let coll drv der_sis = <:sig_item< $der_sis$; $sig_generate tp drv$ >> in
-  List.fold_right coll drvs (SgNil _loc)
-
-let sig_exn_generate = find_generator ~name:"signature exception" sig_exn_generators
-
-let gen_derived_exn_sigs _loc tp drvs =
-  let coll drv der_sis = <:sig_item< $der_sis$; $sig_exn_generate tp drv$ >> in
-  List.fold_right coll drvs (SgNil _loc)
-
-
-(* Syntax extension *)
-
-open Syntax
-
-let is_prefix ~prefix x =
-  let prefix_len = String.length prefix in
-  String.length x >= prefix_len && prefix = String.sub x 0 prefix_len
-
-let chop_prefix ~prefix x =
-  if is_prefix ~prefix x then
-    let prefix_len = String.length prefix in
-    Some (String.sub x prefix_len (String.length x - prefix_len))
-  else None
-
-let get_default_path _loc =
-  try
-    let prefix = Sys.getenv "TYPE_CONV_ROOT" in
-    match chop_prefix ~prefix (Loc.file_name (Loc.make_absolute _loc)) with
-    | Some x -> x ^ "#"
-    | None -> Loc.file_name _loc
-  with _ -> Loc.file_name _loc
-
-let set_conv_path_if_not_set _loc =
-  if !conv_path_ref = Not_initialized || !Sys.interactive then
-    let conv_path = get_default_path _loc in
-    conv_path_ref := Path (conv_path, [conv_path])
-
-let found_module_name =
-  Gram.Entry.of_parser "found_module_name" (fun strm ->
-    match Stream.npeek 1 strm with
-    | [(UIDENT name, token_info)] ->
-        set_conv_path_if_not_set (Gram.token_location token_info);
-        push_conv_path name;
-        Stream.junk strm;
-        name
-    | _ -> raise Stream.Failure)
-
-let rec fetch_generator_arg paren_count strm =
-  match Stream.next strm with
-  | KEYWORD "(", _ -> fetch_generator_arg (paren_count + 1) strm
-  | KEYWORD ")", token_info ->
-      if paren_count = 1 then [(EOI, token_info)]
-      else fetch_generator_arg (paren_count - 1) strm
-  | EOI, token_info ->
-      Loc.raise (Gram.token_location token_info) (Stream.Error "')' missing")
-  | x -> x :: fetch_generator_arg paren_count strm
-
-let generator_arg =
-  Gram.Entry.of_parser "generator_arg" (fun strm ->
-    match Stream.peek strm with
-    | Some (KEYWORD "(", _) ->
-        Stream.junk strm;
-        Some (fetch_generator_arg 1 strm)
-    | _ -> None)
-
-DELETE_RULE Gram str_item: "module"; a_UIDENT; module_binding0 END;
-
-EXTEND Gram
-  GLOBAL: str_item sig_item;
-
-  str_item:
-    [[
-      "TYPE_CONV_PATH"; conv_path = STRING ->
-        set_conv_path conv_path;
-        <:str_item< >>
-    ]];
-
-  generator: [[ id = LIDENT; arg = generator_arg -> (id, arg) ]];
-
-  str_item:
-    [[
-      "type"; tds = type_declaration; "with"; drvs = LIST1 generator SEP "," ->
-        set_conv_path_if_not_set _loc;
-        <:str_item< type $tds$; $gen_derived_defs _loc tds drvs$ >>
-    ]];
-
-  str_item:
-    [[
-      "exception"; tds = constructor_declaration; "with";
-      drvs = LIST1 generator SEP "," ->
-        set_conv_path_if_not_set _loc;
-        <:str_item< exception $tds$; $gen_derived_exn_defs _loc tds drvs$ >>
-    ]];
-
-  sig_item:
-    [[
-      "type"; tds = type_declaration; "with"; drvs = LIST1 generator SEP "," ->
-        set_conv_path_if_not_set _loc;
-        <:sig_item< type $tds$; $gen_derived_sigs _loc tds drvs$ >>
-    ]];
-
-  sig_item:
-   [[
-     "exception"; cd = constructor_declaration; "with";
-     drvs = LIST1 generator SEP "," ->
-       set_conv_path_if_not_set _loc;
-       <:sig_item< exception $cd$; $gen_derived_exn_sigs _loc cd drvs$ >>
-    ]];
-
-  str_item:
-    [[
-      "module"; i = found_module_name; mb = module_binding0 ->
-        pop_conv_path ();
-        <:str_item< module $i$ = $mb$ >>
-    ]];
-
-END

File base/type-conv/syntax/pa_type_conv.mli

-(** Pa_type_conv: Preprocessing Module for Registering Type Conversions *)
-
-open Camlp4.PreCast.Ast
-
-(** {6 Generator registration} *)
-
-val add_generator : ?is_exn : bool -> string -> (ctyp -> str_item) -> unit
-(** [add_generator ?is_exn name gen] adds the code generator [gen],
-    which maps type or exception declarations to structure items, where
-    [is_exn] specifies whether the declaration is an exception.  Note that
-    the original type/exception declarations get added automatically in
-    any case.
-
-    @param is_exn = [false]
-*)
-
-val add_generator_with_arg :
-  ?is_exn : bool -> string -> 'a Camlp4.PreCast.Gram.Entry.t ->
-  (ctyp -> 'a option -> str_item) -> unit
-(** [add_generator_with_arg ?is_exn name entry generator] same as
-    [add_generator], but the generator may accept an argument, which is
-    parsed with [entry]. *)
-
-val rm_generator : ?is_exn : bool -> string -> unit
-(** [rm_generator ?is_exn name] removes the code generator named [name]. *)
-
-val add_sig_generator :
-  ?is_exn : bool -> string -> (ctyp -> sig_item) -> unit
-(** [add_generator ?is_exn name gen] adds the code generator [gen],
-    which maps type or exception declarations to signature items, where
-    [is_exn] specifies whether the declaration is an exception.  Note that
-    the original type/exception declarations get added automatically in
-    any case.
-
-    @param is_exn = [false]
-*)
-
-val set_conv_path_if_not_set : Loc.t -> unit
-
-val add_sig_generator_with_arg :
-  ?is_exn : bool -> string -> 'a Camlp4.PreCast.Gram.Entry.t ->
-  (ctyp -> 'a option -> sig_item) -> unit
-(** [add_sig_generator_with_arg ?is_exn name entry generator] same as
-    [add_sig_generator], but the generator may accept an argument,
-    which is parsed with [entry]. *)
-
-val rm_sig_generator : ?is_exn : bool -> string -> unit
-(** [rm_sig_generator name] removes the code signature generator named
-    [name]. *)
-
-val get_conv_path : unit -> string
-(** [get_conv_path ()] @return the name to module containing a type
-    as required for error messages. *)
-
-
-(** {6 Utility functions} *)
-
-val get_loc_err : Loc.t -> string -> string
-(** [get_loc_err loc msg] generates a compile-time error message. *)
-
-val hash_variant : string -> int
-(** [hash_variant str] @return the integer encoding a variant tag with
-    name [str]. *)
-
-
-(** {6 General purpose code generation module} *)
-
-module Gen : sig
-  val exApp_of_list : expr list -> expr
-  (** [expr_app_of_list l] takes list [l] of expressions [e1; e2; e3; ...]
-      and returns the expression [e1 e2 e3].  C.f.: [Ast.exSem_of_list]. *)
-
-  val tyArr_of_list : ctyp list -> ctyp
-  (** [tyArr_of_list l] takes list [l] of types [e1; e2; e3; ...] and
-      returns the type [e1 e2 e3].  C.f.: [Ast.exSem_of_list]. *)
-
-  val paOr_of_list : patt list -> patt
-  (** [paOr_of_list l] takes list [l] of patterns [p1; p2; p3; ...] and returns
-      the pattern [p1 | p2 | p3 | ...] *)
-
-  val gensym : ?prefix : string -> unit -> string
-  (** [gensym ?prefix ()] generates a fresh variable name with [prefix].
-      When used with the default parameters, it will return: [_x__001],
-      [_x__002], [_x__003], ...
-
-      @param prefix default = "_x"
-  *)
-
-  val error : ctyp -> fn : string -> msg : string -> _
-  (** [error tp ~fn ~msg] raises an error with [msg] on type [tp] occuring
-      in function [fn]. *)
-
-  val unknown_type : ctyp -> string -> _
-  (** [unknown_type tp fn] type [tp] cannot be handled by function [fn]. *)
-
-  val ty_var_list_of_ctyp : ctyp -> string list -> string list
-  (** [ty_var_list_of_ctyp tp acc] accumulates a list of type parameters
-      contained in [tp] into [acc] as strings. *)
-
-  val get_rev_id_path : ident -> string list -> string list
-  (** [get_rev_id_path id acc] takes an identifier.  @return a reversed
-      module path (list of strings) denoting this identifier, appending
-      it to [acc]. *)
-
-  val ident_of_rev_path : Loc.t -> string list -> ident
-  (** [ident_of_rev_path loc path] takes a location [loc] and a reversed path
-      [rev_path] to an identifier.  @return identifier denoting the
-      bound value. *)
-
-  val get_appl_path : Loc.t -> ctyp -> ident
-  (** [get_appl_path loc tp] @return the identifier path associated with
-      a polymorphic type. *)
-
-  val abstract : Loc.t -> patt list -> expr -> expr
-  (** [abstract loc patts body] takes a location [loc], a pattern list
-      [patts], and an expression [body].  @return a function expression
-      that takes the patterns as arguments, and binds them in [body]. *)
-
-  val apply : Loc.t -> expr -> expr list -> expr
-  (** [apply loc f_expr arg_exprs] takes a location [loc], an expression
-      [f_expr] representing a function, and a list of argument expressions
-      [arg_exprs].  @return an expression in which the function is
-      applied to its arguments. *)
-
-  val switch_tp_def :
-    alias : (Loc.t -> ctyp -> 'a) ->
-    sum : (Loc.t -> ctyp -> 'a) ->
-    record : (Loc.t -> ctyp -> 'a) ->
-    variants : (Loc.t -> ctyp -> 'a) ->
-    mani : (Loc.t -> ctyp -> ctyp -> 'a) ->
-    nil : (Loc.t -> 'a) ->
-    ctyp
-    -> 'a
-  (** [switch_tp_def ~alias ~sum ~record ~variants ~mani tp_def]
-      takes a handler function for each kind of type definition and
-      applies the appropriate handler when [tp_def] matches. *)
-
-  val mk_expr_lst : Loc.t -> expr list -> expr
-  (** [mk_expr_lst loc expr_list] takes a list of expressions.
-      @return an expression representing a list of expressions. *)
-
-  val mk_patt_lst : Loc.t -> patt list -> patt
-  (** [mk_patt_lst _loc patt_list] takes a list of patterns.
-      @return a pattern representing a list of patterns. *)
-
-  val get_tparam_id : ctyp -> string
-  (** [get_tparam_id tp] @return the string identifier associated with
-      [tp] if it is a type parameter.  @raise Failure otherwise. *)
-
-  val type_is_recursive : string -> ctyp -> bool
-  (** [type_is_recursive id tp] @return whether the type [tp] with name [id]
-      refers to itself, assuming that it is not mutually recursive with
-      another type. *)
-
-  val drop_variance_annotations : ctyp -> ctyp
-  (** [drop_variance_annotations tp] @return the type resulting from dropping
-      all variance annotations in [tp]. *)
-end

File base/type-conv/syntax/pa_type_conv.mllib

-# OASIS_START
-# DO NOT EDIT (digest: 4688111c934ddd0f4ac3eded6942b27f)
-Pa_type_conv
-# OASIS_STOP

File base/type_conv/.hgignore.in

+INSTALL
+Makefile
+myocamlbuild.ml
+configure
+lib/core.mlpack
+setup.ml
+setup.log
+setup.data
+_oasis
+_build
+_tags
+lib/META
+lib/libpa_type_conv.clib
+lib/type_conv.odocl

File base/type_conv/COPYRIGHT

+Most of this library was written by:
+
+  Markus Mottl          <markus.mottl@gmail.com>
+
+This work is derived from the library "Tywith", version 0.45.  The library
+"Tywith" was written and is distributed by:
+
+  Martin Sandin         <msandin@hotmail.com>
+
+The original license of "Tywith" can be found in the file
+"LICENSE.Tywith".  Files that were derived from "Tywith" contain a
+reference to the original author.
+
+The following company has sponsored and has copyright in part of this work:
+
+  Jane Street Holding, LLC
+  1 New York Plaza, 33rd Floor 
+  New York, NY 10004
+  USA

File base/type_conv/Changelog

+2011-09-15:  Fixes to improve package dependency resolution.
+
+2011-08-02:  Added missing module type case for "module type of".
+
+2011-07-04:  Merged with Jane Street version.  API changes:
+
+             Removed functions:
+
+               * Gen.ide
+               * Gen.idp
+
+             Removed location arguments from:
+
+               * type_is_recursive
+               * drop_variance_annotations
+
+2010-12-22:  Merged with Jane Street version.  No code changes.
+
+2010-09-25:  Added a missing type case to type_is_recursive.
+             Thanks to Michael Wawrzoniak <mhw@cs.princeton.edu> for this
+             patch!
+
+2010-07-07:  Major changes for compatibility with OCaml 3.12.
+
+2010-06-03:  Improved determination of type-conv paths.
+             Thanks to Jacques Le Normand <rathereasy@gmail.com> for this
+             patch!
+
+2009-09-19:  Added missing type cases for supporting variant types.
+
+2009-01-14:  Added support for type converters that take arguments.
+             Thanks to Jérémie Dimino <jeremie@dimino.org> for this
+             patch!
+
+             Added support for deprecated OCaml syntax, since the compiler
+             still supports it, too.
+
+2008-10-22:  Fixed bug preprocessing labeled arguments in function types.
+
+2008-10-18:  Fix for upcoming OCaml release 3.11.
+
+2008-10-07:  Added a patch to improve handling of type conversion paths.
+
+             Thanks to David Rajchenbach-Teller
+             <David.Teller@ens-lyon.org> for the patch!
+
+2008-08-20:  Added support for exception converters.
+
+2008-07-25:  Fixed bug concerning variance annotations in type
+             definitions within structures.
+
+2008-03-17:  Improved META file and support of toplevel interpreter.
+
+2008-02-11:  Added support for handling variance annotations in
+             signatures, and for empty types.
+
+2007-10-14:  Initial release.

File base/type_conv/LICENSE.Tywith

+---------------------------------------------------------------------------
+Copyright (c) 2004 Martin Sandin
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+---------------------------------------------------------------------------

File base/type_conv/README.txt

+The type-conv mini library factors out functionality needed by different
+preprocessors that generate code from type specifications, because this
+functionality cannot be duplicated without losing the ability to use
+these preprocessors simultaneously.

File base/type_conv/lib/pa_type_conv.ml

+(* Pa_type_conv: Preprocessing Module for Registering Type Conversions *)
+
+open Printf
+open Lexing
+
+open Camlp4
+open PreCast
+open Ast
+
+(* Utility functions *)
+
+let both fa fb (a, b) = fa a, fb b
+
+let get_loc_err loc msg =
+  sprintf "File \"%s\", line %d, characters %d-%d: %s"
+    (Loc.file_name loc) (Loc.start_line loc)
+    (Loc.start_off loc - Loc.start_bol loc)
+    (Loc.stop_off loc - Loc.stop_bol loc)
+    msg
+
+(* To be deleted once the OCaml team fixes Mantis issue #4751. *)
+let hash_variant str =
+  let acc_ref = ref 0 in
+  for i = 0 to String.length str - 1 do
+    acc_ref := 223 * !acc_ref + Char.code str.[i]
+  done;
+  if Sys.word_size = 32 then !acc_ref
+  else !acc_ref land int_of_string "0x7FFFFFFF"
+
+
+(* Module/File path management *)
+
+type path =
+  | Not_initialized  (* Initial state *)
+  | Too_late  (* already in a submodule, too late to initialize *)
+  | Path of string * string list  (* Actually initialized *)
+
+(* Reference storing the path to the currently preprocessed module *)
+let conv_path_ref = ref Not_initialized
+
+let get_conv_path_el () =
+  match !conv_path_ref with
+  | Path (e, el) -> e, el
+  | _ -> failwith "Pa_type_conv: path not set"
+
+(* Get path to the currently preprocessed module *)
+let get_conv_path () = fst (get_conv_path_el ())
+
+(* Set path to the currently preprocessed module *)
+let set_conv_path conv_path =
+  if !conv_path_ref = Not_initialized || !Sys.interactive then
+    conv_path_ref := Path (conv_path, [conv_path])
+  else failwith "Pa_type_conv: module name set twice"
+
+let () = if !Sys.interactive then set_conv_path "Toplevel"
+
+let push_conv_path mod_name =
+  match !conv_path_ref with
+  | Not_initialized -> conv_path_ref := Too_late (* Entered a submodule *)
+  | Too_late -> ()
+  | Path (str, rev_lst) ->
+      conv_path_ref := Path (str ^ "." ^ mod_name, mod_name :: rev_lst)
+
+let pop_conv_path () =
+  match !conv_path_ref with
+  | Path (_, _ :: rev_lst) ->
+      conv_path_ref := Path (String.concat "." (List.rev rev_lst), rev_lst)
+  | _ -> ()
+
+
+(* Generator registration *)
+
+
+(* Map of "with"-generators for types in structures *)
+let generators = Hashtbl.create 0
+
+(* Map of "with"-generators for types in signatures *)
+let sig_generators = Hashtbl.create 0
+
+(* Map of "with"-generators for exceptions in structures *)
+let exn_generators = Hashtbl.create 0
+
+(* Map of "with"-generators for exceptions in signatures *)
+let sig_exn_generators = Hashtbl.create 0
+
+(* Check that there is no argument for generators that do not expect
+   arguments *)
+let no_arg id e typ arg =
+  if arg = None then e typ
+  else
+    failwith (
+      "Pa_type_conv: generator '" ^ id ^ "' does not expect an argument")
+
+(* Parse a list of tokens with the given grammar entry *)
+let parse_with entry = function
+  | Some tokens ->
+      Some (Gram.parse_tokens_after_filter entry (Stream.of_list tokens))
+  | None -> None
+
+(* Entry which ignores its input *)
+let ignore_tokens = Gram.Entry.of_parser "ignore_tokens" ignore
+
+(* Add new generator, fail if already defined *)
+let safe_add_gen gens id entry e =
+  if Hashtbl.mem gens id then
+    failwith ("Pa_type_conv: generator '" ^ id ^ "' defined multiple times")
+  else Hashtbl.add gens id (fun typ arg -> e typ (parse_with entry arg))
+
+(* Register a "with"-generator for types in structures *)
+let add_generator_with_arg ?(is_exn = false) id entry e =
+  let gens = if is_exn then exn_generators else generators in
+  safe_add_gen gens id entry e
+
+let add_generator ?is_exn id e =
+  add_generator_with_arg ?is_exn id ignore_tokens (no_arg id e)
+
+(* Removes a "with"-generator for types in structures *)
+let rm_generator ?(is_exn = false) id =
+  let gens = if is_exn then exn_generators else generators in
+  Hashtbl.remove gens id
+
+(* Register a "with"-generator for types in signatures *)
+let add_sig_generator_with_arg ?(is_exn = false) id entry e =
+  let gens = if is_exn then sig_exn_generators else sig_generators in
+  safe_add_gen gens id entry e
+
+let add_sig_generator ?is_exn id e =
+  add_sig_generator_with_arg ?is_exn id ignore_tokens (no_arg id e)
+
+(* Removes a "with"-generator for types in signatures *)
+let rm_sig_generator ?(is_exn = false) id =
+  let gens = if is_exn then sig_exn_generators else sig_generators in
+  Hashtbl.remove gens id
+
+
+(* General purpose code generation module *)
+
+module Gen = struct
+  let gensym =
+    let cnt = ref 0 in
+    fun ?(prefix = "_x") () ->
+      incr cnt;
+      sprintf "%s__%03i_" prefix !cnt
+
+  (* Like Ast.exSem_of_list but for application *)
+  let exApp_of_list l =
+    let rec aux = function
+      | [] -> Ast.ExNil Loc.ghost
+      | [x] -> x
+      | x :: xs ->
+        let loc = Ast.loc_of_expr x in
+        <:expr@loc< $aux xs$ $x$ >>
+    in
+    aux (List.rev l)
+
+  let rec tyArr_of_list = function
+    | [] -> Ast.TyNil Loc.ghost
+    | [x] -> x
+    | x :: xs ->
+      let loc = loc_of_ctyp x in
+      <:ctyp@loc< $x$ -> $tyArr_of_list xs$ >>
+
+  let rec paOr_of_list = function
+    | [] -> Ast.PaNil Loc.ghost
+    | [x] -> x
+    | x :: xs ->
+      let loc = loc_of_patt x in
+      <:patt@loc< $x$ | $paOr_of_list xs$ >>
+
+  module PP = Camlp4.Printers.OCaml.Make (Syntax)
+  let conv_ctyp = (new PP.printer ())#ctyp
+
+  let string_of_ctyp ctyp =
+    try
+      let buffer = Buffer.create 32 in
+      Format.bprintf buffer "%a@?" conv_ctyp ctyp;
+      Some (Buffer.contents buffer)
+    with _ -> None
+
+  let error tp ~fn ~msg =
+    let loc = Ast.loc_of_ctyp tp in
+    let failure =
+      match string_of_ctyp tp with
+      | Some tp_str -> sprintf "%s: %s\n%s" fn msg tp_str
+      | None -> sprintf "%s: %s" fn msg
+    in
+    Loc.raise loc (Failure failure)
+
+  let unknown_type tp fn = error tp ~fn ~msg:"unknown type"
+
+  let rec ty_var_list_of_ctyp tp acc =
+    match tp with
+    | <:ctyp< $tp1$ $tp2$ >> ->
+        ty_var_list_of_ctyp tp1 (ty_var_list_of_ctyp tp2 acc)
+    | <:ctyp< '$param$ >> -> param :: acc
+    | _ -> invalid_arg "ty_var_list_of_ctyp"
+
+  let rec get_rev_id_path tp acc =
+    match tp with
+    | <:ident< $id1$ . $id2$ >> -> get_rev_id_path id2 (get_rev_id_path id1 acc)
+    | <:ident< $lid:id$ >> | <:ident< $uid:id$ >> -> id :: acc
+    | _ -> invalid_arg "get_rev_id_path"
+
+  let mk_ident _loc str =
+    let first = str.[0] in
+    if first >= 'A' && first <= 'Z' then <:ident< $uid:str$ >>
+    else <:ident< $lid:str$ >>
+
+  let rec ident_of_rev_path _loc = function
+    | [str] -> mk_ident _loc str
+    | str :: strs ->
+        <:ident< $ident_of_rev_path _loc strs$ . $mk_ident _loc str$ >>
+    | _ -> invalid_arg "ident_of_rev_path"
+
+  let rec get_appl_path _loc = function
+    | <:ctyp< $id:id$ >> -> id
+    | <:ctyp< $tp$ $_$ >> -> get_appl_path _loc tp
+    | _ -> failwith "get_appl_path: unknown type"
+
+  let abstract _loc = List.fold_right (fun p e -> <:expr< fun $p$ -> $e$ >>)
+  let apply _loc = List.fold_left (fun f arg -> <:expr< $f$ $arg$ >>)
+
+  let switch_tp_def ~alias ~sum ~record ~variants ~mani ~nil tp =
+    let rec loop = function
+      | <:ctyp< private $tp$ >> -> loop tp
+      | <:ctyp@loc< [ $alts$ ] >> -> sum loc alts
+      | <:ctyp@loc< [< $row_fields$ ] >> | <:ctyp@loc< [> $row_fields$ ] >>
+      | <:ctyp@loc< [= $row_fields$ ] >> -> variants loc row_fields
+      | <:ctyp@loc< $id:_$ >>
+      | <:ctyp@loc< ( $tup:_$ ) >>
+      | <:ctyp@loc< $_$ -> $_$ >>
+      | <:ctyp@loc< '$_$ >>
+      | <:ctyp@loc< $_$ $_$ >> as tp_def -> alias loc tp_def
+      | <:ctyp@loc< { $flds$ } >> -> record loc flds
+      | <:ctyp@loc< $tp1$ == $tp2$ >> -> mani loc tp1 tp2
+      | <:ctyp@loc< >> -> nil loc
+      | tp -> unknown_type tp "switch_tp_def"
+    in
+    loop tp
+
+  let rec mk_expr_lst _loc = function
+    | [] -> <:expr< [] >>
+    | e :: es -> <:expr< [$e$ :: $mk_expr_lst _loc es$] >>
+
+  let rec mk_patt_lst _loc = function
+    | [] -> <:patt< [] >>
+    | p :: ps -> <:patt< [$p$ :: $mk_patt_lst _loc ps$] >>
+
+  let get_tparam_id = function
+    | <:ctyp< '$id$ >> | <:ctyp< +'$id$ >> | <:ctyp< -'$id$ >> -> id
+    | tp -> error tp ~fn:"get_tparam_id" ~msg:"not a type parameter"
+
+  let type_is_recursive type_name tp =
+    let bad_type tp = unknown_type tp "type_is_recursive" in
+    let rec loop = function
+      | <:ctyp< private $tp$>> -> loop tp
+      | <:ctyp< $tp1$ $tp2$ >>
+      | <:ctyp< $tp1$ * $tp2$ >>
+      | <:ctyp< $tp1$; $tp2$ >>
+      | <:ctyp< $tp1$ -> $tp2$ >>
+      | <:ctyp< $tp1$ == $tp2$ >>
+      | <:ctyp< $tp1$ and $tp2$ >>
+