plutus-core-1.36.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Name.UniqueSet

Description

A type for sets of things identified by Uniques, usually names. This approach is preferred when it is more efficient to compare the associated Uniques instead of the underlying type.

Synopsis

Documentation

newtype UniqueSet unique Source #

A set containing Uniques. Since Unique is equivalent to Int (see PlutusCore.Name.Unique), we can use an IntSet representation for this type.

Constructors

UniqueSet 

Fields

Instances

Instances details
Monoid (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

mempty :: UniqueSet unique Source #

mappend :: UniqueSet unique -> UniqueSet unique -> UniqueSet unique Source #

mconcat :: [UniqueSet unique] -> UniqueSet unique Source #

Semigroup (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

(<>) :: UniqueSet unique -> UniqueSet unique -> UniqueSet unique Source #

sconcat :: NonEmpty (UniqueSet unique) -> UniqueSet unique Source #

stimes :: Integral b => b -> UniqueSet unique -> UniqueSet unique Source #

Show (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

showsPrec :: Int -> UniqueSet unique -> ShowS Source #

show :: UniqueSet unique -> String Source #

showList :: [UniqueSet unique] -> ShowS Source #

Eq (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

(==) :: UniqueSet unique -> UniqueSet unique -> Bool Source #

(/=) :: UniqueSet unique -> UniqueSet unique -> Bool Source #

insertByUnique :: Coercible unique Unique => unique -> UniqueSet unique -> UniqueSet unique Source #

Insert a unique.

insertByName :: HasUnique name unique => name -> UniqueSet unique -> UniqueSet unique Source #

Insert the unique associated to the name.

singletonName :: HasUnique name unique => name -> UniqueSet unique Source #

Create the singleton set of the unique associated to the name.

fromFoldable :: Foldable f => (i -> UniqueSet unique -> UniqueSet unique) -> f i -> UniqueSet unique Source #

Convert a Foldable into a UniqueSet using the given insertion function.

fromUniques :: Foldable f => Coercible Unique unique => f unique -> UniqueSet unique Source #

Convert a Foldable with uniques into a UniqueSet.

fromNames :: Foldable f => HasUnique name unique => f name -> UniqueSet unique Source #

Convert a Foldable with names into a UniqueSet.

memberByUnique :: Coercible unique Unique => unique -> UniqueSet unique -> Bool Source #

Is the unique a member of the set?

memberByName :: HasUnique name unique => name -> UniqueSet unique -> Bool Source #

Is the name associated to the unique a member of the set?

notMemberByName :: HasUnique name unique => name -> UniqueSet unique -> Bool Source #

The negation of memberByName, useful for converting to operator form, e.g. name notMemberByName set.

(\\) :: UniqueSet unique -> UniqueSet unique -> UniqueSet unique Source #

The difference of two UniqueSets.

union :: UniqueSet unique -> UniqueSet unique -> UniqueSet unique Source #

The union of two UniqueSets.

setOfByUnique :: Coercible unique Unique => Getting (UniqueSet unique) s unique -> s -> UniqueSet unique Source #

Build a set of uniques from the Getting.

setOfByName :: HasUnique name unique => Getting (UniqueSet unique) s name -> s -> UniqueSet unique Source #

Build a set of uniques associated to the names in the Getting.