parseFormatSpec: cleaner error message for invalid extensions.

This commit is contained in:
John MacFarlane 2022-01-03 10:32:57 -08:00
parent 0abfe4fdab
commit cdfdfae4dd

View file

@ -624,8 +624,8 @@ parseFormatSpec = parse formatSpec ""
Just n -> return n
Nothing
| name == "lhs" -> return Ext_literate_haskell
| otherwise -> Prelude.fail $
"Unknown extension: " ++ name
| otherwise -> unexpected $
"unknown extension: " ++ name
return $ \(extsToEnable, extsToDisable) ->
case polarity of
'+' -> (ext : extsToEnable, extsToDisable)