Copyright | (c) CNRS 2017-Present |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data NodeError
- data NodeCreationError
- data NodeLookupError
- class HasNodeError e where
- _NodeError :: Prism' e NodeError
- errorWith :: (MonadError e m, HasNodeError e) => Text -> m a
- nodeError :: (MonadError e m, HasNodeError e) => NodeError -> m a
- nodeCreationError :: (MonadError e m, HasNodeError e) => NodeCreationError -> m a
- nodeLookupError :: (MonadError e m, HasNodeError e) => NodeLookupError -> m a
- catchNodeError :: (MonadError e m, HasNodeError e) => m a -> (NodeError -> m a) -> m a
Types
data NodeCreationError #
UserParentAlreadyExists UserId ParentId | |
UserParentDoesNotExist UserId | |
UserHasNegativeId UserId | |
InsertNodeFailed UserId ParentId |
Instances
data NodeLookupError #
NodeDoesNotExist NodeId | |
NodeParentDoesNotExist NodeId | |
UserDoesNotExist UserId | |
UserNameDoesNotExist Username | |
UserHasTooManyRoots UserId [NodeId] |
Instances
Classes
Functions
errorWith :: (MonadError e m, HasNodeError e) => Text -> m a #
nodeError :: (MonadError e m, HasNodeError e) => NodeError -> m a #
nodeCreationError :: (MonadError e m, HasNodeError e) => NodeCreationError -> m a #
nodeLookupError :: (MonadError e m, HasNodeError e) => NodeLookupError -> m a #
catchNodeError :: (MonadError e m, HasNodeError e) => m a -> (NodeError -> m a) -> m a #