Thanks for reporting that. I've committed a fix and included your example as a regression test.
David

Makarius wrote:
Here is another thing that looks like a regression from Poly/ML 5.3.0.


datatype ('a, 'b) foo = Foo of 'a * 'b;

val _ =
  PolyML.addPrettyPrinter (fn depth => fn (pretty1, pretty2) =>
    fn Foo (x, y) =>
      PolyML.PrettyBlock (2, false, [],
       [PolyML.PrettyString "Foo", PolyML.PrettyBreak (1, 0),
        PolyML.PrettyString "(",
        pretty1 (x, depth - 1),
        PolyML.PrettyString ",", PolyML.PrettyBreak (1, 0),
        pretty2 (y, depth - 1),
        PolyML.PrettyString ")"]));


This crashes the RTS when trying to print Foo (1, "a") for example.

The same kind of code does work with a single type parameter, e.g. for datatype 'a bar = Bar of 'a


    Makarius
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to