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

View of /tests/trunk/bugs/tests.obsolete/bug1323.1.sml

Parent Directory Parent Directory | Revision Log Revision Log


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

functor F (
      type code 
      val boo : bool option option
      val funcs : bool list
    ) : sig end =
struct
  fun reset() = ()   
  val _ = reset() 

  val pairId = fn (a,b) => (a,b)

  val boolref = ref false
  fun h (a,b) = if !boolref then (a,b) else (a,b)

  fun lookup () =
    case boo of
       SOME(SOME b) => b
      | _ => false

  fun f1 C = if lookup () then pairId C else C

  fun f2 C = C

  fun f (x, C) = if x then f1 C else f2 C

  fun g (x::rest) = h(f(x, g rest))

  val uc: unit * code = g funcs

end;

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