Handle haddock headers when looking for LANGUAGE/OPTIONS_GHC pragmas
[ghc-hetmet.git] / compiler / parser / Lexer.x
index 4ce8304..fdf4bdd 100644 (file)
@@ -285,7 +285,7 @@ $tab+         { warn Opt_WarnTabs (text "Tab character") }
 
 -- Haddock comments
 
-<0> {
+<0,option_prags> {
   "-- " $docsym      / { ifExtension haddockEnabled } { multiline_doc_comment }
   "{-" \ ? $docsym   / { ifExtension haddockEnabled } { nested_doc_comment }
 }