We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managed
Currently Language.Spectacle.Interaction.Options uses a file Handle to write model checker logs to a file if the user provides an output path with --output/-o and is subsequently closed when CLI is completed in Language.Spectacle.Interaction.CLI.
Handle
--output
-o
Manually managing this handle is error-prone. @ixmatus noted using the Managed monad to handle cleanup of file Handles would be an improvement.
The text was updated successfully, but these errors were encountered:
Some other ideas to consider:
Follow the withFile style instead of openFile:
withFile
openFile
-handleFrom :: OutputOpt -> IO Handle +withHandleFrom :: OutputOpt -> (Handle -> IO a) -> IO a
resourcet is similar to managed, but it lets you free resources early (managed holds onto resources until you leave the Managed monad).
resourcet
managed
Sorry, something went wrong.
ixmatus
No branches or pull requests
Currently Language.Spectacle.Interaction.Options uses a file
Handle
to write model checker logs to a file if the user provides an output path with--output
/-o
and is subsequently closed when CLI is completed in Language.Spectacle.Interaction.CLI.Manually managing this handle is error-prone. @ixmatus noted using the
Managed
monad to handle cleanup of fileHandle
s would be an improvement.The text was updated successfully, but these errors were encountered: