Safe Haskell | None |
---|---|
Language | Haskell2010 |
The snowflake type
Synopsis
- newtype Snowflake t = 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
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
HasField' field a (Snowflake b) => HasID (b :: k) (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
HasField' field a (Snowflake c) => HasID (b :: k1) (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 #