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/bug1197.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2460 - (download) (annotate)
Sat Apr 28 20:18:10 2007 UTC (12 years, 1 month ago) by gkuan
File size: 478 byte(s)
(* bug1197.sml *)

signature ABSYN =
sig
  datatype expr = Int of int
end;

signature INTERP =
sig
  structure AbSyn : ABSYN
  val evaluate : AbSyn.expr -> AbSyn.expr
end;

functor Interp (structure A : ABSYN) :>
	INTERP where type AbSyn.expr = A.expr =
struct
  structure AbSyn = A
  open AbSyn
  fun evaluate (Int n) = Int n
end;

structure Absyn : ABSYN =
struct
  datatype expr = Int of int
end;

structure E = Interp(structure A = Absyn);

val x = E.evaluate(Absyn.Int 3);

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