From 3bed2d2f60bf955914a3414fb3f159abaa43000a Mon Sep 17 00:00:00 2001 From: aspiwack Date: Sat, 2 Nov 2013 15:34:35 +0000 Subject: Small change to the IO monad interface: [val ref : 'a -> 'a ref t] It doesn't matter much, it's simply a matter of aesthetic, so that all functions in the interface of [Monads.IO] are pure ([IO.run] being the only impure function but it's not part of the generic interface). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16974 85f007b7-540e-0410-9357-904b9bb8a0f7 --- proofs/monads.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'proofs') diff --git a/proofs/monads.ml b/proofs/monads.ml index a6aa98b2b4..9500c27893 100644 --- a/proofs/monads.ml +++ b/proofs/monads.ml @@ -27,7 +27,7 @@ module type IO = sig type 'a ref - val ref : 'a -> 'a ref + val ref : 'a -> 'a ref t val (:=) : 'a ref -> 'a -> unit t val (!) : 'a ref -> 'a t @@ -62,7 +62,7 @@ end = struct type 'a ref = 'a Pervasives.ref - let ref = Pervasives.ref + let ref x () = Pervasives.ref x let (:=) r x () = Pervasives.(:=) r x let (!) r () = Pervasives.(!) r @@ -246,7 +246,7 @@ end = struct (*** IO ***) type 'a ref = 'a T.ref - let ref = T.ref + let ref x = lift (T.ref x) let (:=) r x = lift (T.(:=) r x) let (!) r = lift (T.(!) r) @@ -337,7 +337,7 @@ end = struct (*** IO ***) type 'a ref = 'a T.ref - let ref = T.ref + let ref x = lift (T.ref x) let (:=) r x = lift (T.(:=) r x) let (!) r = lift (T.(!) r) -- cgit v1.2.3