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

SCM Repository

[smlnj] Annotation of /tests/trunk/bugs/tests.obsolete/bug905.5.sml
ViewVC logotype

Annotation of /tests/trunk/bugs/tests.obsolete/bug905.5.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2460 - (view) (download)

1 : dbm 548 (* bug905.5.sml *)
2 :    
3 :     functor F =
4 :     let val lr = ref []
5 :     functor F1 (type t) =
6 :     struct
7 :     exception Empty
8 :    
9 :     (* t -> unit *)
10 :     fun put (x : t) = lr := [x]
11 :    
12 :     (* unit -> t *)
13 :     fun get () =
14 :     case !lr of [x] => x | _ => raise Empty
15 :    
16 :     end (* functor F *)
17 :     in F1
18 :     end; (* let *)
19 :    
20 :     structure A = F(type t = unit -> unit);
21 :     structure B = F(type t = bool);
22 :    
23 :     val x = B.put true;
24 :     val y = (A.get ()) ();
25 :    

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