rio-prettyprint 0.1.7.0 → 0.1.8.0
raw patch · 4 files changed
+20/−6 lines, 4 files
Files
- ChangeLog.md +6/−2
- rio-prettyprint.cabal +2/−2
- src/Text/PrettyPrint/Leijen/Extended.hs +11/−1
- stack.yaml +1/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for rio-prettyprint +## 0.1.8.0 + +* Add `Arch` and `OS` instances of `Pretty`. + ## 0.1.7.0 * Add `prettyThrowIO` and `prettyThrowM`, to throw an exception as a @@ -17,12 +21,12 @@ ## 0.1.5.0 -* Add `Pretty` instances for `SomeBase Dir` and `SomeBase File`. +* Add `SomeBase Dir` and `SomeBase File` instances of `Pretty`. ## 0.1.4.0 * Add `string` and `mkNarrativeList`. -* The `Show` instance of `PrettyException` is now derived. `displayException` is +* The `PrettyException` instance of `Show` is now derived. `displayException` is now defined, as the `displayException` of the inner exception. ## 0.1.3.0
rio-prettyprint.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.5. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack name: rio-prettyprint -version: 0.1.7.0 +version: 0.1.8.0 synopsis: Pretty-printing for RIO description: Combine RIO's log capabilities with pretty printing category: Development
src/Text/PrettyPrint/Leijen/Extended.hs view
@@ -20,7 +20,7 @@ -- * Documents annotated by a style , StyleDoc (..) - , StyleAnn(..) + , StyleAnn (..) , displayAnsi , displayPlain , renderDefault @@ -156,7 +156,9 @@ import Data.Array.IArray ( (!), (//) ) import qualified Data.Text as T import Distribution.ModuleName ( ModuleName ) +import Distribution.System ( Arch (..), OS (..) ) import qualified Distribution.Text ( display ) +import Distribution.Utils.Generic ( lowercase ) import Path ( Dir, File, Path, SomeBase, prjSomeBase, toFilePath ) import RIO import qualified RIO.Map as M @@ -208,6 +210,14 @@ instance Pretty ModuleName where pretty = StyleDoc . fromString . Distribution.Text.display + +instance Pretty Arch where + pretty (OtherArch name) = fromString name + pretty other = fromString $ lowercase $ show other + +instance Pretty OS where + pretty (OtherOS name) = fromString name + pretty other = fromString $ lowercase $ show other -------------------------------------------------------------------------------- -- Style Doc
stack.yaml view
@@ -1,1 +1,1 @@-resolver: stack-ghc-9.4.7.yaml +resolver: stack-ghc-9.6.3.yaml