<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/12/b7717c6417bff34e7f3d535b9a41f26b"
  from="Matt Gushee &lt;mgushee@h...&gt;"
  author="Matt Gushee"
  date="2003-12-22T23:04:20"
  subject="Re: [Caml-list] Multiparameter functors?"
  prev="2003/12/c5862f388f18bdf2460db3f01d99f5fa"
  next="2003/12/5ca36c819dc9228f96fab03197c64733"
  prev-in-thread="2003/12/51b7c5d779dd26ab371ec36d45196ada"
  next-in-thread="2003/12/d2fab26d184127e6f93292a00502213c"
  prev-thread="2003/12/558c3ea8590ceaa0759c13dbe9214a62"
  next-thread="2003/12/2a656034d7dd922a09976441973503de"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/11aef5a42199a1b25c1d3da01c1e7795"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-12-22T03:12:53"
  subject="[Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/a9e3f6e03bb89f6e730fd5401e17d50f"
  from="Julien Signoles &lt;Julien.Signoles@l...&gt;"
  author="Julien Signoles"
  date="2003-12-22T10:21:02"
  subject="Re: [Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/51b7c5d779dd26ab371ec36d45196ada"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-12-23T01:12:30"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
</msg>
<msg 
  url="2003/12/b7717c6417bff34e7f3d535b9a41f26b"
  from="Matt Gushee &lt;mgushee@h...&gt;"
  author="Matt Gushee"
  date="2003-12-22T23:04:20"
  subject="Re: [Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/d2fab26d184127e6f93292a00502213c"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-12-22T23:56:17"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
<msg 
  url="2003/12/53b83ba0ff1d690a7381fbc01e1cca57"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-12-22T23:59:02"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
</msg>
<msg 
  url="2003/12/5ca36c819dc9228f96fab03197c64733"
  from="Julien Demouth &lt;julien.demouth@f...&gt;"
  author="Julien Demouth"
  date="2003-12-22T23:44:50"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
</msg>
</thread>

<contents>
On Sun, Dec 21, 2003 at 07:30:27PM -0500, Brian Hurt wrote:
&gt; 
&gt; Is it possible to do multi-parameter functors?  What I want to be able to 
&gt; so is something like:
&gt; 
&gt; module Make(Key: Map.OrderedType, Pri: Map.OrderedType) = struct
&gt; 	type key = Key.t;;
&gt; 	type pri = Pri.t;;
&gt; 	...
&gt; end;;
&gt; 
&gt; Am I being stupid and just missing something obvious,

Is there anything obvious about functors? ;-)

I've found the following syntax to work:

  module Make =
    functor (Key:Map.OrderedType) -&gt; functor (Pri:Map.OrderedType) -&gt;
      struct
        ....
      end;;

... though I'm not qualified to comment on the merits of doing or not
doing this.

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee@havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

