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
> 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
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
"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
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
> "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
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
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
> >
> >
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
>> 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.
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
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
> > 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
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.
> 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
> 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"
[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
17 matches
Mail list logo