resolve compiler warnings

This commit is contained in:
Willem van den Ende 2026-04-30 17:33:27 +01:00
parent 9dd9313829
commit 8abe1d1bc2

View File

@ -13,7 +13,7 @@ import Docster.Types
( DocsterError(..), OutputFormat(..), SourceDir(..), OutputDir(..), OutputPath(..) ( DocsterError(..), OutputFormat(..), SourceDir(..), OutputDir(..), OutputPath(..)
, DiagramConfig(..), computeOutputDir, ensureOutputDir , DiagramConfig(..), computeOutputDir, ensureOutputDir
) )
import Text.Pandoc.Writers (writeDocx) import Text.Pandoc.Writers ()
import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy as BSL
import Docster.Transform (transformDocument) import Docster.Transform (transformDocument)
import Docster.LaTeX (latexTemplate) import Docster.LaTeX (latexTemplate)
@ -275,7 +275,7 @@ generateOutputM pandoc = do
if writesFile if writesFile
then do then do
outputPath <- asks ccOutputPath outputPath <- asks ccOutputPath
liftIO $ generateOutputFile strategy outputPath pandoc _ <- liftIO $ generateOutputFile strategy outputPath pandoc
return "" -- placeholder, won't be used return "" -- placeholder, won't be used
else liftEitherM $ generateOutput strategy pandoc else liftEitherM $ generateOutput strategy pandoc
@ -328,7 +328,7 @@ generateOutput strategy transformed = do
-- | Generate output file directly (for DOCX which writes to file) -- | Generate output file directly (for DOCX which writes to file)
generateOutputFile :: CompilationStrategy -> FilePath -> Pandoc -> IO (Either DocsterError ()) generateOutputFile :: CompilationStrategy -> FilePath -> Pandoc -> IO (Either DocsterError ())
generateOutputFile strategy outputPath pandoc = do generateOutputFile _ outputPath pandoc = do
result <- runIO $ writeDocx def pandoc result <- runIO $ writeDocx def pandoc
case result of case result of
Left err -> return $ Left $ FileError $ "DOCX generation failed: " <> T.pack (show err) Left err -> return $ Left $ FileError $ "DOCX generation failed: " <> T.pack (show err)