Skip to content

Commit

Permalink
Prefer strOption for -X option, so that quotes are not required
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Jun 29, 2018
1 parent 9a58b74 commit 9809930
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import System.Exit (exitWith)
import qualified System.IO as IO
import Options.Applicative hiding (action, style)
import Data.Monoid ((<>))
import qualified Data.Text as T

data Action = Validate | Reformat

Expand Down Expand Up @@ -103,7 +104,7 @@ options config =
) <*
optional (strOption
(long "style" <> help "Style to print with (historical, now ignored)" <> metavar "STYLE") :: Parser String)
exts = fmap getExtensions (many (option auto (short 'X' <> help "Language extension" <> metavar "GHCEXT")))
exts = fmap getExtensions (many (T.pack <$> strOption (short 'X' <> help "Language extension" <> metavar "GHCEXT")))
indentSpaces =
option auto
(long "indent-size" <> help "Indentation size in spaces" <> value (configIndentSpaces config) <> showDefault) <|>
Expand Down

0 comments on commit 9809930

Please sign in to comment.