If you declare a pragma with underscore symbol then it will be translated in a code unreadable by pdflatex.
$ lhs2Tex --version
lhs2TeX 1.22, Copyright (C) 1997-2017 Ralf Hinze, Andres Loeh
lhs2TeX comes with ABSOLUTELY NO WARRANTY;
for details type `lhs2TeX --warranty'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `lhs2TeX --copying' for details.
$ cat Main.lhs
\documentclass{article}
%include polycode.fmt
\begin{document}
OK
> {-# LANGUAGE OverloadedStrings #-}
Not OK
> {-# OPTIONS_GHC -Wall #-}
\end{document}
Hello.
If you declare a pragma with underscore symbol then it will be translated in a code unreadable by pdflatex.
If you look at generated .tex file, then you'll see such line
Something is wrong with the underscore.