[Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread Dumitru Potop-Butucaru
Hello, I started several days ago to use version 3.12.0+beta1 (at the suggestion of a colleague to whom I explained what I need). I have one main problem, which I see as a bug. The code I want to write is the following: module IntList = Set.Make(struct type t=int let compare x y = x-y end) ;;

[Caml-list] Another problem with version 3.12.0+beta1

2010-07-21 Thread Dumitru Potop-Butucaru
Hello again, Given that I started bugging you, here is another problem I have (not blocking, though, as the previous one). The simplified syntax: module MyModule (Param:ParamType) : sig ... end = struct ... end ;; does not work for module type declarations. The declaration of a module

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread Jeremy Yallop
On 21 July 2010 14:38, Dumitru Potop-Butucaru wrote: > module type Abc = >   functor (M:Simple) -> >   sig >      val x : M.t >   end You're trying to treat Abc as a functor from signatures to signatures (i.e. as a parameterised signature). In fact, it's something quite different: it's the *type

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread rossberg
"Jeremy Yallop" wrote: > On 21 July 2010 14:38, Dumitru Potop-Butucaru > wrote: >> module type Abc = >>   functor (M:Simple) -> >>   sig >>      val x : M.t >>   end > > You're trying to treat Abc as a functor from signatures to signatures > (i.e. as a parameterised signature). In fact, it's som

[Caml-list] Proposition for article exchange

2010-07-21 Thread Chris Ellis
Hi, My name is Chris and I came across http://caml.inria.fr/ today while searching in Google.   Your site is easy to read, has good info, and so it prompted me to write to you.   I work with fiddlewiddle.com , and I'm hoping you'll consider linking to my site in return for me offering you a

[Caml-list] Cryptokit and HMAC-SHA256

2010-07-21 Thread Dario Teixeira
Hi, I need a keyed hash function (HMAC) based on SHA256. I looked at Cryptokit's support for HMAC, and though it has built-in support for HMAC-MD5 and HMAC-SHA1, it seems HMAC-SHA256 is not directly supported, despite Cryptokit implementing the SHA256 algorithm. While RFC 2104 seems straightforw

[Caml-list] Re: Cryptokit and HMAC-SHA256

2010-07-21 Thread Sylvain Le Gall
On 21-07-2010, Dario Teixeira wrote: > Hi, > > I need a keyed hash function (HMAC) based on SHA256. I looked at Cryptokit's > support for HMAC, and though it has built-in support for HMAC-MD5 and > HMAC-SHA1, > it seems HMAC-SHA256 is not directly supported, despite Cryptokit implementing > the

[Caml-list] The Promises of Functional Programming

2010-07-21 Thread Christophe TROESTLER
Hi, If you haven't yet read it, this paper “The Promises of Functional Programming”, from Computing in Science & Engineering, shows the growing interest for functional programming in scientific circles (OCaml is even mentioned!). http://www.computer.org/portal/web/computingnow/0609/whatsnew/cise

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread Dumitru Potop-Butucaru
Hello everybody, Thanks for your help. I now have 2 solutions that should work (it will take a couple of days to change my **real** project to see if it works). However, I still did not understand this statement of Jeremy Yallop: module type Abc = functor (M:Simple) -> sig val x :

Re: [Caml-list] Re: Cryptokit and HMAC-SHA256

2010-07-21 Thread Dario Teixeira
Hi, > If you decide to code the solution and provide the patch, I will be > happy to apply it to cryptokit (if the main author of cryptokit accepts > it, of course). I'm attaching the patches adding support for HMAC-SHA256 and HMAC-RIPEMD160 (I don't need the latter, but for the sake of completen

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread Alain Frisch
On 7/21/2010 8:41 PM, Dumitru Potop-Butucaru wrote: If I understand well, what I try to do is impossible for some deep theoretical reason. Can someone explain this to me, or point me to a relevant paper explaining it? Turning a module type into a module is not possible in general: if the modul

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread Jacques Garrigue
From: Dumitru Potop-Butucaru > However, I still did not understand this statement of > Jeremy Yallop: >>> module type Abc = >>>functor (M:Simple) -> >>>sig >>> val x : M.t >>>end >>> >> You're trying to treat Abc as a functor from signatures to signatures >> (i.e. as a para

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-21 Thread Dumitru Potop-Butucaru
On 22/07/2010 04:29, Alain Frisch wrote: On 7/21/2010 8:41 PM, Dumitru Potop-Butucaru wrote: If I understand well, what I try to do is impossible for some deep theoretical reason. Can someone explain this to me, or point me to a relevant paper explaining it? Turning a module type into a module