Re: [Simon Marlow simonmar@microsoft.com] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2003-01-21 Thread Manuel M T Chakravarty
Ross Paterson [EMAIL PROTECTED] wrote, On Mon, Jan 20, 2003 at 11:03:36PM +1100, Manuel M T Chakravarty wrote: Hence, I propose to leave the definition in the spec as it was; ie, the equality of ForeignPtrs is defined via the vanilla pointer that they encapsulate. However, if you

Re: [Simon Marlow simonmar@microsoft.com] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2003-01-20 Thread Manuel M T Chakravarty
Alastair Reid [EMAIL PROTECTED] wrote, perhaps ForeignPtr should not be an instance of Eq so people can provide their own? Note that if we did this, we'd want to consider adding an operation eqForeignPtr :: FP a - FP a - Bool FP b-- possible variant

Re: [Simon Marlow simonmar@microsoft.com] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2003-01-20 Thread Ross Paterson
On Mon, Jan 20, 2003 at 11:03:36PM +1100, Manuel M T Chakravarty wrote: Hence, I propose to leave the definition in the spec as it was; ie, the equality of ForeignPtrs is defined via the vanilla pointer that they encapsulate. However, if you generalize ForeignPtrs (which I hope you will) this

Re: [Simon Marlow simonmar@microsoft.com] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2002-11-11 Thread Carl R. Witty
Alastair Reid [EMAIL PROTECTED] writes: perhaps ForeignPtr should not be an instance of Eq so people can provide their own? Note that if we did this, we'd want to consider adding an operation eqForeignPtr :: FP a - FP a - Bool FP b-- possible variant

Re: [Simon Marlow simonmar@microsoft.com] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2002-11-07 Thread John Meacham
foreign dependencies can mutate too. they are attached to the ForeignPtr, not the underlying C Ptr. perhaps ForeignPtr should not be an instance of Eq so people can provide their own? although, I supose that is what newtypes are for. is testing if they are 'the same' foreign pointer efficiently

Re: [Simon Marlow simonmar@microsoft.com] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2002-11-07 Thread Alastair Reid
perhaps ForeignPtr should not be an instance of Eq so people can provide their own? Note that if we did this, we'd want to consider adding an operation eqForeignPtr :: FP a - FP a - Bool FP b-- possible variant but not very useful which lets people test