Skip to content

Commit

Permalink
Make formatFile strict
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Dec 15, 2023
1 parent 20dfcc2 commit 3a2ddec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rzk/src/Rzk/Format.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down

0 comments on commit 3a2ddec

Please sign in to comment.