packages feed

text-show-instances 3.6.5 → 3.7

raw patch · 9 files changed

+13/−260 lines, 9 filesdep −hoopldep ~QuickCheckdep ~quickcheck-instancesPVP ok

version bump matches the API change (PVP)

Dependencies removed: hoopl

Dependency ranges changed: QuickCheck, quickcheck-instances

API changes (from Hackage documentation)

- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow Compiler.Hoopl.Label.Label
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow Compiler.Hoopl.Label.LabelSet
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow Compiler.Hoopl.Passes.Dominator.DPath
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow Compiler.Hoopl.Passes.Dominator.DominatorNode
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow Compiler.Hoopl.Passes.Dominator.DominatorTree
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow Compiler.Hoopl.Unique.UniqueSet
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow (Compiler.Hoopl.Pointed.Pointed t b a)
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow v => TextShow.Classes.TextShow (Compiler.Hoopl.Label.LabelMap v)
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow v => TextShow.Classes.TextShow (Compiler.Hoopl.Unique.UniqueMap v)
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow1 (Compiler.Hoopl.Pointed.Pointed t b)
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow1 Compiler.Hoopl.Label.LabelMap
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow1 Compiler.Hoopl.Unique.UniqueMap
- TextShow.Compiler.Hoopl: instance TextShow.Classes.TextShow2 (Compiler.Hoopl.Pointed.Pointed t)

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+## 3.7 [2018.10.07]+* Remove `hoopl` dependency. Instances are no longer provided for data types+  in the `hoopl` library.+* Depend on `QuickCheck-2.12` or later.+* Depend on `quickcheck-instances-0.3.19` or later.+ ### 3.6.5 [2018.07.03] * Fix the tests on GHC 8.6. 
README.md view
@@ -24,7 +24,6 @@ * [`directory`](http://hackage.haskell.org/package/directory) * [`ghc-boot`](http://hackage.haskell.org/package/ghc-boot) * [`haskeline`](http://hackage.haskell.org/package/haskeline)-* [`hoopl`](http://hackage.haskell.org/package/hoopl) * [`hpc`](http://hackage.haskell.org/package/hpc) * [`old-locale`](http://hackage.haskell.org/package/old-locale) * [`old-time`](http://hackage.haskell.org/package/old-time)
− src/TextShow/Compiler/Hoopl.hs
@@ -1,119 +0,0 @@-{-# LANGUAGE CPP               #-}-{-# LANGUAGE GADTs             #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell   #-}-{-# OPTIONS_GHC -fno-warn-orphans #-}-{-|-Module:      TextShow.Compiler.Hoopl-Copyright:   (C) 2014-2017 Ryan Scott-License:     BSD-style (see the file LICENSE)-Maintainer:  Ryan Scott-Stability:   Provisional-Portability: GHC--'TextShow' instances for data types in the @hoopl@ library.--/Since: 2/--}-module TextShow.Compiler.Hoopl () where--import Compiler.Hoopl (Label, LabelMap, LabelSet, Pointed(..),-                       UniqueMap, UniqueSet)-#if MIN_VERSION_hoopl(3,9,0)-import Compiler.Hoopl.Internals (lblToUnique)-#else-import Compiler.Hoopl (Unique)-import Compiler.Hoopl.GHC (lblToUnique, uniqueToInt)-#endif-import Compiler.Hoopl.Passes.Dominator (DominatorNode(..), DominatorTree(..), DPath(..))--import Prelude ()-import Prelude.Compat--import TextShow (TextShow(..), TextShow1(..),-                 TextShow2(..), Builder, singleton, showbPrec1)-import TextShow.Data.Containers ()-import TextShow.TH (deriveTextShow, deriveTextShow1)---- | /Since: 2/-instance TextShow Label where-    showb l = singleton 'L' <> showb (lblToUnique l)-    {-# INLINE showb #-}---- | /Since: 2/-$(deriveTextShow  ''LabelMap)--- | /Since: 2/-$(deriveTextShow1 ''LabelMap)---- | /Since: 2/-$(deriveTextShow  ''LabelSet)---- | /Since: 2/-instance TextShow a => TextShow (Pointed t b a) where-    showbPrec = showbPrec1-    {-# INLINE showbPrec #-}---- | /Since: 2/-instance TextShow1 (Pointed t b) where-    liftShowbPrec _  _ _ Bot       = "_|_"-    liftShowbPrec _  _ _ Top       = singleton 'T'-    liftShowbPrec sp _ _ (PElem a) = sp 0 a-    {-# INLINE liftShowbPrec #-}---- | /Since: 2/-instance TextShow2 (Pointed t) where-    liftShowbPrec2 _ _ = liftShowbPrec-    {-# INLINE liftShowbPrec2 #-}--#if !(MIN_VERSION_hoopl(3,9,0))--- | /Since: 2/-instance TextShow Unique where-    showb = showb . uniqueToInt-    {-# INLINE showb #-}-#endif---- | /Since: 2/-$(deriveTextShow  ''UniqueMap)--- | /Since: 2/-$(deriveTextShow1 ''UniqueMap)---- | /Since: 2/-$(deriveTextShow  ''UniqueSet)---- | /Since: 2/-instance TextShow DominatorNode where-    showb Entry        = "entryNode"-    showb (Labelled l) = showb l-    {-# INLINE showb #-}---- | /Since: 2/-instance TextShow DominatorTree where-    showb t = mconcat $ "digraph {\n" : dot t ["}\n"]-      where-        dot :: DominatorTree -> [Builder] -> [Builder]-        dot (Dominates root trees) =-            (dotnode root :) . outedges trees . flip (foldl subtree) trees-          where-            outedges :: [DominatorTree] -> [Builder] -> [Builder]-            outedges [] = id-            outedges (Dominates n _ : ts) =-                  \bs -> "  "-                : showb root-                : " -> "-                : showb n-                : singleton '\n'-                : outedges ts bs--            dotnode :: DominatorNode -> Builder-            dotnode Entry        = "  entryNode [shape=plaintext, label=\"entry\"]\n"-            dotnode (Labelled l) = "  " <> showb l <> singleton '\n'--            subtree :: [Builder] -> DominatorTree -> [Builder]-            subtree = flip dot---- | /Since: 2/-instance TextShow DPath where-    showb (DPath ls) = mconcat $ foldr (\l path -> showb l <> " -> " : path)-                                       ["entry"]-                                       ls-    {-# INLINE showb #-}
src/TextShow/Instances.hs view
@@ -22,8 +22,6 @@  import TextShow (TextShow(..), TextShow1(..), TextShow2(..)) -import TextShow.Compiler.Hoopl              ()- import TextShow.Control.Applicative.Trans   () import TextShow.Control.Monad.Trans         () 
− tests/Instances/Compiler/Hoopl.hs
@@ -1,72 +0,0 @@-{-# LANGUAGE CPP                        #-}-{-# LANGUAGE FlexibleInstances          #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE StandaloneDeriving         #-}-{-# OPTIONS_GHC -fno-warn-orphans #-}-{-|-Module:      Instances.Compiler.Hoopl-Copyright:   (C) 2014-2017 Ryan Scott-License:     BSD-style (see the file LICENSE)-Maintainer:  Ryan Scott-Stability:   Provisional-Portability: GHC--Provides 'Arbitrary' instances for data types in the @hoopl@ library.--}-module Instances.Compiler.Hoopl () where--import Compiler.Hoopl (Label, LabelMap, LabelSet, Pointed(..),-                       UniqueMap, UniqueSet, C, mapFromList, setFromList)-#if MIN_VERSION_hoopl(3,9,0)-import Compiler.Hoopl.Internals (uniqueToLbl)-#else-import Compiler.Hoopl (Unique, intToUnique)-import Compiler.Hoopl.GHC (uniqueToLbl)-#endif-import Compiler.Hoopl.Passes.Dominator (DominatorNode(..), DominatorTree(..), DPath(..))--import Instances.Utils ((<@>))--import Prelude ()-import Prelude.Compat--import Test.QuickCheck (Arbitrary(..), oneof)--instance Arbitrary Label where-    arbitrary = uniqueToLbl <$> arbitrary--instance Arbitrary v => Arbitrary (LabelMap v) where-    arbitrary = mapFromList <$> arbitrary--instance Arbitrary LabelSet where-    arbitrary = setFromList <$> arbitrary--instance Arbitrary a => Arbitrary (Pointed C C a) where-    arbitrary = oneof [pure Bot, PElem <$> arbitrary, pure Top]--#if !(MIN_VERSION_hoopl(3,9,0))-instance Arbitrary Unique where-    arbitrary = intToUnique <$> arbitrary-#endif--instance Arbitrary v => Arbitrary (UniqueMap v) where-    arbitrary = mapFromList <$> arbitrary--instance Arbitrary UniqueSet where-    arbitrary = setFromList <$> arbitrary--instance Arbitrary DominatorNode where-    arbitrary = oneof [pure Entry, Labelled <$> arbitrary]--instance Arbitrary DominatorTree where-    arbitrary = Dominates <$> arbitrary <@> [fDominatorTree]---     arbitrary = Dominates <$> arbitrary <*> arbitrary--deriving instance Arbitrary DPath------------------------------------------------------------------------------------ Workarounds to make Arbitrary instances faster----------------------------------------------------------------------------------fDominatorTree :: DominatorTree-fDominatorTree = Dominates Entry []
tests/Instances/Control/Monad/Trans.hs view
@@ -20,7 +20,6 @@ import           Control.Monad.Trans.Except              (ExceptT(..)) import           Control.Monad.Trans.Identity            (IdentityT(..)) import           Control.Monad.Trans.List                (ListT(..))-import           Control.Monad.Trans.Maybe               (MaybeT(..)) import qualified Control.Monad.Trans.Writer.Lazy   as WL (WriterT(..)) import qualified Control.Monad.Trans.Writer.Strict as WS (WriterT(..)) @@ -30,6 +29,5 @@ deriving instance Arbitrary (m (Either e a)) => Arbitrary (ExceptT e m a) deriving instance Arbitrary (f a)            => Arbitrary (IdentityT f a) deriving instance Arbitrary (m [a])          => Arbitrary (ListT m a)-deriving instance Arbitrary (m (Maybe a))    => Arbitrary (MaybeT m a) deriving instance Arbitrary (m (a, w))       => Arbitrary (WL.WriterT w m a) deriving instance Arbitrary (m (a, w))       => Arbitrary (WS.WriterT w m a)
− tests/Spec/Compiler/HooplSpec.hs
@@ -1,51 +0,0 @@-{-|-Module:      Spec.Compiler.HooplSpec-Copyright:   (C) 2014-2017 Ryan Scott-License:     BSD-style (see the file LICENSE)-Maintainer:  Ryan Scott-Stability:   Provisional-Portability: GHC--@hspec@ tests for data types in the @hoopl@ library.--}-module Spec.Compiler.HooplSpec (main, spec) where--import Compiler.Hoopl (Label, LabelMap, LabelSet, Pointed,-                       Unique, UniqueMap, UniqueSet, C)-import Compiler.Hoopl.Passes.Dominator (DominatorNode, DominatorTree, DPath)--import Data.Proxy (Proxy(..))--import Instances.Compiler.Hoopl ()--import Spec.Utils (matchesTextShowSpec)--import Test.Hspec (Spec, describe, hspec, parallel)--import TextShow.Compiler.Hoopl ()--main :: IO ()-main = hspec spec--spec :: Spec-spec = parallel $ do-    describe "Label" $-        matchesTextShowSpec (Proxy :: Proxy Label)-    describe "LabelMap Char" $-        matchesTextShowSpec (Proxy :: Proxy (LabelMap Char))-    describe "LabelSet" $-        matchesTextShowSpec (Proxy :: Proxy LabelSet)-    describe "Pointed C C Int" $-        matchesTextShowSpec (Proxy :: Proxy (Pointed C C Int))-    describe "Unique" $-        matchesTextShowSpec (Proxy :: Proxy Unique)-    describe "UniqueMap Char" $-        matchesTextShowSpec (Proxy :: Proxy (UniqueMap Char))-    describe "UniqueSet" $-        matchesTextShowSpec (Proxy :: Proxy UniqueSet)-    describe "DominatorNode" $-        matchesTextShowSpec (Proxy :: Proxy DominatorNode)-    describe "DominatorTree" $-        matchesTextShowSpec (Proxy :: Proxy DominatorTree)-    describe "DPath" $-        matchesTextShowSpec (Proxy :: Proxy DPath)
tests/Spec/Control/Monad/TransSpec.hs view
@@ -26,6 +26,7 @@ import           Spec.Utils (matchesTextShowSpec)  import           Test.Hspec (Spec, describe, hspec, parallel)+import           Test.QuickCheck.Instances ()  import           TextShow.Control.Monad.Trans () 
text-show-instances.cabal view
@@ -1,5 +1,5 @@ name:                text-show-instances-version:             3.6.5+version:             3.7 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@@ -19,8 +19,6 @@                      .                      * @<http://hackage.haskell.org/package/haskeline            haskeline>@                      .-                     * @<http://hackage.haskell.org/package/hoopl                hoopl>@-                     .                      * @<http://hackage.haskell.org/package/hpc                  hpc>@                      .                      * @<http://hackage.haskell.org/package/old-locale           old-locale>@@@ -98,7 +96,6 @@ library   exposed-modules:     TextShow.Instances -                       TextShow.Compiler.Hoopl                        TextShow.Control.Applicative.Trans                        TextShow.Control.Monad.Trans                        TextShow.Data.Bifunctor@@ -138,7 +135,6 @@                      , containers            >= 0.1    && < 0.7                      , directory             >= 1      && < 1.4                      , haskeline             >= 0.7    && < 0.8-                     , hoopl                 >= 3.8.7  && < 3.11                      , hpc                   >= 0.5    && < 0.7                      , old-locale            >= 1      && < 1.1                      , old-time              >= 1      && < 1.2@@ -179,13 +175,12 @@     build-depends:     Win32                 >= 2.1    && < 2.9   else     build-depends:     terminfo              >= 0.3.2  && < 0.5-                     , unix                  >= 2      && < 2.9+                     , unix                  >= 2      && < 2.8  test-suite spec   type:                exitcode-stdio-1.0   main-is:             Spec.hs-  other-modules:       Instances.Compiler.Hoopl-                       Instances.Control.Applicative.Trans+  other-modules:       Instances.Control.Applicative.Trans                        Instances.Control.Monad.Trans                        Instances.Data.Bifunctor                        Instances.Data.Binary@@ -220,7 +215,6 @@                        Instances.System.Console.Terminfo                        Instances.System.Posix -                       Spec.Compiler.HooplSpec                        Spec.Control.Applicative.TransSpec                        Spec.Control.Monad.TransSpec                        Spec.Data.BifunctorSpec@@ -262,14 +256,13 @@                      , generic-deriving      >= 1.9    && < 2                      , ghc-prim                      , haskeline             >= 0.7    && < 0.8-                     , hoopl                 >= 3.8.7  && < 3.11                      , hpc                   >= 0.5    && < 0.7                      , hspec                 >= 2      && < 3                      , old-locale            >= 1      && < 1.1                      , old-time              >= 1      && < 1.2                      , pretty                >= 1      && < 1.2-                     , QuickCheck            >= 2.10   && < 2.12-                     , quickcheck-instances  >= 0.3.16 && < 0.4+                     , QuickCheck            >= 2.12   && < 2.13+                     , quickcheck-instances  >= 0.3.19 && < 0.4                      , random                >= 1.0.1  && < 1.2                      , tagged                >= 0.4.4  && < 1                      , text-show             >= 3.4    && < 4@@ -308,4 +301,4 @@     build-depends:     Win32                 >= 2.1    && < 2.9   else     build-depends:     terminfo              >= 0.3.2  && < 0.5-                     , unix                  >= 2      && < 2.9+                     , unix                  >= 2      && < 2.8