diff --git a/rzk/src/Rzk/Format.hs b/rzk/src/Rzk/Format.hs index 2ba6a9f7d..2afd32aa6 100644 --- a/rzk/src/Rzk/Format.hs +++ b/rzk/src/Rzk/Format.hs @@ -294,7 +294,9 @@ format = applyTextEdits =<< formatTextEdits -- | Format Rzk code from a file formatFile :: FilePath -> IO String -formatFile path = format <$> readFile path +formatFile path = do + contents <- T.readFile path + return (format (T.unpack contents)) -- | Format the file and write the result back to the file. formatFileWrite :: FilePath -> IO ()