[Caml-list] ocaml-http is looking for a new maintainer

2009-03-18 Thread Stefano Zacchiroli
Hi all, ocaml-http [1] is looking for a new maintainer.
More details have been written on my blog [2].

If you are interested in taking over the maintenance, please mail me
in private.

Cheers.

[1] http://upsilon.cc/~zack/hacking/software/ocaml-http/
[2] 
http://upsilon.cc/~zack/blog/posts/2009/03/ocaml-http_is_looking_for_a_new_maintainer/

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...| ..: | Je dis tu à tous ceux que j'aime

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] Cannot safely evaluate the definition of the recursively-defined module

2009-03-18 Thread Hugo Ferreira

Hello,

I hope this is not a beginners questions.
I am trying to reuse code via functors,
however I am getting the following error:

Cannot safely evaluate the definition of the recursively-defined module
(refers to AA.empty when implemented as a constant value)

I circumvented the problem by not using a
constant value but a function instead. As I
understand it this may cause run-time errors.
My question is: is their any way to make the
following example work.

Specifically, for the example below is their
any way of indicating to the compiler that
AA.q = ASet.t ?

TIA,
Hugo F.

module type AA =
  sig
type q
type t = string

val compare: t - t - int
val add: t - q - q
val empty: unit - q
  end

module rec A1 : AA
 = struct
 type q = ASet.t
 type t = string

 let compare s1 s2 = Pervasives.compare s1 s2
 let add e s = ASet.add e s
 let empty _ = ASet.empty
   end
and ASet : Set.S with type elt = A1.t
 = Set.Make(A1)

module type Wrap_A =
  sig
type t
type q

val init: q
val add: t - q - q
  end

module Make_A (An_A : AA) : Wrap_A
 =
 struct
type t = An_A.t
type q = An_A.q

(*let init = ASet.empty*)
let init = An_A.empty ()
let add t q = An_A.add t q
end

module Wrap_A1 = Make_A( A1 )

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Cannot safely evaluate the definition of the recursively-defined module

2009-03-18 Thread Alp Mestan
Hi,

replacing :
module rec A1 : AA
= struct
type q = ASet.t
type t = string

with :
module rec A1 : AA with type q = ASet.t, type t = string

should be okay. Shouldn't it ?

On Wed, Mar 18, 2009 at 1:08 PM, Hugo Ferreira h...@inescporto.pt wrote:

 Hello,

 I hope this is not a beginners questions.
 I am trying to reuse code via functors,
 however I am getting the following error:

 Cannot safely evaluate the definition of the recursively-defined module
 (refers to AA.empty when implemented as a constant value)

 I circumvented the problem by not using a
 constant value but a function instead. As I
 understand it this may cause run-time errors.
 My question is: is their any way to make the
 following example work.

 Specifically, for the example below is their
 any way of indicating to the compiler that
 AA.q = ASet.t ?

 TIA,
 Hugo F.

 module type AA =
  sig
type q
type t = string

val compare: t - t - int
val add: t - q - q
val empty: unit - q
  end

 module rec A1 : AA
 = struct
 type q = ASet.t
 type t = string

 let compare s1 s2 = Pervasives.compare s1 s2
 let add e s = ASet.add e s
 let empty _ = ASet.empty
   end
and ASet : Set.S with type elt = A1.t
 = Set.Make(A1)

 module type Wrap_A =
  sig
type t
type q

val init: q
val add: t - q - q
  end

 module Make_A (An_A : AA) : Wrap_A
  =
  struct
type t = An_A.t
type q = An_A.q

(*let init = ASet.empty*)
let init = An_A.empty ()
let add t q = An_A.add t q
 end

 module Wrap_A1 = Make_A( A1 )

 ___
 Caml-list mailing list. Subscription management:
 http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
 Archives: http://caml.inria.fr
 Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
 Bug reports: http://caml.inria.fr/bin/caml-bugs




-- 
Alp Mestan
In charge of the C++ section on Developpez.com.
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Cannot safely evaluate the definition of the recursively-defined module

2009-03-18 Thread Julien SIGNOLES
Hello,

 module rec A1 : AA with type q = ASet.t
 with type t = string
   = struct
   type q = ASet.t
   type t = string
 
   let compare s1 s2 = Pervasives.compare s1 s2
   let add e s = ASet.add e s
   let empty = ASet.empty
 end
  and ASet : Set.S with type elt = A1.t
   = Set.Make(A1)
 
 No. It doens't work.

  however I am getting the following error:
  
  Cannot safely evaluate the definition of the recursively-defined module
  (refers to AA.empty when implemented as a constant value)

That is consistent with the behaviour specified in Section 7.8 of the
reference manual [1]. Both A1 and ASet are not safe according to the
definition given in this section. So a type error occurs because ocaml
does know that the program won't be safely evaluated.

For additional details, you could refer to the Xavier Leroy's notes
describing the implementation of recursive modules in ocaml [2].

[1] http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc75
[2] http://caml.inria.fr/pub/papers/xleroy-recursive_modules-03.pdf

Hope this helps,
Julien Signoles
-- 
Researcher-engineer
CEA LIST, Software Reliability Lab
91191 Gif-Sur-Yvette Cedex
tel:(+33)1.69.08.71.83  fax:(+33)1.69.08.83.95  julien.signo...@cea.fr

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Cannot safely evaluate the definition of the recursively-defined module

2009-03-18 Thread Hugo Ferreira

Julien SIGNOLES wrote:

Hello,


module rec A1 : AA with type q = ASet.t
with type t = string
  = struct
  type q = ASet.t
  type t = string

  let compare s1 s2 = Pervasives.compare s1 s2
  let add e s = ASet.add e s
  let empty = ASet.empty
end
 and ASet : Set.S with type elt = A1.t
  = Set.Make(A1)

No. It doens't work.



however I am getting the following error:

Cannot safely evaluate the definition of the recursively-defined module
(refers to AA.empty when implemented as a constant value)


That is consistent with the behaviour specified in Section 7.8 of the
reference manual [1]. Both A1 and ASet are not safe according to the
definition given in this section. So a type error occurs because ocaml
does know that the program won't be safely evaluated.

For additional details, you could refer to the Xavier Leroy's notes
describing the implementation of recursive modules in ocaml [2].

[1] http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc75
[2] http://caml.inria.fr/pub/papers/xleroy-recursive_modules-03.pdf



Read the manual.
I'll take a look at [2]

Thank you.
Hugo F.



Hope this helps,
Julien Signoles


___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs