Safe Haskell | None |
---|---|
Language | Haskell2010 |
Switch
es allow enabling and disabling individual rules on a global
level.
TODO Consider moving the switch status to the type level.
TODO Consider using patterns for the switch status and encode using Int
s.
Synopsis
- data SwitchStatus
- data Switch where
- Switch :: !SwitchStatus -> Switch
Documentation
data SwitchStatus Source #
Explicit naming of the status of the switch.
Instances
Eq SwitchStatus Source # | |
Defined in ADP.Fusion.Core.Term.Switch (==) :: SwitchStatus -> SwitchStatus -> Bool # (/=) :: SwitchStatus -> SwitchStatus -> Bool # | |
Ord SwitchStatus Source # | |
Defined in ADP.Fusion.Core.Term.Switch compare :: SwitchStatus -> SwitchStatus -> Ordering # (<) :: SwitchStatus -> SwitchStatus -> Bool # (<=) :: SwitchStatus -> SwitchStatus -> Bool # (>) :: SwitchStatus -> SwitchStatus -> Bool # (>=) :: SwitchStatus -> SwitchStatus -> Bool # max :: SwitchStatus -> SwitchStatus -> SwitchStatus # min :: SwitchStatus -> SwitchStatus -> SwitchStatus # | |
Show SwitchStatus Source # | |
Defined in ADP.Fusion.Core.Term.Switch showsPrec :: Int -> SwitchStatus -> ShowS # show :: SwitchStatus -> String # showList :: [SwitchStatus] -> ShowS # |
Terminal for the switch. The switch status is not given to any function,
since processing of the rule already indicates that the switch is enabled --
if all other symbols parse successfully. Due to consistency, the type of
result is ()
.
Switch :: !SwitchStatus -> Switch |