From recent SVN commit messages, I see that there has been some
reorganization of structure/signature matching; apologies if the reorganization is incomplete (i.e., not ready for testing) and/or the following is a known issue.

This program type checks under PolyML 5.2.1 (and SML/NJ 110.68 and
MLton 20070826), but reports type errors under PolyML SVN HEAD.

=====
signature UNIQUE_SET_STRUCTS =
   sig
      structure Element:
         sig
            type t
         end
   end
signature UNIQUE_SET =
   sig
      include UNIQUE_SET_STRUCTS
      type t
      val toList: t -> Element.t list
   end
structure UniqueSetRep =
   struct
      datatype 'a t = T of {elements: 'a list}
   end
functor UniqueSet (S: UNIQUE_SET_STRUCTS): UNIQUE_SET =
   struct
      open S
      type elements = Element.t list
      structure Tree: sig
                         structure Set:
                            sig
                               type t
                               val toList: t -> elements
                            end
                      end =
         struct
            structure Set =
               struct
                  open UniqueSetRep
                  type t = Element.t t
                  fun new elements = T {elements = elements}
                  fun elements (T {elements, ...}) = elements
                  val toList = elements
               end
         end
      open Tree.Set
   end
=====
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to