packages feed

megaparsec-utils 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+12/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,12 @@ Changelog +# [1.1.0](https://github.com/drlkf/megaparsec-utils/compare/1.0.0...1.1.0) (2025-07-28)+++### Features++* add on/off to booleans ([1e9b885](https://github.com/drlkf/megaparsec-utils/commit/1e9b88532ec86ef3bf229de01c0a5a81a89261ec))+ # 1.0.0 (2025-07-28)  
megaparsec-utils.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           megaparsec-utils-version:        0.1.0.0+version:        0.1.1.0 synopsis:       Parsers and utilities for the Megaparsec library. description:    Common parsers and utilities to use with the Megaparsec library. category:       Parsing
src/Text/Megaparsec/Utils.hs view
@@ -51,15 +51,15 @@  ) import Text.Read (readMaybe) --- | Parse a case-insensitive human-readable boolean, including C-style numbers--- and English yes-no.+-- | Parse a case-insensitive human-readable boolean, including C-style numbers,+-- English yes-no and @on@ / @off@. boolParser   :: Ord e   => Parsec e String Bool boolParser = true <|> false  where-  true = True <$ choice (map string' ["true", "y", "yes", "1"])-  false = False <$ choice (map string' ["false", "n", "no", "0"])+  true = True <$ choice (map string' ["true", "y", "yes", "on", "1"])+  false = False <$ choice (map string' ["false", "n", "no", "off", "0"])  -- | Parse a 'Bounded' 'Enum' type that has a 'Show' instance, trying all -- possibilities, case-insensitive, in the 'Enum' order.