text-show-instances 3.2 → 3.2.1
raw patch · 5 files changed
+33/−3 lines, 5 filesdep ~QuickCheckdep ~text-showdep ~text-show-instancesPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck, text-show, text-show-instances
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- src/TextShow/Language/Haskell/TH.hs +11/−0
- tests/Instances/Language/Haskell/TH.hs +12/−1
- tests/Spec/Language/Haskell/THSpec.hs +4/−0
- text-show-instances.cabal +2/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+### 3.2.1+* Fix build with GHC 8.0+* Add `TextShow` instance for `Overlap` in `TextShow.Language.Haskell.TH`+ ## 3.2 * Allow build with `text-show-3.2`
src/TextShow/Language/Haskell/TH.hs view
@@ -66,6 +66,9 @@ , showbName , showbName' , showbOccNamePrec+#if MIN_VERSION_template_haskell(2,11,0)+ , showbOverlap+#endif , showbPatPrec #if MIN_VERSION_template_haskell(2,8,0) , showbPhasesPrec@@ -504,6 +507,13 @@ showbInjectivityAnnPrec :: Int -> InjectivityAnn -> Builder showbInjectivityAnnPrec = showbPrec +-- | Convert an 'Overlap' to a 'Builder'.+-- This function is only available with @template-haskell-2.11.0.0@ or later.+--+-- /Since: 3.2.1/+showbOverlap :: Overlap -> Builder+showbOverlap = showb+ -- | Convert a 'SourceStrictness' to a 'Builder'. -- This function is only available with @template-haskell-2.11.0.0@ or later. --@@ -593,6 +603,7 @@ $(deriveTextShow ''DecidedStrictness) $(deriveTextShow ''FamilyResultSig) $(deriveTextShow ''InjectivityAnn)+$(deriveTextShow ''Overlap) $(deriveTextShow ''SourceStrictness) $(deriveTextShow ''SourceUnpackedness) $(deriveTextShow ''TypeFamilyHead)
tests/Instances/Language/Haskell/TH.hs view
@@ -85,7 +85,13 @@ <*> arbitrary , TySynD <$> arbitrary <*> arbitrary <*> arbitrary , ClassD [fPred] <$> arbitrary <*> arbitrary <*> arbitrary <@> [fDec]- , InstanceD [fPred] <$> arbitrary <@> [fDec]+ , pure InstanceD+#if MIN_VERSION_template_haskell(2,11,0)+ <*> arbitrary+#endif+ <@> [fPred]+ <*> arbitrary+ <@> [fDec] , SigD <$> arbitrary <*> arbitrary , ForeignD <$> arbitrary , PragmaD <$> arbitrary@@ -614,6 +620,11 @@ instance Arbitrary InjectivityAnn where arbitrary = pure $ InjectivityAnn fName [fName]++deriving instance Bounded Overlap+deriving instance Enum Overlap+instance Arbitrary Overlap where+ arbitrary = arbitraryBoundedEnum deriving instance Bounded SourceStrictness deriving instance Enum SourceStrictness
tests/Spec/Language/Haskell/THSpec.hs view
@@ -113,6 +113,10 @@ prop "has the same output as showName" prop_showName' describe "OccName" $ prop "TextShow instance" (prop_matchesTextShow :: Int -> OccName -> Bool)+#if MIN_VERSION_template_haskell(2,11,0)+ describe "Overlap" $+ prop "TextShow instance" (prop_matchesTextShow :: Int -> Overlap -> Bool)+#endif describe "Pat" $ prop "TextShow instance" (prop_matchesTextShow :: Int -> Pat -> Bool) #if MIN_VERSION_template_haskell(2,8,0)
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name: text-show-instances-version: 3.2+version: 3.2.1 synopsis: Additional instances for text-show description: @text-show-instances@ is a supplemental library to @text-show@ that provides additional @Show@ instances for data types in@@ -241,7 +241,7 @@ , vector >= 0.9 && < 0.12 , xhtml >= 3000.2 && < 3000.3 if !flag(developer)- build-depends: text-show-instances == 3.2+ build-depends: text-show-instances == 3.2.1 hs-source-dirs: tests if flag(developer)