#7539: Hard ghc api crash when calling runStmt on code which has not been 
compiled
---------------------------------+------------------------------------------
    Reporter:  edsko             |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.6.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by edsko):

 In the layer around GHC we allow enabling or disabling code generation
 (i.e., type check only). When disabled, we set `{ hscTarget = HscNothing,
 ghcLink = NoLink }`. If then later the code is tried to run anyway, the
 above crash can arise. (We guard against this at our layer now, but it
 would still be nice if ghc would give us an error message rather than
 segfault when we make a mistake).

 So, yes, I agree, a check and an error message will suffice.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7539#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to