Skip to content
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

Add the ddump-dir option/config value #4225 #4242

Merged
merged 3 commits into from
Aug 20, 2018
Merged

Add the ddump-dir option/config value #4225 #4242

merged 3 commits into from
Aug 20, 2018

Conversation

waddlaw
Copy link
Contributor

@waddlaw waddlaw commented Aug 19, 2018

Fixes #4225

Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

@waddlaw
Copy link
Contributor Author

waddlaw commented Aug 20, 2018

@snoyberg this should be all set now :)
Is this alright? Could you please confirm it?

Copy link
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

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

Looks like a great PR, just one minor comment.

-- copy ddump-* files
let enableDdumpDir = isJust $ boptsDdumpDir eeBuildOpts
ddumpPath = maybe "" T.unpack $ boptsDdumpDir eeBuildOpts
when (buildingFinals && enableDdumpDir && not (null ddumpPath)) $ do
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like a pattern match would be easier to read here, e.g.:

case T.unpack <$> boptsDdumpDir eebuildOpts of
  Just ddumpPath | buildingFinals && enableDdumpDir && not (null ddumpPath) -> do ...
  _ -> pure ()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. That's true :)

@snoyberg
Copy link
Contributor

LGTM. We can merge once CI passes.

@snoyberg snoyberg merged commit 87b0e7c into commercialhaskell:master Aug 20, 2018
@snoyberg
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

Can't display -ddump-splices result.
2 participants