When creating either a Lexer.x
or a Parser.y
parser using the Alex lexer generator or the Happy parser generator, compiling those into Haskell files, and compiling those into object files, by default this will generate the following "warnings":
$ ghc Lexer
line-map.c: file "<command-line>" left but not entered
line-map.c: file "<command-line>" left but not entered
[1 of 1] Compiling Lexer ( Lexer.hs, Lexer.o )
$ happy Parser.y
$ ghc Parser
line-map.c: file "<command-line>" left but not entered
line-map.c: file "<command-line>" left but not entered
[2 of 2] Compiling Parser ( Parser.hs, Parser.o )
Those lines occur as a result of the following lines embedded in the generated .hs
files:
{-# LINE 1 "<command-line>" #-}
Why are those lines included, and is there a way to suppress those messages in case the command-line is not apparently used for anything in the generated lexer and parser?