Created
August 30, 2018 13:02
-
-
Save sorki/d59ddca8995ff8c2ec8e7d8490260de6 to your computer and use it in GitHub Desktop.
ghci colors (~/.ghc/ghci.conf)
This file contains hidden or 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
import Control.Applicative | |
import Control.Monad | |
import Control.Concurrent | |
import Data.String | |
import Data.Char | |
import Data.List | |
import Data.Monoid | |
import Control.Monad.IO.Class | |
import Data.HashSet as HS | |
import Numeric (readHex) | |
import Text.Printf (printf) | |
-- You must set your prompt to a lambda, it's a law. | |
:set prompt "\ESC[35m\STX λ: \ESC[m\STX" | |
:set -fno-warn-unused-imports | |
:def hlint const . return $ ":! hlint \"src\"" | |
:def hoogle \s -> return $ ":! hoogle --count=15 \"" ++ s ++ "\"" | |
:def pl \s -> return $ ":! pointfree \"" ++ s ++ "\"" | |
:set -XOverloadedStrings | |
-- maybe | |
-- :seti -XNoMonomorphismRestriction | |
import qualified IPPrint | |
import qualified Language.Haskell.HsColour as HsColour | |
import qualified Language.Haskell.HsColour.Colourise as HsColour | |
import qualified Language.Haskell.HsColour.Output as HsColour | |
let myColourPrefs = HsColour.defaultColourPrefs { HsColour.conid = [HsColour.Foreground HsColour.Yellow, HsColour.Bold], HsColour.conop = [HsColour.Foreground HsColour.Yellow], HsColour.string = [HsColour.Foreground HsColour.Green], HsColour.char = [HsColour.Foreground HsColour.Cyan], HsColour.number = [HsColour.Foreground HsColour.Red, HsColour.Bold], HsColour.layout = [HsColour.Foreground HsColour.White], HsColour.keyglyph = [HsColour.Foreground HsColour.White] } | |
let myPrint = putStrLn . HsColour.hscolour (HsColour.TTYg HsColour.XTerm256Compatible) myColourPrefs False False "" False . IPPrint.pshow | |
:set -interactive-print=myPrint | |
print = myPrint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment