packages feed

css-selectors 0.4.0.1 → 0.4.0.2

raw patch · 4 files changed

+76/−11 lines, 4 filesdep ~Decimaldep ~QuickCheckdep ~arrayPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: Decimal, QuickCheck, array

API changes (from Hackage documentation)

Files

css-selectors.cabal view
@@ -1,5 +1,5 @@ name:                css-selectors-version:             0.4.0.1+version:             0.4.0.2 synopsis:            Parsing, rendering and manipulating css selectors in Haskell. description:   A library for parsing, manipulating, and rendering css selectors (not css files,@@ -42,14 +42,14 @@   build-depends:       base >=4.7 && <5     , aeson >=1.0-    , array >=0.5.3.0+    , array >=0.5.2.0     , binary >=0.2     , blaze-markup >=0.8     , bytestring >=0.9     , data-default >=0.7-    , Decimal >=0.5.1+    , Decimal >=0.4.2     , hashable >=1.2.7.0-    , QuickCheck >=2.13+    , QuickCheck >=2.8     , shakespeare >=2.0     , template-haskell >=2.12.0     , text >=1.1
src/Css3/Selector/Core.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, OverloadedStrings, PatternSynonyms, TemplateHaskellQuotes, TypeFamilies #-}+{-# LANGUAGE CPP, DeriveDataTypeable, DeriveGeneric, OverloadedStrings, PatternSynonyms, TemplateHaskellQuotes, TypeFamilies #-}  {-| Module      : Css3.Selector.Core@@ -57,6 +57,9 @@ import Data.List.NonEmpty(NonEmpty((:|))) import qualified Data.List.NonEmpty import Data.Ord(comparing)+#if __GLASGOW_HASKELL__ < 803+import Data.Semigroup(Semigroup((<>)))+#endif import Data.String(IsString(fromString)) import qualified Data.Text as T import Data.Text(Text, cons, inits, intercalate, pack, tails, unpack)@@ -65,7 +68,13 @@ import GHC.Generics(Generic)  import Language.Haskell.TH.Lib(appE, conE)+#if MIN_VERSION_template_haskell(2,17,0)+import Language.Haskell.TH.Syntax(Lift(lift, liftTyped), Exp(AppE, ConE, LitE), Lit(StringL), Name, Pat(ConP, ListP, ViewP), Q, unsafeCodeCoerce)+#elif MIN_VERSION_template_haskell(2,16,0)+import Language.Haskell.TH.Syntax(Lift(lift, liftTyped), Exp(AppE, ConE, LitE), Lit(StringL), Name, Pat(ConP, ListP, ViewP), Q, unsafeTExpCoerce)+#else import Language.Haskell.TH.Syntax(Lift(lift), Exp(AppE, ConE, LitE), Lit(StringL), Name, Pat(ConP, ListP, ViewP), Q)+#endif  import Test.QuickCheck.Arbitrary(Arbitrary(arbitrary, shrink), arbitraryBoundedEnum) import Test.QuickCheck.Gen(Gen, frequency, listOf, listOf1, oneof)@@ -454,12 +463,21 @@  instance Monoid SelectorSpecificity where     mempty = SelectorSpecificity 0 0 0+#if __GLASGOW_HASKELL__ < 803+    mappend = (<>)+#endif  instance Monoid Namespace where     mempty = NAny+#if __GLASGOW_HASKELL__ < 803+    mappend = (<>)+#endif  instance Monoid ElementName where     mempty = EAny+#if __GLASGOW_HASKELL__ < 803+    mappend = (<>)+#endif  -- IsString instances instance IsString Class where@@ -745,13 +763,49 @@ instance Lift SelectorGroup where     lift (SelectorGroup sg) = _apply 'SelectorGroup [liftNe sg]         where liftNe (a :| as) = _apply '(:|) [lift a, lift as]+#if MIN_VERSION_template_haskell(2,17,0)+    liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0)+    liftTyped = unsafeTExpCoerce . lift+#endif -instance Lift Selector-instance Lift SelectorCombinator-instance Lift SelectorSequence-instance Lift SelectorFilter-instance Lift Attrib +instance Lift Selector where+#if MIN_VERSION_template_haskell(2,17,0)+  liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0)+  liftTyped = unsafeTExpCoerce . lift+#endif++instance Lift SelectorCombinator where+#if MIN_VERSION_template_haskell(2,17,0)+  liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0)+  liftTyped = unsafeTExpCoerce . lift+#endif++instance Lift SelectorSequence where+#if MIN_VERSION_template_haskell(2,17,0)+  liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0)+  liftTyped = unsafeTExpCoerce . lift+#endif++instance Lift SelectorFilter where+#if MIN_VERSION_template_haskell(2,17,0)+  liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0)+  liftTyped = unsafeTExpCoerce . lift+#endif++instance Lift Attrib where+#if MIN_VERSION_template_haskell(2,17,0)+  liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0)+  liftTyped = unsafeTExpCoerce . lift+#endif++ -- ToMarkup instances _cssToMarkup :: ToCssSelector a => a -> Markup _cssToMarkup = text . toCssSelector@@ -773,7 +827,11 @@  -- ToJavaScript and ToJson instances _cssToJavascript :: ToCssSelector a => a -> Javascript+#if __GLASGOW_HASKELL__ < 803+_cssToJavascript = toJavascript . toJSON . toCssSelector+#else _cssToJavascript = toJavascript . toCssSelector+#endif  _cssToJson :: ToCssSelector a => a -> Value _cssToJson = String . toCssSelector
src/Css3/Selector/Parser.y view
@@ -6,6 +6,10 @@ import Css3.Selector.Lexer(AlexPosn(..), Token(..), TokenLoc(..))  import Data.List.NonEmpty(NonEmpty((:|)), (<|))++#if __GLASGOW_HASKELL__ < 803+import Data.Semigroup((<>))+#endif import Data.Text(pack) } 
src/Css3/Selector/Utils.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE Safe #-}+{-# LANGUAGE CPP, Safe #-}  {-| Module      : Css3.Selector.Utils@@ -20,6 +20,9 @@ import Control.Arrow(first)  import Data.Char(chr, digitToInt, intToDigit, isAsciiLower, isAsciiUpper, isHexDigit, ord)+#if __GLASGOW_HASKELL__ < 803+import Data.Semigroup((<>))+#endif import Data.Text(Text, cons, pack, singleton, snoc) import qualified Data.Text as T