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
HasID (a :: k) (Snowflake a) Source # | |
Vector Vector (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Snowflake t) -> m (Vector (Snowflake t)) basicUnsafeThaw :: PrimMonad m => Vector (Snowflake t) -> m (Mutable Vector (PrimState m) (Snowflake t)) basicLength :: Vector (Snowflake t) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Snowflake t) -> Vector (Snowflake t) basicUnsafeIndexM :: Monad m => Vector (Snowflake t) -> Int -> m (Snowflake t) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Snowflake t) -> Vector (Snowflake t) -> m () | |
MVector MVector (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake basicLength :: MVector s (Snowflake t) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Snowflake t) -> MVector s (Snowflake t) basicOverlaps :: MVector s (Snowflake t) -> MVector s (Snowflake t) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Snowflake t)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Snowflake t -> m (MVector (PrimState m) (Snowflake t)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> Int -> m (Snowflake t) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> Int -> Snowflake t -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> Snowflake t -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> MVector (PrimState m) (Snowflake t) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> MVector (PrimState m) (Snowflake t) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Snowflake t) -> Int -> m (MVector (PrimState m) (Snowflake t)) | |
Eq (Snowflake t) Source # | |
(Typeable t, Typeable k) => Data (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Snowflake t -> c (Snowflake t) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Snowflake t) # toConstr :: Snowflake t -> Constr # dataTypeOf :: Snowflake t -> DataType # dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Snowflake t)) # dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Snowflake t)) # gmapT :: (forall b. Data b => b -> b) -> Snowflake t -> Snowflake t # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Snowflake t -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Snowflake t -> r # gmapQ :: (forall d. Data d => d -> u) -> Snowflake t -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Snowflake t -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Snowflake t -> m (Snowflake t) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Snowflake t -> m (Snowflake t) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Snowflake t -> m (Snowflake t) # | |
Ord (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake | |
Show (Snowflake t) Source # | |
Generic (Snowflake t) Source # | |
NFData (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake | |
FromJSON (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake parseJSON :: Value -> Parser (Snowflake t) parseJSONList :: Value -> Parser [Snowflake t] | |
ToJSON (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake toJSON :: Snowflake t -> Value toEncoding :: Snowflake t -> Encoding toJSONList :: [Snowflake t] -> Value toEncodingList :: [Snowflake t] -> Encoding | |
ToJSONKey (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake toJSONKey :: ToJSONKeyFunction (Snowflake t) toJSONKeyList :: ToJSONKeyFunction [Snowflake t] | |
Hashable (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake | |
Unbox (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake | |
TextShow (Snowflake t) Source # | |
newtype MVector s (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake | |
type Rep (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake | |
newtype Vector (Snowflake t) Source # | |
Defined in Calamity.Types.Snowflake |
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 :: k2) (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 #