-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Robert Fischer's Common library -- -- An enhanced Prelude and various utilities for Aeson, Servant, PSQL, -- and Redis that Robert Fischer uses. @package rfc @version 0.0.0.13 module RFC.HTTP.Types module RFC.String type ConvertibleString = ConvertibleStrings type ConvertibleToSBS a = ConvertibleStrings a StrictByteString type ConvertibleFromSBS a = ConvertibleStrings StrictByteString a module RFC.JSON jsonOptions :: Options -- | Generates both ToJSON and FromJSON instance declarations -- for the given data type or data family instance constructor. -- -- This is a convienience function which is equivalent to calling both -- deriveToJSON and deriveFromJSON. deriveJSON :: Options -> Name -> Q [Dec] -- | A type that can be converted from JSON, with the possibility of -- failure. -- -- In many cases, you can get the compiler to generate parsing code for -- you (see below). To begin, let's cover writing an instance by hand. -- -- There are various reasons a conversion could fail. For example, an -- Object could be missing a required key, an Array could -- be of the wrong size, or a value could be of an incompatible type. -- -- The basic ways to signal a failed conversion are as follows: -- --
-- -- Allow ourselves to write Text literals.
-- {-# LANGUAGE OverloadedStrings #-}
--
-- data Coord = Coord { x :: Double, y :: Double }
--
-- instance FromJSON Coord where
-- parseJSON (Object v) = Coord
-- <$> v .: "x"
-- <*> v .: "y"
--
-- -- We do not expect a non-Object value here.
-- -- We could use mzero to fail, but typeMismatch
-- -- gives a much more informative error message.
-- parseJSON invalid = typeMismatch "Coord" invalid
--
--
-- For this common case of only being concerned with a single type of
-- JSON value, the functions withObject, withNumber, etc.
-- are provided. Their use is to be preferred when possible, since they
-- are more terse. Using withObject, we can rewrite the above
-- instance (assuming the same language extension and data type) as:
--
-- -- instance FromJSON Coord where -- parseJSON = withObject "Coord" $ \v -> Coord -- <$> v .: "x" -- <*> v .: "y" ---- -- Instead of manually writing your FromJSON instance, there are -- two options to do it automatically: -- --
-- {-# LANGUAGE DeriveGeneric #-}
--
-- import GHC.Generics
--
-- data Coord = Coord { x :: Double, y :: Double } deriving Generic
--
-- instance FromJSON Coord
--
--
-- The default implementation will be equivalent to parseJSON =
-- genericParseJSON defaultOptions; If you need
-- different options, you can customize the generic decoding by defining:
--
--
-- customOptions = defaultOptions
-- { fieldLabelModifier = map toUpper
-- }
--
-- instance FromJSON Coord where
-- parseJSON = genericParseJSON customOptions
--
class FromJSON a
parseJSON :: FromJSON a => Value -> Parser a
parseJSONList :: FromJSON a => Value -> Parser [a]
-- | A type that can be converted to JSON.
--
-- Instances in general must specify toJSON and
-- should (but don't need to) specify toEncoding.
--
-- An example type and instance:
--
--
-- -- Allow ourselves to write Text literals.
-- {-# LANGUAGE OverloadedStrings #-}
--
-- data Coord = Coord { x :: Double, y :: Double }
--
-- instance ToJSON Coord where
-- toJSON (Coord x y) = object ["x" .= x, "y" .= y]
--
-- toEncoding (Coord x y) = pairs ("x" .= x <> "y" .= y)
--
--
-- Instead of manually writing your ToJSON instance, there are two
-- options to do it automatically:
--
--
-- {-# LANGUAGE DeriveGeneric #-}
--
-- import GHC.Generics
--
-- data Coord = Coord { x :: Double, y :: Double } deriving Generic
--
-- instance ToJSON Coord where
-- toEncoding = genericToEncoding defaultOptions
--
--
-- If on the other hand you wish to customize the generic decoding, you
-- have to implement both methods:
--
--
-- customOptions = defaultOptions
-- { fieldLabelModifier = map toUpper
-- }
--
-- instance ToJSON Coord where
-- toJSON = genericToJSON customOptions
-- toEncoding = genericToEncoding customOptions
--
--
-- Previous versions of this library only had the toJSON method.
-- Adding toEncoding had to reasons:
--
-- -- instance ToJSON Coord where -- toEncoding = genericToEncoding defaultOptions --toEncoding :: ToJSON a => a -> Encoding toJSONList :: ToJSON a => [a] -> Value toEncodingList :: ToJSON a => [a] -> Encoding -- | Like decode but returns an error message when decoding fails. eitherDecode :: FromJSON a => ByteString -> Either String a decodeEither :: (FromJSON a) => LazyByteString -> Either String a -- | Like decode' but returns an error message when decoding fails. eitherDecode' :: FromJSON a => ByteString -> Either String a decodeEither' :: (FromJSON a) => LazyByteString -> Either String a decodeOrDie :: (FromJSON a, MonadThrow m) => LazyByteString -> m a data DecodeError -- | A JSON value represented as a Haskell value. data Value :: * Object :: !Object -> Value Array :: !Array -> Value String :: !Text -> Value Number :: !Scientific -> Value Bool :: !Bool -> Value Null :: Value -- | Efficiently serialize a JSON value as a lazy ByteString. -- -- This is implemented in terms of the ToJSON class's -- toEncoding method. encode :: ToJSON a => a -> ByteString -- | Efficiently deserialize a JSON value from a lazy ByteString. If -- this fails due to incomplete or invalid input, Nothing is -- returned. -- -- The input must consist solely of a JSON document, with no trailing -- data except for whitespace. -- -- This function parses immediately, but defers conversion. See -- json for details. decode :: FromJSON a => ByteString -> Maybe a instance GHC.Generics.Generic RFC.JSON.DecodeError instance GHC.Classes.Ord RFC.JSON.DecodeError instance GHC.Classes.Eq RFC.JSON.DecodeError instance GHC.Show.Show RFC.JSON.DecodeError instance GHC.Exception.Exception RFC.JSON.DecodeError instance Web.Internal.HttpApiData.FromHttpApiData Data.Aeson.Types.Internal.Value instance Web.Internal.HttpApiData.ToHttpApiData Data.Aeson.Types.Internal.Value module RFC.Data.UUID instance Database.PostgreSQL.Simple.FromRow.FromRow Data.UUID.Types.Internal.UUID instance Database.PostgreSQL.Simple.ToRow.ToRow Data.UUID.Types.Internal.UUID instance Data.String.Conversions.ConvertibleStrings Data.UUID.Types.Internal.UUID GHC.Base.String instance Data.String.Conversions.ConvertibleStrings Data.UUID.Types.Internal.UUID Data.String.Conversions.StrictText instance Data.String.Conversions.ConvertibleStrings Data.UUID.Types.Internal.UUID Data.String.Conversions.LazyText instance Data.String.Conversions.ConvertibleStrings Data.UUID.Types.Internal.UUID Data.String.Conversions.StrictByteString instance Data.String.Conversions.ConvertibleStrings Data.UUID.Types.Internal.UUID Data.String.Conversions.LazyByteString module RFC.Prelude charIsUpper :: Char -> Bool charIsLower :: Char -> Bool uniq :: (Eq a) => [a] -> [a] mapFst :: (a -> c) -> (a, b) -> (c, b) mapSnd :: (b -> c) -> (a, b) -> (a, c) safeHead :: [a] -> Maybe a type Boolean = Bool module RFC.HTTP.Client withAPISession :: (Session -> IO a) -> IO a class (MonadThrow m, MonadIO m) => HasAPIClient m getAPIClient :: HasAPIClient m => m Session data BadStatusException apiGet :: (HasAPIClient m, FromJSON a, MonadCatch m, Exception e) => URL -> (e -> m a) -> m a instance GHC.Generics.Generic RFC.HTTP.Client.BadStatusException instance GHC.Classes.Ord RFC.HTTP.Client.BadStatusException instance GHC.Classes.Eq RFC.HTTP.Client.BadStatusException instance GHC.Show.Show RFC.HTTP.Client.BadStatusException instance GHC.Exception.Exception RFC.HTTP.Client.BadStatusException module RFC.Env readGoogleMapsAPIKey :: (MonadIO m) => m String isDevelopment :: (MonadIO m) => m Bool readEnvironment :: (MonadIO m) => m String readPsqlConnectInfo :: (MonadIO m) => m ConnectInfo readRedisConnectInfo :: (MonadIO m) => m ConnectInfo module RFC.Redis createConnectionPool :: (MonadIO m) => m ConnectionPool type ConnectionPool = Connection class (MonadIO m, MonadThrow m) => HasRedis m getRedisPool :: HasRedis m => m ConnectionPool runRedis :: HasRedis m => Redis a -> m a newtype RedisException RedisException :: Reply -> RedisException get :: (HasRedis m, ConvertibleToSBS tIn, ConvertibleFromSBS tOut) => tIn -> m (Maybe tOut) setex :: (HasRedis m, ConvertibleToSBS key, ConvertibleToSBS value, TimeUnit expiry) => key -> value -> expiry -> m () instance GHC.Show.Show RFC.Redis.RedisException instance GHC.Exception.Exception RFC.Redis.RedisException module RFC.Log withLogging :: IO a -> IO a module RFC.Psql type ConnectionPool = Pool Connection class (MonadIO m, MonadCatch m, MonadBaseControl IO m) => HasPsql m getPsqlPool :: HasPsql m => m ConnectionPool withPsqlConnection :: HasPsql m => (Connection -> m a) -> m a withPsqlTransaction :: HasPsql m => (Connection -> m a) -> m a defaultConnectInfo :: (MonadIO m) => m ConnectInfo createConnectionPool :: (MonadIO m) => ConnectInfo -> m ConnectionPool query :: (MonadIO m, FromRow r, ToRow q) => Connection -> Query -> q -> m [r] query_ :: (MonadIO m, FromRow r) => Connection -> Query -> m [r] query1 :: (MonadIO m, FromRow r, ToRow q) => Connection -> Query -> q -> m (Maybe r) query1_ :: (MonadIO m, FromRow r) => Connection -> Query -> m (Maybe r) query1Else :: (MonadIO m, FromRow r, ToRow q, Exception e) => Connection -> Query -> q -> e -> m (Maybe r) query1Else_ :: (MonadIO m, FromRow r, Exception e) => Connection -> Query -> e -> m (Maybe r) execute :: (MonadIO m, ToRow q) => Connection -> Query -> q -> m Int64 execute_ :: (MonadIO m) => Connection -> Query -> m Int64 executeMany :: (MonadIO m, ToRow q) => Connection -> Query -> [q] -> m Int64 module RFC.Data.ListMoveDirection data ListMoveDirection TowardsHead :: ListMoveDirection TowardsTail :: ListMoveDirection instance GHC.Generics.Generic RFC.Data.ListMoveDirection.ListMoveDirection instance GHC.Classes.Ord RFC.Data.ListMoveDirection.ListMoveDirection instance GHC.Classes.Eq RFC.Data.ListMoveDirection.ListMoveDirection instance GHC.Show.Show RFC.Data.ListMoveDirection.ListMoveDirection instance Data.Aeson.Types.FromJSON.FromJSON RFC.Data.ListMoveDirection.ListMoveDirection instance Data.Aeson.Types.ToJSON.ToJSON RFC.Data.ListMoveDirection.ListMoveDirection module RFC.Data.LatLng data LatLng LatLng :: Latitude -> Longitude -> LatLng [latitude] :: LatLng -> Latitude [longitude] :: LatLng -> Longitude type Longitude = Double type Latitude = Double latLng :: Latitude -> Longitude -> LatLng lngLat :: Longitude -> Latitude -> LatLng instance Data.Aeson.Types.ToJSON.ToJSON RFC.Data.LatLng.LatLng instance Data.Aeson.Types.FromJSON.FromJSON RFC.Data.LatLng.LatLng instance Database.PostgreSQL.Simple.ToRow.ToRow RFC.Data.LatLng.LatLng instance Database.PostgreSQL.Simple.ToRow.ToRow (GHC.Base.Maybe RFC.Data.LatLng.LatLng) instance Database.PostgreSQL.Simple.FromRow.FromRow RFC.Data.LatLng.LatLng instance Database.PostgreSQL.Simple.FromRow.FromRow (GHC.Base.Maybe RFC.Data.LatLng.LatLng) instance GHC.Generics.Generic RFC.Data.LatLng.LatLng instance GHC.Show.Show RFC.Data.LatLng.LatLng instance GHC.Classes.Ord RFC.Data.LatLng.LatLng instance GHC.Classes.Eq RFC.Data.LatLng.LatLng module RFC.Google.Places.SearchResults type ResultsStatus = String newtype Results Results :: (ResultsStatus, [Result]) -> Results data Result Result :: LatLng -> String -> String -> Maybe String -> Result [resultLocation] :: Result -> LatLng [resultName] :: Result -> String [resultPlaceId] :: Result -> String [resultVicinity] :: Result -> Maybe String instance Data.Aeson.Types.ToJSON.ToJSON RFC.Google.Places.SearchResults.Results instance Data.Aeson.Types.FromJSON.FromJSON RFC.Google.Places.SearchResults.Results instance Data.Aeson.Types.FromJSON.FromJSON RFC.Google.Places.SearchResults.Result instance Data.Aeson.Types.ToJSON.ToJSON RFC.Google.Places.SearchResults.Result module RFC.Google.Places.PlaceSearch endpoint :: URL data Params Params :: String -> String -> Maybe String -> Maybe PlaceType -> Params [apiKey] :: Params -> String [search] :: Params -> String [language] :: Params -> Maybe String -- | "type" [placeType] :: Params -> Maybe PlaceType data PlaceType Hospital :: PlaceType Doctor :: PlaceType placeTypeToString :: PlaceType -> String paramsToPairs :: Params -> [(String, String)] optionalParamToPair :: Params -> (Params -> Maybe String) -> String -> Maybe (String, String) paramsToUrl :: Params -> URL query :: (MonadCatch m, HasAPIClient m) => Params -> m Results class (MonadThrow m, MonadIO m) => HasAPIClient m instance GHC.Generics.Generic RFC.Google.Places.PlaceSearch.PlaceType instance GHC.Enum.Bounded RFC.Google.Places.PlaceSearch.PlaceType instance GHC.Enum.Enum RFC.Google.Places.PlaceSearch.PlaceType instance GHC.Classes.Ord RFC.Google.Places.PlaceSearch.PlaceType instance GHC.Classes.Eq RFC.Google.Places.PlaceSearch.PlaceType instance GHC.Show.Show RFC.Google.Places.PlaceSearch.PlaceType module RFC.Google.Places.NearbySearch endpoint :: URL data Params Params :: String -> LatLng -> Integer -> RankBy -> Maybe String -> Maybe String -> Maybe String -> Maybe PlaceType -> Params [apiKey] :: Params -> String [location] :: Params -> LatLng -- | maximum of 50,000 [radiusMeters] :: Params -> Integer [rankBy] :: Params -> RankBy [keyword] :: Params -> Maybe String [language] :: Params -> Maybe String [region] :: Params -> Maybe String -- | "type" [placeType] :: Params -> Maybe PlaceType data RankBy Distance :: RankBy Prominence :: RankBy rankByToString :: RankBy -> String data OptionalParams OptionalParams :: OptionalParams data PlaceType Hospital :: PlaceType Doctor :: PlaceType placeTypeToString :: PlaceType -> String paramsToPairs :: Params -> [(String, String)] optionalParamToPair :: Params -> (Params -> Maybe String) -> String -> Maybe (String, String) paramsToUrl :: Params -> URL query :: (HasAPIClient m, MonadCatch m) => Params -> m Results class (MonadThrow m, MonadIO m) => HasAPIClient m module RFC.Data.IdAnd idAndsToMap :: [IdAnd a] -> Map UUID a -- | Represents something which has an ID. newtype IdAnd a IdAnd :: (UUID, a) -> IdAnd a valuesToIdAnd :: UUID -> a -> IdAnd a idAndToTuple :: IdAnd a -> (UUID, a) tupleToIdAnd :: (UUID, a) -> IdAnd a idAndToPair :: IdAnd a -> (UUID, IdAnd a) instance GHC.Generics.Generic (RFC.Data.IdAnd.IdAnd a) instance GHC.Show.Show a => GHC.Show.Show (RFC.Data.IdAnd.IdAnd a) instance GHC.Classes.Ord a => GHC.Classes.Ord (RFC.Data.IdAnd.IdAnd a) instance GHC.Classes.Eq a => GHC.Classes.Eq (RFC.Data.IdAnd.IdAnd a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (RFC.Data.IdAnd.IdAnd a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (RFC.Data.IdAnd.IdAnd a) instance Database.PostgreSQL.Simple.FromRow.FromRow a => Database.PostgreSQL.Simple.FromRow.FromRow (RFC.Data.IdAnd.IdAnd a) instance Database.PostgreSQL.Simple.ToRow.ToRow a => Database.PostgreSQL.Simple.ToRow.ToRow (RFC.Data.IdAnd.IdAnd a) instance Servant.Docs.Internal.ToSample a => Servant.Docs.Internal.ToSample (RFC.Data.IdAnd.IdAnd a) instance Servant.Docs.Internal.ToSample a => Servant.Docs.Internal.ToSample (Data.Map.Internal.Map Data.UUID.Types.Internal.UUID (RFC.Data.IdAnd.IdAnd a)) module RFC.Servant type ApiCtx = ReaderT Session (ReaderT ConnectionPool (ReaderT ConnectionPool Handler)) apiCtxToHandler :: Session -> ConnectionPool -> ConnectionPool -> ApiCtx :~> Handler class (FromJSON a, ToJSON a, Show a) => ResourceDefinition a restFetchAll :: ResourceDefinition a => FetchAllImpl a restFetch :: ResourceDefinition a => FetchImpl a restCreate :: ResourceDefinition a => CreateImpl a restPatch :: ResourceDefinition a => PatchImpl a restReplace :: ResourceDefinition a => ReplaceImpl a restServer :: ResourceDefinition a => ServerImpl a fetchResource :: ResourceDefinition a => UUID -> ApiCtx (Maybe a) fetchAllResources :: ResourceDefinition a => ApiCtx [IdAnd a] createResource :: ResourceDefinition a => a -> ApiCtx (Maybe UUID) replaceResource :: ResourceDefinition a => (IdAnd a) -> ApiCtx () type ServerAPI a = (FetchAllAPI a) :<|> ((FetchAPI a) :<|> ((CreateAPI a) :<|> (ReplaceAPI a))) type ServerImpl a = (FetchAllImpl a) :<|> ((FetchImpl a) :<|> ((CreateImpl a) :<|> (ReplaceImpl a))) instance RFC.HTTP.Client.HasAPIClient RFC.Servant.ApiCtx instance RFC.Psql.HasPsql RFC.Servant.ApiCtx instance RFC.Redis.HasRedis RFC.Servant.ApiCtx module RFC.Servant.ApiDoc apiToHtml :: (HasDocs a) => Proxy a -> Html apiToAscii :: (ConvertibleString String s, HasDocs a) => Proxy a -> s apiToSwagger :: (HasSwagger a) => Proxy a -> Swagger apiApplication :: (HasDocs a, HasSwagger a) => Proxy a -> Application module RFC.Concurrent -- | Executes all the IO actions simultaneously and returns the original -- data structure with the arguments replaced by the results of the -- execution. doConcurrently :: (Traversable t, MonadBaseControl IO m) => t (m a) -> m (t a) -- | Executes all the IO actions simulataneously and discards the results. doConcurrently_ :: (Foldable f, MonadBaseControl IO m) => f (m a) -> m () -- | Executes all the IO actions simultaneously, feeds them into the filter -- function, and then filters the results. filterConcurrently :: (MonadBaseControl IO m) => (a -> Bool) -> [m a] -> m [a] module RFC.API -- | JSON DELETE type JDelete a = Delete '[JSON] a -- | JSON GET type JGet a = Get '[JSON] a -- | JSON PATCH type JPatch a = Get '[JSON] a -- | JSON POST type JPost a = Post '[JSON] a -- | JSON PUT type JPut a = Post '[JSON] a -- | JSON Request Body (ReqBody) type JReqBody a = ReqBody '[JSON] a -- | Client to access API of Coinhive: -- https://coinhive.com/documentation/http-api module RFC.Client.Coinhive newtype SecretKey SecretKey :: String -> SecretKey newtype TokenId TokenId :: String -> TokenId data TokenVerification TokenVerification :: Bool -> Integer -> Integer -> Maybe String -> TokenVerification [tvSuccess] :: TokenVerification -> Bool [tvHashes] :: TokenVerification -> Integer [tvCreated] :: TokenVerification -> Integer [tvError] :: TokenVerification -> Maybe String data TokenVerifyRequest TokenVerifyRequest :: SecretKey -> TokenId -> Integer -> TokenVerifyRequest [tvrSecret] :: TokenVerifyRequest -> SecretKey [tvrToken] :: TokenVerifyRequest -> TokenId [tvrHashes] :: TokenVerifyRequest -> Integer data UserCurrentBalance UserCurrentBalance :: Bool -> String -> Integer -> Integer -> Integer -> Maybe String -> UserCurrentBalance [ucbSuccess] :: UserCurrentBalance -> Bool [ucbName] :: UserCurrentBalance -> String [ucbTotal] :: UserCurrentBalance -> Integer [ucbWithdrawn] :: UserCurrentBalance -> Integer [ucbBalance] :: UserCurrentBalance -> Integer [ucbError] :: UserCurrentBalance -> Maybe String data UserWithdrawRequest UserWithdrawRequest :: SecretKey -> String -> Integer -> UserWithdrawRequest [uwrSecret] :: UserWithdrawRequest -> SecretKey [uwrName] :: UserWithdrawRequest -> String [uwrAmount] :: UserWithdrawRequest -> Integer data UserWithdrawl UserWithdrawl :: Bool -> String -> Integer -> Maybe String -> UserWithdrawl [uwSuccess] :: UserWithdrawl -> Bool [uwName] :: UserWithdrawl -> String [uwAmount] :: UserWithdrawl -> Integer [uwError] :: UserWithdrawl -> Maybe String data UserOrdering TotalUserOrdering :: UserOrdering BalanceUserOrdering :: UserOrdering WithdrawnUserOrdering :: UserOrdering -- | Represents a single user in a UserTopReport or -- UserListReport data ReportUser ReportUser :: String -> Integer -> Integer -> Integer -> ReportUser [ruName] :: ReportUser -> String [ruTotal] :: ReportUser -> Integer [ruWithdrawn] :: ReportUser -> Integer [ruBalance] :: ReportUser -> Integer -- | Report of top users by UserOrdering. data UserTopReport UserTopReport :: Bool -> [ReportUser] -> Maybe String -> UserTopReport [utrSuccess] :: UserTopReport -> Bool [utrUsers] :: UserTopReport -> [ReportUser] [utrError] :: UserTopReport -> Maybe String data UserListReport UserListReport :: Bool -> [ReportUser] -> Maybe String -> Maybe String -> UserListReport [ulrSuccess] :: UserListReport -> Bool [ulrUsers] :: UserListReport -> [ReportUser] [ulrNextPage] :: UserListReport -> Maybe String [ulrError] :: UserListReport -> Maybe String data UserResetRequest UserResetRequest :: SecretKey -> String -> UserResetRequest [urreqSecret] :: UserResetRequest -> SecretKey [urreqName] :: UserResetRequest -> String data UserResetResult UserResetResult :: Bool -> Maybe String -> UserResetResult [urrSuccess] :: UserResetResult -> Bool [urrError] :: UserResetResult -> Maybe String api :: Proxy API -- | The unification of the various endpoints. type API = TokenVerify :<|> (UserBalance :<|> (UserWithdraw :<|> (UserTop :<|> (UserList :<|> UserReset)))) type TokenVerify = "token" :> ("verify" :> (JReqBody TokenVerifyRequest :> JPost TokenVerification)) type UserBalance = "user" :> ("balance" :> (QueryParam "secret" SecretKey :> (QueryParam "name" String :> JGet UserCurrentBalance))) type UserWithdraw = "user" :> ("withdraw" :> (JReqBody UserWithdrawRequest :> JPost UserWithdrawl)) type UserTop = "user" :> ("top" :> (QueryParam "secret" SecretKey :> (QueryParam "count" Integer :> (QueryParam "order" UserOrdering :> JGet UserTopReport)))) type UserList = "user" :> ("list" :> (QueryParam "secert" SecretKey :> (QueryParam "count" Integer :> (QueryParam "page" String :> JGet UserListReport)))) type UserReset = "user" :> ("reset" :> (JReqBody UserResetRequest :> JPost UserResetResult)) -- | The URL prefix used for Coinhive's API baseUrl :: BaseUrl instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserResetResult instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserResetResult instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserResetRequest instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserResetRequest instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserListReport instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserListReport instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserTopReport instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserTopReport instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.ReportUser instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.ReportUser instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserOrdering instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserOrdering instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserWithdrawl instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserWithdrawl instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserWithdrawRequest instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserWithdrawRequest instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.UserCurrentBalance instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.UserCurrentBalance instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.TokenVerifyRequest instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.TokenVerifyRequest instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.TokenVerification instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.TokenVerification instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.TokenId instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.TokenId instance Data.Aeson.Types.ToJSON.ToJSON RFC.Client.Coinhive.SecretKey instance Data.Aeson.Types.FromJSON.FromJSON RFC.Client.Coinhive.SecretKey module RFC.Throttle createThrottle :: (MonadIO m) => Int -> m Throttle withThrottle :: (MonadBaseControl IO m) => Throttle -> m b -> m b data Throttle module RFC.Wai defaultMiddleware :: IO Middleware