From: Anton Bachin <antonbachin@yahoo.com>
To: Drup <drupyog+caml@zoho.com>
Cc: "François Bobot" <francois.bobot@cea.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] [ANN] Lambda Soup - HTML scraping and rewriting with CSS selectors
Date: Mon, 23 Nov 2015 13:02:07 -0600 [thread overview]
Message-ID: <7ADE37A1-D6C9-4639-A4DF-1D02F4800252@yahoo.com> (raw)
In-Reply-To: <565358DE.6050508@zoho.com>
> It's also nominal, so you can't say `coerce ~to:"a”`
That’s fine, I’m not proposing something like that, in part because I
don’t think it is even possible to have a type coercion with such usage
in OCaml. Maybe it is with some GADT abuse, if “a” was a constructor, but
it’s still not what I meant. I was just thinking of a set of functions
coerce_blah : any_node -> blah_node option
for some more or less verbose actual types any_node and blah_node. For
comparison, see Dom_html.CoerceTo from js_of_ocaml [1]. then you can do
root $$ select “div > whatever"
|> filter_map coerce_whatever
|> iter (fun typed_whatever_node -> ...)
Anyway, I will study tyxml in some detail. I am working on something
else right now, so it will probably be in a few weeks.
Thanks,
Anton
[1]: http://ocsigen.org/js_of_ocaml/2.6/api/Dom_html.CoerceTo
next prev parent reply other threads:[~2015-11-23 19:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 21:01 Anton Bachin
2015-11-17 9:31 ` François Bobot
2015-11-22 7:58 ` Anton Bachin
2015-11-23 10:44 ` François Bobot
2015-11-23 16:26 ` Anton Bachin
2015-11-23 17:16 ` Drup
2015-11-23 17:35 ` Anton Bachin
2015-11-23 17:41 ` Anton Bachin
2015-11-23 18:20 ` Drup
2015-11-23 19:02 ` Anton Bachin [this message]
2015-11-24 8:35 ` François Bobot
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=7ADE37A1-D6C9-4639-A4DF-1D02F4800252@yahoo.com \
--to=antonbachin@yahoo.com \
--cc=caml-list@inria.fr \
--cc=drupyog+caml@zoho.com \
--cc=francois.bobot@cea.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