[GHC] #1363: Sourcing multi-line scripts in GHCi: track line numbers, and bail out after first error

GHC cvs-ghc at haskell.org
Mon Oct 25 00:15:01 EDT 2010


#1363: Sourcing multi-line scripts in GHCi: track line numbers, and bail out after
first error
---------------------------------+------------------------------------------
    Reporter:  Frederik          |        Owner:  vivian                    
        Type:  feature request   |       Status:  new                       
    Priority:  normal            |    Milestone:  _|_                       
   Component:  GHCi              |      Version:  6.6                       
    Keywords:  multiline script  |     Testcase:                            
   Blockedby:                    |   Difficulty:  Moderate (less than a day)
          Os:  Unknown/Multiple  |     Blocking:                            
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown              
---------------------------------+------------------------------------------
Changes (by vivian):

  * owner:  => vivian


Comment:

 I've discovered that `GHCiState` already stores the `progname` but does
 not use it when generating a source location for parsing/evaluating
 statements.  Instead `<interactive>` is hard-coded in `hscParseThing`.  I
 have updated the code to use `progname` in the source location so that
 scripts can set `progname` to the file name being loaded.

 Also, I have updated the specification of `:script [n] <filename>` in that
 the optional integer is the line number after which to stop, nothing
 fancier.

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


More information about the Glasgow-haskell-bugs mailing list