Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class JoinSemiLattice a where
- (\/) ∷ a → a → a
- class MeetSemiLattice a where
- (/\) ∷ a → a → a
- type Lattice a = (JoinSemiLattice a, MeetSemiLattice a)
- class JoinSemiLattice a ⇒ BoundedJoinSemiLattice a where
- bottom ∷ a
- class MeetSemiLattice a ⇒ BoundedMeetSemiLattice a where
- top ∷ a
- type BoundedLattice a = (BoundedJoinSemiLattice a, BoundedMeetSemiLattice a)
- newtype Join a = Join a
- newtype Meet a = Meet a
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. (->)
.
Instances
JoinSemiLattice Bool Source # | |
(JoinSemiLattice a, JoinSemiLattice b) ⇒ JoinSemiLattice (a, b) Source # | |
Defined in PlutusTx.Lattice | |
JoinSemiLattice b ⇒ JoinSemiLattice (a → b) Source # | |
Defined in PlutusTx.Lattice |
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. (->)
.
Instances
MeetSemiLattice Bool Source # | |
(MeetSemiLattice a, MeetSemiLattice b) ⇒ MeetSemiLattice (a, b) Source # | |
Defined in PlutusTx.Lattice | |
MeetSemiLattice b ⇒ MeetSemiLattice (a → b) Source # | |
Defined in PlutusTx.Lattice |
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 (\/)
.
Instances
BoundedJoinSemiLattice Bool Source # | |
Defined in PlutusTx.Lattice | |
(BoundedJoinSemiLattice a, BoundedJoinSemiLattice b) ⇒ BoundedJoinSemiLattice (a, b) Source # | |
Defined in PlutusTx.Lattice | |
BoundedJoinSemiLattice b ⇒ BoundedJoinSemiLattice (a → b) Source # | |
Defined in PlutusTx.Lattice |
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 (/\)
.
Instances
BoundedMeetSemiLattice Bool Source # | |
Defined in PlutusTx.Lattice | |
(BoundedMeetSemiLattice a, BoundedMeetSemiLattice b) ⇒ BoundedMeetSemiLattice (a, b) Source # | |
Defined in PlutusTx.Lattice | |
BoundedMeetSemiLattice b ⇒ BoundedMeetSemiLattice (a → b) Source # | |
Defined in PlutusTx.Lattice |
type BoundedLattice a = (BoundedJoinSemiLattice a, BoundedMeetSemiLattice a) Source #
A bounded lattice.
Join a |
Meet a |