From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 95FB57EDE3 for ; Tue, 23 Oct 2012 00:10:04 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of philippe.veber@gmail.com) identity=pra; client-ip=209.85.210.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of philippe.veber@gmail.com designates 209.85.210.54 as permitted sender) identity=mailfrom; client-ip=209.85.210.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-da0-f54.google.com) identity=helo; client-ip=209.85.210.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="postmaster@mail-da0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgBAPTChVDRVdI2k2dsb2JhbABFhU0Bu2EIIwEBAQEJCQsJFAQjghciAhMZARseAxIIAQddAREBBQEiGxqHTwEDD5pogmcJA4wogWyBCoURChknDVmIdQEFDJI7A5VxjlgWKYQT X-IronPort-AV: E=Sophos;i="4.80,632,1344204000"; d="scan'208";a="159990456" Received: from mail-da0-f54.google.com ([209.85.210.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Oct 2012 00:10:03 +0200 Received: by mail-da0-f54.google.com with SMTP id z9so1947867dad.27 for ; Mon, 22 Oct 2012 15:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=7pfJkLBAephqt7h4VaTUk/+S8GOA3J+cgEpRFQ/Buvw=; b=H2SbewbQ4uKI0hihRXS2nCmiQYzulHfV5ihg4xpWmYchWXnOGt9sFmRlA8rAVIQdCi iHReI1IvHDEMhhKzXOtyR7tJ2ZtGthilrjLkAHaUD/FIWkMYNwkvzfQTitf6E4byksGb CHNvkUoRi+rdWynn7QOciMBXULyIzKNAY6XlHIWf4/efU7W6LA7/ZgwUjJhG9kIatuFf VaPI/aSDP2lyoixNqX9MtsvXsJhEZ2TNSlV66Q9qiWD3MHMcZY63AezHRBHNwjIycpE8 l5mSwv7pn8TZuyppFDEtn/E0TJD7DSriz7sOm7xPsGuyXJWt814Brt0YjX2ay2d7LsHq RZhg== Received: by 10.68.222.226 with SMTP id qp2mr24111765pbc.53.1350943801704; Mon, 22 Oct 2012 15:10:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.241.169 with HTTP; Mon, 22 Oct 2012 15:09:41 -0700 (PDT) From: Philippe Veber Date: Tue, 23 Oct 2012 00:09:41 +0200 Message-ID: To: caml users Content-Type: multipart/alternative; boundary=047d7b2ee78169806d04ccad1dcc X-Validation-by: philippe.veber@gmail.com Subject: [Caml-list] Parameterizing a function with a thread monad --047d7b2ee78169806d04ccad1dcc Content-Type: text/plain; charset=ISO-8859-1 Dear camlers, A couple of libraries, like pgocaml for instance, define a functor over a (monadic) thread implementation, like in the following: module type Thread = sig type 'a t val return : 'a -> 'a t val bind : 'a t -> ('a -> 'b t) -> 'b t end module F(T : Thread) : sig val v : string -> string T.t end Is it possible to define F as a function (ie at the value level)? Cheers, Philippe. --047d7b2ee78169806d04ccad1dcc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear camlers,

A couple of libraries, like pgocaml for instance, defi= ne a functor over a (monadic) thread implementation, like in the following:=

module type Thread =3D sig
=A0 type 'a t
=A0 val return := 'a -> 'a t
=A0 val bind : 'a t -> ('a -> 'b t) -> 'b t
end=

module F(T : Thread) : sig
=A0 val v : string -> string T.tend

Is it possible to define F as a function (ie at the value leve= l)?

Cheers,
=A0 Philippe.

--047d7b2ee78169806d04ccad1dcc--