Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /tests/trunk/bugs/tests.obsolete/bug416.sml
ViewVC logotype

View of /tests/trunk/bugs/tests.obsolete/bug416.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2071 - (download) (annotate)
Tue Oct 31 02:58:12 2006 UTC (12 years, 8 months ago) by blume
Original Path: tests/trunk/bugs/tests/bug416.sml
File size: 745 byte(s)
moved tests trunk
(* bug416.sml *)
(* lack of equality type checking on functor application *)

signature PSIG =
sig
  eqtype 'a symTab ;
  datatype guide = G1 | G2 of guide symTab  (* guide an eqtype *) 
end;

functor PFUN (structure S : sig type 'a symTab end) =
struct
  open S;
  datatype guide = G1 | G2 of guide symTab;  (* this guide is not an eqtype *)
end;

structure S = struct datatype 'a symTab = Empty end;
structure P = PFUN(structure S = S);  (* P.guide is not an eqtype *)

(*
P.G1 = P.G1;  (* this is illegal *)
*)

functor MFUN(structure X : PSIG) =
struct
  val z = X.G1 = X.G1;
end;
structure M = MFUN(structure X = P);

(* This functor application should be illegal because P.guide is not
   an equality type as required by signature PSIG *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0