API

This module exports everything that you need to be able to create your own framework test provider. To create a provider you need to:
  • Create an instance of the Testlike class
  • Create an instance of the TestResultlike class
  • Expose a function that lets people construct Test values using your new instances
This module exports everything that you need to be able to create your own test runner.
An element in the exposed API
Our API documentation type, a product of top-level information and a good old hashmap from Endpoint to Action
multipart/form-data Servant API support for servant. see servant-multipart and servant-multipart-client for server- and client- definitions. This is mostly useful for adding file upload support to an API. See haddocks of MultipartForm for an introduction.
These functions are for conveniently implementing the simple CLI
This module provides a unified interface for writing type-checking plugins for GHC. It attempts to re-export all the functionality from GHC that is relevant to plugin authors, as well as providing utility functions to streamline certain common operations such as creating evidence (to solve constraints), rewriting type family applications, throwing custom type errors. Consider making use of the table of contents to help navigate this documentation; don't hesitate to jump between sections to get an overview of the relevant aspects. For an illustration of the functionality, check the examples in the associated GitHub repository. The internal module GHC.TcPlugin.API.Internal can be used to directly lift and unlift computations in GHC's TcM monad, but it is hoped that the interface provided in this module is sufficient.
Low level XMLRPC API based directly on the python API since that is the only available reference documentation: https://koji.fedoraproject.org/koji/api. Note that many of the procedures in this module are untested and experimental: particularly most of those that return a Value. Higher level wrapper procedures live in Distribution.Koji. Fixes and enhancements welcome.
This module re-exports all identifiers that LH needs from the GHC API. The intended use of this module is to provide a quick look of what GHC API features LH depends upon. The transitive dependencies of this module shouldn't contain modules from Language.Haskell.Liquid.* or other non-boot libraries. This makes it easy to discover breaking changes in the GHC API.
Module that implements the Mail API of SendGrid v3. https://sendgrid.com/docs/API_Reference/api_v3.html
{-# LANGUAGE OverloadedStrings #-}

import Data.List.NonEmpty (fromList)
import Network.SendGridV3.Api
import Control.Lens ((^.))
import Network.Wreq (responseStatus, statusCode)

sendGridApiKey :: ApiKey
sendGridApiKey = ApiKey "SG..."

testMail :: Mail () ()
testMail =
let to = personalization $ fromList [MailAddress "john@example.com" "John Doe"]
from = MailAddress "jane@example.com" "Jane Smith"
subject = "Email Subject"
content = fromList [mailContentText "Example Content"]
in mail [to] from subject content

main :: IO ()
main = do
-- Send an email, overriding options as needed
eResponse <- sendMail sendGridApiKey (testMail { _mailSendAt = Just 1516468000 })
case eResponse of
Left httpException -> error $ show httpException
Right response -> print (response ^. responseStatus . statusCode)
This module defines the Throws and Throwing types.
FIXME(jadel): move the rest of the Conversations API into here since the old "shoving all the API in one spot" is soft deprecated. @since 2.2.0.0
Raw Servant API for Advent of Code. Can be useful for building mock servers, generating documentation and other servanty things, or low-level raw requests. If you use this to make requests directly, please use responsibly: do not make automated requests more than once per day and throttle all manual requestes. See notes in Advent.