Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "David Baelde" <david.baelde@gmail.com>
To: "Christian Sternagel" <christian.sternagel@uibk.ac.at>
Cc: 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:26:58 +0200	[thread overview]
Message-ID: <53c655920809020126t41811fb0s7c226e48bdb4eabd@mail.gmail.com> (raw)
In-Reply-To: <48BCF2BB.3090507@uibk.ac.at>

You can provide your own application function, as follows.

On Tue, Sep 2, 2008 at 10:00 AM, Christian Sternagel
<christian.sternagel@uibk.ac.at> wrote:
> E.g., when having the module
> module Parser : sig
>  type ('a,'tok) t
>  val token : ('tok -> 'a option) -> ('a,'tok) t
>  val apply : ('a,'tok) t -> 'tok list -> ('a * 'tok list)
> end = [...]

This amouns to provide a cast from the abstract type to the function
type, while keeping the liberty on how it's implemented.

Cheers,
--
David


  reply	other threads:[~2008-09-02  8:26 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 ` David Baelde [this message]
2008-09-02  8:34   ` [Caml-list] " blue storm
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=53c655920809020126t41811fb0s7c226e48bdb4eabd@mail.gmail.com \
    --to=david.baelde@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