Merge from Haddock: allow blank lines inside code blocks
[ghc-hetmet.git] / compiler / parser / HaddockParse.y
index fd3f99d..ded4dbe 100644 (file)
@@ -1,9 +1,9 @@
 {
-{-# OPTIONS_GHC -w #-}
+{-# OPTIONS -w #-}
 -- The above warning supression flag is a temporary kludge.
 -- While working on this module you are encouraged to remove it and fix
 -- any warnings in the module. See
---     http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
 -- for details
 
 module HaddockParse (parseHaddockParagraphs, parseHaddockString) where
@@ -74,7 +74,8 @@ elem  :: { HsDoc RdrName }
        | '@' seq1 '@'          { DocMonospaced $2 }
 
 seq1   :: { HsDoc RdrName }
-       : elem1 seq1            { docAppend $1 $2 }
+       : PARA seq1             { docAppend (DocString "\n") $2 }
+       | elem1 seq1            { docAppend $1 $2 }
        | elem1                 { $1 }
 
 elem1  :: { HsDoc RdrName }