
14 Nov
2006
14 Nov
'06
7:10 a.m.
More about finding the source of fromJust Nothing. For g n = fromJust $ f n, ghc-6.6 often looses the reference to f in its run-time error report -- when f returns Nothing. And this is difficult to locate the source. But one could write g n = let Just m = f n in m, for which GHC reports Main: M1.hs:9:11-22: Irrefutable pattern failed for pattern Data.Maybe.Just m -- it points to the source line! ----------------- Serge Mechveliani mechvel@botik.ru
6763
Age (days ago)
6763
Last active (days ago)
0 comments
1 participants
participants (1)
-
Serge D. Mechveliani