From: Julien Signoles <julien.signoles@gmail.com>
To: Alain Frisch <alain.frisch@lexifi.com>
Cc: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>,
caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] What is an applicative functor?
Date: Mon, 11 Apr 2011 09:21:50 +0200 [thread overview]
Message-ID: <BANLkTikcYgFsXWum8wqCXrYb=2h++iKtyQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikPvf7ZdhFkQKD-oY1AODGR7qP=bw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]
2011/4/11 Julien Signoles <julien.signoles@gmail.com>
> Hello Allain,
>
> 2011/4/8 Alain Frisch <alain.frisch@lexifi.com>
>
>> On 04/08/2011 01:25 PM, Julien Signoles wrote:
>>
>>> 2) module F(X:...) = G(H(X))
>>>
>>> Without applicative functors, we again get the error about parameter
>>> elimination. But I see no workaround to eliminate it without changing
>>> the signature of F. So IMHO that is a use case where applicative
>>> functors are useful.
>>>
>>
>> I'd be interested to see a full example for this case.
>>
>
> Download sources of Frama-C here :
> http://frama-c.com/download/frama-c-Carbon-20110201.tar.gz
> The use case is in module State_builder :
>
> src/project/state_builder.ml:
> (* ... *)
> module Caml_weak_hashtbl(Data: Datatype.S) =
> Weak_hashtbl(Weak.Make(Data))(Data)
> (* ... *)
>
> Do you see any workaround to compile this code with -no-app-funct (and as
> most as possible without changing API)?
>
Looking this case in details, there is actually one workaround.
src/project/state_builder.ml:
(* ... *)
module Caml_weak_hashtbl(Data: Datatype.S)(Info: Info_with_size) = struct
module W = Weak.Make(Data)
include Weak_hashtbl(W)(Data)(Info)
end
(* ... *)
There is still the issue with diamond import in libraries like mentionned by
Andreas.
Sorry for the noise,
Julien
[-- Attachment #2: Type: text/html, Size: 2374 bytes --]
next prev parent reply other threads:[~2011-04-11 7:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 21:12 Dawid Toton
2011-04-07 21:49 ` Gerd Stolpmann
2011-04-08 0:44 ` [Caml-list] " Dawid Toton
2011-04-08 1:34 ` Gerd Stolpmann
2011-04-08 6:50 ` [Caml-list] " Andreas Rossberg
2011-04-08 8:04 ` Alain Frisch
2011-04-08 8:20 ` Jacques Garrigue
2011-04-08 8:38 ` Jacques Garrigue
2011-04-08 8:44 ` Alain Frisch
2011-04-08 10:09 ` Jacques Garrigue
2011-04-08 11:25 ` Julien Signoles
2011-04-08 11:58 ` Alain Frisch
2011-04-11 7:10 ` Julien Signoles
2011-04-11 7:21 ` Julien Signoles [this message]
2011-04-08 13:43 ` rossberg
2011-04-08 16:26 ` Julien Signoles
2011-04-13 2:36 ` Lucas Dixon
2011-04-13 7:23 ` Andreas Rossberg
2011-04-15 3:08 ` Lucas Dixon
2011-04-19 14:04 ` Andreas Rossberg
2011-04-08 16:43 ` Till Varoquaux
2011-04-08 17:35 ` Alain Frisch
2011-04-08 18:44 ` Andreas Rossberg
2011-04-08 21:23 ` Lauri Alanko
2011-04-08 21:34 ` Guillaume Yziquel
2011-04-09 11:41 ` Andreas Rossberg
2011-04-08 5:35 ` Stefan Holdermans
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='BANLkTikcYgFsXWum8wqCXrYb=2h++iKtyQ@mail.gmail.com' \
--to=julien.signoles@gmail.com \
--cc=alain.frisch@lexifi.com \
--cc=caml-list@yquem.inria.fr \
--cc=garrigue@math.nagoya-u.ac.jp \
/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