Re: Sets of IOErrors?

1999-09-29 Thread Marcin 'Qrczak' Kowalczyk
Thu, 30 Sep 1999 02:08:23 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze: > > I only don't like the details about IOError. It's not extensible > > and Dynamic is still not nice. I have no idea how to make it > > better. Probably some general way of making extensible datatypes. > > Could you e

RE: advice wanted on GUI design patterns

1999-09-29 Thread Frank A. Christoph
> Just before everyone starts writing MVC (model-view-controller) > GUIs, you should be aware that there is a later development called > MVP (model-view-presenter), which decouples the components > even more. > > Main Dolphin site: > http://www.object-arts.com Thanks for the link. I found this b

implied copying

1999-09-29 Thread S.D.Mechveliani
I thank Fergus Henderson <[EMAIL PROTECTED]> and Dave Tweed <[EMAIL PROTECTED]> for the explanations on the Cryptarithm test, its C++ program. Fergus Henderson writes > But the comment about the ratio being smaller will probably not be, > because the conditions when pass-by-value must be u

Xtract with hugs and Haskell implementation inconsistency

1999-09-29 Thread S. Alexander Jacobson
I am trying to get Malcolm Wallace's Xtract code to run with Hugs and have noticed a few inconsistencies between whatever compiler he is using and hugs... 1. Where `maybe` is exported His compiler does not export `maybe` from the Maybe library but Hugs does. The report says that Maybe should be

Re: Sets of IOErrors?

1999-09-29 Thread George Russell
Fergus Henderson wrote: [snip] > So why limit expressiveness by providing only the former? Why indeed? You are right. I hadn't realised that a -> IO (Maybe a) would still suffer from non-determinism. (Because if you have x = error "foo" + _|_ it may cause a return of Nothing or else no

Re: Sets of IOErrors?

1999-09-29 Thread Johan Nordlander
Alastair Reid wrote: > [discussion of Dynamic library, etc deleted] > > [...] > > If Haskell supported extensible datatypes, it would be easy to define a > hierarchy of exception values. For example, the attached pseudocode > creates a hierarchy like this: > > IOError > Win32Error >

Re: Sets of IOErrors?

1999-09-29 Thread George Russell
Fergus Henderson wrote: [snip] > SML's exception mechanism essentially forces sequential execution, > and (I think) causes problems for equational reasoning. > Haskell's exception mechanism preserves referential transparency > and gives the compiler more freedom to reorder and/or parallelize code.

Re: Sets of IOErrors?

