License | GPL-2 |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Yi.Style.EmacsColours.Internal
Description
Copyright : © Mateusz Kowalczyk, 2014 Maintainer : fuuzetsu@fuuzetsu.co.uk Stability : experimental Portability : portable
Internal-use module.
Documentation
Temporary type to carry colour info we need for conversion to string
Constructors
ColInfo | |
toHaskell :: String -> String Source
Takes a string that looks like this:
255 250 250 #fffafa snow snow 248 248 255 #f8f8ff ghost white ghost white 248 248 255 #f8f8ff GhostWhite GhostWhite
and massages it to spit out a ready-to-go series of functions. Make sure to add the imports and module headers and just splice in the rest.
You might use it as
readFile "tmpcolors" >>= writeFile "tmpcolout" . toHaskell
colToHaskell :: String -> ColInfo -> String Source
Coerce colour info into Haskell function thing