<?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/11/b0824ff17e581379b1c4a9a60ef71fb5"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-11-22T11:44:11"
  subject="Re: [Caml-list] Accuracy of Gc.stat ()"
  prev="2003/11/6bf8a87b5380533fca9209333f36a9c2"
  next="2003/11/8f2405258c33a120ad0ca9f46f985eb6"
  prev-in-thread="2003/11/002147abdef4f6fe5248093cd8c75a75"
  next-in-thread="2003/11/8f2405258c33a120ad0ca9f46f985eb6"
  prev-thread="2003/11/b9a42a206431fb25d03c3e4bf43cc125"
  next-thread="2003/11/58c657c03c7683b0214401b6eee2a21f"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Accuracy of Gc.stat ()">
<msg 
  url="2003/11/f5ceb88194f4324b692f89b6f3398ff2"
  from="Daniel_Bünzli &lt;daniel.buenzli@e...&gt;"
  author="Daniel_Bünzli"
  date="2003-11-19T17:52:08"
  subject="[Caml-list] Accuracy of Gc.stat ()">
<msg 
  url="2003/11/974acf8ee1bf674c02076f709368a862"
  from="Damien Doligez &lt;damien.doligez@i...&gt;"
  author="Damien Doligez"
  date="2003-11-21T16:45:52"
  subject="Re: [Caml-list] Accuracy of Gc.stat ()">
</msg>
<msg 
  url="2003/11/002147abdef4f6fe5248093cd8c75a75"
  from="Kim Nguyen &lt;nguyen@b...&gt;"
  author="Kim Nguyen"
  date="2003-11-22T00:18:27"
  subject="Re: [Caml-list] Accuracy of Gc.stat ()">
<msg 
  url="2003/11/b0824ff17e581379b1c4a9a60ef71fb5"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-11-22T11:44:11"
  subject="Re: [Caml-list] Accuracy of Gc.stat ()">
<msg 
  url="2003/11/8f2405258c33a120ad0ca9f46f985eb6"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-11-22T11:49:12"
  subject="Re: [Caml-list] Accuracy of Gc.stat ()">
<msg 
  url="2003/11/47c7a7b20eb96e9e1835662fe1651255"
  from="Daniel_Bünzli &lt;daniel.buenzli@e...&gt;"
  author="Daniel_Bünzli"
  date="2003-11-22T14:20:36"
  subject="Self-detection of native code execution (Was Re: [Caml-list] Accuracy of Gc.stat ())">
<msg 
  url="2003/11/26ef24002e41d7ebabfb7229a3904059"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-11-22T14:28:54"
  subject="Re: Self-detection of native code execution (Was Re: [Caml-list] Accuracy of Gc.stat ())">
</msg>
</msg>
<msg 
  url="2003/11/92dbb3eff27c1305dfb13cc95807a0c3"
  from="Kim Nguyen &lt;nguyen@b...&gt;"
  author="Kim Nguyen"
  date="2003-11-22T14:25:55"
  subject="Re: [Caml-list] Accuracy of Gc.stat ()">
<msg 
  url="2003/11/6ee5dd7ed01812dc5e6b44c4bdc4eaff"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-11-22T14:31:14"
  subject="Re: [Caml-list] Accuracy of Gc.stat ()">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
On Sat, Nov 22, 2003 at 01:20:54AM +0100, Kim Nguyen wrote:
&gt; external is_bytecode : unit -&gt; bool = "is_bytecode_bytecode" "is_bytecode_native"

Neat trick. This _ought_ to work, but it doesn't for some reason:

	let arg = (true, false) 
	external is_bytecode : bool * bool -&gt; bool = "%field0" "%field1" 
 
	let () = 
	  if is_bytecode arg then 
	    print_endline "Bytecode!" 
	  else 
	    print_endline "Native!" 

Perhaps someone can explain why ...

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
"One serious obstacle to the adoption of good programming languages is
the notion that everything has to be sacrificed for speed. In computer
languages as in life, speed kills." -- Mike Vanier
</contents>

</message>

