Re: overlapping instances

2000-02-17 Thread Fergus Henderson
On 18-Feb-2000, Brian Boutel <[EMAIL PROTECTED]> wrote: > > OK, I understand now. But what advantage does explicit control of instance > import/export give you over the current Haskell rule? It's just a question of information hiding. It lets you declare a type to be an instance of a public ty

RE: overlapping instances

2000-02-17 Thread Brian Boutel
On Friday, February 18, 2000 1:46 AM, Fergus Henderson [SMTP:[EMAIL PROTECTED]] wrote: > > Mercury allows private instances, but it does not allow shadowing. > For any given class and type, there can only be one instance; > that instance can be public, or private, but not both. > > If you allow s

Re: overlapping instances

2000-02-17 Thread Fergus Henderson
On 17-Feb-2000, Brian Boutel <[EMAIL PROTECTED]> wrote: > On Thursday, February 17, 2000 7:02 PM, Fergus Henderson > > Well, I remain unconvinced. In Mercury, we give the user control > > over whether instance declarations are exported or not, and it > > works quite nicely, IMHO. I think the pr

RE: records in Haskell

2000-02-17 Thread Simon Marlow
Jan Kort writes: > It seem that any record, no matter how trivial, can't be much > longer than about 200 lines in Haskell. If a try to compile a > 300 line record containing just: > data X = X { > f1 :: String, > f2 :: String, > f3 :: String, > ... > f300 :: St

RE: Wanted: mmap or other fast IO

2000-02-17 Thread Simon Marlow
> 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),

Re: overlapping instances

2000-02-17 Thread Jeffrey R. Lewis
Fergus Henderson wrote: > 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

RE: overlapping instances

2000-02-17 Thread Brian Boutel
On Thursday, February 17, 2000 7:02 PM, Fergus Henderson [SMTP:[EMAIL PROTECTED]] wrote: >> > Well, I remain unconvinced. In Mercury, we give the user control > over whether instance declarations are exported or not, and it > works quite nicely, IMHO. I think the problems that you are referring