diff options
Diffstat (limited to 'tools/colouriser/colour.hs')
-rw-r--r-- | tools/colouriser/colour.hs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/colouriser/colour.hs b/tools/colouriser/colour.hs deleted file mode 100644 index 3e6e39ba45f6..000000000000 --- a/tools/colouriser/colour.hs +++ /dev/null @@ -1,24 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} - -import Control.Monad (unless) -import Language.Haskell.HsColour.Colourise (defaultColourPrefs) -import Language.Haskell.HsColour.CSS -import Options - -defineOptions "MainOptions" $ do - stringOption "optFile" "file" "" - "Name of the .hs file. Will be used for the HTML file as well" - -colorCode :: String -> IO () -colorCode input = do - code <- readFile input - putStr $ concat [ "<div class=\"code\">" - , hscolour False code - , "</div>" - ] - -main :: IO () -main = runCommand $ \opts args -> do - let file = optFile opts - unless (file == "") $ - colorCode file \ No newline at end of file |