packages feed

Z-Data 0.1.6.0 → 0.1.6.1

raw patch · 10 files changed

+226/−198 lines, 10 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Z.Data.JSON.Base: instance Z.Data.JSON.Base.EncodeJSON Z.Data.Text.ShowT.Str
- Z.Data.JSON.Base: instance Z.Data.JSON.Base.FromValue Z.Data.Text.ShowT.Str
- Z.Data.JSON.Base: instance Z.Data.JSON.Base.ToValue Z.Data.Text.ShowT.Str
- Z.Data.Text: data Category
- Z.Data.Text: data Locale
- Z.Data.Text.Base: data Category
- Z.Data.Text.Base: data Locale
- Z.Data.Text.ShowT: Str :: [Char] -> Str
- Z.Data.Text.ShowT: [chrs] :: Str -> [Char]
- Z.Data.Text.ShowT: instance GHC.Classes.Eq Z.Data.Text.ShowT.Str
- Z.Data.Text.ShowT: instance GHC.Classes.Ord Z.Data.Text.ShowT.Str
- Z.Data.Text.ShowT: instance GHC.Generics.Generic Z.Data.Text.ShowT.Str
- Z.Data.Text.ShowT: instance GHC.Read.Read Z.Data.Text.ShowT.Str
- Z.Data.Text.ShowT: instance GHC.Show.Show Z.Data.Text.ShowT.Str
- Z.Data.Text.ShowT: instance Z.Data.Text.ShowT.ShowT Z.Data.Text.ShowT.Str
- Z.Data.Text.ShowT: newtype Str
- Z.Data.Text.UTF8Rewind: Category :: CSize -> Category
- Z.Data.Text.UTF8Rewind: Locale :: CSize -> Locale
- Z.Data.Text.UTF8Rewind: instance Data.Bits.Bits Z.Data.Text.UTF8Rewind.Category
- Z.Data.Text.UTF8Rewind: instance Data.Bits.FiniteBits Z.Data.Text.UTF8Rewind.Category
- Z.Data.Text.UTF8Rewind: instance GHC.Classes.Eq Z.Data.Text.UTF8Rewind.Category
- Z.Data.Text.UTF8Rewind: instance GHC.Classes.Eq Z.Data.Text.UTF8Rewind.Locale
- Z.Data.Text.UTF8Rewind: instance GHC.Classes.Ord Z.Data.Text.UTF8Rewind.Category
- Z.Data.Text.UTF8Rewind: instance GHC.Classes.Ord Z.Data.Text.UTF8Rewind.Locale
- Z.Data.Text.UTF8Rewind: instance GHC.Generics.Generic Z.Data.Text.UTF8Rewind.Category
- Z.Data.Text.UTF8Rewind: instance GHC.Generics.Generic Z.Data.Text.UTF8Rewind.Locale
- Z.Data.Text.UTF8Rewind: instance GHC.Show.Show Z.Data.Text.UTF8Rewind.Category
- Z.Data.Text.UTF8Rewind: instance GHC.Show.Show Z.Data.Text.UTF8Rewind.Locale
- Z.Data.Text.UTF8Rewind: newtype Category
- Z.Data.Text.UTF8Rewind: newtype Locale
+ Z.Data.Array.Unaligned: instance Z.Data.Array.Unaligned.Unaligned (GHC.Ptr.Ptr a)
+ Z.Data.JSON.Base: instance Z.Data.JSON.Base.EncodeJSON GHC.IO.Exception.ExitCode
+ Z.Data.JSON.Base: instance Z.Data.JSON.Base.FromValue GHC.IO.Exception.ExitCode
+ Z.Data.JSON.Base: instance Z.Data.JSON.Base.ToValue GHC.IO.Exception.ExitCode
+ Z.Data.Text: type Category = CSize
+ Z.Data.Text: type Locale = CSize
+ Z.Data.Text.Base: type Category = CSize
+ Z.Data.Text.Base: type Locale = CSize
+ Z.Data.Text.ShowT: instance Z.Data.Text.ShowT.ShowT GHC.IO.Exception.ExitCode
+ Z.Data.Text.UTF8Rewind: type Category = CSize
+ Z.Data.Text.UTF8Rewind: type Locale = CSize

Files

