Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Functions to evaluate conditional restrictions.
Documentation
result :: [(ID, Value)] -> ConditionalRestriction -> Result ([ErrorMsg], [(ID, Type)]) (Maybe Token) Source #
The result
function takes input data in the form of (ID
, Value
) and a ConditionalRestriction
and returns
the result of that ConditionalRestriction
when applied to the input data given. If data needed for the evaluation
is missing or of the wrong type, it will return a list of error messages and a list of missing data types instead.
Note that this function will accept incomplete data if it is enough to evaluate the expression, but will always return a complete list of needed data types.
timeIn :: DateTime -> OpeningHours -> Bool Source #
The timeIn
function returns wheter a DateTime
is within given OpeningHours
. Unknown values count as not
within the opening hours.