diff --git a/source/library/Language/Haskell/Brittany/Internal/SplitExactModule.hs b/source/library/Language/Haskell/Brittany/Internal/SplitExactModule.hs index c2cdccf..9f1e64b 100644 --- a/source/library/Language/Haskell/Brittany/Internal/SplitExactModule.hs +++ b/source/library/Language/Haskell/Brittany/Internal/SplitExactModule.hs @@ -352,7 +352,8 @@ groupifyImportLines ls = finalToList_ $ go (PartialCommsOnly []) ls finalYield $ NewlineComment comm PartialImport partialRecord -> finalYield $ ImportStatement $ unpartial partialRecord - go acc (line1 : lineR) = do + go acc (EmptyLines 0 : lineR) = go acc lineR + go acc (line1 : lineR) = do newAcc <- case acc of PartialCommsOnly comms -> case line1 of e@EmptyLines{} -> do