Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Internal helper types and functions for manipulating view sets
Synopsis
- data ViewsSetError = DuplicatedViewName ViewName
- newtype ViewsSetF a = ViewsSetF {
- unViewsSetF :: Map ViewName a
- mkViewsSet :: (a -> ViewName) -> [a] -> Either ViewsSetError (ViewsSetF a)
- emptyViewsSet :: ViewsSetF a
- addViewToSet :: (a -> ViewName) -> a -> ViewsSetF a -> Either ViewsSetError (ViewsSetF a)
- lookupView :: ViewName -> ViewsSetF a -> Maybe a
- viewsSetNames :: ViewsSetF a -> Set ViewName
- ensureNoDuplicates :: [ViewName] -> Either ViewsSetError ()
Documentation
data ViewsSetError Source #
Errors possible when constructing ViewsSet
.
Instances
Show ViewsSetError Source # | |
Defined in Morley.Michelson.Internal.ViewsSet showsPrec :: Int -> ViewsSetError -> ShowS # show :: ViewsSetError -> String # showList :: [ViewsSetError] -> ShowS # | |
Buildable ViewsSetError Source # | |
Defined in Morley.Michelson.Internal.ViewsSet build :: ViewsSetError -> Builder # | |
Eq ViewsSetError Source # | |
Defined in Morley.Michelson.Internal.ViewsSet (==) :: ViewsSetError -> ViewsSetError -> Bool # (/=) :: ViewsSetError -> ViewsSetError -> Bool # |
Type for intermediate coercions between typed and untyped view sets. Intended as an internal helper.
ViewsSetF | |
|
Instances
mkViewsSet :: (a -> ViewName) -> [a] -> Either ViewsSetError (ViewsSetF a) Source #
Convenience function to construct ViewsSetF
.
emptyViewsSet :: ViewsSetF a Source #
No views.
addViewToSet :: (a -> ViewName) -> a -> ViewsSetF a -> Either ViewsSetError (ViewsSetF a) Source #
Add a view to set.
ensureNoDuplicates :: [ViewName] -> Either ViewsSetError () Source #