Re: Standalone Parser for Haskell Grammar

2003-09-10 Thread Ross Paterson
On Wed, Sep 10, 2003 at 12:33:50PM +0200, Peter Robinson wrote: Does anyone know a reasonable standalone Parser for the Haskell Grammar? The only one i found was hsparser but it's still an alpha release and i get a few errors during compiling. I know i could write one using Happy but i don't

Re: Yet Another Monad Tutorial

2003-08-14 Thread Ross Paterson
On Tue, Aug 12, 2003 at 03:04:39PM -0400, Antony Courtney wrote: So then, in your view, what *is* an IO action? One conceptual model is that an IO action with type (IO a) denotes a function of type World - (World,a). But the IO monad is not a state monad, because other agents may change the

Re: Type design question

2003-07-30 Thread Ross Paterson
On Wed, Jul 30, 2003 at 02:04:22PM +1000, Andrew J Bromage wrote: On Tue, Jul 29, 2003 at 12:11:29PM +0200, Konrad Hinsen wrote: I think that C++ was a lot worse, even the accepted features (e.g. templates) didn't work the same with all compilers. All non-trivial code came with a list of

Re: How do I create dynamic exceptions

2003-07-22 Thread Ross Paterson
On Tue, Jul 22, 2003 at 02:59:12PM +0100, Bayley, Alistair wrote: handler :: Dynamic - IO () handler e = do case (fromDynamic e) of Nothing - putStrLn (dynamic cast failed) Just (MkExc n s) - putStrLn (exception: ++ (show n) ++ ++ s) main :: IO () main = catchDyn temp

Re: How to catch an exception

2003-07-21 Thread Ross Paterson
On Mon, Jul 21, 2003 at 02:12:02PM +0100, Bayley, Alistair wrote: module Main where import Control.Exception hiding (GHC.Prelude.catch) This hiding clause is illegal. But anyway what you want is import Prelude hiding (catch) import Control.Exception Prelude.catch only catches Haskell 98

Re: how implement a UArray with a ForeignPtr?

2003-07-19 Thread Ross Paterson
On Sat, Jul 19, 2003 at 08:17:10AM -0400, David Roundy wrote: Hello. I was wondering if there might be any relatively simple way to implement a type equivalent to UArray, but with the memory stored in a ForeignPtr? It seems like this would be a commonly useful situation, where you have a C

Re: infinite types

2003-07-16 Thread Ross Paterson
On Wed, Jul 16, 2003 at 02:01:36PM +0200, blaat blaat wrote: Sorry if this mail starts a new thread. I am not subscribed to haskell-cafe and am new to hotmail. Uhm, as far as the example goes. I was trying to define a small (shallow encoding of) a reactive systems language. Because I

Re: Arrow Classes

2003-07-10 Thread Ross Paterson
On Thu, Jul 10, 2003 at 02:00:37AM -0700, Ashley Yakeley wrote: In article [EMAIL PROTECTED], Ross Paterson [EMAIL PROTECTED] wrote: The point about symmetry is a fair one, but unfortunately the Haskell class system imposes a cost on fine-grained class hierarchies, It does

Re: Hugs Humor

2003-07-07 Thread Ross Paterson
On Mon, Jul 07, 2003 at 12:01:09PM +0200, Jerzy Karczmarczuk wrote: This is less a bug than a Nessie monster which haunts Hugs some centuries already, and on Internet the issue has been discussed at least 4 times. The old, experimental Gofer Prelude numeric functions were sometimes abominable,

Re: Hugs Humor

2003-07-07 Thread Ross Paterson
On Mon, Jul 07, 2003 at 01:09:53PM +0200, Wolfgang Jeltsch wrote: On Monday, 2003-07-07, 13:05, CEST, Ross Paterson wrote: In the case of 0.1::Rational, it shouldn't be using floating point. The Report says this means fromRational (1%10), i.e. 1%10. In which paragraph of the report

Re: Hugs Humor

2003-07-05 Thread Ross Paterson
On Sat, Jul 05, 2003 at 08:24:32PM +0100, Jon Fairbairn wrote: On 2003-07-05 at 19:43+0200 Steffen Mazanek wrote: a quit funny hugs session: Prelude 0.5::Rational 1 % 2 Prelude 0.1::Rational 13421773 % 134217728 Prelude 13421773/134217728 0.1 I do not know how this fraction

Re: List comprehensions

2003-01-30 Thread Ross Paterson
On Thu, Jan 30, 2003 at 11:41:49AM +0100, Rijk J. C. van Haaften wrote: Recently, I came accross this expression: [ x + y | x - xs | y - ys ] As far as I can see (Haskell Report), this is not allowed by the haskell 98 standard. So I assume it to be an ex- tension. Where can I find

Re: A newbie question about Arrows.

2003-01-07 Thread Ross Paterson
On Tue, Jan 07, 2003 at 06:22:53PM +0100, Nicolas.Oury wrote: I may be totally wrong, but I read in Hughes paper than in Stream Processors, Either is more a product than (,) . It could be interesting to parameter the arrow by product, in order than the multiplexing is done using this product

Re: A newbie question about Arrows.

2003-01-06 Thread Ross Paterson
On Mon, Jan 06, 2003 at 11:02:32AM +0100, Nicolas Oury wrote: * Why is made the choice to use (,) as Cartesian in first? It's certainly possible to define a more general interface, and the theoretical work does. However the arrow interface is already very general, and the question is whether

H98 copyright notice

2002-11-08 Thread Ross Paterson
The new copyright notice is inconsistent. If it is not otherwise changed, I suggest that the first clause, The publisher intends this Report to belong to the entire Haskell community, ... be deleted. Maybe the word belong could be replaced with be available, but that doesn't seem completely

Re: question about 'sort' algorithm

2002-10-02 Thread Ross Paterson
On Wed, Oct 02, 2002 at 07:01:50AM -0400, David Roundy wrote: I was wondering if anyone knows what sort of algorithm the 'sort' function in the List module actually uses? In The Haskell 98 Library Report, they give an insertion sort implementation, but I find it hard to believe that the

preprocessors [was Re: syntax...(strings/interpolation/here docs)]

2002-02-14 Thread Ross Paterson
On Wed, Feb 13, 2002 at 08:42:09AM -0800, Jeffrey R Lewis wrote: The point about same support in all implementations is of course a good one. Thomas and I are the culprits who put here docs in hugs in the first place. However, it is just as easy to support here docs using a pre-processor.

Re: [off-topic] LaTex for [[ ... ]]

2001-06-01 Thread Ross Paterson
On Fri, Jun 01, 2001 at 12:41:05PM -0400, Ken Shan wrote: On 2001-06-01T08:41:34-0700, Andrew Moran wrote: There's also \llbracket and \rrbracket, from stmaryrd. They look better than the negative space hack, IMHO (now all I need is for Alan Jeffrey to write in and say that

<    1   2   3   4