There is already this in MLtonIntInf:<br><pre class="code"> <b><font color="#0000ff">structure</font></b> BigWord : WORD<br> <b><font color="#0000ff">structure</font></b> SmallInt : INTEGER<br> <b><font color="#a020f0">datatype</font></b><b><font color="#228b22"> rep </font></b>=<b><font color="#228b22"><br>
<font color="#b8860b">Big</font> <b><font color="#a020f0">of</font></b> BigWord.word vector<br> </font></b>|<b><font color="#228b22"> <font color="#b8860b">Small</font> <b><font color="#a020f0">of</font></b> SmallInt.int<br>
</font></b><b><font color="#a020f0">val</font></b> rep: t -> rep<br></pre>This is pretty useful since it makes it possible to convert an IntInf into a byte-stream or hexadecimal in linear-time. Without this API the fastest algorithm I know requires nlog(n) time using >> recursively. However, I also need to be able to convert the other direction too; from rep to t. I can see this is easy enough to do with Prim.fromVector. Does anyone have an objection to the addition of 'fromRep' to MLtonIntInf? Otherwise loading an IntInf from the network will have to be slow.<br>
<br>