From: Dario Teixeira <darioteixeira@yahoo.com>
To: caml-list@yquem.inria.fr
Subject: Issues with Sexplib (#2)
Date: Sat, 29 Nov 2008 09:14:57 -0800 (PST) [thread overview]
Message-ID: <81266.45254.qm@web111512.mail.gq1.yahoo.com> (raw)
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
next reply other threads:[~2008-11-29 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-29 17:14 Dario Teixeira [this message]
2008-12-02 19:21 ` [Caml-list] " Markus Mottl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81266.45254.qm@web111512.mail.gq1.yahoo.com \
--to=darioteixeira@yahoo.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox