| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.ECS.Utils
Synopsis
- class GetRep t where
- findM :: forall m a t. (Monad m, Foldable t) => (a -> m Bool) -> t a -> m (Maybe a)
- class Functor f => Unwrappable (f :: Type -> Type) where
- unwrap' :: HasCallStack => Text -> f a -> a
- unwrap :: (HasCallStack, Unwrappable f) => f a -> a
- expect :: (HasCallStack, Unwrappable f) => Text -> f a -> a
- andM :: (Traversable t, Applicative f) => t (f Bool) -> f Bool
- orM :: (Traversable t, Applicative f) => t (f Bool) -> f Bool
- anyM :: (Traversable t, Monad f) => (a -> f Bool) -> t a -> f Bool
- mapLeft :: (a -> c) -> Either a b -> Either c b
- data ErasedValue where
- ErasedValue :: forall a. Typeable a => a -> ErasedValue
- eraseValue :: Typeable a => a -> ErasedValue
- uneraseValue :: Typeable a => ErasedValue -> Maybe a
- unsafeUneraseValue :: ErasedValue -> a
- fromMaybeM :: Applicative m => m a -> Maybe a -> m a
Documentation
Instances
| GetRep ComponentType Source # | |
Defined in Mischief.ECS.Components Methods getRep :: ComponentType -> TypeRep Source # | |
| GetRep DefaultComponentType Source # | |
Defined in Mischief.ECS.Components Methods getRep :: DefaultComponentType -> TypeRep Source # | |
| GetRep ErasedComponent Source # | |
Defined in Mischief.ECS.Components Methods getRep :: ErasedComponent -> TypeRep Source # | |
class Functor f => Unwrappable (f :: Type -> Type) where Source #
Methods
unwrap' :: HasCallStack => Text -> f a -> a Source #
Instances
| Unwrappable Maybe Source # | |
Defined in Mischief.ECS.Utils | |
| Unwrappable (Either a) Source # | |
Defined in Mischief.ECS.Utils | |
unwrap :: (HasCallStack, Unwrappable f) => f a -> a Source #
expect :: (HasCallStack, Unwrappable f) => Text -> f a -> a Source #
andM :: (Traversable t, Applicative f) => t (f Bool) -> f Bool Source #
orM :: (Traversable t, Applicative f) => t (f Bool) -> f Bool Source #
data ErasedValue where Source #
Constructors
| ErasedValue :: forall a. Typeable a => a -> ErasedValue |
eraseValue :: Typeable a => a -> ErasedValue Source #
uneraseValue :: Typeable a => ErasedValue -> Maybe a Source #
unsafeUneraseValue :: ErasedValue -> a Source #
fromMaybeM :: Applicative m => m a -> Maybe a -> m a Source #