
14 Nov
2006
14 Nov
'06
5:57 a.m.
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 is free of bugs. Then, instead of f x = h $ fromJust $ g x one needs too write f x = case g x of Just y -> h y _ -> error $ concat ["Foo.f ", shows x "\n:\nImpossible happened:\n", "g ", shows x " = Nothing.\n" ] ----------------- Serge Mechveliani mechvel@botik.ru