morpheus-graphql-core-0.18.0: Morpheus GraphQL Core
Safe HaskellNone
LanguageHaskell2010

Data.Morpheus.Internal.Utils

Synopsis

Documentation

singleton :: (IsMap k m, KeyOf k a) => a -> m a Source #

class IsMap k m | m -> k Source #

Minimal complete definition

unsafeFromList, singleton, lookup

Instances

Instances details
(Eq k, Hashable k) => IsMap k (HashMap k) Source # 
Instance details

Defined in Data.Mergeable.IsMap

Methods

unsafeFromList :: [(k, a)] -> HashMap k a Source #

singleton :: k -> a -> HashMap k a

lookup :: k -> HashMap k a -> Maybe a

member :: k -> HashMap k a -> Bool Source #

(Eq k, Hashable k) => IsMap k (OrdMap k) Source # 
Instance details

Defined in Data.Mergeable.OrdMap

Methods

unsafeFromList :: [(k, a)] -> OrdMap k a Source #

singleton :: k -> a -> OrdMap k a

lookup :: k -> OrdMap k a -> Maybe a

member :: k -> OrdMap k a -> Bool Source #

type Failure = MonadError Source #

Deprecated: use MonadError

failure :: MonadError e m => e -> m a Source #

Deprecated: use throwError

class (Eq k, Hashable k) => KeyOf k a | a -> k where Source #

Methods

keyOf :: a -> k Source #

Instances

Instances details
KeyOf TypeName SchemaDefinition Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

KeyOf TypeName UnionTag Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

KeyOf OperationType RootOperationTypeDefinition Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

(Eq name, Hashable name) => KeyOf name (Ref name) Source # 
Instance details

Defined in Data.Morpheus.Ext.KeyOf

Methods

keyOf :: Ref name -> name Source #

KeyOf FragmentName (Fragment s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

KeyOf FieldName (ObjectEntry s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

KeyOf FieldName (Variable s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

KeyOf FieldName (ArgumentDefinition s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Fields

KeyOf FieldName (DirectiveDefinition s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Fields

KeyOf FieldName (Directive s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Fields

KeyOf FieldName (Argument stage) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Fields

Methods

keyOf :: Argument stage -> FieldName Source #

KeyOf FieldName (Selection s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

(Eq k, Hashable k) => KeyOf k (k, a) Source # 
Instance details

Defined in Data.Morpheus.Ext.KeyOf

Methods

keyOf :: (k, a) -> k Source #

KeyOf TypeName (UnionMember cat s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Union

Methods

keyOf :: UnionMember cat s -> TypeName Source #

KeyOf TypeName (TypeDefinition a s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

KeyOf FieldName (FieldDefinition cat s) Source # 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Fields

toPair :: KeyOf k a => a -> (k, a) Source #

selectBy :: (MonadError e m, IsMap k c, Monad m) => e -> k -> c a -> m a Source #

traverseCollection :: (Monad m, Failure GQLError m, KeyOf k b, FromList m map k b, Foldable t) => (a -> m b) -> t a -> m (map k b) Source #

prop :: (b -> b -> m b) -> (a -> b) -> a -> a -> m b Source #

mergeT :: (KeyOf k a, Foldable t, Monad m) => t a -> t a -> ResolutionT k a c m c Source #

class Empty coll where Source #

Methods

empty :: coll Source #

Instances

Instances details
Empty [a] Source # 
Instance details

Defined in Data.Morpheus.Ext.Empty

Methods

empty :: [a] Source #

Empty (HashMap k v) Source # 
Instance details

Defined in Data.Morpheus.Ext.Empty

Methods

empty :: HashMap k v Source #

Empty (OrdMap k a) Source # 
Instance details

Defined in Data.Mergeable.OrdMap

Methods

empty :: OrdMap k a Source #

elems :: Foldable t => t a -> [a] Source #

Deprecated: use Foldable.toList

addPath :: MonadReader [a1] m => a1 -> m a2 -> m a2 Source #

mergeConcat :: (Monad m, Merge m a, MonadError e m) => NonEmpty a -> m a Source #

(<:>) :: (Merge (HistoryT m) a, Monad m) => a -> a -> m a Source #

selectOr :: IsMap k c => d -> (a -> d) -> k -> c a -> d Source #

member :: IsMap k m => k -> m a -> Bool Source #

unsafeFromList :: IsMap k m => [(k, a)] -> m a Source #

insert :: (NameCollision e a, KeyOf k a, Failure e m) => a -> SafeHashMap k a -> m (SafeHashMap k a) Source #

fromElems :: (Monad m, KeyOf k a, FromList m map k a) => [a] -> m (map k a) Source #