imp: lib: registerWidthsFromOpts: fix ugly parse error message

This commit is contained in:
Simon Michael 2023-01-10 17:07:54 -10:00
parent 5c289ac92e
commit 1ea2c41bf7

View File

@ -662,7 +662,7 @@ registerWidthsFromOpts :: CliOpts -> (Int, Maybe Int)
registerWidthsFromOpts CliOpts{width_=Nothing, available_width_=w} = (w, Nothing)
registerWidthsFromOpts CliOpts{width_=Just s} =
case runParser registerwidthp "(unknown)" s of
Left e -> usageError $ "could not parse width option: "++show e
Left e -> usageError $ "could not parse width option: "++errorBundlePretty e
Right ws -> ws
where
registerwidthp :: (Stream s, Char ~ Token s) => ParsecT Void s m (Int, Maybe Int)