packages feed

prologue 3.1.7 → 3.2.0

raw patch · 4 files changed

+59/−16 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Prologue.Text.Show.Pretty: class PrettyShow a
- Prologue.Text.Show.Pretty: prettyShow :: PrettyShow a => a -> Text
+ Prologue.Text.Show.Styled: Pretty :: Pretty
+ Prologue.Text.Show.Styled: class StyledShow style a
+ Prologue.Text.Show.Styled: class StyledShow1 style a
+ Prologue.Text.Show.Styled: class StyledShow2 style a
+ Prologue.Text.Show.Styled: data Pretty
+ Prologue.Text.Show.Styled: instance GHC.Show.Show Prologue.Text.Show.Styled.Pretty
+ Prologue.Text.Show.Styled: instance Prologue.Text.Show.Styled.StyledShow1 style a => Prologue.Text.Show.Styled.StyledShow style (a t)
+ Prologue.Text.Show.Styled: instance Prologue.Text.Show.Styled.StyledShow2 style a => Prologue.Text.Show.Styled.StyledShow1 style (a t)
+ Prologue.Text.Show.Styled: prettyShow :: PrettyShow a => a -> Text
+ Prologue.Text.Show.Styled: prettyShow1 :: PrettyShow1 a => a t1 -> Text
+ Prologue.Text.Show.Styled: styledShow :: StyledShow style a => style -> a -> StyledShowOutput style
+ Prologue.Text.Show.Styled: styledShow1 :: forall t1. StyledShow1 style a => style -> a t1 -> StyledShowOutput style
+ Prologue.Text.Show.Styled: styledShow2 :: forall t1 t2. StyledShow2 style a => style -> a t1 t2 -> StyledShowOutput style
+ Prologue.Text.Show.Styled: type PrettyShow = StyledShow Pretty
+ Prologue.Text.Show.Styled: type PrettyShow1 = StyledShow1 Pretty

Files

prologue.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3fe730e269997bb415be310c9f50e763eb75d92f00169835ab0d84a1b22fca2e+-- hash: d1ea16d1ed3a0340ac20cadbb8452762d4d25ee6f46d882b5ac3404607590279  name:           prologue-version:        3.1.7+version:        3.2.0 synopsis:       Better, more general Prelude exporting common utilities. description:    Replacement for the Haskell's Prelude, exposing more commonly used functions and patching old GHC ones to behave in the newest GHC's way. category:       control@@ -97,7 +97,7 @@       Prologue.Placeholders_old       Prologue.Prim       Prologue.Text.Show-      Prologue.Text.Show.Pretty+      Prologue.Text.Show.Styled       Prologue.Type.Reflection       Prologue.Unsafe   other-modules:
src/Prologue.hs view
@@ -36,7 +36,7 @@                                              ) import Text.Read                        as X (readPrec) -- new style Read class implementation import Prologue.Text.Show               as X-import Prologue.Text.Show.Pretty        as X+import Prologue.Text.Show.Styled        as X import Text.Show.Functions              as X () import Data.Void                        as X (Void, absurd) 
− src/Prologue/Text/Show/Pretty.hs
@@ -1,12 +0,0 @@-module Prologue.Text.Show.Pretty where--import Data.Text (Text)------------------------- === Class === ------------------------class PrettyShow a where-    prettyShow :: a -> Text-
+ src/Prologue/Text/Show/Styled.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE AllowAmbiguousTypes #-}++module Prologue.Text.Show.Styled where++import Prelude++import Data.Text (Text)++++-------------------+-- === Class === --+-------------------++-- === Definition === --++type family StyledShowOutput style++class StyledShow  style a where +    styledShow :: style -> a -> StyledShowOutput style++class StyledShow1 style a where+    styledShow1 :: ∀ t1. style -> a t1 -> StyledShowOutput style++class StyledShow2 style a where+    styledShow2 :: ∀ t1 t2. style -> a t1 t2 -> StyledShowOutput style+++-- === Redirect instances === --++instance {-# OVERLAPPABLE #-} StyledShow1 style a +    => StyledShow style (a t) where+    styledShow = styledShow1 ; {-# INLINE styledShow #-}++instance {-# OVERLAPPABLE #-} StyledShow2 style a +    => StyledShow1 style (a t) where+    styledShow1 = styledShow2 ; {-# INLINE styledShow1 #-}++++--------------------+-- === Styles === --+--------------------++-- === Pretty === --++data Pretty = Pretty deriving (Show)+type PrettyShow  = StyledShow  Pretty+type PrettyShow1 = StyledShow1 Pretty+type instance StyledShowOutput Pretty = Text++prettyShow  :: PrettyShow  a => a    -> Text+prettyShow1 :: PrettyShow1 a => a t1 -> Text+prettyShow  = styledShow  Pretty ; {-# INLINE prettyShow  #-}+prettyShow1 = styledShow1 Pretty ; {-# INLINE prettyShow1 #-}