From: "blue storm" <bluestorm.dylc@gmail.com>
To: david.baelde@ens-lyon.org
Cc: "Christian Sternagel" <christian.sternagel@uibk.ac.at>,
caml-list@yquem.inria.fr
Subject: Re: [Caml-list] `This expression is not a function it cannot be applied'
Date: Tue, 2 Sep 2008 10:34:34 +0200 [thread overview]
Message-ID: <527cf6bc0809020134u783ffcefv83082e009d400814@mail.gmail.com> (raw)
In-Reply-To: <53c655920809020126t41811fb0s7c226e48bdb4eabd@mail.gmail.com>
On Tue, Sep 2, 2008 at 10:26 AM, David Baelde <david.baelde@gmail.com> wrote:
> This amouns to provide a cast from the abstract type to the function
> type, while keeping the liberty on how it's implemented.
If you want even more implementation liberty, you should consider
making the internal "token collection" type abstract : you use a list
for now, but might want to use Streams or lazy lists or what not
someday.
That would give something like that :
module Parser : sig
type ('a,'tok) t
type 'tok input
val token : ('tok -> 'a option) -> ('a,'tok) t
val apply : ('a,'tok) t -> 'tok input -> ('a * 'tok input)
val input_of_list : 'tok list -> 'tok input
end = [...]
next prev parent reply other threads:[~2008-09-02 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-02 8:00 Christian Sternagel
2008-09-02 8:26 ` [Caml-list] " David Baelde
2008-09-02 8:34 ` blue storm [this message]
2008-09-02 8:46 ` David Teller
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=527cf6bc0809020134u783ffcefv83082e009d400814@mail.gmail.com \
--to=bluestorm.dylc@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=christian.sternagel@uibk.ac.at \
--cc=david.baelde@ens-lyon.org \
/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).