mainland-pretty 0.6.2 → 0.7.1.1
raw patch · 4 files changed
Files
- LICENSE +1/−1
- Text/PrettyPrint/Mainland.hs +11/−5
- Text/PrettyPrint/Mainland/Class.hs +6/−0
- mainland-pretty.cabal +21/−8
LICENSE view
@@ -48,7 +48,7 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Copyright (c) 2015-2017+Copyright (c) 2015-2024 Drexel University. Redistribution and use in source and binary forms, with or without
Text/PrettyPrint/Mainland.hs view
@@ -41,7 +41,7 @@ -- ** Basic document combinators empty, srcloc, line, softline, softbreak,- (<>), (<|>), (<+>), (</>), (<+/>), (<//>),+ (<|>), (<+>), (</>), (<+/>), (<//>), group, flatten, -- ** Wrapping documents in delimiters@@ -337,7 +337,8 @@ -- | The document @'group' d@ will flatten @d@ to /one/ line if there is -- room for it, otherwise the original @d@. group :: Doc -> Doc-group d = flatten d `Alt` d+group Empty = Empty+group d = flatten d `Alt` d -- | The document @'flatten' d@ will flatten @d@ to /one/ line. flatten :: Doc -> Doc@@ -479,9 +480,10 @@ -- | The document @'align' d@ renders @d@ with a nesting level set to the current -- column. align :: Doc -> Doc-align d = column $ \k ->- nesting $ \i ->- nest (k - i) d+align Empty = Empty+align d = column $ \k ->+ nesting $ \i ->+ nest (k - i) d -- | The document @'hang' i d@ renders @d@ with a nesting level set to the -- current column plus @i@, /not including/ the first line.@@ -532,7 +534,11 @@ else spaces (f - w) -- | Equivalent of 'fail', but with a document instead of a string.+#if MIN_VERSION_base(4,13,0)+faildoc :: MonadFail m => Doc -> m a+#else faildoc :: Monad m => Doc -> m a+#endif faildoc = fail . pretty 80 -- | Equivalent of 'error', but with a document instead of a string.
Text/PrettyPrint/Mainland/Class.hs view
@@ -38,6 +38,12 @@ Pos(..), posFile) import qualified Data.Map as Map+#if !(MIN_VERSION_base(4,9,0))+import Data.Monoid (Monoid(..), (<>))+#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 qualified Data.Text as T import qualified Data.Text.Lazy as L
mainland-pretty.cabal view
@@ -1,11 +1,11 @@ name: mainland-pretty-version: 0.6.2-cabal-version: >= 1.6+version: 0.7.1.1+cabal-version: >= 1.10 license: BSD3 license-file: LICENSE copyright: (c) 2006-2011 Harvard University (c) 2011-2012 Geoffrey Mainland- (c) 2015-2018 Drexel University+ (c) 2015-2024 Drexel University author: Geoffrey Mainland <mainland@drexel.edu> maintainer: Geoffrey Mainland <mainland@drexel.edu> stability: alpha@@ -19,21 +19,34 @@ 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.2, GHC==8.4.1+tested-with: GHC==8.0.2,+ GHC==8.2.2,+ GHC==8.4.3,+ GHC==8.6.5,+ GHC==8.8.4,+ GHC==8.10.7,+ GHC==9.0.2,+ GHC==9.2.2,+ GHC==9.4.8,+ GHC==9.6.4,+ GHC==9.8.2,+ GHC==9.10.1 build-type: Simple library+ default-language: Haskell2010+ exposed-modules: Text.PrettyPrint.Mainland Text.PrettyPrint.Mainland.Class build-depends: base >= 4.5 && < 5,- containers >= 0.2 && < 0.6,- srcloc >= 0.2 && < 0.6,- text > 0.11 && < 1.3,- transformers > 0.3 && < 0.6+ containers >= 0.2 && < 0.8,+ srcloc >= 0.2 && < 0.7,+ text > 0.11 && < 2.2,+ transformers > 0.3 && < 0.7 source-repository head type: git