Browse thread
`This expression is not a function it cannot be applied'
-
Christian Sternagel
- David Baelde
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Baelde <david.baelde@g...> |
| Subject: | Re: [Caml-list] `This expression is not a function it cannot be applied' |
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