plutus-tx-1.36.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Lattice

Synopsis

Documentation

class JoinSemiLattice a where Source #

A join semi-lattice, i.e. a partially ordered set equipped with a binary operation (\/).

Note that the mathematical definition would require an ordering constraint - we omit that so we can define instances for e.g. (->).

Methods

(\/) :: a -> a -> a Source #

Instances

Instances details
JoinSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(\/) :: Bool -> Bool -> Bool Source #

(JoinSemiLattice a, JoinSemiLattice b) => JoinSemiLattice (a, b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(\/) :: (a, b) -> (a, b) -> (a, b) Source #

JoinSemiLattice b => JoinSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(\/) :: (a -> b) -> (a -> b) -> a -> b Source #

class MeetSemiLattice a where Source #

A meet semi-lattice, i.e. a partially ordered set equipped with a binary operation (/\).

Note that the mathematical definition would require an ordering constraint - we omit that so we can define instances for e.g. (->).

Methods

(/\) :: a -> a -> a Source #

Instances

Instances details
MeetSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(/\) :: Bool -> Bool -> Bool Source #

(MeetSemiLattice a, MeetSemiLattice b) => MeetSemiLattice (a, b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(/\) :: (a, b) -> (a, b) -> (a, b) Source #

MeetSemiLattice b => MeetSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(/\) :: (a -> b) -> (a -> b) -> a -> b Source #

type Lattice a = (JoinSemiLattice a, MeetSemiLattice a) Source #

A lattice.

class JoinSemiLattice a => BoundedJoinSemiLattice a where Source #

A bounded join semi-lattice, i.e. a join semi-lattice augmented with a distinguished element bottom which is the unit of (\/).

Methods

bottom :: a Source #

Instances

Instances details
BoundedJoinSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

bottom :: Bool Source #

(BoundedJoinSemiLattice a, BoundedJoinSemiLattice b) => BoundedJoinSemiLattice (a, b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

bottom :: (a, b) Source #

BoundedJoinSemiLattice b => BoundedJoinSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

bottom :: a -> b Source #

class MeetSemiLattice a => BoundedMeetSemiLattice a where Source #

A bounded meet semi-lattice, i.e. a meet semi-lattice augmented with a distinguished element top which is the unit of (/\).

Methods

top :: a Source #

Instances

Instances details
BoundedMeetSemiLattice Bool Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

top :: Bool Source #

(BoundedMeetSemiLattice a, BoundedMeetSemiLattice b) => BoundedMeetSemiLattice (a, b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

top :: (a, b) Source #

BoundedMeetSemiLattice b => BoundedMeetSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

top :: a -> b Source #

newtype Join a Source #

A wrapper witnessing that a join semi-lattice is a monoid with (\/) and bottom.

Constructors

Join a 

Instances

Instances details
BoundedJoinSemiLattice a => Monoid (Join a) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

mempty :: Join a Source #

JoinSemiLattice a => Semigroup (Join a) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(<>) :: Join a -> Join a -> Join a Source #

newtype Meet a Source #

A wrapper witnessing that a meet semi-lattice is a monoid with (/\) and top.

Constructors

Meet a 

Instances

Instances details
BoundedMeetSemiLattice a => Monoid (Meet a) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

mempty :: Meet a Source #

MeetSemiLattice a => Semigroup (Meet a) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

(<>) :: Meet a -> Meet a -> Meet a Source #