1999-09-29 Thread R.S. Nikhil
[ Apologies that this message is not about Haskell, but it is about interesting use of language! ] Amazingly, Perec's book has been translated into English, by Gilbert Adair, completely maintaining it's "e-less" constraint! The title of the English translation is "A Void" (the French title wou

Re: Sets of IOErrors?

1999-09-29 Thread Marcin 'Qrczak' Kowalczyk
Wed, 29 Sep 1999 11:43:06 +0200, George Russell <[EMAIL PROTECTED]> pisze: > When that happens in my code it counts as a bug! Therefore error > is appropriate. If you are in some larger Haskell universe calling > component Haskell code it is unfortunate if a single error calls the > entire univ

Re: Haskell and Parallelism (was: What is a functional language?)

1999-09-29 Thread Marko Schuetz
> "Fergus" == Fergus Henderson <[EMAIL PROTECTED]> writes: Fergus> On 28-Sep-1999, Paul Hudak <[EMAIL PROTECTED]> wrote: >> > Haskell's (&&) only models the logical AND when it is passed booleans. >> > To say that _|_ is a Haskell Boolean, is to create another concept >> > domain (Haskell Boo

Re: Sets of IOErrors?

1999-09-29 Thread George Russell
Fergus Henderson wrote: [many interesting things which are snipped] > There are many common examples where exceptions arise for reasons other > than I/O, for example integer overflow, division by zero, taking the > square root of a negative number, head of an empty list, and so forth. When that ha

Re: advice wanted on GUI design patterns

1999-09-29 Thread Johan Nordlander
> >Havoc Pennington wrote: >> >> On Mon, 27 Sep 1999, Antony Courtney wrote: >> > >> > First, it is possible to write applications in Haskell using event loops >> > and mutable state. Most of the simple toolkit bindings (such as >> > TclHaskell, which is really a binding to Tk) do this. >> > >>

Re: advice wanted on GUI design patterns

1999-09-29 Thread Rob MacAulay
Josef Sveningsson wrote: > On Mon, 27 Sep 1999, Havoc Pennington wrote: > > > The question is: how do you structure a GUI program? > > There is one paper I can recommend that tries to answer this question; > "Structuring Graphical Paradigms in TkGofer". It can be found here: > > http://www.cs.

Re: Sets of IOErrors?

1999-09-29 Thread Jan Skibinski
On 29 Sep 1999, Marcin 'Qrczak' Kowalczyk wrote: > Wed, 29 Sep 1999 11:43:06 +0200, George Russell <[EMAIL PROTECTED]> pisze: > > > When that happens in my code it counts as a bug! Therefore error > > is appropriate. If you are in some larger Haskell universe calling > > component Haskell co

Re: Haskell and Parallelism (was: What is a functional language?)

1999-09-29 Thread Lars Lundgren
On Tue, 28 Sep 1999, S. Alexander Jacobson wrote: > My simple point is that claims about the correctness or incorrectness of > the behavior of a function are incoherent outside the function's domain; > that, as an language implementation matter, it is handy to make _|_ a > member of all types is

Re: Haskell and Parallelism (was: What is a functional language?)

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, Paul Hudak <[EMAIL PROTECTED]> wrote: > > I don't think it is correct to say that the notion of _|_ invariably > > creeps into the denotational semantics. > > But perhaps I am misusing the term "denotational semantics". > > > > In languages such as Goedel and Mercury, the declarat

Re: Sets of IOErrors?

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, Alastair Reid <[EMAIL PROTECTED]> wrote: > > > > > (b) allow throwing and catching of dynamically typed values, > > > > e.g. using an interface like the Hugs/ghc Dynamic library > > [discussion of Dynamic library, etc deleted] > > [The following is a bit of a straw-man: it d

tutorial

1999-09-29 Thread John Peterson
I've now got a .pdf (with decent fonts, I think) and some patches to upgrade some of the ancient Latex I was using. I'll get a patched version on the web later today (no technical changes - just slightly nicer formatting). Thanks to all who helped ... John

Re: Haskell and Parallelism (was: What is a functional language?)

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, Paul Hudak <[EMAIL PROTECTED]> wrote: > > Haskell's (&&) only models the logical AND when it is passed booleans. > > To say that _|_ is a Haskell Boolean, is to create another concept > > domain (Haskell Boolean), which shares many properties with Logic > > Boolean but is not ident

Re: Haskell and Parallelism (was: What is a functional language?)

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, Paul Hudak <[EMAIL PROTECTED]> wrote: > There seems to be serious confusion here! > > True and False are the only "fully determined" members of Bool. But, > even in imperative languages, it is possible for a boolean-typed > expression to diverge, or possibly cause an error -- nei

Re: Sets of IOErrors?

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, Alastair Reid <[EMAIL PROTECTED]> wrote: > > Fergus Henderson <[EMAIL PROTECTED]> replied: > > What existing functions for testing IOErrors? > > Apart from the Eq and Show classes, Haskell 98 doesn't define any, AFAIK. > > The IO library defines these functions. > (http://haskell

Re: Sets of IOErrors?

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, George Russell <[EMAIL PROTECTED]> wrote: > I must be missing something. Isn't it blindlingly obvious that > here SML's exception mechanism is streets ahead of Haskell's? Please, > what am I missing? Is there some lurking type-unsafeness? SML's exception mechanism essentially f

Re: What *I* thinks Haskell Needs.

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, Alex Ferguson <[EMAIL PROTECTED]> wrote: > > It would be interesting to investigate adding 'dynamic classes' to > Haskell, but it introduces the issue of what type to give the resulting > function: I think I'd want to clearly distinguish between a genuine > (boundedly) polymorphi

Re: improved Cryptarithm test

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, S.D.Mechveliani <[EMAIL PROTECTED]> wrote: > Fergus Henderson <[EMAIL PROTECTED]> writes > > On 28-Sep-1999, S.D.Mechveliani <[EMAIL PROTECTED]> wrote: > >> And now the performance ratio shows * 16 *. > >> > >> I understand this so, that this particular task allows to set > >> `

Re: Sets of IOErrors?

1999-09-29 Thread Fergus Henderson
On 08-Sep-1999, Alastair Reid <[EMAIL PROTECTED]> wrote: > > I recently had occasion to write this function: > > -- do a, if that fails do b, if that fails, raise b's exception > (?) :: IO a -> IO a -> IO a > a ? b = a `catch` \_ -> b > > Simple enough, but if b fails, I don't really wan

Re: improved Cryptarithm test

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, S.D.Mechveliani <[EMAIL PROTECTED]> wrote: > D. Tweed <[EMAIL PROTECTED]> writes > T> One small comment is that in your functions condition1 & condition2 I > T> think most C++ programmers would say that you want to write > T> > T> int condition1 (const vector& x) > T> > T> sinc

Re: OO in Haskell (was Re: What *I* thinks Haskell Needs.)

1999-09-29 Thread Fergus Henderson
On 28-Sep-1999, Andreas C. Doering <[EMAIL PROTECTED]> wrote: > > The trickier part is putting different types into a heterogenous > > collection, and then manipulating according to their _individual_ types. > > If we are already at this point, a naive question: > > Assume we add the type of all