MonadIO needs catch?

2003-01-27 Thread John Meacham
while genericizing my utility libraries to work within any MonadIO (http://haskell.cs.yale.edu/ghc/docs/latest/html/base/Control.Monad.Trans.html) I ran into a problem, 'liftIO' is not powerful enough to catch exceptions in a MonadIO. the closest one can get is > genCatch :: MonadIO m => IO a ->

Re: Binary I/O in haskell.

2003-01-27 Thread John Meacham
If you dont want to wait for libraries in development, the easiest way to do real binary IO is via hGetArray and hPutArray which let you get and put raw arrays of bytes (Word8). unfortunatly, there is no way to do binary IO in pure Haskell 98. http://haskell.cs.yale.edu/ghc/docs/latest/html/base/

Re: Bizarre Haskell Problem

2003-01-27 Thread Daan Leijen
My guess is that you are having an out-of-date .o of .hi file in your working directory. Clean it up and try again. All the best, Daan. - Original Message - From: "Matthew Donadio" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 27, 2003 10:34 PM Subject: Bizarre Has

Bizarre Haskell Problem

2003-01-27 Thread Matthew Donadio
Hi all, I am currently a having a bizarre Haskell problem, and was wondering if anyone had any suggestions. This is a snippet from a source file: > foo n = [ a ^* i | i <- [0..(n-2)] ] > where i ^* j = (i ^ j) `mod` n > a = generator n > rader :: Array Int (Complex Double) -> Int

WFLP'03 - First Call for Papers

2003-01-27 Thread German Vidal
== PRELIMINARY CALL FOR PAPERS WFLP 2003 12th Int'l Workshop on Functional and (Constraint) Logic Programming June 12-13, 2003, Valencia (Spain) http://www.dsic.upv.es/~rdp03/wflp/ ==

RE: seeking ideas for short lecture on type classes

2003-01-27 Thread Mark P Jones
Hi Norman, | [looking for papers about type classes ...] | * Of all the many articles on the topic, which few might you | recommend for beginners? I wonder if my notes on "Functional Programming with Overloading and Higher-Order Polymorphism" will be useful? You can find them at: ht

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Norman Ramsey
Now that I have made it abundantly clear that my understanding of type classes is highly imperfect, perhaps I will repeat my plea: * Can you recommend any interesting, elementary examples? * Of all the many articles on the topic, which few might you recommend for beginners? Would Faxen's

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Dylan Thurston
On Mon, Jan 27, 2003 at 12:25:52PM +0200, Lauri Alanko wrote: > On Mon, Jan 27, 2003 at 08:37:06PM +1100, Fergus Henderson wrote: > > I agree. The above characterization is highly misleading. It would be > > more accurate and informative to say that both Haskell and OO languages > > dispatch on t

Re: existential typing question

2003-01-27 Thread Dean Herington
Consider: class RT r t where rt :: r -> t data D t = Dt t | forall r. RT r t => Dr r f1 :: D t -> D t f1 (Dr r) = Dt (rt r) f2 :: D t -> D t f2 = g where g :: D t -> D t g (Dr r) = Dt (rt r) Your explanation well justifies the need for `f1`'s type declaration. But I still don't unders

ANNOUNCE: Helium, for learning Haskell

2003-01-27 Thread Arjan van IJzendoorn
=== Helium (for learning Haskell) 1.0 === We are pleased to announce the first public release of the Helium system, consisting of a language, compiler and interpreter designed especially for education in functional programmi

Binary I/O in haskell.

2003-01-27 Thread Immanuel Litzroth
I am currently writing a small sound/dsp application in haskell, and I am having some problems deciding on the best way to do I/O from soundfiles. I am currently only implementing raw data input, and I am looking for code examples that demonstrate the best way(s) to implement reading in and process

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Lauri Alanko
On Mon, Jan 27, 2003 at 08:37:06PM +1100, Fergus Henderson wrote: > I agree. The above characterization is highly misleading. It would be > more accurate and informative to say that both Haskell and OO languages > dispatch on the dynamic type of a value. What is the "dynamic type of a value" in

announce: buddha 0.4, a declarative debugger for Haskell 98

2003-01-27 Thread Bernard James POPE
Hi all, Buddha version 0.4 is now available. It is a declarative debugger for Haskell 98 programs. It supports most of the language and standard libraries. Currently it requires ghc 5.04 or greater, and has only been tested on unix-ish machines. Documentation and source code are available here:

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Fergus Henderson
On 26-Jan-2003, Norman Ramsey <[EMAIL PROTECTED]> wrote: > > > In a fit of madness, I have agreed to deliver a 50-minute lecture > > > on type classes to an audience of undergraduate students. These > > > students will have seen some simple typing rules for F2 and will > > > have some exposure

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Fergus Henderson
On 24-Jan-2003, Norman Ramsey <[EMAIL PROTECTED]> wrote: > In a fit of madness, I have agreed to deliver a 50-minute lecture > on type classes to an audience of undergraduate students. These > students will have seen some simple typing rules for F2 and will > have some exposure to Hindley-Milner t

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Fergus Henderson
On 26-Jan-2003, Dean Herington <[EMAIL PROTECTED]> wrote: > On Sun, 26 Jan 2003, Norman Ramsey wrote: > > > A fact that I know but don't understand the implication of is that > > Haskell dispatches on the static type of a value, whereas OO languages > > dispatch on the dynamic type of a value. Bu

Re: seeking ideas for short lecture on type classes

2003-01-27 Thread Fergus Henderson
On 26-Jan-2003, John H?rnkvist <[EMAIL PROTECTED]> wrote: > > On Saturday, January 25, 2003, at 04:14 AM, Andrew J Bromage wrote: > > >G'day all. > > > >On Fri, Jan 24, 2003 at 06:13:29PM -0500, Norman Ramsey wrote: > > > >>In a fit of madness, I have agreed to deliver a 50-minute lecture > >>on