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)