Re: [Haskell-cafe] Proposal: Partitionable goes somewhere + containers instances

2013-09-29 Thread Milan Straka
Hi Ryan, > -Original message- > From: Ryan Newton > Sent: 29 Sep 2013, 04:21 > > > > *class Partitionable t where* > * partition :: t -> Maybe (t,t)* > > > > So what I really want is for the *containers package to please get some > kind of Partitionable instances! * Johan & others, I

[Haskell-cafe] Destructive updates to plain ADTs

2012-09-09 Thread Milan Straka
Hi all, is there any way to perform a destructive update on a plain ADT? Imagine I have a simple data Tree a = Nil | Node a (Tree a) (Tree a) I would like to be able to modify right subtree of an existing tree. I can do that for example when using IORefs by changing the datatype to data Tree

Re: [Haskell-cafe] Destructive updates to plain ADTs

2012-09-09 Thread Milan Straka
> > is there any way to perform a destructive update on a plain ADT? > > Imagine I have a simple > > data Tree a = Nil | Node a (Tree a) (Tree a) > > I would like to be able to modify right subtree of an existing tree. > > > > I can do that for example when using IORefs by changing the datatype t

Re: [Haskell-cafe] Destructive updates to plain ADTs

2012-09-11 Thread Milan Straka
Hi, > > is there any way to perform a destructive update on a plain ADT? > > Hi Milan, perhaps this is a dumb question, but given that you're using a lazy > functional language: why do you want to do destructive updates at all? > > Perhaps you'd be better off using an imperative/object-oriented

Re: [Haskell-cafe] A paper relating to Data.Set and Data.Map

2011-04-19 Thread Milan Straka
s is not proved yet. If interested, > let's discuss whether or not we should replace the variant with the > original in Data.Set/Data.Map. > > We guess that Milan Straka, a big contributer of the container > package, has his opinion. We welcome opinions from other people, two.