genvalidity-property-1.0.0.0: Standard properties for functions on `Validity` types

Safe Haskell | Safe-Inferred
Language | Haskell2010

Test.Validity.Types

Synopsis

- class CanFail (f :: Type -> Type) where
  - hasFailed :: f a -> Bool
  - resultIfSucceeded :: f a -> Maybe a

# Documentation

class CanFail (f :: Type -> Type) where Source #

A class of types that are the result of functions that can fail

Methods

hasFailed :: f a -> Bool Source #

resultIfSucceeded :: f a -> Maybe a Source #

#### Instances

Instances details

CanFail Maybe Source # |
Instance details Defined in Test.Validity.Types Methods hasFailed :: Maybe a -> Bool Source # resultIfSucceeded :: Maybe a -> Maybe a Source #
CanFail (Either e) Source # |
Instance details Defined in Test.Validity.Types Methods hasFailed :: Either e a -> Bool Source # resultIfSucceeded :: Either e a -> Maybe a Source #