[Haskell-cafe] Arbitrary files in a Cabal package: how to install

2005-07-24 Thread Dimitry Golubovsky
I am trying to use Cabal for buiding HSFFIG as a package. Among other files to install I have the special template for hsc2hs which is a C include file. If I specify it in the Includes: clause nothing happens: it is not copied anywhere during installation. I need this file to be placed

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 - %s] %s %s %s %s q a z m

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

2005-07-24 Thread Jonathan Cast
[EMAIL PROTECTED] wrote: snip 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

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

2005-07-24 Thread Jonathan Cast
Albert Lai [EMAIL PROTECTED] wrote: snip 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

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

2005-07-24 Thread Jonathan Cast
Jonathan Cast [EMAIL PROTECTED] wrote: Albert Lai [EMAIL PROTECTED] wrote: snip 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? Could someone implement

[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

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 handle