-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Type-indexed runtime-checked properties -- -- This package provides a (phantom) type-indexed newtype -- evidence-wrapper for values that are checked to satisfy the property -- associated with the type. @package data-checked @version 0.1 -- | Type-indexed runtime-checked properties. module Data.Checked -- | Wrapper-evidence for property p. data Checked p v -- | Use when the property can be deduced without a runtime check. trustMe :: v -> Checked p v -- | Unwrap the checked value. checked :: Checked p v -> v class Property p v holds :: Property p v => p -> v -> Bool -- | Return Just v if p holds and Nothing -- overwise. maybeHolds :: Property p v => p -> v -> Maybe v -- | Wrap the value if the property holds. check :: Property p v => v -> Maybe (Checked p v)