Safe Haskell | None |
---|---|
Language | Haskell2010 |
The snowflake type
Synopsis
- newtype Snowflake (t :: Type) = Snowflake {}
- class HasID b a where
- type HasID' a = HasID a a
- newtype HasIDField field a = HasIDField a
- newtype HasIDFieldCoerce field a c = HasIDFieldCoerce a
- type HasIDFieldCoerce' field a = HasIDFieldCoerce field a a
- coerceSnowflake :: Snowflake a -> Snowflake b
Documentation
newtype Snowflake (t :: Type) Source #
Instances
class HasID b a where Source #
A typeclass for types that contain snowflakes of type b
Instances
newtype HasIDField field a Source #
A newtype wrapper for deriving HasID generically
Instances
(HasID b c, HasField' field a c) => HasID b (HasIDField field a) Source # | |
Defined in Calamity.Types.Snowflake getID :: HasIDField field a -> Snowflake b Source # |
newtype HasIDFieldCoerce field a c Source #
A data a
which contains an ID of type `Snowflake c`
which should be swapped with `Snowflake b` upon fetching
Instances
(HasID c d, HasField' field a d) => HasID b (HasIDFieldCoerce field a c) Source # | |
Defined in Calamity.Types.Snowflake getID :: HasIDFieldCoerce field a c -> Snowflake b Source # |
type HasIDFieldCoerce' field a = HasIDFieldCoerce field a a Source #
coerceSnowflake :: Snowflake a -> Snowflake b Source #