Hi,
 
thx for this reply.
 
Is there any overhead using this mutable?
 
Are you also using Templates ?
 
With this mutable I can adapt a lot of software from Ocamel.
 
But the gnawing question remains: Shall it be possible to be almost as efficient (in native code) as Ocamel's code, I refer here to Doug Bagley's comparison of programming languages. Remarkably the fibonacci numbers test scores almost as well. But the code is not the same. Comparable code would have been to use the same code of Ocamel, to be more specific: how efficiently is recusivity implemented in Haskell. I cannot compare this on my Windows XP since I need MSVC6.0 on this machine which I don't have. On the other hand I have cygwin installed now. Unfortunately I can't make makefiles. Probably on the web I can find an explanation. In this way I can recompile Ocamel with Cygwin and compare the results a bit.
There are also 5(?) failures of Haskell programms . Is there a flaw in these programms?
 
Thx
 
Scott
 
P.S. does anyone know a good Haskell  IDE for Windows XP?
----- Original Message -----
From: Iavor S. Diatchki
Cc: haskell-cafe@haskell.org
Sent: Monday, September 09, 2002 10:45 PM
Subject: Re: mutable records

hi,

> Is it possible to define parts of a record  with the help of the *ST s*
> monad *mutable* during the whole program? (As is possible in Ocamel)?

you can find an example of how to do that at:
http://icfpcontest.cse.ogi.edu/simulator/

look inside module Robo for example.  there you will find examples of
records with mutable fields and some useful functions to manipulate
them.  the state of the "objects" is not hidden so it is available for
anyone to modify.  to hide the state you could use fancy types as people
already pointed out, or you could use the Haskell module system.
unfortunatelly with the Haskell module system approach you soon run into
recursive modules (when objects depend on each other) and this is not
well supported by Haskell implementations at the moment.

bye
iavor

--
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe