[MLton] {to/from}Poly Bug?
Matthew Fluet
matthew.fluet at gmail.com
Sat Oct 31 12:07:46 PST 2009
No misunderstanding. There seems to be some missing sharing
constraints in the signature that defines the basis library. The
following is untested, but it or something like it should do the
trick:
Index: basis-library/libs/basis-extra/top-level/basis.sig
===================================================================
--- basis-library/libs/basis-extra/top-level/basis.sig (revision 7269)
+++ basis-library/libs/basis-extra/top-level/basis.sig (working copy)
@@ -717,9 +717,15 @@
sharing type Word64Array2.vector = Word64Vector.vector
sharing type MLton.BinIO.instream = BinIO.instream
sharing type MLton.BinIO.outstream = BinIO.outstream
+ sharing type MLton.CharArray.elem = CharArray.elem
+ sharing type MLton.CharArray.t = CharArray.array
+ sharing type MLton.CharVector.elem = CharVector.elem
+ sharing type MLton.CharVector.t = CharVector.vector
sharing type MLton.TextIO.instream = TextIO.instream
sharing type MLton.TextIO.outstream = TextIO.outstream
+ sharing type MLton.Word8Array.elem = Word8Array.elem
sharing type MLton.Word8Array.t = Word8Array.array
+ sharing type MLton.Word8Vector.elem = Word8Vector.elem
sharing type MLton.Word8Vector.t = Word8Vector.vector
end
On Sat, Oct 31, 2009 at 1:54 PM, Wesley W. Terpstra <wesley at terpstra.ca> wrote:
> Maybe I've misunderstood the intention of these methods?
>
> terpstra at orange:~$ cat bug.sml
> val x = Word8Array.array (10, 0w0)
> val y : Word8.word array = MLton.Word8Array.toPoly x
>
> terpstra at orange:~$ mlton bug.sml
> Error: bug.sml 2.5.
> Pattern and expression disagree.
> pattern: [Word8.word] array
> expression: [MLton.Word8Array.elem] array
> in: (y): Word8.word array = MLton.Word8Array.toPoly x
> compilation aborted: parseAndElaborate reported errors
>
> _______________________________________________
> MLton mailing list
> MLton at mlton.org
> http://mlton.org/mailman/listinfo/mlton
>
More information about the MLton
mailing list