gnuplot-0.5.5: src/Graphics/Gnuplot/Private/Terminal.hs
module Graphics.Gnuplot.Private.Terminal where
data T =
Cons {
precommands :: [String],
options :: [String],
commands :: [String],
interactive :: Bool
}
class C terminal where
canonical :: terminal -> T
format :: T -> [String]
format (Cons pre opts cmds _ia) =
pre ++
if null opts
then cmds
else (unwords $ "set" : "terminal" : opts) : cmds