validity-0.4.0.2: Validity typeclass

Safe HaskellSafe
LanguageHaskell2010

Data.RelativeValidity

Description

Relative validity

Synopsis

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 isValidFor b should imply isValid a for any b.

If there is a Validity b instance as well, then a isValidFor b should imply isValid b for any a.

Minimal complete definition

isValidFor

Methods

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