{-# LANGUAGE DeriveDataTypeable #-}
module Language.Javascript.Flot(
Flot(..), version, file
) where
import qualified Paths_js_flot as Paths
import Data.Version
import Data.Data
import Data.Char
data Flot
= Flot
| FlotCanvas
| FlotCategories
| FlotCrosshair
| FlotErrorbars
| FlotFillbetween
| FlotImage
| FlotNavigate
| FlotPie
| FlotResize
| FlotSelection
| FlotStack
| FlotSymbol
| FlotThreshold
| FlotTime
deriving (Eq,Ord,Show,Read,Bounded,Enum,Data,Typeable)
file :: Flot -> IO FilePath
file = Paths.getDataFileName . name
name Flot = "jquery.flot.min.js"
name x = "jquery.flot." ++ map toLower (drop 4 $ show x) ++ ".min.js"
version :: Version
version = Version (take 3 $ versionBranch Paths.version) []