Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Things that can be upgraded from snowflakes to their full data
Synopsis
- class Upgradeable a ids | a -> ids, ids -> a where
Documentation
class Upgradeable a ids | a -> ids, ids -> a where Source #
A typeclass that represents snowflakes that can be upgraded to their complete data, either through the cache or HTTP.
upgrade :: BotC r => ids -> Sem r (Maybe a) Source #
Upgrade a snowflake to its complete data.
If it existed in the cache then it is returned from there, otherwise we fetch from HTTP and update the cache on success.