Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

Relative validity

## Synopsis

- class RelativeValidity a b where
- isValidFor :: a -> b -> Bool

- isInvalidFor :: RelativeValidity a b => a -> b -> Bool

# Documentation

class RelativeValidity a b where Source #

A class of types that have additional invariants defined upon them that aren't enforced by the type system

If there is a `Validity a`

instance as well, then `a `

should imply `isValidFor`

b`isValid a`

for any `b`

.

If there is a `Validity b`

instance as well, then `a `

should imply `isValidFor`

b`isValid b`

for any `a`

.

isValidFor :: a -> b -> Bool Source #

isInvalidFor :: RelativeValidity a b => a -> b -> Bool Source #