I am working through some ghc-exactprint test cases with GHC 9.2.1 and came
across an oddity.

If I parse some source with

{-# LINE 93 "Foo.chs" #-}

on line five, it shows up in the ParseSource as

(L
  (Anchor
   { LINE:5:1-25 }
   (UnchangedAnchor))
  (EpaComment
   (EpaLineComment
    "{-# LINE 93 \"Foo.chs\" #-}")
   { LINE:5:1-25 }))

and the following item locations are unchanged.

The effect seems to be to change the name of the file in the RealSrcSpan to
"LINE", but just for that line, and no other effect.

Is this expected?

Alan
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to