Re: overlapping instances

2000-02-16 Thread Fergus Henderson
On 17-Feb-2000, Brian Boutel <[EMAIL PROTECTED]> wrote: > On Thursday, February 17, 2000 3:03 PM, Fergus Henderson > [SMTP:[EMAIL PROTECTED]] wrote: > >> > > If Haskell had explicit imports and exports of instance declarations, > > then I could perhaps buy this argument. But it doesn't. In Hask

RE: overlapping instances

2000-02-16 Thread Brian Boutel
On Thursday, February 17, 2000 3:03 PM, Fergus Henderson [SMTP:[EMAIL PROTECTED]] wrote: >> > If Haskell had explicit imports and exports of instance declarations, > then I could perhaps buy this argument. But it doesn't. In Haskell, > all instance declarations defined in a module are always ex

Re: overlapping instances

2000-02-16 Thread Fergus Henderson
On 16-Feb-2000, Jeffrey R. Lewis <[EMAIL PROTECTED]> wrote: > To my mind, the biggest flaw with overlapping instances is the separate > compilation issue: to whit, if the `instance Eq (Maybe String)' was in > a different module, not imported by the module defining `f', then > Marcin's definition o

Re: Wanted: mmap or other fast IO

2000-02-16 Thread Fergus Henderson
On 16-Feb-2000, Simon Marlow <[EMAIL PROTECTED]> wrote: > > The easiest way is to declare mmap as a foreign function using foreign > import, then build a little wrapper around it. Unfortunately you won't be > able to turn the resulting memory into an array (even a ByteArray), since > these are a

Re: overlapping instances

2000-02-16 Thread Jeffrey R. Lewis
Marcin 'Qrczak' Kowalczyk wrote: > Wed, 16 Feb 2000 15:45:07 +0300 (MSK), S.D.Mechveliani <[EMAIL PROTECTED]> pisze: > > > I fear, I am loosing the thread. The discussion was on the > > overlapping instances. And this latter question is maybe, on giving > > a polymorphic function to another funct

Re: Wanted: mmap or other fast IO

2000-02-16 Thread Manuel M. T. Chakravarty
Sven Panne <[EMAIL PROTECTED]> wrote, > [ Simply can't resist... ;-) ] > > Simon Marlow wrote: > > The easiest way is to declare mmap as a foreign function using > > foreign import, then build a little wrapper around it. > > A problem will be: What Haskell types should be used for size_t and >

Re: overlapping instances

2000-02-16 Thread Carl R. Witty
[EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) writes: > I do not blame ghc for that. IMHO overlapping instances together > with the rest of Haskell are impossible to be safely and effectively > implemented. > > Unless one accepts that subtle differences in contexts, ones > depending on the implem

Re: overlapping instances

2000-02-16 Thread Marcin 'Qrczak' Kowalczyk
Wed, 16 Feb 2000 15:45:07 +0300 (MSK), S.D.Mechveliani <[EMAIL PROTECTED]> pisze: > I fear, I am loosing the thread. The discussion was on the > overlapping instances. And this latter question is maybe, on giving > a polymorphic function to another function as the argument. I am > not an implemen

Re: Wanted: mmap or other fast IO

2000-02-16 Thread Sven Panne
[ Simply can't resist... ;-) ] Simon Marlow wrote: > The easiest way is to declare mmap as a foreign function using > foreign import, then build a little wrapper around it. A problem will be: What Haskell types should be used for size_t and off_t? Getting this done properly would require autoco

RE: Wanted: mmap or other fast IO

2000-02-16 Thread Simon Marlow
Title: RE: Wanted: mmap or other fast IO > Is there any interface to mmap(2) available? Something that > behaves like > an immutable array would be great. > > An mmap may have a signature like > > mmap :: Ix a, ?? b => Handle -> IO (Array a b) > > I've no idea what types should be allowed

overlapping instances

2000-02-16 Thread S.D.Mechveliani
Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> writes on 15 Feb 2000 >> Here A is a superclass for B, so, `B a =>' is a more special >> condition than `A a =>'. > I am not brave enough to try to formulate general rules of determining > which context is more general, [..

IORefs in Ord

2000-02-16 Thread Wolfram Kahl
On glasgow-haskell-users, Simon Peyton-Jones <[EMAIL PROTECTED]> answered my question arising from a different thread: > > | This is something that I have long been wondering about > | (perhaps it is just because of my ignorance): > | Wouldn't stable pointers be a cheaper and more appropriate