Closed jtapolczai closed 9 years ago
The getter is now backed into the NodeCondition
type, which looks like this:
data NodeCondition s = forall a.Ord a => NodeEq (Prism' s a) a
| ...
NodeConditions can be constructed in the intuitive way: NodeEQ _AMTime 5
and checked via runCondition
.
(==), (<=), (>=) constraints should only work within the context of one product among the sum components of AgentMessage.
e.g.
AMTemperature
is one constructor ofAgentMessage
and it has a singleTemperature
field. A node should select this field and compare its value.Something like
Ord b=> (a -> b) -> a -> NodeCondition a
or whatever.