INblobs-0.1.1: src/DisplayOptions.hs
module DisplayOptions where
import Data.List ((\\))
type ShowInfo = [What]
data What = NodeLabel | NodeInfo | EdgeLabel | EdgeInfo deriving (Eq)
data DisplayOptions = DP
{ dpShowInfo :: ShowInfo
}
standard :: DisplayOptions
standard = DP []
toggle :: What -> DisplayOptions -> DisplayOptions
toggle w (DP opts) = DP (if w `elem` opts then opts\\[w] else w:opts)