on master help sign in
Reformat stackage.hs in tibbe style

@snoyberg Not bad, ran this through hindent --johan-tibell, looks legit. Looks like you wrote it =)

commitc42b61bd4c1fd3fe88bb5355c7ce4ffdb7ecbbdc authorChris Done <chrisdone@gmail.com> dateWed 31 Dec 2014, 19:33 (12 years ago) parent7819eea
1 file changed+50−32
app/stackage.hs+50−32
app/stackage.hs+50−32
@@ -1,3 +1,5 @@
1+{-# LANGUAGE TupleSections #-}
2+
13module Main where
24
35import Control.Monad
@@ -9,38 +11,54 @@ import Stackage.CompleteBuild
911
1012main :: IO ()
1113main =
12− join (execParser
13− (info (helpOption <*> versionOption <*> config)
14− (header "Stackage" <>
15− fullDesc)))
16− where helpOption =
17− abortOption
18− ShowHelpText
19− (long "help" <>
20− help "Show this help text")
21− versionOption =
22− infoOption
14+ join $
15+ execParser $
16+ info
17+ (helpOption <*> versionOption <*> config)
18+ (header "Stackage" <>
19+ fullDesc)
20+ where
21+ helpOption =
22+ abortOption ShowHelpText $
23+ long "help" <>
24+ help "Show this help text"
25+ versionOption =
26+ infoOption
2327 ("fpbuild version " ++ showVersion version)
2428 (long "version" <>
2529 help "Show fpbuild version")
26− config =
27− subparser (mconcat [cmnd completeBuild
28− (pure Nightly)
29− "nightly"
30− "Build, test and upload the Nightly snapshot"
31− ,cmnd completeBuild
32− (pure (LTS Major))
33− "lts-major"
34− "Build, test and upload the LTS (major) snapshot"
35− ,cmnd completeBuild
36− (pure (LTS Minor))
37− "lts-minor"
38− "Build, test and upload the LTS (minor) snapshot"
39− ,cmnd (const justCheck)
40− (pure ())
41− "check"
42− "Just check that the build plan is ok"])
43− cmnd exec parse name desc =
44− (command name
45− (info (fmap exec parse)
46− (progDesc desc)))
30+ config =
31+ subparser $
32+ mconcat
33+ [ cmnd
34+ (uncurry completeBuild)
35+ (fmap (Nightly, ) buildFlags)
36+ "nightly"
37+ "Build, test and upload the Nightly snapshot"
38+ , cmnd
39+ (uncurry completeBuild)
40+ (fmap (LTS Major, ) buildFlags)
41+ "lts-major"
42+ "Build, test and upload the LTS (major) snapshot"
43+ , cmnd
44+ (uncurry completeBuild)
45+ (fmap (LTS Minor, ) buildFlags)
46+ "lts-minor"
47+ "Build, test and upload the LTS (minor) snapshot"
48+ , cmnd
49+ (const justCheck)
50+ (pure ())
51+ "check"
52+ "Just check that the build plan is ok"]
53+ cmnd exec parse name desc =
54+ command name $
55+ info
56+ (fmap exec parse)
57+ (progDesc desc)
58+ buildFlags =
59+ BuildFlags <$>
60+ fmap
61+ not
62+ (switch
63+ (long "skip-tests" <>
64+ help "Skip build and running the test suites"))