MBR04 call for papers

2003-11-16 Thread Lorenzo Magnani
** MODEL-BASED REASONING IN SCIENCE AND ENGINEERING ABDUCTION, VISUALIZATION, AND SIMULATION MBR'04 Pavia, Italy, December 16-18, 2004 Chairs: Lorenzo Magnani and N

How to best add logging/debugging code?

2003-11-16 Thread Ben Escoto
Hi all, does anyone have any tips on how to insert debugging or logging statements through a program? Here are two possibilities: 1. Use some kind of logging monad. But then all your types become more complicated and it seems you have to use lots of ->'s and >>='s instead of ordinary fu

Re: How to best add logging/debugging code?

2003-11-16 Thread ketil+haskell
Ben Escoto <[EMAIL PROTECTED]> writes: > Hi all, does anyone have any tips on how to insert debugging or > logging statements through a program? > 1. Use some kind of logging monad. > 2. Use unsafePerformIO or similar. > It seems this must come up a lot when writing Haskell programs. What >

Re: How to best add logging/debugging code?

2003-11-16 Thread Peter Simons
Ben Escoto writes: > 1. Use some kind of logging monad. This is definitely the way to go. The 'MonadWriter' class provides a very general interface, which often proves to be much more useful than just for logging. Especially, when you use it to return data types with useful information -- rathe

Re: How to best add logging/debugging code?

2003-11-16 Thread Manuel M T Chakravarty
Ben Escoto <[EMAIL PROTECTED]> wrote, > Hi all, does anyone have any tips on how to insert debugging or > logging statements through a program? Here are two possibilities: [..] > 2. Use unsafePerformIO or similar. But then your code is regularly > defeating the type system, which presumably

Implementation of while loop

2003-11-16 Thread r2yang
Hi,does any one knows how to implement while-do loop or nested while-do loop? I'm in a situation that I need to implement nested while do loop with some if- then-else condition in my code,but I have no idea about it.Thanks. Ray This mail sent through ww

Re: How to best add logging/debugging code?

2003-11-16 Thread Ben Escoto
On 16 Nov 2003 22:43:55 +0100 Peter Simons <[EMAIL PROTECTED]> wrote: > This is definitely the way to go. The 'MonadWriter' class > provides a very general interface, which often proves to be > much more useful than just for logging. Especially, when you > use it to return data types with useful in