plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
LanguageHaskell2010

PlutusTx.Enum

Synopsis

Documentation

class Enum a where Source #

Class Enum defines operations on sequentially ordered types.

Methods

succ :: a -> a Source #

the successor of a value. For numeric types, succ adds 1.

pred :: a -> a Source #

the predecessor of a value. For numeric types, pred subtracts 1.

toEnum :: Integer -> a Source #

Convert from an Integer.

fromEnum :: a -> Integer Source #

Convert to an Integer.

Instances

Instances details
Enum Bool Source # 
Instance details

Defined in PlutusTx.Enum

Enum Integer Source # 
Instance details

Defined in PlutusTx.Enum

Enum Ordering Source # 
Instance details

Defined in PlutusTx.Enum

Enum () Source # 
Instance details

Defined in PlutusTx.Enum

Methods

succ :: () -> () Source #

pred :: () -> () Source #

toEnum :: Integer -> () Source #

fromEnum :: () -> Integer Source #