Re: [Haskell-cafe] RFC: only-read-or-write-vars

2010-03-22 Thread vlado
> > I wonder if this would be a place to add a function returning the pair > > of the read and write capabilities (for the lack of a better word) of a > > value. > > > > something like: > > > > rwPair:: v α -> (ReadOnly v α , WriteOnly v α) > > rwPair a = (readOnly a, writeOnly a) > > > > sorry f

Re: [Haskell-cafe] RFC: only-read-or-write-vars

2010-03-20 Thread Bas van Dijk
On Fri, Mar 19, 2010 at 5:49 PM, vlado wrote: > +1 - I like it, I've used this technique in some private projects Nice, I hope you can use this package. > I wonder if this would be a place to add a function returning the pair > of the read and write capabilities (for the lack of a better word) o

Re: [Haskell-cafe] RFC: only-read-or-write-vars

2010-03-19 Thread vlado
> http://code.haskell.org/~basvandijk/code/only-read-or-write-vars/ > > This is a Request For Comments, so any comments / patches / +1s / -1s > about anything are more than welcome before I upload it to hackage > (sometime this weekend). +1 - I like it, I've used this technique in some private pr

[Haskell-cafe] RFC: only-read-or-write-vars

2010-03-19 Thread Bas van Dijk
Hello, I've written a tiny package for restricting access to mutable variables to be read-only or write-only: http://code.haskell.org/~basvandijk/code/only-read-or-write-vars/ This is a Request For Comments, so any comments / patches / +1s / -1s about anything are more than welcome before I uplo