Re: [Haskell-cafe] Functional Programming lecture on video

2005-07-24 Thread Carsten Otto
The lecture excercises can be downloaded from following homepage. The lecture notes are not available, but the difference between the written word in the notes and the spoken word in the lecture is minimal. http://www-i2.informatik.rwth-aachen.de/lufgi2/fp05/ The last two lectures will be digital

Re: [Haskell-cafe] Newbie Question about Error Handling

2005-07-24 Thread Andrew Pimlott
On Sun, Jul 24, 2005 at 08:00:58PM +, Gerd M wrote: > Hello! > I'm confused by the error handling in Haskell. I've written a program that > uses a combined monad of type: > type MyMonad a = ErrorT MyErrorType (StateT MyStateType IO) a > (MyErrorType is an instance of Error) > > Therefore, to

[Haskell-cafe] Newbie Question about Error Handling

2005-07-24 Thread Gerd M
Hello! I'm confused by the error handling in Haskell. I've written a program that uses a combined monad of type: type MyMonad a = ErrorT MyErrorType (StateT MyStateType IO) a (MyErrorType is an instance of Error) Therefore, to handle IO Errors inside of MyMonad I need to write: foo :: MyMonad a

Re: [Haskell-cafe] Best way to build strings?

2005-07-24 Thread Jonathan Cast
Jonathan Cast <[EMAIL PROTECTED]> wrote: > Albert Lai <[EMAIL PROTECTED]> wrote: > > > The best of both worlds may be something like the notation in the HOL > > theorem prover: > > > > ``^q ^a ^z [^m -> ^k |^p| ^g -> ^c] ^h ^b ^f ^i`` > > > > Do you agree that this is much better? > > > > Coul

Re: [Haskell-cafe] Best way to build strings?

2005-07-24 Thread Jonathan Cast
Albert Lai <[EMAIL PROTECTED]> wrote: > I wish to toss out a new thought. To that end let me blow up the > example to underline a scalability issue: > > A. q ++ " " ++ a ++ " " ++ z ++ " [" ++ m ++ " -> " ++ k ++ " |" ++ p ++ "| " >++ g ++ " -> " ++ c ++ "] " ++ h ++ " " ++ b ++ " " ++

Re: [Haskell-cafe] Re: Lists vs. Monads

2005-07-24 Thread Jonathan Cast
[EMAIL PROTECTED] wrote: > Jonathan Cast wrote: > ] OK. Right. I forgot about the Church encoding. > > I'm afraid just using Church encoding in the typed setting without any > recursive datatypes whatsoever may be problematic. OK. Wrong terminology on my part. Sorry. I am afraid in any ca

Re: [Haskell-cafe] Best way to build strings?

2005-07-24 Thread Vadim Konovalov
I wish to toss out a new thought. To that end let me blow up the example to underline a scalability issue: A. q ++ " " ++ a ++ " " ++ z ++ " [" ++ m ++ " -> " ++ k ++ " |" ++ p ++ "| " ++ g ++ " -> " ++ c ++ "] " ++ h ++ " " ++ b ++ " " ++ f ++ " " ++ i B. printf "%s %s %s [%s -> %s |%s| %s