Re: ["Simon Marlow" ] 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

Re: ["Simon Marlow" ] 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) thi

Re: ["Simon Marlow" ] 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-- possi

Re: ["Simon Marlow" ] 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-- poss

Re: ["Simon Marlow" ] 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 e

Re: ["Simon Marlow" ] 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 pos

Re: ["Simon Marlow" ] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2002-11-07 Thread Alastair Reid
Manuel M T Chakravarty <[EMAIL PROTECTED]> writes: > The issue came up in a binding to a BDD library currently being > implemented by Peter Gammie <[EMAIL PROTECTED]>. With BDDs, it > is important that when you construct a BDD for the same expression > two times that you get the same BDD (ie, th

Re: ["Simon Marlow" ] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2002-11-06 Thread Manuel M T Chakravarty
Alastair Reid <[EMAIL PROTECTED]> wrote, > [Thread moved from the library cvs mailing list] > > Simon Marlow: > > - Fix the Eq instance for ForeignPtr to match the behaviour > > specified by the spec. Two ForeignPtrs are equal iff their > > underlying Ptrs are equal (previously they were equal

["Simon Marlow" ] RE: cvs commit: fptools/libraries/base/Foreign ForeignPtr.hs

2002-11-06 Thread Alastair Reid
[Thread moved from the library cvs mailing list] Simon Marlow: > - Fix the Eq instance for ForeignPtr to match the behaviour > specified by the spec. Two ForeignPtrs are equal iff their > underlying Ptrs are equal (previously they were equal iff they were > the same ForeignPtr). Alastair Reid