File: HsColour.hs

package info (click to toggle)
hlint 2.1.10-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 588 kB
  • sloc: haskell: 4,475; lisp: 86; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{-# LANGUAGE CPP #-}
module HsColour(hsColourHTML, hsColourConsole) where

#ifdef GPL_SCARES_ME

hsColourConsole :: IO (String -> String)
hsColourConsole = return id

hsColourHTML :: String -> String
hsColourHTML = id

#else

import Data.Functor
import Prelude

import Language.Haskell.HsColour.TTY as TTY
import Language.Haskell.HsColour.Colourise
import Language.Haskell.HsColour.CSS as CSS


hsColourConsole :: IO (String -> String)
hsColourConsole = TTY.hscolour <$> readColourPrefs

hsColourHTML :: String -> String
hsColourHTML = CSS.hscolour False 1

#endif