diff options
| author | aspiwack | 2013-11-02 15:34:35 +0000 |
|---|---|---|
| committer | aspiwack | 2013-11-02 15:34:35 +0000 |
| commit | 3bed2d2f60bf955914a3414fb3f159abaa43000a (patch) | |
| tree | 93571df06290146b7cf7f587dc8df17a463c5a77 | |
| parent | 0a1202fae3a8ae8cf651c1b699545a8638ec579f (diff) | |
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
| -rw-r--r-- | proofs/monads.ml | 8 |
1 files changed, 4 insertions, 4 deletions
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) |
