#314: #line pragmas not respected inside nested comments
--------------------------------+-------------------------------------------
  Reporter:  nobody             |          Owner:                  
      Type:  bug                |         Status:  new             
  Priority:  low                |      Milestone:  _|_             
 Component:  Compiler (Parser)  |        Version:  6.4             
Resolution:  None               |       Keywords:                  
        Os:  Unknown/Multiple   |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown       |     Difficulty:  Unknown         
  Testcase:  read032            |      Blockedby:                  
  Blocking:                     |        Related:                  
--------------------------------+-------------------------------------------
Changes (by orenbenkiki):

  * failure:  => None/Unknown


Comment:

 It seems this bug is related to another symptom which affects re-
 compilation. The issue is as follows. Suppose a Module.hs file contains
 the following lines:

 {{{
 {-
 #include "included"
 -}
 }}}

 Then, if the {{{included}}} file contains:

 {{{
 -}
 compiled stuff
 {-
 }}}

 Then {{{ghc --make}}} will correctly re-compile the {{{Module}}} if the
 {{{included}}} file is modified. However, if the {{{included}}} file
 contains:

 {{{
 comment stuff
 }}}

 Then {{{ghc --make}}} will ''not'' re-compile the {{{Module}}} if the
 {{{included}}} file is modified. If the file is changed to include
 compiled code, then {{{ghc --make}}} will produce incorrect results.

 I have encountered this problem while playing around with {{{{-# #include
 #-}}}} as a poor man's replacement to the proposed {{{{-# DEPENDS #-}}}}.
 Simon Marlow suggested that the problem is related to bug 314 and that it
 should be re-evaluated given it affects re-compilation (and not only line
 numbers).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/314#comment:8>
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