<?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/4f93711601205bf9fdbfa68a6c41f310"
  from="ronniec95@l..."
  author="ronniec95@l..."
  date="2003-12-23T15:49:35"
  subject="[Caml-list] type equality help (camlidl related but not directly)"
  prev="2003/12/1e37ba7a17a7389f7424c835894632b7"
  next="2003/12/08a3627a1781fc99ed92f239984a9f9c"
  next-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>
Camlidl generates the following mli (sample here)

type union_9 =
  | NUMERIC
  | STRING
  | TBOOL
  | ENUM_DATA
  | CONTROL
  | ENCRYPT
and msg_type = union_9

let foo x : msg_type option = x



If I try to do

# foo STRING;;
Characters 4-10:
  foo STRING;;
      ^^^^^^
This expression has type union_9 but is here used with type msg_type option


How can I either get camlidl to not do this, or what is the syntax in Ocaml
to ensure I use the right type?

Thanks,

Ronnie

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

