packages feed

ghci-pretty (empty) → 0.0.1

raw patch · 6 files changed

+176/−0 lines, 6 filesdep +basedep +hscolourdep +ipprintsetup-changed

Dependencies added: base, hscolour, ipprint

Files

+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2014, Lars Kuhtz <lakuhtz@gmail.com>++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be+included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ README.md view
@@ -0,0 +1,51 @@+[![Build Status](https://travis-ci.org/larskuhtz/ghci-pretty.svg?branch=master)](https://travis-ci.org/larskuhtz/ghci-pretty)++A tiny package that combines the [ipprint](https://hackage.haskell.org/package/ipprint)+package and the [hscolour](https://hackage.haskell.org/package/hscolour)+package to provide colored pretty-printing in ghci.++Here is all the code from this package:++```.haskell+module IPPrint.Colored+( cpprint+) where++import IPPrint+import Language.Haskell.HsColour+import Language.Haskell.HsColour.Colourise+import Language.Haskell.HsColour.Output++cpprint :: Show a => a -> IO ()+cpprint = putStrLn . hscolour (TTYg XTerm256Compatible) defaultColourPrefs False False "" False . pshow+```++Usage+=====++```.haskell+cabal update+cabal install ghci-pretty+```++Add the following lines to your `ghci.conf` file:++```.haskell+-- Pretty printing of it+import IPPrint.Colored+:set -interactive-print=IPPrint.Colored.cpprint+:def cp (\_ -> return ":set -interactive-print=IPPrint.Colored.cpprint")+:def ncp (\_ -> return ":set -interactive-print=print")+```++Now you can enable colored pretty-printing in ghci with the commmand++```.haskell+:cp+```++The following command turns colored pretty-printing off again++```.haskell+:ncp+```
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ constraints view
@@ -0,0 +1,46 @@+constraints: Extra ==1.46.3,+             HUnit ==1.2.5.2,+             QuickCheck ==2.7.6,+             Unixutils ==1.52,+             array ==0.5.0.0,+             base ==4.7.0.1,+             binary ==0.7.1.0,+             bytestring ==0.10.4.0,+             bzlib ==0.5.0.4,+             cereal ==0.4.0.1,+             containers ==0.5.5.1,+             crypto-api ==0.13.2,+             deepseq ==1.3.0.2,+             directory ==1.2.1.0,+             entropy ==0.3.2,+             filepath ==1.3.0.2,+             ghc-prim ==0.3.1.0,+             ghci-pretty ==0.0.1,+             haskell-src ==1.0.1.6,+             hscolour ==1.20.3,+             integer-gmp ==0.5.1.0,+             ipprint ==0.5,+             mtl ==2.2.1,+             network-uri ==2.6.0.1,+             old-locale ==1.0.0.6,+             old-time ==1.1.0.2,+             parsec ==3.1.7,+             pretty ==1.1.1.1,+             primitive ==0.5.3.0,+             process ==1.2.0.0,+             pureMD5 ==2.1.2.1,+             random ==1.0.1.1,+             regex-base ==0.93.2,+             regex-compat ==0.95.1,+             regex-posix ==0.95.2,+             regex-tdfa ==1.2.0,+             rts ==1.0,+             syb ==0.4.2,+             tagged ==0.7.2,+             template-haskell ==2.9.0.0,+             text ==1.1.1.3,+             tf-random ==0.5,+             time ==1.4.2,+             transformers ==0.4.1.0,+             unix ==2.7.0.1,+             zlib ==0.5.4.1
+ ghci-pretty.cabal view
@@ -0,0 +1,41 @@+Name: ghci-pretty+Version: 0.0.1+Synopsis: colored pretty-printing within ghci+description:+    a tiny package that combines the ipprint package and+    the hscolour package to provide colored pretty-printing+    in ghci+Homepage: https://github.com/larskuhtz/ghci-pretty+License: MIT+License-file: LICENSE+Author: Lars Kuhtz+Maintainer: Lars Kuhtz <lakuhtz@gmail.com>+Copyright: Copyright (c) 2014 Lars Kuhtz <lakuhtz@gmail.com>+Category: Development+Build-type: Simple+Cabal-version: >= 1.16++extra-doc-files:+    README.md++extra-source-files:+    constraints++source-repository head+    type: git+    location: https://github.com/larskuhtz/ghci-pretty++Library+    default-language: Haskell2010+    hs-source-dirs: src++    exposed-modules:+        IPPrint.Colored++    build-depends:+        base == 4.*,+        ipprint >= 0.5,+        hscolour >= 1.20++    ghc-options: -Wall+
+ src/IPPrint/Colored.hs view
@@ -0,0 +1,16 @@+-- ------------------------------------------------------ --+-- Copyright © 2014 Lars Kuhtz <lakuhtz@gmail.com>+-- ------------------------------------------------------ --++module IPPrint.Colored+( cpprint+) where++import IPPrint+import Language.Haskell.HsColour+import Language.Haskell.HsColour.Colourise+import Language.Haskell.HsColour.Output++cpprint :: Show a => a -> IO ()+cpprint = putStrLn . hscolour (TTYg XTerm256Compatible) defaultColourPrefs False False "" False . pshow+