wl-pprint-extras 1.4 → 1.4.1
raw patch · 2 files changed
+15/−2 lines, 2 filesdep +containers
Dependencies added: containers
Files
Text/PrettyPrint/Free/Internal.hs view
@@ -128,8 +128,11 @@ import Data.Functor.Apply import Data.Functor.Bind import Data.Functor.Plus+import Data.List.NonEmpty (NonEmpty)+import Numeric.Natural (Natural) import Control.Applicative import Control.Monad+import Data.Sequence (Seq) import Data.Semigroup import System.IO (Handle,hPutStr,hPutChar,stdout) import Prelude hiding (foldr1)@@ -535,11 +538,20 @@ pretty = char prettyList s = string s +instance Pretty a => Pretty (Seq a) where+ pretty = prettyList . toList++instance Pretty a => Pretty (NonEmpty a) where+ pretty = prettyList . toList+ instance Pretty Int where pretty = int instance Pretty Integer where pretty = integer++instance Pretty Natural where+ pretty = integer . toInteger instance Pretty Float where pretty = float
wl-pprint-extras.cabal view
@@ -1,6 +1,6 @@ name: wl-pprint-extras category: Control, Monads, Text-version: 1.4+version: 1.4.1 cabal-version: >= 1.6 license: BSD3 license-file: LICENSE@@ -23,7 +23,8 @@ build-depends: base >= 4 && < 5, semigroups >= 0.7.1 && < 0.8,- semigroupoids >= 1.2.4 && <= 1.3+ semigroupoids >= 1.2.4 && <= 1.3,+ containers >= 0.4 && < 0.5 exposed-modules: Text.PrettyPrint.Free