find module of `fromJust Nothing'
Simon Peyton-Jones
simonpj at microsoft.com
Mon Nov 13 07:17:07 EST 2006
The "Maybe.fromJust: Nothing" comes from the library code itself.
The "Nat1" part is simply the name of the binary. It give no clue to who called fromJust.
Finding who called fromJust is an often-requested feature eg http://hackage.haskell.org/trac/ghc/ticket/960
. Currently our best answer is to try with the -xc flag (involves recompiling)
The Haskellwiki debugging page could perhaps mention the -xc thing. I had trouble even finding the page from the Haskell.org home page. http://haskell.org/haskellwiki/Debugging
Simon
| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-bounces at haskell.org]
| On Behalf Of Serge D. Mechveliani
| Sent: 13 November 2006 11:21
| To: glasgow-haskell-users at haskell.org
| Subject: find module of `fromJust Nothing'
|
| Who can advise, please, about an error message
| Nat1: Maybe.fromJust: Nothing
| ?
|
| Probably, this is a bug in my program, and first, I need to locate it.
| The head test module is Nat1.hs. The output is
|
| --------------------------------------------------------------------
| ...
| ...
|
| --(ProofSearchState ----------------------------------
| tree =
| (formula1 Any
| [(1, NegCp (spent cost 1283),
| (formula1 Any []))
| (2, ArC fromList [(n,n_c)],
| (formula6 Any
| [(1, NegCp (spent cost 683),
| (formula6 Any []))]))
| (3, Ind n,
| (formula1
| [(1, IndMember,
| Nat1: Maybe.fromJust: Nothing
| -----------------------------------------------------------------------
|
| -- and break.
| By the last line GHC says, probably, that executing the module Nat1
| caused the call of `fromJust Nothing'.
|
| And Nat1.hs does not contain any call of fromJust, neither even the
| substring of "fromJust".
| Nat1 imports many other modules.
| Why GHC does not mention some other module from which this
| `fromJust Nothing' has directly appeared?
|
| Thank you in advance for your explanations,
|
| -----------------
| Serge Mechveliani
| mechvel at botik.ru
|
|
|
|
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
More information about the Glasgow-haskell-users
mailing list