Last active
November 26, 2018 13:58
-
-
Save cemerick/e2a1edfde67280d16a19755f89db7ff7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- mostly ripped off from https://teh.id.au/posts/2017/02/13/interactive-print/index.html | |
:{ | |
:def pp (\_ -> return | |
$ unlines ["import qualified Text.Show.Pretty as SP", | |
"import qualified Language.Haskell.HsColour as HSC", | |
"import Language.Haskell.HsColour.Colourise (defaultColourPrefs)", | |
"_colorPrint = putStrLn . HSC.hscolour HSC.TTY defaultColourPrefs False False \"\" False . SP.ppShow", | |
":set -interactive-print _colorPrint"]) | |
:} | |
:def npp \_ -> return (":set -interactive-print System.IO.print") | |
:pp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment