Adapt for butcher-0.2.0.0
parent
23936d7522
commit
508780466c
|
@ -78,7 +78,7 @@ library {
|
||||||
, bytestring >=0.10.8.1 && <0.11
|
, bytestring >=0.10.8.1 && <0.11
|
||||||
, directory >=1.2.6.2 && <1.3
|
, directory >=1.2.6.2 && <1.3
|
||||||
, lens
|
, lens
|
||||||
, butcher
|
, butcher >=0.2.0.0 && <0.3
|
||||||
, yaml >=0.8.18 && <0.9
|
, yaml >=0.8.18 && <0.9
|
||||||
, extra >=1.4.10 && <1.5
|
, extra >=1.4.10 && <1.5
|
||||||
, uniplate >=1.6.12 && <1.7
|
, uniplate >=1.6.12 && <1.7
|
||||||
|
|
|
@ -65,9 +65,9 @@ mainCmdParser = do
|
||||||
reorderStart
|
reorderStart
|
||||||
printHelp <- addSimpleBoolFlag "" ["help"] mempty
|
printHelp <- addSimpleBoolFlag "" ["help"] mempty
|
||||||
printVersion <- addSimpleBoolFlag "" ["version"] mempty
|
printVersion <- addSimpleBoolFlag "" ["version"] mempty
|
||||||
inputPaths <- addFlagStringParam "i" ["input"] "PATH" (flagHelpStr "path to input haskell source file")
|
inputPaths <- addFlagStringParams "i" ["input"] "PATH" (flagHelpStr "path to input haskell source file")
|
||||||
outputPaths <- addFlagStringParam "o" ["output"] "PATH" (flagHelpStr "output file path")
|
outputPaths <- addFlagStringParams "o" ["output"] "PATH" (flagHelpStr "output file path")
|
||||||
configPaths <- addFlagStringParam "" ["config-file"] "PATH" (flagHelpStr "path to config file") -- TODO: allow default on addFlagStringParam ?
|
configPaths <- addFlagStringParams "" ["config-file"] "PATH" (flagHelpStr "path to config file") -- TODO: allow default on addFlagStringParam ?
|
||||||
cmdlineConfig <- configParser
|
cmdlineConfig <- configParser
|
||||||
suppressOutput <- addSimpleBoolFlag "" ["suppress-output"] (flagHelp $ parDoc "suppress the regular output, i.e. the transformed haskell source")
|
suppressOutput <- addSimpleBoolFlag "" ["suppress-output"] (flagHelp $ parDoc "suppress the regular output, i.e. the transformed haskell source")
|
||||||
_verbosity <- addSimpleCountFlag "v" ["verbose"] (flagHelp $ parDoc "[currently without effect; TODO]")
|
_verbosity <- addSimpleCountFlag "v" ["verbose"] (flagHelp $ parDoc "[currently without effect; TODO]")
|
||||||
|
|
|
@ -35,9 +35,9 @@ import Data.Coerce ( Coercible, coerce )
|
||||||
configParser :: CmdParser Identity out (ConfigF Option)
|
configParser :: CmdParser Identity out (ConfigF Option)
|
||||||
configParser = do
|
configParser = do
|
||||||
-- TODO: why does the default not trigger; ind never should be []!!
|
-- TODO: why does the default not trigger; ind never should be []!!
|
||||||
ind <- addFlagReadParam "" ["indent"] "AMOUNT" (flagHelpStr "spaces per indentation level")
|
ind <- addFlagReadParams "" ["indent"] "AMOUNT" (flagHelpStr "spaces per indentation level")
|
||||||
cols <- addFlagReadParam "" ["columns"] "AMOUNT" (flagHelpStr "target max columns (80 is an old default for this)")
|
cols <- addFlagReadParams "" ["columns"] "AMOUNT" (flagHelpStr "target max columns (80 is an old default for this)")
|
||||||
importCol <- addFlagReadParam "" ["import-col"] "N" (flagHelpStr "column to align import lists at")
|
importCol <- addFlagReadParams "" ["import-col"] "N" (flagHelpStr "column to align import lists at")
|
||||||
|
|
||||||
dumpConfig <- addSimpleBoolFlag "" ["dump-config"] (flagHelp $ parDoc "dump the programs full config (commandline + file + defaults)")
|
dumpConfig <- addSimpleBoolFlag "" ["dump-config"] (flagHelp $ parDoc "dump the programs full config (commandline + file + defaults)")
|
||||||
dumpAnnotations <- addSimpleBoolFlag "" ["dump-annotations"] (flagHelp $ parDoc "dump the full annotations returned by ghc-exactprint")
|
dumpAnnotations <- addSimpleBoolFlag "" ["dump-annotations"] (flagHelp $ parDoc "dump the full annotations returned by ghc-exactprint")
|
||||||
|
@ -56,7 +56,7 @@ configParser = do
|
||||||
outputOnErrors <- addSimpleBoolFlag "" ["output-on-errors"] (flagHelp $ parDoc "even when there are errors, produce output (or try to to the degree possible")
|
outputOnErrors <- addSimpleBoolFlag "" ["output-on-errors"] (flagHelp $ parDoc "even when there are errors, produce output (or try to to the degree possible")
|
||||||
wError <- addSimpleBoolFlag "" ["werror"] (flagHelp $ parDoc "treat warnings as errors")
|
wError <- addSimpleBoolFlag "" ["werror"] (flagHelp $ parDoc "treat warnings as errors")
|
||||||
|
|
||||||
optionsGhc <- addFlagStringParam
|
optionsGhc <- addFlagStringParams
|
||||||
""
|
""
|
||||||
["ghc-options"]
|
["ghc-options"]
|
||||||
"STRING"
|
"STRING"
|
||||||
|
|
|
@ -7,7 +7,7 @@ packages:
|
||||||
- .
|
- .
|
||||||
- extra-dep: true
|
- extra-dep: true
|
||||||
location:
|
location:
|
||||||
commit: e0885a4f482c063862e38db7de4319f3786c7a28
|
commit: 8b721f7e17a20a338432f1d31ef55db5e50b8e8d
|
||||||
git: https://github.com/lspitzner/butcher.git
|
git: https://github.com/lspitzner/butcher.git
|
||||||
- extra-dep: true
|
- extra-dep: true
|
||||||
location:
|
location:
|
||||||
|
|
Loading…
Reference in New Issue