Re: [Haskell] Mixing monadic and non-monadic functions

2004-03-23 Thread Max Kirillov
On Tue, Mar 23, 2004 at 10:29:26AM -0500, Sean E. Russell wrote: Here's my base case: someFunc :: String - IO [a] ... ax - someFunc a bx - someFunc b assertBool fail $ length ax == length bx ...What I'd much rather have is:

Re: optimization question

2004-02-23 Thread Max Kirillov
On Sun, Feb 22, 2004 at 12:20:35AM -0800, John Meacham wrote: case x of foo - Foo bar - Bar fuzz - Fuzz fuzo - Fuzo x - other .. thing The reason I ask is I am writing someting which will generate large case statements like the first form and want

Re: Read and Write to Same File

2003-10-06 Thread Max Kirillov
On Sun, Oct 05, 2003 at 11:37:16AM +0200, Tomasz Zielonka wrote: On Sun, Oct 05, 2003 at 04:25:41AM -, [EMAIL PROTECTED] wrote: 2. main = do text - readFile test let something = somefunc text writeFile test $! something Are both of these correct (guaranteed to give

package name mismatch

2002-07-13 Thread Max Kirillov
Hello! Building htk, I've got an error: TestGetPut.hs:6: Module `GetPut' is located in package `Main' but its interface file claims it is part of package `uni-events-test' It happened (as far as I got) when ghc saw in current path the *.hi file built for installation. There are

Re: readFloat

2002-05-31 Thread Max Kirillov
So why one might need it? I've never used Rational, but, if asked, I would say that they are for exact representation of numbers (some symbolic calcs). On the other side, 'real' dotted numbers always represent some real values with finite accuracy. That's look like a bad idea to me to call

Re: Hugs plugin, Haskell Browser

2002-03-15 Thread Max Kirillov
On Thu, Mar 14, 2002 at 07:29:13PM +, C.Reinke wrote: 2. When I hear translate to HTML I imagine that underlined words which can be clicked to see, say, definition of function. Sadly, most htmlizers are focused on highlighting rather than navigation. Why generate HTML pages if noone

Re: Hugs plugin, Haskell Browser

2002-03-14 Thread Max Kirillov
On Thu, Mar 14, 2002 at 03:05:34PM +1100, Manuel M. T. Chakravarty wrote: Again, XEmacs with the above mentioned Haskell mode can do it. Just execute the function `htmlize-buffer' on a buffer containing the Haskell source. As an example for the generated output, have a look at

Re: Ground Up

2002-03-03 Thread Max Kirillov
You're right with this (and the rest too). In did not pretend to play an expert. I just shared my impression. Anyway, I think there are many reasons to learn functional programming first, and then haskell as an implementation. Max. On Fri, Mar 01, 2002 at 12:47:34AM -0800, Simon Peyton-Jones

Re: Ground Up

2002-02-28 Thread Max Kirillov
Hi! I'm far not an expert in Haskell, but I'll venture to say I'm in. I'm not an CS student and I have never been (I learned Solid State Physics). I became there in about 6 months without paying a cent. Well, I paid for dialup. I also spent a lot of time. My wife should hate Haskell. I would

Re: What isn't possible with Finite Maps, and should be.

2001-11-08 Thread Max Kirillov
On Thu, Nov 08, 2001 at 11:48:44PM +0100, George Russell wrote: In any case it looks fairly simple to write. If only I were set up to be able to compile GHC I could write the necessary code myself . . . There's no need to rebuild the entire ghc system to hack the data package. You onky need

Re: Vim syntax files for .lhs files using \begin{code} and \end{code}

2001-10-30 Thread Max Kirillov
Hi. That's my hacked syntax files Max. On Tue, Oct 30, 2001 at 02:22:07PM +, Nicholas Nethercote wrote: Hi, The Vim syntax file for literate Haskell programs handles code lines that begin with a '' character fine. But in GHC much of the code is defined between \begin{code} and

Re: Enum class

2001-10-23 Thread Max Kirillov
On Tue, Oct 23, 2001 at 12:27:37PM +0200, Ch. A. Herrmann wrote: Removing them would possibly cause problems with existing programs and this is definitely not my aim. However, it'll make sense to think about long-term improvements. I wouldn't call Float and Double enumeration types. Maybe,

Re: IO concurrency

2001-10-17 Thread Max Kirillov
I didn't try ghc-5.02 since I haven't installed it yet. Could you do that? The IO library in 5.00.2 had a bug in fdToHandle which meant that it didn't put the file descriptor into non-blocking mode, and I suspect this is the cause of your problem. It works. Thank you. Max.

Re: IO concurrency

2001-10-15 Thread Max Kirillov
On Mon, Oct 15, 2001 at 04:47:25PM +0100, Simon Marlow wrote: I tried this here on Linux/x86 with 5.02 and it seems to work fine. Instead of the tcl/tk script you mentioned I used a FIFO in /tmp/fifo and made the runProcess just call cat /tmp/fifo. Which GHC version and platform is this on?