caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: oleg@okmij.org
To: gabriel.scherer@gmail.com
Cc: yallop@gmail.com, jon@ffconsultancy.com,
	garrigue@math.nagoya-u.ac.jp, caml-list@inria.fr
Subject: Re: [Caml-list] ocaml considered dangerous
Date: 19 Jan 2014 06:09:06 -0000	[thread overview]
Message-ID: <20140119060906.69435.qmail@www1.g3.pair.com> (raw)
In-Reply-To: <CAPFanBEoZksLoahT3wQH-gU47JUgQXOYDUTYRbYbDoqtrPoS3Q@mail.gmail.com>


> Jacques Garrigue wrote:
> By the way, there is now an implementation of Printf that avoids
> most of the Obj.magic by using GADTs. It should be merged soon.

Perhaps it may be worth mentioning a (quite old actually) paper
        http://okmij.org/ftp/typed-formatting/index.html#derivation

that attempts to _derive_ various typed scanf and printf
implementation, including a couple of new ones. All the code is in
OCaml. Perhaps also relevant is
        http://okmij.org/ftp/typed-formatting/index.html#C-like
which uses Template Haskell to convert a C-like format string into the
proper combinator format. The conversion is syntax-directed rather
than type directed (that is, a simple preprocessor, like ppx). 

In the above developments, the types seem to have fewer type
parameters than what I've seen presented at the OCaml workshop. I am
still not clear about the source of that difference.



      parent reply	other threads:[~2014-01-19  6:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 23:00 Jürgen Pfitzenmaier
2014-01-16 23:27 ` Milan Stanojević
2014-01-16 23:33 ` Daniel Bünzli
2014-01-17  0:43 ` Nicolas Braud-Santoni
2014-01-20 10:07   ` Goswin von Brederlow
2014-01-17  2:12 ` Jeff Meister
2014-01-17  2:38 ` Jacques Garrigue
2014-01-17  9:01   ` Gabriel Scherer
2014-01-18  0:39   ` Jon Harrop
2014-01-18  2:22     ` Jeremy Yallop
2014-01-18  7:04       ` Gabriel Scherer
2014-01-18  9:11         ` David Allsopp
2014-01-18  9:28           ` Gabriel Scherer
2014-01-18  9:43             ` David Allsopp
2014-01-18  9:59               ` Gabriel Scherer
2014-01-19  6:09         ` oleg [this message]

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=20140119060906.69435.qmail@www1.g3.pair.com \
    --to=oleg@okmij.org \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@gmail.com \
    --cc=garrigue@math.nagoya-u.ac.jp \
    --cc=jon@ffconsultancy.com \
    --cc=yallop@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).