@@ -15,7 +15,6 @@ where
1515import Control.Monad
1616import Data.Coerce (coerce)
1717import Data.Data (Data)
18−import Data.Maybe (isJust)
1918import Ormolu.CommentStream
2019import Ormolu.Printer.Internal
2120import Ormolu.Utils (isModule)
@@ -202,7 +201,10 @@ commentFollowsElt ref mnSpn meSpn mlastSpn (L l comment) =
202201 let startColumn = srcLocCol . realSrcSpanStart
203202 in abs (startColumn espn - startColumn l)
204203 >= abs (startColumn ref - startColumn l)
205− continuation = isJust mlastSpn
204+ continuation =
205+ case mlastSpn of
206+ Nothing -> False
207+ Just spn -> srcSpanEndLine spn + 1 == srcSpanStartLine l
206208
207209-- | Output a 'Comment'. This is a low-level printing function.
208210