plutus-tx-0.1.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
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 b => JoinSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

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

(JoinSemiLattice a, 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 b => MeetSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

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

(MeetSemiLattice a, 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 b => BoundedJoinSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

bottom :: a -> b Source #

(BoundedJoinSemiLattice a, 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 b => BoundedMeetSemiLattice (a -> b) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

top :: a -> b Source #

(BoundedMeetSemiLattice a, 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
JoinSemiLattice a => Semigroup (Join a) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

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

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

Defined in PlutusTx.Lattice

Methods

mempty :: 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
MeetSemiLattice a => Semigroup (Meet a) Source # 
Instance details

Defined in PlutusTx.Lattice

Methods

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

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

Defined in PlutusTx.Lattice

Methods

mempty :: Meet a Source #