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

View of /tests/trunk/bugs/tests.obsolete/bug1308.4.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: 548 byte(s)
(* bug1308.4.sml *)

signature STOCOMP =
sig
  type store
  val update : (store -> 'a) -> 'a
  type 'a lift
  val rap : 'a -> 'a lift
end;

functor F (structure SC : STOCOMP)
: sig
    val x : SC.store SC.lift
  end =
struct
  val x = SC.update (SC.rap: SC.store -> SC.store SC.lift)
end;

structure StoComp : STOCOMP =
struct
  type store = string list * int
  fun update f = f (["x"],0)
  type 'a lift = ('a -> store) -> store
  fun rap (v: 'a) (k: 'a -> store) = k v
end;

structure R =
  F (structure SC = StoComp);

val s2' = R.x (fn x => x);

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