packages feed

ascii 1.3.1.0 → 1.4.0.0

raw patch · 4 files changed

+52/−57 lines, 4 filesdep ~ascii-supersetPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: ascii-superset

API changes (from Hackage documentation)

+ ASCII: class KnownCase (letterCase :: Case)
+ ASCII: data ASCII'case (letterCase :: Case) superset
+ ASCII: disregardCase :: Char -> CaselessChar
+ ASCII: refineCharToCase :: forall (letterCase :: Case) char. (KnownCase letterCase, CharSuperset char) => ASCII char -> ASCII'case letterCase char
+ ASCII: refineStringToCase :: forall (letterCase :: Case) char. (KnownCase letterCase, StringSuperset char) => ASCII char -> ASCII'case letterCase char
+ ASCII: theCase :: KnownCase letterCase => Case
+ ASCII: type ASCII'lower superset = ASCII'case 'LowerCase superset
+ ASCII: type ASCII'upper superset = ASCII'case 'UpperCase superset
- ASCII: toCaseChar :: CharIso char => Case -> char -> char
+ ASCII: toCaseChar :: CharSuperset char => Case -> char -> char
- ASCII: toCaseString :: StringIso string => Case -> string -> string
+ ASCII: toCaseString :: StringSuperset string => Case -> string -> string

Files

