mainland-pretty 0.6.1 → 0.6.2
raw patch · 2 files changed
+19/−11 lines, 2 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Text.PrettyPrint.Mainland.Class: instance (Text.PrettyPrint.Mainland.Class.Pretty k, Text.PrettyPrint.Mainland.Class.Pretty v) => Text.PrettyPrint.Mainland.Class.Pretty (Data.Map.Base.Map k v)
- Text.PrettyPrint.Mainland.Class: instance Text.PrettyPrint.Mainland.Class.Pretty a => Text.PrettyPrint.Mainland.Class.Pretty (Data.Set.Base.Set a)
+ Text.PrettyPrint.Mainland: instance Data.Semigroup.Semigroup Text.PrettyPrint.Mainland.Doc
+ Text.PrettyPrint.Mainland.Class: instance (Text.PrettyPrint.Mainland.Class.Pretty k, Text.PrettyPrint.Mainland.Class.Pretty v) => Text.PrettyPrint.Mainland.Class.Pretty (Data.Map.Internal.Map k v)
+ Text.PrettyPrint.Mainland.Class: instance Text.PrettyPrint.Mainland.Class.Pretty a => Text.PrettyPrint.Mainland.Class.Pretty (Data.Set.Internal.Set a)
- Text.PrettyPrint.Mainland: (<>) :: Monoid m => m -> m -> m
+ Text.PrettyPrint.Mainland: (<>) :: Semigroup a => a -> a -> a
- Text.PrettyPrint.Mainland.Class: class Pretty a where ppr = pprPrec 0 pprPrec _ = ppr pprList xs = list (map ppr xs)
+ Text.PrettyPrint.Mainland.Class: class Pretty a
Files
- Text/PrettyPrint/Mainland.hs +12/−4
- mainland-pretty.cabal +7/−7
Text/PrettyPrint/Mainland.hs view
@@ -82,11 +82,12 @@ posFile, posLine) import qualified Data.Map as Map-#if MIN_VERSION_base(4,5,0)+#if !(MIN_VERSION_base(4,9,0)) import Data.Monoid (Monoid(..), (<>))-#else /* !MIN_VERSION_base(4,5,0) */-import Data.Monoid (Monoid(..))-#endif /* !MIN_VERSION_base(4,5,0) */+#endif /* !(MIN_VERSION_base(4,9,0)) */+#if MIN_VERSION_base(4,9,0) && !(MIN_VERSION_base(4,11,0))+import Data.Semigroup (Semigroup(..))+#endif import qualified Data.Set as Set import Data.String (IsString(..)) import qualified Data.Text as T@@ -122,9 +123,16 @@ -- | Calculate document based on current nesting | Nesting (Int -> Doc) +#if MIN_VERSION_base(4,9,0)+instance Semigroup Doc where+ (<>) = Cat+#endif+ instance Monoid Doc where mempty = empty+#if !(MIN_VERSION_base(4,11,0)) mappend = Cat+#endif instance IsString Doc where fromString s = string s
mainland-pretty.cabal view
@@ -1,11 +1,11 @@ name: mainland-pretty-version: 0.6.1+version: 0.6.2 cabal-version: >= 1.6 license: BSD3 license-file: LICENSE copyright: (c) 2006-2011 Harvard University (c) 2011-2012 Geoffrey Mainland- (c) 2015-2017 Drexel University+ (c) 2015-2018 Drexel University author: Geoffrey Mainland <mainland@drexel.edu> maintainer: Geoffrey Mainland <mainland@drexel.edu> stability: alpha@@ -14,12 +14,12 @@ category: Text synopsis: Pretty printing designed for printing source code. description: Pretty printing designed for printing source code based on- Wadler's paper /A Prettier Printer/. The main advantage of this- library is its ability to automatically track the source- locations associated with pretty printed values and output- appropriate #line pragmas and its ability to produce output+ Wadler's paper /A Prettier Printer/. The main advantage of this+ library is its ability to automatically track the source+ locations associated with pretty printed values and output+ appropriate #line pragmas and its ability to produce output in the form of lazy text using a builder.-tested-with: GHC==7.4.2, GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1+tested-with: GHC==7.4.2, GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.1 build-type: Simple