<?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/b21406c1d9068413e42c25c6abd232cc"
  from="ronniec95@l..."
  author="ronniec95@l..."
  date="2003-12-23T16:12:43"
  subject="Re: [Caml-list] type equality help - Thanks to all"
  prev="2003/12/fd6d69954b9797a10947b0e8e2fc484b"
  next="2003/12/48c1bdc28352b8ffaa6ab8cdc1029b85"
  prev-in-thread="2003/12/08a3627a1781fc99ed92f239984a9f9c"
  prev-thread="2003/12/1e37ba7a17a7389f7424c835894632b7"
  next-thread="2003/12/6f29bbcbd7940b1f3bee84f95924c267"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] type equality help (camlidl related but not directly)">
<msg 
  url="2003/12/4f93711601205bf9fdbfa68a6c41f310"
  from="ronniec95@l..."
  author="ronniec95@l..."
  date="2003-12-23T15:49:35"
  subject="[Caml-list] type equality help (camlidl related but not directly)">
<msg 
  url="2003/12/08a3627a1781fc99ed92f239984a9f9c"
  from="David MENTRE &lt;dmentre@l...&gt;"
  author="David MENTRE"
  date="2003-12-23T16:00:08"
  subject="Re: [Caml-list] type equality help (camlidl related but not directly)">
<msg 
  url="2003/12/b21406c1d9068413e42c25c6abd232cc"
  from="ronniec95@l..."
  author="ronniec95@l..."
  date="2003-12-23T16:12:43"
  subject="Re: [Caml-list] type equality help - Thanks to all">
</msg>
</msg>
</msg>
</thread>

<contents>
That made sense. I guess not quite clear from docs.

I should be able to progress a lot further on my project. thanks very much
for the responses.

Ronnie
&gt;-- Original Message --
&gt;To: ronniec95@lineone.net
&gt;Cc: caml-list@inria.fr
&gt;Subject: Re: [Caml-list] type equality help (camlidl related but not
&gt; directly)
&gt;From: David MENTRE &lt;dmentre@linux-france.org&gt;
&gt;Date: Tue, 23 Dec 2003 17:00:04 +0100
&gt;
&gt;
&gt;Hello,

ronniec95@lineone.net writes:

&gt; type union_9 =
&gt;   | NUMERIC
&gt;   | STRING
&gt;   | TBOOL
&gt;   | ENUM_DATA
&gt;   | CONTROL
&gt;   | ENCRYPT
&gt; and msg_type = union_9
&gt;
&gt; let foo x : msg_type option = x
                       ^^^^^^Here is t
&gt;e trick


&gt; If I try to do
&gt;
&gt; # foo STRING;;
&gt; Characters 4-10:
&gt;   foo STRING;;
&gt;       ^^^^^^
&gt; This expression has type union_9 but is here used with type msg_type option

You should do :
# foo (Some STRING);;
- : msg_type option = Som
&gt; STRING

foo is defined as an option (| None | Some of 'a) over msg_type.

Yours,
d.
-- 
 David Mentré &lt;dmentre@linux-france.org&gt;
   http://www.linux-france.org/~dmentre/david-mentre-public-key.asc
 GnuPG key fingerprint: A7CD 7357 3EC4 1163 7
&gt;5B  7FD3 FB3E AD7C 2A18 BE9E

-------------------
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.co
&gt;/group/ocaml_beginners



-------------------
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>

