Binary: Put -> Builder

Don Stewart dons at galois.com
Thu Feb 12 11:20:20 EST 2009


ross:
> On Thu, Feb 12, 2009 at 07:40:21AM -0800, Don Stewart wrote:
> > ross:
> > > On Thu, Feb 12, 2009 at 07:28:07AM -0800, Don Stewart wrote:
> > > > ross:
> > > > > Here's a concrete suggestion: have Data.Binary.Put export the existing
> > > > > function
> > > > > 
> > > > >   tell :: Builder -> Put
> > > > > 
> > > > > and also
> > > > > 
> > > > >   execPut :: PutM a -> Builder
> > > > >   execPut = sndS . unPut
> > > > 
> > > > What's the use case?
> > > 
> > > Quoting a previous message:
> > > > I imagine one might want to make a Builder for a composite object,
> > > > using the Binary instances of some types.  And one might want to go
> > > > the other way too, defining a Binary instance using an existing Builder.
> > 
> > Sounds good. Do you just want these exposed as is?
> 
> Yes, though Antoine's suggestion of exporting tell as putBuilder may
> be better.

OK. I'm preparing the 0.5 release of binary atm, so will expose these.

-- Don


More information about the Libraries mailing list