morley-1.20.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Michelson.Internal.ViewsSet

Description

Internal helper types and functions for manipulating view sets

Synopsis

Documentation

data ViewsSetError Source #

Errors possible when constructing ViewsSet.

Instances

Instances details
Show ViewsSetError Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Eq ViewsSetError Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Buildable ViewsSetError Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Methods

build :: ViewsSetError -> Doc

buildList :: [ViewsSetError] -> Doc

newtype ViewsSetF a Source #

Type for intermediate coercions between typed and untyped view sets. Intended as an internal helper.

Constructors

ViewsSetF 

Fields

Instances

Instances details
Functor ViewsSetF Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Methods

fmap :: (a -> b) -> ViewsSetF a -> ViewsSetF b #

(<$) :: a -> ViewsSetF b -> ViewsSetF a #

FromJSON a => FromJSON (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

ToJSON a => ToJSON (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Show a => Show (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Default (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Methods

def :: ViewsSetF a #

NFData a => NFData (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Methods

rnf :: ViewsSetF a -> () #

Eq a => Eq (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Methods

(==) :: ViewsSetF a -> ViewsSetF a -> Bool #

(/=) :: ViewsSetF a -> ViewsSetF a -> Bool #

Container (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Associated Types

type Element (ViewsSetF a) #

Methods

toList :: ViewsSetF a -> [Element (ViewsSetF a)] #

null :: ViewsSetF a -> Bool #

foldr :: (Element (ViewsSetF a) -> b -> b) -> b -> ViewsSetF a -> b #

foldl :: (b -> Element (ViewsSetF a) -> b) -> b -> ViewsSetF a -> b #

foldl' :: (b -> Element (ViewsSetF a) -> b) -> b -> ViewsSetF a -> b #

length :: ViewsSetF a -> Int #

elem :: Element (ViewsSetF a) -> ViewsSetF a -> Bool #

foldMap :: Monoid m => (Element (ViewsSetF a) -> m) -> ViewsSetF a -> m #

fold :: ViewsSetF a -> Element (ViewsSetF a) #

foldr' :: (Element (ViewsSetF a) -> b -> b) -> b -> ViewsSetF a -> b #

notElem :: Element (ViewsSetF a) -> ViewsSetF a -> Bool #

all :: (Element (ViewsSetF a) -> Bool) -> ViewsSetF a -> Bool #

any :: (Element (ViewsSetF a) -> Bool) -> ViewsSetF a -> Bool #

and :: ViewsSetF a -> Bool #

or :: ViewsSetF a -> Bool #

find :: (Element (ViewsSetF a) -> Bool) -> ViewsSetF a -> Maybe (Element (ViewsSetF a)) #

safeHead :: ViewsSetF a -> Maybe (Element (ViewsSetF a)) #

safeMaximum :: ViewsSetF a -> Maybe (Element (ViewsSetF a)) #

safeMinimum :: ViewsSetF a -> Maybe (Element (ViewsSetF a)) #

safeFoldr1 :: (Element (ViewsSetF a) -> Element (ViewsSetF a) -> Element (ViewsSetF a)) -> ViewsSetF a -> Maybe (Element (ViewsSetF a)) #

safeFoldl1 :: (Element (ViewsSetF a) -> Element (ViewsSetF a) -> Element (ViewsSetF a)) -> ViewsSetF a -> Maybe (Element (ViewsSetF a)) #

ToPairs (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

Associated Types

type Key (ViewsSetF a) #

type Val (ViewsSetF a) #

Methods

toPairs :: ViewsSetF a -> [(Key (ViewsSetF a), Val (ViewsSetF a))] #

keys :: ViewsSetF a -> [Key (ViewsSetF a)] #

elems :: ViewsSetF a -> [Val (ViewsSetF a)] #

type Element (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

type Key (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

type Key (ViewsSetF a) = Key (Map ViewName a)
type Val (ViewsSetF a) Source # 
Instance details

Defined in Morley.Michelson.Internal.ViewsSet

type Val (ViewsSetF a) = Val (Map ViewName a)

mkViewsSet :: (a -> ViewName) -> [a] -> Either ViewsSetError (ViewsSetF a) Source #

Convenience function to construct ViewsSetF.

addViewToSet :: (a -> ViewName) -> a -> ViewsSetF a -> Either ViewsSetError (ViewsSetF a) Source #

Add a view to set.

lookupView :: ViewName -> ViewsSetF a -> Maybe a Source #

Find a view in the set.

viewsSetNames :: ViewsSetF a -> Set ViewName Source #

Get all taken names in views set.