ChangeLog.md view
@@ -1,8 +1,15 @@ # Revision history for Z-Data +## 0.1.6.1  -- 2020-10-09++* Remove `Str` newtype.+* Make `CBytes` a newtype.+* Add JSON instances for `ExitCode`, Add Unaligned instances for `Ptr a`.+* Use type alias instead of newtypes for `Locale`, `Category` in `Z.Data.Text`. + ## 0.1.6.0  -- 2020-10-09 -* Rename `ToText` to `ShowT`, `toText` to `showT`, add FFI types instances.+* Rename `ToText` to `ShowT`, `toText` to `showT`, add FFI types instances, remove `Str` newtype. * Change `Text` 's `Show` and `ShowT` escaping rules to reuse JSON escaping, remove `Read` instance. * Add `ShowT` instances to `CBytes` and FFI types. 
Z-Data.cabal view
@@ -1,6 +1,6 @@ cabal-version:              2.4 name:                       Z-Data-version:                    0.1.6.0+version:                    0.1.6.1 synopsis:                   Array, vector and text description:                This package provides array, slice and text operations license:                    BSD-3-Clause@@ -177,12 +177,14 @@                             DeriveAnyClass                             DefaultSignatures                             DataKinds+                            ExistentialQuantification                             FlexibleContexts                             FlexibleInstances                             GeneralizedNewtypeDeriving                              KindSignatures                             MagicHash                             MultiParamTypeClasses+                            MultiWayIf                             PartialTypeSignatures                             PatternSynonyms                              PolyKinds
Z/Data/Array/Unaligned.hs view
@@ -23,6 +23,8 @@ import           GHC.Float (stgFloatToWord32, stgWord32ToFloat, stgWord64ToDouble, stgDoubleToWord64) import           Foreign.C.Types +#include "MachDeps.h"+ -- toggle these defs to test different implements #define USE_BSWAP -- #define USE_SHIFT@@ -729,6 +731,17 @@ #endif  --------------------------------------------------------------------------------++instance Unaligned (Ptr a) where+    {-# INLINE unalignedSize #-}+    unalignedSize _ = SIZEOF_HSPTR+    {-# INLINE writeWord8ArrayAs# #-}+    writeWord8ArrayAs# mba# i# (Ptr x#) = writeWord8ArrayAsAddr# mba# i# x#+    {-# INLINE readWord8ArrayAs# #-}+    readWord8ArrayAs# mba# i# s0 =+        let !(# s1, x# #) = readWord8ArrayAsAddr# mba# i# s0 in (# s1, Ptr x# #)+    {-# INLINE indexWord8ArrayAs# #-}+    indexWord8ArrayAs# ba# i# = Ptr (indexWord8ArrayAsAddr# ba# i#)  instance Unaligned Float where     {-# INLINE unalignedSize #-}
Z/Data/CBytes.hs view
@@ -85,12 +85,12 @@ -- return a filename which is not proper encoded in any unicode encoding at all. -- But still, UTF-8 is recommanded to be used when text represatation is needed. -- ---data CBytes = CBytes+newtype CBytes = CBytes     {         -- | Convert to 'PrimArray',         --         -- there's an invariance that this array never contains @\NUL@-        toPrimArray :: {-# UNPACK #-} !(PrimArray Word8)+        toPrimArray :: PrimArray Word8     }  -- | Use this pattern to match or construct 'CBytes', result will be trimmed down to first byte before @\NUL@ byte if there's any.
Z/Data/JSON/Base.hs view
@@ -72,6 +72,8 @@ import           GHC.Exts                     (Proxy#, proxy#) import           GHC.Generics import           GHC.Natural+import           System.Exit+import           Text.ParserCombinators.ReadP (readP_to_S) import qualified Z.Data.Builder             as B import           Z.Data.Generics.Utils import           Z.Data.JSON.Value          (Value(..))@@ -87,7 +89,6 @@ import qualified Z.Data.Vector.FlatIntSet   as FIS import qualified Z.Data.Vector.FlatMap      as FM import qualified Z.Data.Vector.FlatSet      as FS-import           Text.ParserCombinators.ReadP (readP_to_S)  -------------------------------------------------------------------------------- @@ -347,7 +348,7 @@         _      -> fail' . T.buildText $ do             "converting "             T.text name-            "failed, value is either floating or will cause over or underflow "+            "failed, value is either floating or will cause over or underflow: "             T.scientific x withBoundedIntegral name _ v = typeMismatch name "Number" v @@ -885,16 +886,6 @@ instance ToValue T.Text     where {{-# INLINE toValue #-}; toValue = String;} instance EncodeJSON T.Text where {{-# INLINE encodeJSON #-}; encodeJSON = JB.string;} -instance FromValue T.Str where-    {-# INLINE fromValue #-}-    fromValue = withText "Str" (pure . T.Str . T.unpack)-instance ToValue T.Str where-    {-# INLINE toValue #-}-    toValue = String . T.pack . T.chrs-instance EncodeJSON T.Str where-    {-# INLINE encodeJSON #-}-    encodeJSON = JB.string . T.pack . T.chrs- instance FromValue Scientific where {{-# INLINE fromValue #-}; fromValue = withScientific "Scientific" pure;} instance ToValue Scientific where {{-# INLINE toValue #-}; toValue = Number;} instance EncodeJSON Scientific where {{-# INLINE encodeJSON #-}; encodeJSON = B.scientific;}@@ -1169,6 +1160,25 @@ instance EncodeJSON () where     {-# INLINE encodeJSON #-}     encodeJSON () = "[]"++instance FromValue ExitCode where+    {-# INLINE fromValue #-}+    fromValue (String "ExitSuccess") = return ExitSuccess+    fromValue (Number x) =+        case toBoundedInteger x of+            Just i -> return (ExitFailure i)+            _      -> fail' . T.buildText $ do+                "converting ExitCode failed, value is either floating or will cause over or underflow: "+                T.scientific x+    fromValue _ =  fail' "converting ExitCode failed, expected a string or number"+instance ToValue ExitCode where+    {-# INLINE toValue #-}+    toValue ExitSuccess = String "ExitSuccess"+    toValue (ExitFailure n) = Number (fromIntegral n)+instance EncodeJSON ExitCode where+    {-# INLINE encodeJSON #-}+    encodeJSON ExitSuccess = "ExitSuccess"+    encodeJSON (ExitFailure n) = B.int n  instance FromValue Version where     {-# INLINE fromValue #-}
Z/Data/Parser/Numeric.hs view
@@ -42,7 +42,6 @@ import           Data.Int import qualified Data.Scientific          as Sci import           Data.Word-import           Foreign.Ptr              (IntPtr) import qualified Z.Data.Builder.Numeric as B import           Z.Data.Parser.Base     (Parser, (<?>)) import qualified Z.Data.Parser.Base     as P@@ -67,18 +66,6 @@ -- hex :: (Integral a, Bits a) => Parser a {-# INLINE hex #-}-{-# SPECIALIZE INLINE hex :: Parser Int    #-}-{-# SPECIALIZE INLINE hex :: Parser Int64  #-}-{-# SPECIALIZE INLINE hex :: Parser Int32  #-}-{-# SPECIALIZE INLINE hex :: Parser Int16  #-}-{-# SPECIALIZE INLINE hex :: Parser Int8   #-}-{-# SPECIALIZE INLINE hex :: Parser Word   #-}-{-# SPECIALIZE INLINE hex :: Parser Word64 #-}-{-# SPECIALIZE INLINE hex :: Parser Word32 #-}-{-# SPECIALIZE INLINE hex :: Parser Word16 #-}-{-# SPECIALIZE INLINE hex :: Parser Word8  #-}-{-# SPECIALIZE INLINE hex :: Parser Integer #-}-{-# SPECIALIZE INLINE hex :: Parser IntPtr #-} hex = "Z.Data.Parser.Numeric.hex" <?> hexLoop 0 <$> P.takeWhile1 isHexDigit  -- | decode hex digits sequence within an array.@@ -103,17 +90,6 @@ -- | Parse and decode an unsigned decimal number. uint :: (Integral a) => Parser a {-# INLINE uint #-}-{-# SPECIALIZE INLINE uint :: Parser Int    #-}-{-# SPECIALIZE INLINE uint :: Parser Int64  #-}-{-# SPECIALIZE INLINE uint :: Parser Int32  #-}-{-# SPECIALIZE INLINE uint :: Parser Int16  #-}-{-# SPECIALIZE INLINE uint :: Parser Int8   #-}-{-# SPECIALIZE INLINE uint :: Parser Word   #-}-{-# SPECIALIZE INLINE uint :: Parser Word64 #-}-{-# SPECIALIZE INLINE uint :: Parser Word32 #-}-{-# SPECIALIZE INLINE uint :: Parser Word16 #-}-{-# SPECIALIZE INLINE uint :: Parser Word8  #-}-{-# SPECIALIZE INLINE uint :: Parser Integer #-} uint = "Z.Data.Parser.Numeric.uint" <?> decLoop 0 <$> P.takeWhile1 isDigit  -- | decode digits sequence within an array.@@ -143,17 +119,6 @@ -- character. int :: (Integral a) => Parser a {-# INLINE int #-}-{-# SPECIALIZE INLINE int :: Parser Int    #-}-{-# SPECIALIZE INLINE int :: Parser Int64  #-}-{-# SPECIALIZE INLINE int :: Parser Int32  #-}-{-# SPECIALIZE INLINE int :: Parser Int16  #-}-{-# SPECIALIZE INLINE int :: Parser Int8   #-}-{-# SPECIALIZE INLINE int :: Parser Word   #-}-{-# SPECIALIZE INLINE int :: Parser Word64 #-}-{-# SPECIALIZE INLINE int :: Parser Word32 #-}-{-# SPECIALIZE INLINE int :: Parser Word16 #-}-{-# SPECIALIZE INLINE int :: Parser Word8  #-}-{-# SPECIALIZE INLINE int :: Parser Integer #-} int = "Z.Data.Parser.Numeric.int" <?> do     w <- P.peek     if w == MINUS
Z/Data/Text.hs view
@@ -78,12 +78,68 @@   , isNormalized, isNormalizedTo, normalize, normalizeTo     -- ** Case conversion     -- $case-  , Locale(..)   , envLocale   , caseFold, caseFoldWith, toLower, toLowerWith, toUpper, toUpperWith, toTitle, toTitleWith     -- ** Unicode category   , isCategory, spanCategory-  , Category(..)+  -- * Constants+  -- ** Locale+  , Locale+  , pattern LocaleDefault+  , pattern LocaleLithuanian+  , pattern LocaleTurkishAndAzeriLatin+  -- ** Category+  , Category+  , pattern CategoryLetterUppercase+  , pattern CategoryLetterLowercase+  , pattern CategoryLetterTitlecase+  , pattern CategoryLetterOther+  , pattern CategoryLetter+  , pattern CategoryCaseMapped+  , pattern CategoryMarkNonSpacing+  , pattern CategoryMarkSpacing+  , pattern CategoryMarkEnclosing+  , pattern CategoryMark+  , pattern CategoryNumberDecimal+  , pattern CategoryNumberLetter+  , pattern CategoryNumberOther+  , pattern CategoryNumber+  , pattern CategoryPunctuationConnector+  , pattern CategoryPunctuationDash+  , pattern CategoryPunctuationOpen+  , pattern CategoryPunctuationClose+  , pattern CategoryPunctuationInitial+  , pattern CategoryPunctuationFinal+  , pattern CategoryPunctuationOther+  , pattern CategoryPunctuation+  , pattern CategorySymbolMath+  , pattern CategorySymbolCurrency+  , pattern CategorySymbolModifier+  , pattern CategorySymbolOther+  , pattern CategorySymbol+  , pattern CategorySeparatorSpace+  , pattern CategorySeparatorLine+  , pattern CategorySeparatorParagraph+  , pattern CategorySeparator+  , pattern CategoryControl+  , pattern CategoryFormat+  , pattern CategorySurrogate+  , pattern CategoryPrivateUse+  , pattern CategoryUnassigned+  , pattern CategoryCompatibility+  , pattern CategoryIgnoreGraphemeCluster+  , pattern CategoryIscntrl+  , pattern CategoryIsprint+  , pattern CategoryIsspace+  , pattern CategoryIsblank+  , pattern CategoryIsgraph+  , pattern CategoryIspunct+  , pattern CategoryIsalnum+  , pattern CategoryIsalpha+  , pattern CategoryIsupper+  , pattern CategoryIslower+  , pattern CategoryIsdigit+  , pattern CategoryIsxdigit  ) where  import           Z.Data.Text.Base
Z/Data/Text/Base.hs view
@@ -42,68 +42,68 @@   , isNormalized, isNormalizedTo, normalize, normalizeTo     -- ** Case conversion     -- $case-  , Locale(LocaleDefault, LocaleLithuanian, LocaleTurkishAndAzeriLatin)   , envLocale   , caseFold, caseFoldWith, toLower, toLowerWith, toUpper, toUpperWith, toTitle, toTitleWith     -- ** Unicode category   , isCategory, spanCategory-  , Category(-        CategoryLetterUppercase-      , CategoryLetterLowercase-      , CategoryLetterTitlecase-      , CategoryLetterOther-      , CategoryLetter-      , CategoryCaseMapped--      , CategoryMarkNonSpacing-      , CategoryMarkSpacing-      , CategoryMarkEnclosing-      , CategoryMark--      , CategoryNumberDecimal-      , CategoryNumberLetter-      , CategoryNumberOther-      , CategoryNumber--      , CategoryPunctuationConnector-      , CategoryPunctuationDash-      , CategoryPunctuationOpen-      , CategoryPunctuationClose-      , CategoryPunctuationInitial-      , CategoryPunctuationFinal-      , CategoryPunctuationOther-      , CategoryPunctuation--      , CategorySymbolMath-      , CategorySymbolCurrency-      , CategorySymbolModifier-      , CategorySymbolOther-      , CategorySymbol--      , CategorySeparatorSpace-      , CategorySeparatorLine-      , CategorySeparatorParagraph-      , CategorySeparator-      , CategoryControl-      , CategoryFormat-      , CategorySurrogate-      , CategoryPrivateUse-      , CategoryUnassigned-      , CategoryCompatibility-      , CategoryIgnoreGraphemeCluster-      , CategoryIscntrl--      , CategoryIsprint-      , CategoryIsspace-      , CategoryIsblank-      , CategoryIsgraph-      , CategoryIspunct-      , CategoryIsalnum-      , CategoryIsalpha-      , CategoryIsupper-      , CategoryIslower-      , CategoryIsdigit-      , CategoryIsxdigit)+  -- * Constants+  -- ** Locale+  , Locale+  , pattern LocaleDefault+  , pattern LocaleLithuanian+  , pattern LocaleTurkishAndAzeriLatin+  -- ** Category+  , Category+  , pattern CategoryLetterUppercase+  , pattern CategoryLetterLowercase+  , pattern CategoryLetterTitlecase+  , pattern CategoryLetterOther+  , pattern CategoryLetter+  , pattern CategoryCaseMapped+  , pattern CategoryMarkNonSpacing+  , pattern CategoryMarkSpacing+  , pattern CategoryMarkEnclosing+  , pattern CategoryMark+  , pattern CategoryNumberDecimal+  , pattern CategoryNumberLetter+  , pattern CategoryNumberOther+  , pattern CategoryNumber+  , pattern CategoryPunctuationConnector+  , pattern CategoryPunctuationDash+  , pattern CategoryPunctuationOpen+  , pattern CategoryPunctuationClose+  , pattern CategoryPunctuationInitial+  , pattern CategoryPunctuationFinal+  , pattern CategoryPunctuationOther+  , pattern CategoryPunctuation+  , pattern CategorySymbolMath+  , pattern CategorySymbolCurrency+  , pattern CategorySymbolModifier+  , pattern CategorySymbolOther+  , pattern CategorySymbol+  , pattern CategorySeparatorSpace+  , pattern CategorySeparatorLine+  , pattern CategorySeparatorParagraph+  , pattern CategorySeparator+  , pattern CategoryControl+  , pattern CategoryFormat+  , pattern CategorySurrogate+  , pattern CategoryPrivateUse+  , pattern CategoryUnassigned+  , pattern CategoryCompatibility+  , pattern CategoryIgnoreGraphemeCluster+  , pattern CategoryIscntrl+  , pattern CategoryIsprint+  , pattern CategoryIsspace+  , pattern CategoryIsblank+  , pattern CategoryIsgraph+  , pattern CategoryIspunct+  , pattern CategoryIsalnum+  , pattern CategoryIsalpha+  , pattern CategoryIsupper+  , pattern CategoryIslower+  , pattern CategoryIsdigit+  , pattern CategoryIsxdigit   -- * Misc   , TextException(..), errorEmptyText   , c_utf8_validate_ba
Z/Data/Text/ShowT.hs view
@@ -18,8 +18,6 @@ module Z.Data.Text.ShowT   ( -- * ShowT class   ShowT(..), showT, toBuilder, toBytes, toString-  -- * Str newtype-  , Str(..)   -- * Textual Builder   , TextBuilder   , getBuilder@@ -76,6 +74,8 @@ import           GHC.Generics import           GHC.Stack import           Data.Version+import           System.Exit+import           Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary(..)) import           Data.Primitive.Types import qualified Z.Data.Builder.Base            as B import qualified Z.Data.Builder.Numeric         as B@@ -83,8 +83,6 @@ import           Z.Data.Text.Base               (Text(..)) import qualified Z.Data.Array                   as A import qualified Z.Data.Vector.Base             as V-import           Text.Read                      (Read(..))-import           Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary(..))  #define DOUBLE_QUOTE 34 @@ -321,29 +319,6 @@ intercalateList (TextBuilder s) f = TextBuilder . B.intercalateList s (getBuilder . f)  ----------------------------------------------------------------------------------- | Newtype wrapper for @[Char]@ to provide textual instances.------ We didn't provide special treatment to differentiate instances between @[a]@ and @[Char]@--- in various classes, e.g. 'Z.Data.JSON.ToJSON'.------ This newtype is therefore to provide instances similar to @T.Text@, in case you really--- need to wrap a 'String'.------ >>> Z.Data.JSON.encodeText ("abc" :: String)--- > "[\"a\",\"b\",\"c\"]"   -- Just like any other [a]'s instance--- >>> Z.Data.JSON.encodeText . Str $ ("abc" :: String)--- > "\"abc\""----newtype Str = Str { chrs :: [Char] } deriving stock (Eq, Ord, Generic)--instance Show Str where show = show . chrs-instance Read Str where readPrec = Str <$> readPrec--instance ShowT Str where-    {-# INLINE toTextBuilder #-}-    toTextBuilder _ = TextBuilder . B.string8 . show---------------------------------------------------------------------------------- -- Data types -- -- | A class similar to 'Show', serving the purpose that quickly convert a data type to a 'Text' value.@@ -351,10 +326,10 @@ -- You can use newtype or generic deriving to implement instance of this class quickly: -- -- @---  {-## LANGUAGE GeneralizedNewtypeDeriving ##-}---  {-## LANGUAGE DeriveAnyClass ##-}---  {-## LANGUAGE DeriveGeneric ##-}---  {-## LANGUAGE DerivingStrategies ##-}+--  {-\# LANGUAGE GeneralizedNewtypeDeriving \#-}+--  {-\# LANGUAGE DeriveAnyClass \#-}+--  {-\# LANGUAGE DeriveGeneric \#-}+--  {-\# LANGUAGE DerivingStrategies \#-} -- --  import GHC.Generics --@@ -676,6 +651,7 @@ deriving newtype instance ShowT CFloat deriving newtype instance ShowT CDouble +deriving anyclass instance ShowT ExitCode deriving anyclass instance ShowT a => ShowT (Semigroup.Min a) deriving anyclass instance ShowT a => ShowT (Semigroup.Max a) deriving anyclass instance ShowT a => ShowT (Semigroup.First a)
Z/Data/Text/UTF8Rewind.hsc view
@@ -20,14 +20,14 @@ #include "utf8rewind.h"  -- | Locale for case mapping.-newtype Locale = Locale CSize deriving (Show, Eq, Ord, Generic)+type Locale = CSize   pattern LocaleDefault              :: Locale -pattern LocaleDefault               = Locale (#const UTF8_LOCALE_DEFAULT)+pattern LocaleDefault               = #const UTF8_LOCALE_DEFAULT pattern LocaleLithuanian           :: Locale-pattern LocaleLithuanian            = Locale (#const UTF8_LOCALE_LITHUANIAN)+pattern LocaleLithuanian            = #const UTF8_LOCALE_LITHUANIAN pattern LocaleTurkishAndAzeriLatin :: Locale-pattern LocaleTurkishAndAzeriLatin  = Locale (#const UTF8_LOCALE_TURKISH_AND_AZERI_LATIN)+pattern LocaleTurkishAndAzeriLatin  = #const UTF8_LOCALE_TURKISH_AND_AZERI_LATIN  -- | Get environment locale foreign import ccall unsafe "utf8envlocale" envLocale :: IO Locale@@ -63,8 +63,7 @@ -- | Unicode categories. -- -- See 'Z.Data.Text.Base.isCategory', you can combine categories with bitwise or.-newtype Category = Category CSize deriving (Show, Eq, Ord, Generic)-                                    deriving newtype (Bits, FiniteBits)+type Category = CSize   pattern CategoryLetterUppercase       :: Category pattern CategoryLetterLowercase       :: Category@@ -72,30 +71,30 @@ pattern CategoryLetterOther           :: Category pattern CategoryLetter                :: Category pattern CategoryCaseMapped            :: Category-pattern CategoryLetterUppercase        = Category (#const UTF8_CATEGORY_LETTER_UPPERCASE)-pattern CategoryLetterLowercase        = Category (#const UTF8_CATEGORY_LETTER_LOWERCASE)-pattern CategoryLetterTitlecase        = Category (#const UTF8_CATEGORY_LETTER_TITLECASE)-pattern CategoryLetterOther            = Category (#const UTF8_CATEGORY_LETTER_OTHER)-pattern CategoryLetter                 = Category (#const UTF8_CATEGORY_LETTER)-pattern CategoryCaseMapped             = Category (#const UTF8_CATEGORY_CASE_MAPPED)+pattern CategoryLetterUppercase        = #const UTF8_CATEGORY_LETTER_UPPERCASE+pattern CategoryLetterLowercase        = #const UTF8_CATEGORY_LETTER_LOWERCASE+pattern CategoryLetterTitlecase        = #const UTF8_CATEGORY_LETTER_TITLECASE+pattern CategoryLetterOther            = #const UTF8_CATEGORY_LETTER_OTHER+pattern CategoryLetter                 = #const UTF8_CATEGORY_LETTER+pattern CategoryCaseMapped             = #const UTF8_CATEGORY_CASE_MAPPED  pattern CategoryMarkNonSpacing        :: Category   pattern CategoryMarkSpacing           :: Category   pattern CategoryMarkEnclosing         :: Category   pattern CategoryMark                  :: Category  -pattern CategoryMarkNonSpacing         = Category (#const UTF8_CATEGORY_MARK_NON_SPACING)-pattern CategoryMarkSpacing            = Category (#const UTF8_CATEGORY_MARK_SPACING)-pattern CategoryMarkEnclosing          = Category (#const UTF8_CATEGORY_MARK_ENCLOSING)-pattern CategoryMark                   = Category (#const UTF8_CATEGORY_MARK)+pattern CategoryMarkNonSpacing         = #const UTF8_CATEGORY_MARK_NON_SPACING+pattern CategoryMarkSpacing            = #const UTF8_CATEGORY_MARK_SPACING+pattern CategoryMarkEnclosing          = #const UTF8_CATEGORY_MARK_ENCLOSING+pattern CategoryMark                   = #const UTF8_CATEGORY_MARK  pattern CategoryNumberDecimal         :: Category  pattern CategoryNumberLetter          :: Category  pattern CategoryNumberOther           :: Category  pattern CategoryNumber                :: Category -pattern CategoryNumberDecimal          = Category (#const UTF8_CATEGORY_NUMBER_DECIMAL)-pattern CategoryNumberLetter           = Category (#const UTF8_CATEGORY_NUMBER_LETTER)-pattern CategoryNumberOther            = Category (#const UTF8_CATEGORY_NUMBER_OTHER)-pattern CategoryNumber                 = Category (#const UTF8_CATEGORY_NUMBER)+pattern CategoryNumberDecimal          = #const UTF8_CATEGORY_NUMBER_DECIMAL+pattern CategoryNumberLetter           = #const UTF8_CATEGORY_NUMBER_LETTER+pattern CategoryNumberOther            = #const UTF8_CATEGORY_NUMBER_OTHER+pattern CategoryNumber                 = #const UTF8_CATEGORY_NUMBER  pattern CategoryPunctuationConnector  :: Category pattern CategoryPunctuationDash       :: Category@@ -105,24 +104,24 @@ pattern CategoryPunctuationFinal      :: Category pattern CategoryPunctuationOther      :: Category pattern CategoryPunctuation           :: Category-pattern CategoryPunctuationConnector   = Category (#const UTF8_CATEGORY_PUNCTUATION_CONNECTOR)-pattern CategoryPunctuationDash        = Category (#const UTF8_CATEGORY_PUNCTUATION_DASH)-pattern CategoryPunctuationOpen        = Category (#const UTF8_CATEGORY_PUNCTUATION_OPEN)-pattern CategoryPunctuationClose       = Category (#const UTF8_CATEGORY_PUNCTUATION_CLOSE)-pattern CategoryPunctuationInitial     = Category (#const UTF8_CATEGORY_PUNCTUATION_INITIAL)-pattern CategoryPunctuationFinal       = Category (#const UTF8_CATEGORY_PUNCTUATION_FINAL)-pattern CategoryPunctuationOther       = Category (#const UTF8_CATEGORY_PUNCTUATION_OTHER)-pattern CategoryPunctuation            = Category (#const UTF8_CATEGORY_PUNCTUATION)+pattern CategoryPunctuationConnector   = #const UTF8_CATEGORY_PUNCTUATION_CONNECTOR+pattern CategoryPunctuationDash        = #const UTF8_CATEGORY_PUNCTUATION_DASH+pattern CategoryPunctuationOpen        = #const UTF8_CATEGORY_PUNCTUATION_OPEN+pattern CategoryPunctuationClose       = #const UTF8_CATEGORY_PUNCTUATION_CLOSE+pattern CategoryPunctuationInitial     = #const UTF8_CATEGORY_PUNCTUATION_INITIAL+pattern CategoryPunctuationFinal       = #const UTF8_CATEGORY_PUNCTUATION_FINAL+pattern CategoryPunctuationOther       = #const UTF8_CATEGORY_PUNCTUATION_OTHER+pattern CategoryPunctuation            = #const UTF8_CATEGORY_PUNCTUATION pattern CategorySymbolMath            :: Category  pattern CategorySymbolCurrency        :: Category  pattern CategorySymbolModifier        :: Category  pattern CategorySymbolOther           :: Category  pattern CategorySymbol                :: Category -pattern CategorySymbolMath             = Category (#const UTF8_CATEGORY_SYMBOL_MATH)-pattern CategorySymbolCurrency         = Category (#const UTF8_CATEGORY_SYMBOL_CURRENCY)-pattern CategorySymbolModifier         = Category (#const UTF8_CATEGORY_SYMBOL_MODIFIER)-pattern CategorySymbolOther            = Category (#const UTF8_CATEGORY_SYMBOL_OTHER)-pattern CategorySymbol                 = Category (#const UTF8_CATEGORY_SYMBOL)+pattern CategorySymbolMath             = #const UTF8_CATEGORY_SYMBOL_MATH+pattern CategorySymbolCurrency         = #const UTF8_CATEGORY_SYMBOL_CURRENCY+pattern CategorySymbolModifier         = #const UTF8_CATEGORY_SYMBOL_MODIFIER+pattern CategorySymbolOther            = #const UTF8_CATEGORY_SYMBOL_OTHER+pattern CategorySymbol                 = #const UTF8_CATEGORY_SYMBOL  pattern CategorySeparatorSpace        :: Category  pattern CategorySeparatorLine         :: Category @@ -136,18 +135,18 @@ pattern CategoryCompatibility         :: Category  pattern CategoryIgnoreGraphemeCluster :: Category  pattern CategoryIscntrl               :: Category -pattern CategorySeparatorSpace         = Category (#const UTF8_CATEGORY_SEPARATOR_SPACE)-pattern CategorySeparatorLine          = Category (#const UTF8_CATEGORY_SEPARATOR_LINE)-pattern CategorySeparatorParagraph     = Category (#const UTF8_CATEGORY_SEPARATOR_PARAGRAPH)-pattern CategorySeparator              = Category (#const UTF8_CATEGORY_SEPARATOR)-pattern CategoryControl                = Category (#const UTF8_CATEGORY_CONTROL)-pattern CategoryFormat                 = Category (#const UTF8_CATEGORY_FORMAT)-pattern CategorySurrogate              = Category (#const UTF8_CATEGORY_SURROGATE)-pattern CategoryPrivateUse             = Category (#const UTF8_CATEGORY_PRIVATE_USE)-pattern CategoryUnassigned             = Category (#const UTF8_CATEGORY_UNASSIGNED)-pattern CategoryCompatibility          = Category (#const UTF8_CATEGORY_COMPATIBILITY)-pattern CategoryIgnoreGraphemeCluster  = Category (#const UTF8_CATEGORY_IGNORE_GRAPHEME_CLUSTER)-pattern CategoryIscntrl                = Category (#const UTF8_CATEGORY_ISCNTRL)+pattern CategorySeparatorSpace         = #const UTF8_CATEGORY_SEPARATOR_SPACE+pattern CategorySeparatorLine          = #const UTF8_CATEGORY_SEPARATOR_LINE+pattern CategorySeparatorParagraph     = #const UTF8_CATEGORY_SEPARATOR_PARAGRAPH+pattern CategorySeparator              = #const UTF8_CATEGORY_SEPARATOR+pattern CategoryControl                = #const UTF8_CATEGORY_CONTROL+pattern CategoryFormat                 = #const UTF8_CATEGORY_FORMAT+pattern CategorySurrogate              = #const UTF8_CATEGORY_SURROGATE+pattern CategoryPrivateUse             = #const UTF8_CATEGORY_PRIVATE_USE+pattern CategoryUnassigned             = #const UTF8_CATEGORY_UNASSIGNED+pattern CategoryCompatibility          = #const UTF8_CATEGORY_COMPATIBILITY+pattern CategoryIgnoreGraphemeCluster  = #const UTF8_CATEGORY_IGNORE_GRAPHEME_CLUSTER+pattern CategoryIscntrl                = #const UTF8_CATEGORY_ISCNTRL  pattern CategoryIsprint               :: Category pattern CategoryIsspace               :: Category@@ -160,14 +159,14 @@ pattern CategoryIslower               :: Category pattern CategoryIsdigit               :: Category pattern CategoryIsxdigit              :: Category-pattern CategoryIsprint                = Category (#const UTF8_CATEGORY_ISPRINT)-pattern CategoryIsspace                = Category (#const UTF8_CATEGORY_ISSPACE)-pattern CategoryIsblank                = Category (#const UTF8_CATEGORY_ISBLANK)-pattern CategoryIsgraph                = Category (#const UTF8_CATEGORY_ISGRAPH)-pattern CategoryIspunct                = Category (#const UTF8_CATEGORY_ISPUNCT)-pattern CategoryIsalnum                = Category (#const UTF8_CATEGORY_ISALNUM)-pattern CategoryIsalpha                = Category (#const UTF8_CATEGORY_ISALPHA)-pattern CategoryIsupper                = Category (#const UTF8_CATEGORY_ISUPPER)-pattern CategoryIslower                = Category (#const UTF8_CATEGORY_ISLOWER)-pattern CategoryIsdigit                = Category (#const UTF8_CATEGORY_ISDIGIT)-pattern CategoryIsxdigit               = Category (#const UTF8_CATEGORY_ISXDIGIT)                   +pattern CategoryIsprint                = #const UTF8_CATEGORY_ISPRINT+pattern CategoryIsspace                = #const UTF8_CATEGORY_ISSPACE+pattern CategoryIsblank                = #const UTF8_CATEGORY_ISBLANK+pattern CategoryIsgraph                = #const UTF8_CATEGORY_ISGRAPH+pattern CategoryIspunct                = #const UTF8_CATEGORY_ISPUNCT+pattern CategoryIsalnum                = #const UTF8_CATEGORY_ISALNUM+pattern CategoryIsalpha                = #const UTF8_CATEGORY_ISALPHA+pattern CategoryIsupper                = #const UTF8_CATEGORY_ISUPPER+pattern CategoryIslower                = #const UTF8_CATEGORY_ISLOWER+pattern CategoryIsdigit                = #const UTF8_CATEGORY_ISDIGIT+pattern CategoryIsxdigit               = #const UTF8_CATEGORY_ISXDIGIT