It seems to me that this is exactly the same? define a functor MyFunctor like this: module MyFunctor (S : sig val sz : int end) = struct ... S.sz ......
... Good starting points: - if you accept an imperative FIFO : module Queue of the standard library - if you want a functional FIFO : module Fqueue of Jane...
... If Squeue.create returns a queue bounded to a specific size, wouldn't that be a non-functorized solution? Then, you no longer need the solutions previously...
... Well he can stil functorize it if he wants. The advantage being to bound all possibly created squeues to have the wanted size thus avoiding potential...
Commercial Users of Functional Programming Workshop (CUFP) 2009 Functional Programming As a Means, Not an End Call for Participation Sponsored by SIGPLAN ...
Vincent Aravantinos wrote: ... without really looking into your mail, why not something allong: module M: sig type t end = struct type t = A of int | B of...
JM Nunes
jose.manuel.nunes@...
Jul 3, 2009 9:11 am
11166
... I would still like to access the structure in some way. But this way should not reveal the data structure. Notice my question is highly informal and I...
... The purpose of an abstract type is to hide how it is implemented. You may want to provide an interface to your type, and the end-users will be tied to it....
citromatik
miguel.pignatelli@...
Jul 3, 2009 10:16 am
11168
... What is a nonsense? The use of abstract types or the opening up of the type and implementation details to external users? On a similar note: I too am...
... I was not clear, settled this way this is indeed non-sense. But what I meant by "structure" in the quotation was not the "implementation structure". I mean...
... I think he is talking about doing both at a time. Which is indeed nonsense. ... I am having the same problem and am thinking of just keeping the black box...
... Hash: SHA1 ... For testing and debugging purposes I find it convenient to have some access to raw (unabstracted) types. My solution is for every module to...
Sorry for the slow response, Vincent. I have been on holiday... ... Yes. That solutions works well when it is suitable. Specifically, when the arguments of the...
Jon Harrop
jon@...
Jul 3, 2009 8:27 pm
11175
... tediousness. Do you mean there is some general tool? Can you refer us to any examples? ... [Non-text portions of this message have been removed]...
... Exactly. I could not manage to express it as clear... ... Exactly. That's the solution I first chose, this is of course very general but we lose all the...
... Sorry, this is actually wrong now. I forgot to mention that a subtle but enormously important advancement was made in OCaml 3.11. Specifically, you can now...
Jon Harrop
jon@...
Jul 5, 2009 2:16 pm
11178
Hi, I'd like to fully understand the type system of ocaml. I believe this part is crucial for writting good caml code. Types are the building blocks that allow...
... You're right. (first question answered, remain... hee? 20? :) ... I don't know if this sentence was only rethorical or not, but I slightly disagree. I...
Hi, I'm having some trouble with the OCaml type system. I'm using objects as a kind of dynamic module system, as each function requires certain dynamic...
... IMHO, this question is way too advanced for the beginners list. I strongly suggest you ask on the main caml-list where the l33t type system gurus hang out....
Jon Harrop
jon@...
Jul 8, 2009 2:19 pm
11182
... Hash: SHA1 I use objects a lot and also run into this problem. Type annotations can quickly get too large. I don't have a good answer, but this is what I...
Peng Zang
peng.zang@...
Jul 8, 2009 4:10 pm
11183
Hi Peng, Thanks very much for your reply, this is very helpful. As Jon suggested this is a bit too advanced for this list, I've reposted on the normal OCaml...
Hi, Is there a syntax extension that allows a string to be assigned the contents of a file? So instead of doing let str = "very long string" one would just ...
Hi, ... Thanks, that will do. But which syntax extension provides that facility? (It doesn't seem to work with vanilla Ocaml). I know you are associated with ...
Hi again, ... Btw, I just noticed that Delimited Overloading does include a "Macro" module offering the INCLUDE facility. As for why I need this: I want to...