#2116: ghci should try to read erroneous modules partially
-----------------------------+----------------------------------------------
 Reporter:  j.waldmann       |          Owner:             
     Type:  feature request  |         Status:  reopened   
 Priority:  normal           |      Milestone:  6.10 branch
Component:  Compiler         |        Version:  6.8.2      
 Severity:  normal           |     Resolution:             
 Keywords:                   |     Difficulty:  Unknown    
 Testcase:                   |   Architecture:  Unknown    
       Os:  Unknown          |  
-----------------------------+----------------------------------------------
Changes (by claus):

 * cc: claus (added)

Comment:

 i don't know whether type errors can be caught locally, without ghci
 losing its place during load, but if yes, one could try to replace each
 erroneous definition with calls to error:
 {{{
 f x = x+True
 }}}
 might become
 {{{
 f x = error "No instance for (Num Bool)
 arising from a use of `+' at <interactive>:1:10-15
 Possible fix: add an instance declaration for (Num Bool)
 In the expression: x + True
 In the definition of `f': f x = x + True"
 }}}
 while trying to continue loading the rest of the module (which should be
 marked as partially loaded).
 does that sound plausible?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2116#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to