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

[#96] Add option to choose cabal or stack or both #106

Merged
merged 3 commits into from
Jul 17, 2018
Merged

Conversation

vrom911
Copy link
Member

@vrom911 vrom911 commented Jul 17, 2018

Resolves #96

@vrom911 vrom911 self-assigned this Jul 17, 2018
@chshersh chshersh self-requested a review July 17, 2018 08:27
@chshersh chshersh added this to the v1.1 Upgrade milestone Jul 17, 2018
Copy link
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

Looks quite good to me. Probably we can refactor some parts later. But this is already nice 👍

@@ -170,6 +176,8 @@ finalise Config{..} = Config
<*> fin "email" cEmail
<*> fin "license" cLicense
<*> fin "ghcersions" cGhcVer
Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed typo in ghcersions...

@@ -67,7 +71,9 @@ generateProject projectName Config{..} = do
-- Library/Executable/Tests/Benchmarks flags
github <- decisionToBool cGitHub "GitHub integration"
travis <- ifGithub github "Travis CI integration" cTravis
appVey <- ifGithub github "AppVeyor CI integration" cAppVey
appVey <- let appTar = "AppVeyor CI integration" in
if stack then ifGithub github appTar cAppVey
Copy link
Contributor

Choose a reason for hiding this comment

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

You can write this as ifGithub (github && stack) ...

(Idk, Idk) -> decisionToBool cCabal "cabal" >>= \c ->
if c then decisionToBool cStack "stack" >>= \s -> pure (c, s)
else stackMsg True >> pure (False, True)
(Nop, Nop) -> errorMessage "Neither cabal nor stack was choosen" >> exitFailure
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably it's chosen

@vrom911 vrom911 force-pushed the vrom911/96-cabal branch from ad048d3 to 6a0b8ef Compare July 17, 2018 08:53
@chshersh chshersh merged commit 26fc283 into master Jul 17, 2018
@chshersh chshersh deleted the vrom911/96-cabal branch July 17, 2018 09:28
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