Re: primShiftInt broken or strange in C

1999-07-27 Thread Ralf Muschall
Lennart Augustsson wrote: > b) Haskell does not have a function called primShiftInt so >you can't say that's intended or not intended. I looked once more where it appears: It is used in the extension libraries which come with hugs and ghc for the definition of shiftR etc. in Int.hs and Word.

Re: Haskell Parser in Hugs

1999-07-27 Thread Manuel M. T. Chakravarty
[EMAIL PROTECTED] (Martin Erwig) wrote, > I am wondering what is the best way (in terms of > easy-to-use and easy-to-install) to use a parser > for Haskell in Hugs. As far as I know the parsers > by Sven Panne and Manuel Chakravarty require ghc. I didn't write a parser for parsing Haskell - I on

Again: Referential Equality

1999-07-27 Thread Andreas C. Doering
Hello, I come up again with a topic I mentioned some years ago. I would like to have a comparison instruction that compares the internal reference of two objects. Let's call it "req". req :: a -> a -> Bool -- of course it is an equivalence operation req x x = True req x y = req y x (req x

RE: Again: Referential Equality

1999-07-27 Thread Simon Peyton-Jones
> The expression > > let x=[1..] in x==x > would not terminate in the first case but succeed in the second. But, much worse let x = (a,b) in x `req` x = True but (a,b) `req` (a,b) = False So referential transparency is lost. This is a high price t

Re: Haskell Parser in Hugs

1999-07-27 Thread Sven Panne
Simon Marlow wrote: > [EMAIL PROTECTED] (Martin Erwig) wrote, > > I am wondering what is the best way (in terms of > easy-to-use and > > easy-to-install) to use a parser for Haskell in Hugs. [...] > > Our Haskell parser library works fine with Hugs: [...] It's not quite > complete (it doesn't do

RE: Clarifying Defaults

1999-07-27 Thread Simon Peyton-Jones
> Current versions of Hugs 98 avoid this problem by adding an > extra, implicit > condition to the definition of defaulting, marked with * in the > following: > > If "v" is an ambiguous variable, and > if "v" appears only in constraints of the form "C v", and * > if one of "v"

Re: Again: Referential Equality

1999-07-27 Thread Wolfram Kahl
Andreas C. Doering <[EMAIL PROTECTED]> writes: > > I would like to have a comparison instruction that compares the internal > reference of two objects. > Let's call it "req". > > req :: a -> a -> Bool > > -- of course it is an equivalence operation > req x x = True > req x y = req

RE: Again: Referential Equality

1999-07-27 Thread Andreas C. Doering
>> let x=[1..] in x==x >> would not terminate in the first case but succeed in the second. > > But, much worse > > let x = (a,b) in x `req` x = True > but > (a,b) `req` (a,b) = False > > So referential transparency is lost. This is a high price to pay.

Re: Haskell Parser in Hugs

1999-07-27 Thread Marko Schuetz
> "Martin" == Martin Erwig <[EMAIL PROTECTED]> writes: Martin> I am wondering what is the best way (in terms of Martin> easy-to-use and easy-to-install) to use a parser Martin> for Haskell in Hugs. As far as I know the parsers Martin> by Sven Panne and Manuel Chakravarty require ghc. There i

RE: Again: Referential Equality

1999-07-27 Thread Simon Marlow
> > I would like to have a comparison instruction that compares > the internal > > reference of two objects. > > Let's call it "req". > > > > req :: a -> a -> Bool > > By coincidence, I was just looking at GHC's documentation on > stable names > and pointers, and it seems relevant here. > > ht

RE: Again: Referential Equality

1999-07-27 Thread Frank A. Christoph
> I would like to have a comparison instruction that compares the internal > reference of two objects. > Let's call it "req". > > req :: a -> a -> Bool By coincidence, I was just looking at GHC's documentation on stable names and pointers, and it seems relevant here. http://research.microsoft.co

Re: Again: Referential Equality

1999-07-27 Thread Koen Claessen
Andreas C. Doering wrote: | I would like to have a comparison instruction that compares the internal | reference of two objects. It might be of interest here to talk about a paper that Dave Sands and I have recently submitted to a conference, about something we call "observable sharing". It

Re: Again: Referential Equality

1999-07-27 Thread Lennart Augustsson
"D. Tweed" wrote: > On Tue, 27 Jul 1999, Simon Marlow wrote: > > > req a b = unsafePerformIO $ do > > >a' <- makeStableName a > > >b' <- makeStableName b > > >return (a' == b') > > > > That's exactly what to use in a situation like this. Pointer equality loses > > referential transpa

RE: Again: Referential Equality

1999-07-27 Thread Theo Norvell
On Tue, 27 Jul 1999, Andreas C. Doering wrote: > >> let x=[1..] in x==x > >> would not terminate in the first case but succeed in the second. > > > > But, much worse > > > > let x = (a,b) in x `req` x = True > > but > > (a,b) `req` (a,b) = False > > > >

Re: Again: Referential Equality

1999-07-27 Thread Hans Aberg
At 14:11 +0200 1999/07/27, Koen Claessen wrote: >The contructs we add to the language are: > > type Ref a = ... > > ref :: a -> Ref a > deref :: Ref a -> a > (<=>) :: Ref a -> Ref a -> Bool > >This basically gives you ML-style but non-updatable references, but you >can compare them for equal

Re: primShiftInt broken or strange in C

1999-07-27 Thread Fergus Henderson
On 27-Jul-1999, Ralf Muschall <[EMAIL PROTECTED]> wrote: > Lennart Augustsson wrote: > > > b) Haskell does not have a function called primShiftInt so > >you can't say that's intended or not intended. > > I looked once more where it appears: It is used in the > extension libraries which come

RE: Again: Referential Equality

1999-07-27 Thread D. Tweed
On Tue, 27 Jul 1999, Simon Marlow wrote: > > req a b = unsafePerformIO $ do > >a' <- makeStableName a > >b' <- makeStableName b > >return (a' == b') > > That's exactly what to use in a situation like this. Pointer equality loses > referential transparency in general (as Simon P.J. po