Skip to content

Add --censor switch for disabling source code display #1312

New issue

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

Merged
merged 3 commits into from
Sep 14, 2019
Merged

Conversation

Gabriella439
Copy link
Collaborator

Related to #1294

This currently only affects parse errors, but can later be extended
to type errors, too

Related to #1294

This currently only affects parse errors, but can later be extended
to type errors, too
Copy link
Collaborator

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give an example what the errors look like with --censor?

I suspect that this might elide more than is strictly required for #1294. But that can be addressed later on.


-- | Convenient utility for retrieving an expression
getExpression
:: Bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A dedicated CensorMode or similar would probably be more readable.

getExpression
:: Bool
-- ^ Censor the source code?
-> Maybe FilePath
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing arguments also smell a bit like boolean blindness to me. IMHO the straightforward fix would be to have both getExpressionFromFile and getExpressionFromStdin, but it's not important to me.

... as requested by @sjakobi

* Replace `Bool` with `Censor`
* Replace `Maybe FilePath` with `Input`
@mergify mergify bot merged commit 79bd32e into master Sep 14, 2019
@mergify mergify bot deleted the gabriel/censor branch September 14, 2019 05:02
@sjakobi
Copy link
Collaborator

sjakobi commented Sep 14, 2019

Many thanks for the much nicer types! :)

@Gabriella439
Copy link
Collaborator Author

@sjakobi: You're welcome! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants