caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Issues with Sexplib (#2)
@ 2008-11-29 17:14 Dario Teixeira
  2008-12-02 19:21 ` [Caml-list] " Markus Mottl
  0 siblings, 1 reply; 2+ messages in thread
From: Dario Teixeira @ 2008-11-29 17:14 UTC (permalink / raw)
  To: caml-list

Hi again,

The second issue is a bit more straightforward, though I reckon it may
actually be in Type-conv (used by Sexplib).  Consider the following code:

(* TYPE_CONV_PATH "Order" *)

module Order =
struct
    type ordinal_t = [ `Ordinal of int ] (* with sexp *)
    type hierarchical_t = [ `Hierarchical of int list ] (* with sexp *)
    type appendix_t = [ `Appendix of int list ] (* with sexp *)
    type 'a scheme_t = 'a constraint 'a = [< ordinal_t | hierarchical_t | appendix_t ] (* with sexp *)

    type 'a auto_t = [ `Auto of 'a scheme_t ] (* with sexp *)
    type 'a user_t = [ `User of 'a scheme_t ] (* with sexp *)
    type none_t = [ `None ] (* with sexp *)
    type ('a, 'b) given_t = 'b constraint 'b = [< 'a auto_t | 'a user_t | none_t ] (* with sexp *)

    type body_sectional_order_t = (hierarchical_t as 'a, ['a auto_t | 'a user_t | none_t ]) given_t (* with sexp *)
    type appendix_sectional_order_t = (appendix_t as 'a, ['a auto_t | 'a user_t | none_t ]) given_t (* with sexp *)
    type preset_sectional_order_t = (hierarchical_t, none_t) given_t (* with sexp *)
    type wrapper_order_t = (ordinal_t as 'a, ['a auto_t | 'a user_t]) given_t (* with sexp *)
    type ghost_order_t = (ordinal_t as 'a, 'a auto_t) given_t (* with sexp *)
end


It compiles fine.  Now uncomment the "(* with sexp *)" parts, such that it
makes use of the Sexplib syntax extension.  The compilation fails on the
definition of body_sectional_order_t, with an error "type_is_recursive:
unknown type construct".  Is this a known limitation in Type-conv/Sexplib?

One last note to the authors of Sexplib: for each reporting of an issue with
Sexplib there are tons of unreported happy cases.  It is such a great tool
that I find myself using it everywhere, hence the inevitability of every
now and then running into problems...

Thanks again for your attention.
Cheers,
Dario Teixeira






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Issues with Sexplib (#2)
  2008-11-29 17:14 Issues with Sexplib (#2) Dario Teixeira
@ 2008-12-02 19:21 ` Markus Mottl
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Mottl @ 2008-12-02 19:21 UTC (permalink / raw)
  To: Dario Teixeira; +Cc: caml-list

On Sat, Nov 29, 2008 at 12:14 PM, Dario Teixeira
<darioteixeira@yahoo.com> wrote:
> It compiles fine.  Now uncomment the "(* with sexp *)" parts, such that it
> makes use of the Sexplib syntax extension.  The compilation fails on the
> definition of body_sectional_order_t, with an error "type_is_recursive:
> unknown type construct".  Is this a known limitation in Type-conv/Sexplib?

This should be fixed in newer releases of type-conv.

> One last note to the authors of Sexplib: for each reporting of an issue with
> Sexplib there are tons of unreported happy cases.  It is such a great tool
> that I find myself using it everywhere, hence the inevitability of every
> now and then running into problems...

Thanks for the feedback!

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-02 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-29 17:14 Issues with Sexplib (#2) Dario Teixeira
2008-12-02 19:21 ` [Caml-list] " Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).