/ src /
src/DisplayOptions.hs
1 module DisplayOptions where
2
3 import Data.List ((\\))
4
5 type ShowInfo = [What]
6 data What = NodeLabel | NodeInfo | EdgeLabel | EdgeInfo deriving (Eq)
7
8 data DisplayOptions = DP
9 { dpShowInfo :: ShowInfo
10 }
11
12 standard :: DisplayOptions
13 standard = DP []
14
15 toggle :: What -> DisplayOptions -> DisplayOptions
16 toggle w (DP opts) = DP (if w `elem` opts then opts\\[w] else w:opts)