ascii.cabal view
@@ -1,7 +1,7 @@ cabal-version: 3.0  name: ascii-version: 1.3.1.0+version: 1.4.0.0 synopsis: The ASCII character set and encoding category: Data, Text @@ -26,75 +26,50 @@ common base     default-language: Haskell2010     ghc-options: -Wall--    default-extensions:-        NoImplicitPrelude-+    default-extensions: NoImplicitPrelude     build-depends:-        base ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17+        ascii-caseless == 0.0.0.*+      , ascii-char == 1.0.0.*+      , ascii-group == 1.0.0.*+      , ascii-case == 1.0.1.*+      , ascii-numbers == 1.1.0.*+      , ascii-predicates == 1.0.1.*+      , ascii-superset == 1.2.0.*+      , ascii-th == 1.1.1.*+      , base ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17+      , bytestring ^>= 0.10.12 || ^>= 0.11       , text ^>= 1.2.4 || ^>= 2.0  library     import: base     hs-source-dirs: library--    build-depends:-        bytestring ^>= 0.10.12 || ^>= 0.11-+    default-extensions: RankNTypes ScopedTypeVariables TypeApplications     exposed-modules: ASCII--    build-depends: ascii-caseless == 0.0.0.*     reexported-modules:-        ASCII.Caseless--    build-depends: ascii-char == 1.0.0.*-    reexported-modules:-        ASCII.Char--    build-depends: ascii-group == 1.0.0.*-    reexported-modules:-        ASCII.Group--    build-depends: ascii-case == 1.0.1.*-    reexported-modules:         ASCII.Case--    build-depends: ascii-numbers == 1.1.0.*-    reexported-modules:-        ASCII.Decimal+      , ASCII.Caseless+      , ASCII.CaseRefinement+      , ASCII.Char+      , ASCII.Decimal+      , ASCII.Group       , ASCII.Hexadecimal-      , ASCII.Word4--    build-depends: ascii-predicates == 1.0.1.*-    reexported-modules:-        ASCII.Predicates-      , ASCII.Lists-      , ASCII.ListsAndPredicates--    build-depends: ascii-superset == 1.1.0.*-    reexported-modules:-        ASCII.CaseRefinement       , ASCII.Isomorphism       , ASCII.Lift+      , ASCII.Lists+      , ASCII.ListsAndPredicates+      , ASCII.Predicates+      , ASCII.QuasiQuoters       , ASCII.Refinement       , ASCII.Superset--    build-depends: ascii-th == 1.1.1.*-    reexported-modules:-        ASCII.TemplateHaskell-      , ASCII.QuasiQuoters+      , ASCII.TemplateHaskell+      , ASCII.Word4  test-suite test-ascii     import: base     type: exitcode-stdio-1.0     hs-source-dirs: test     main-is: Main.hs-+    default-extensions: OverloadedStrings QuasiQuotes TemplateHaskell     build-depends:         ascii       , hedgehog ^>= 1.0.5 || ^>= 1.1 || ^>= 1.2--    default-extensions:-        OverloadedStrings-        QuasiQuotes-        TemplateHaskell
changelog.md view
@@ -1,3 +1,14 @@+### 1.4.0.0++Additions to the `ASCII` module: `disregardCase`, `ASCII'case`, `ASCII'upper`,+`ASCII'lower`, `KnownCase (..)`, `refineCharToCase`, `refineStringToCase`++Update `ascii-superset` to `1.2.0`. This adds `CharSuperset (toCaseChar)`,+`StringSuperset (toCaseString)`, `refineCharToCase`, and `refineStringToCase`.++The constraint on `toCaseChar` is relaxed from `CharIso` to `CharSuperset`.+The constraint on `toCaseString` is relaxed from `StringIso` to `StringSuperset`.+ ### 1.3.1.0 (2023-01-03)  Update `ascii-th` to `1.1.1`.
library/ASCII.hs view
@@ -38,6 +38,7 @@     Group (..), charGroup,  inGroup,     {- ** Upper/lower case -} {- $case -}     Case (..), letterCase, isCase, toCaseChar, toCaseString,+    disregardCase, refineCharToCase, refineStringToCase,     {- ** Letters  -} isLetter,     {- ** Letters and numbers  -} isAlphaNum,     {- ** Decimal digits -} {- $digit -} isDigit, Digit,@@ -87,7 +88,8 @@     {- ** @Natural@ ↔ @[HexChar]@ -}     showNaturalHexChars, readNaturalHexChars, -    {- * Refinement type -} {- $refinement -} ASCII,+    {- * Refinement types -} {- $refinement -} ASCII,+    ASCII'case, ASCII'upper, ASCII'lower, KnownCase (..),      {- * Polymorphic conversions -}     {- ** Narrowing -} toAsciiCharMaybe, toDigitMaybe, toHexCharMaybe,@@ -115,6 +117,7 @@   where  import ASCII.Case (Case (..))+import ASCII.CaseRefinement (KnownCase (..), ASCII'case, ASCII'upper, ASCII'lower, refineCharToCase, refineStringToCase) import ASCII.Caseless (CaselessChar) import ASCII.Char (Char) import ASCII.Decimal (Digit, DigitStringSuperset, DigitSuperset)@@ -139,6 +142,7 @@ import Prelude (Integral)  import qualified ASCII.Case+import qualified ASCII.Caseless import qualified ASCII.Decimal import qualified ASCII.Group import qualified ASCII.Hexadecimal@@ -251,8 +255,8 @@  -} -toCaseChar :: CharIso char => Case -> char -> char-toCaseChar c = ASCII.Isomorphism.asChar (ASCII.Case.toCase c)+toCaseChar :: CharSuperset char => Case -> char -> char+toCaseChar = ASCII.Superset.toCaseChar  {- | Maps each of the characters in a string to its upper/lower case equivalent. @@ -264,9 +268,14 @@  -} -toCaseString :: StringIso string => Case -> string -> string-toCaseString c = ASCII.Isomorphism.mapChars (ASCII.Case.toCase c)+toCaseString :: StringSuperset string => Case -> string -> string+toCaseString = ASCII.Superset.toCaseString +{-| Convert from ASCII character to caseless ASCII character, discarding the+case if the character is a letter -}+disregardCase :: Char -> CaselessChar+disregardCase = ASCII.Caseless.disregardCase+ {- $monomorphicConversions  These are a few simple monomorphic functions to convert between ASCII and types representing some other character set.@@ -483,7 +492,7 @@  {- $refinement -See also: "ASCII.Refinement"+See also: "ASCII.Refinement", "ASCII.CaseRefinement"  -} 
readme.md view
@@ -45,7 +45,7 @@    * The `ascii-numbers` package provides utilities for working with numbers     represented using ASCII digits 0-9, ASCII letters A-F to represent-    hexadecimal digits 10-15, and the `HypenMinus` character for negation.+    hexadecimal digits 10-15, and the `HyphenMinus` character for negation.    * The `ascii-th` package provides a [quasi-quoter][qq] that allows one to     safely and conveniently express ASCII string literals. The generated