This good long thread prompted Don and I to take a look at the darcs
source (this is current darcs-unstable). You can get the darcs source
at:
darcs get http://abridgegame.org/repos/darcs-unstable
Here are some data points (without interpretation):
In impossible.h we have the definitions:
import Bug ( bug )
#define impossible (bug $ "Impossible case at "++__FILE__++":"++show
(__LINE__ :: Int)++" compiled "++__TIME__++" "++__DATE__)
#define fromJust (\m_fromJust_funny_name -> case m_fromJust_funny_name
of {Nothing -> bug ("fromJust error at "++__FILE__++":"++show
(__LINE__ :: Int)++" compiled "++__TIME__++" "++__DATE__); Just x ->
x})
The second definition gives bug reports like the following:
fromJust error at Push.lhs:136 compiled 11:51:58 Jun 16 2006
Please report this to [EMAIL PROTECTED],
If possible include the output of 'darcs --exact-version'.
To see at a glance the various bug reports about fromJust you can
search the bug database:
http://bugs.darcs.net/[EMAIL
PROTECTED]&@sort=activity&@group=priority&@search_text=fromJust
I count 7 bugs.
Some other datapoints:
$ grep fromJust *.lhs *.hs | wc -l
101
$ grep fromMaybe *.lhs *.hs | wc -l
7
$ grep maybe *.lhs *.hs | wc -l
120
I would be interested to see the results of static analysis tools
(Catch?) or applying Oleg's strategy. Any volunteers?
thanks!
Jason
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe