dep-software-0.1.0.0
Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Dep.Class.Mergeable

Description

A module that defines three-value logic, for example used in thruth tables, Karnaugh cards, etc.

Synopsis

The Mergeable typeclass

class Mergeable a where Source #

A typeclass that specifies that it is sometimes possible to merge two values together into a new value.

Methods

merge Source #

Arguments

:: a

The first item to merge.

-> a

The second item to merge.

-> Maybe a

The result of the merge wrapped in a Just; Nothing if it is not possible to merge the two.

Try to merge two values into a new value. The result is wrapped in a Just if it is possible; otherwise Nothing is returned.

Instances

Instances details
Mergeable ThreeValue Source # 
Instance details

Defined in Dep.Data.ThreeValue

Mergeable (Maybe a) Source # 
Instance details

Defined in Dep.Class.Mergeable

Methods

merge :: Maybe a -> Maybe a -> Maybe (Maybe a) Source #