Re: fromJust Nothing problem

2006-11-15 Thread Serge D. Mechveliani
On Tue, Nov 14, 2006 at 05:28:22PM +, Simon Peyton-Jones wrote: Both of these messages (from Neil and Serge) suggest use debugging ideas. Would anyone like to add them to http://haskell.org/haskellwiki/Debugging [..] How can I put it there? It needs login. I do not know,

Re: fromJust Nothing problem

2006-11-14 Thread Jon Fairbairn
On 2006-11-14 at 13:57+0300 Serge D. Mechveliani wrote: Thanks to people who discussed the question of who said `fromJust Nothing' and -xc option. My last impression is that instead of using -xc it is better to write programs in a debug-friendly style. For example, let g x must

fromJust Nothing problem

2006-11-14 Thread Serge D. Mechveliani
Thanks to people who discussed the question of who said `fromJust Nothing' and -xc option. My last impression is that instead of using -xc it is better to write programs in a debug-friendly style. For example, let g x must return (Just _), but the programmer is not 100% sure that g x

Re: fromJust Nothing problem

2006-11-14 Thread Serge D. Mechveliani
On Tue, Nov 14, 2006 at 12:08:07PM +, Jon Fairbairn wrote: [..] My last impression is that instead of using -xc it is better to write programs in a debug-friendly style. For example, let g x must return (Just _), but the programmer is not 100% sure that g x is free of bugs.

Re: fromJust Nothing problem

2006-11-14 Thread Neil Mitchell
Hi My last impression is that instead of using -xc it is better to write programs in a debug-friendly style. For example, let g x must return (Just _), but the programmer is not 100% sure that g x is free of bugs. Then, instead of f x = h $ fromJust $ g x one

RE: fromJust Nothing problem

2006-11-14 Thread Simon Peyton-Jones
Both of these messages (from Neil and Serge) suggest use debugging ideas. Would anyone like to add them to http://haskell.org/haskellwiki/Debugging Simon | Use a safe module: | http://neilmitchell.blogspot.com/2006/11/library-idea-safe-library.html | - always works, a little bit of

Re: fromJust Nothing problem

2006-11-14 Thread Donald Bruce Stewart
ndmitchell: Hi My last impression is that instead of using -xc it is better to write programs in a debug-friendly style. For example, let g x must return (Just _), but the programmer is not 100% sure that g x is free of bugs. Then, instead of f x = h $