plutus-tx-1.0.0.0.0.0.0.0.1: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
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.

enumFromTo :: a -> a -> [a] Source #

Construct a list from the given range.

Instances

Instances details
Enum Ordering Source # 
Instance details

Defined in PlutusTx.Enum

Enum Integer 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 #

enumFromTo :: () -> () -> [()] Source #

Enum Bool Source # 
Instance details

Defined in PlutusTx.Enum