-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Deploying Haskell code onto AWS Lambda using Serverless -- -- Utilities to help process the events from AWS Lambda when deployed -- with the serverless-haskell plugin. @package serverless-haskell @version 0.3.1 module AWSLambda.Events.Embedded -- | Type for a JSON value embedded within a JSON string value newtype Embedded a Embedded :: a -> Embedded a [_unEmbed] :: Embedded a -> a unEmbed :: forall a_affA a_aoKf. Iso (Embedded a_affA) (Embedded a_aoKf) a_affA a_aoKf instance GHC.Show.Show a => GHC.Show.Show (AWSLambda.Events.Embedded.Embedded a) instance GHC.Classes.Eq a => GHC.Classes.Eq (AWSLambda.Events.Embedded.Embedded a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (AWSLambda.Events.Embedded.Embedded a) module AWSLambda.Events.Records newtype RecordsEvent a RecordsEvent :: [a] -> RecordsEvent a [_reRecords] :: RecordsEvent a -> [a] reRecords :: forall a_apAi a_apP7. Iso (RecordsEvent a_apAi) (RecordsEvent a_apP7) [a_apAi] [a_apP7] instance GHC.Show.Show a => GHC.Show.Show (AWSLambda.Events.Records.RecordsEvent a) instance GHC.Classes.Eq a => GHC.Classes.Eq (AWSLambda.Events.Records.RecordsEvent a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (AWSLambda.Events.Records.RecordsEvent a) -- | Based on -- https://github.com/aws/aws-lambda-dotnet/tree/master/Libraries/src/Amazon.Lambda.KinesisEvents module AWSLambda.Events.KinesisEvent data KinesisRecord KinesisRecord :: !Record -> !Text -> KinesisRecord [_krRecord] :: KinesisRecord -> !Record [_krKinesisSchemaVersion] :: KinesisRecord -> !Text krRecord :: Lens' KinesisRecord Record krKinesisSchemaVersion :: Lens' KinesisRecord Text data KinesisEventRecord KinesisEventRecord :: !KinesisRecord -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Region -> KinesisEventRecord [_kerKinesis] :: KinesisEventRecord -> !KinesisRecord [_kerEventSource] :: KinesisEventRecord -> !Text [_kerEventID] :: KinesisEventRecord -> !Text [_kerInvokeIdentityArn] :: KinesisEventRecord -> !Text [_kerEventVersion] :: KinesisEventRecord -> !Text [_kerEventName] :: KinesisEventRecord -> !Text [_kerEventSourceARN] :: KinesisEventRecord -> !Text [_kerAwsRegion] :: KinesisEventRecord -> !Region kerKinesis :: Lens' KinesisEventRecord KinesisRecord kerInvokeIdentityArn :: Lens' KinesisEventRecord Text kerEventVersion :: Lens' KinesisEventRecord Text kerEventSourceARN :: Lens' KinesisEventRecord Text kerEventSource :: Lens' KinesisEventRecord Text kerEventName :: Lens' KinesisEventRecord Text kerEventID :: Lens' KinesisEventRecord Text kerAwsRegion :: Lens' KinesisEventRecord Region type KinesisEvent = RecordsEvent KinesisEventRecord instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.KinesisEvent.KinesisEventRecord instance GHC.Show.Show AWSLambda.Events.KinesisEvent.KinesisEventRecord instance GHC.Classes.Eq AWSLambda.Events.KinesisEvent.KinesisEventRecord instance GHC.Show.Show AWSLambda.Events.KinesisEvent.KinesisRecord instance GHC.Classes.Eq AWSLambda.Events.KinesisEvent.KinesisRecord instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.KinesisEvent.KinesisRecord -- | Based on -- https://github.com/aws/aws-lambda-dotnet/tree/master/Libraries/src/Amazon.Lambda.SNSEvents module AWSLambda.Events.SNSEvent data MessageAttribute MessageAttribute :: !Text -> !Text -> MessageAttribute [_maType] :: MessageAttribute -> !Text [_maValue] :: MessageAttribute -> !Text maValue :: Lens' MessageAttribute Text maType :: Lens' MessageAttribute Text data SNSMessage message SNSMessage :: !message -> !(HashMap Text MessageAttribute) -> !Text -> !Text -> !Text -> !Text -> !Text -> !UTCTime -> !Text -> !Text -> !Text -> SNSMessage message [_smMessage] :: SNSMessage message -> !message [_smMessageAttributes] :: SNSMessage message -> !(HashMap Text MessageAttribute) [_smMessageId] :: SNSMessage message -> !Text [_smSignature] :: SNSMessage message -> !Text [_smSignatureVersion] :: SNSMessage message -> !Text [_smSigningCertUrl] :: SNSMessage message -> !Text [_smSubject] :: SNSMessage message -> !Text [_smTimestamp] :: SNSMessage message -> !UTCTime [_smTopicArn] :: SNSMessage message -> !Text [_smType] :: SNSMessage message -> !Text [_smUnsubscribeUrl] :: SNSMessage message -> !Text smUnsubscribeUrl :: forall message_atov. Lens' (SNSMessage message_atov) Text smType :: forall message_atov. Lens' (SNSMessage message_atov) Text smTopicArn :: forall message_atov. Lens' (SNSMessage message_atov) Text smTimestamp :: forall message_atov. Lens' (SNSMessage message_atov) UTCTime smSubject :: forall message_atov. Lens' (SNSMessage message_atov) Text smSigningCertUrl :: forall message_atov. Lens' (SNSMessage message_atov) Text smSignatureVersion :: forall message_atov. Lens' (SNSMessage message_atov) Text smSignature :: forall message_atov. Lens' (SNSMessage message_atov) Text smMessageId :: forall message_atov. Lens' (SNSMessage message_atov) Text smMessageAttributes :: forall message_atov. Lens' (SNSMessage message_atov) (HashMap Text MessageAttribute) smMessage :: forall message_atov message_atGo. Lens (SNSMessage message_atov) (SNSMessage message_atGo) message_atov message_atGo data SNSRecord message SNSRecord :: !Text -> !Text -> !Text -> !(SNSMessage message) -> SNSRecord message [_srEventVersion] :: SNSRecord message -> !Text [_srEventSubscriptionArn] :: SNSRecord message -> !Text [_srEventSource] :: SNSRecord message -> !Text [_srSns] :: SNSRecord message -> !(SNSMessage message) srSns :: forall message_atIZ message_atRP. Lens (SNSRecord message_atIZ) (SNSRecord message_atRP) (SNSMessage message_atIZ) (SNSMessage message_atRP) srEventVersion :: forall message_atIZ. Lens' (SNSRecord message_atIZ) Text srEventSubscriptionArn :: forall message_atIZ. Lens' (SNSRecord message_atIZ) Text srEventSource :: forall message_atIZ. Lens' (SNSRecord message_atIZ) Text -- | SNSEvent. The message type is parameterised. To treat it as a -- text value use SNSEvent Text. To extract an embedded event -- object use the Embedded type. E.g. SNSEvent (Embedded -- S3Event) will treat the message as an embedded S3Event. type SNSEvent message = RecordsEvent (SNSRecord message) instance Data.Aeson.Types.FromJSON.FromJSON message => Data.Aeson.Types.FromJSON.FromJSON (AWSLambda.Events.SNSEvent.SNSRecord message) instance GHC.Show.Show message => GHC.Show.Show (AWSLambda.Events.SNSEvent.SNSRecord message) instance GHC.Classes.Eq message => GHC.Classes.Eq (AWSLambda.Events.SNSEvent.SNSRecord message) instance Data.Aeson.Types.FromJSON.FromJSON message => Data.Aeson.Types.FromJSON.FromJSON (AWSLambda.Events.SNSEvent.SNSMessage message) instance GHC.Show.Show message => GHC.Show.Show (AWSLambda.Events.SNSEvent.SNSMessage message) instance GHC.Classes.Eq message => GHC.Classes.Eq (AWSLambda.Events.SNSEvent.SNSMessage message) instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.SNSEvent.MessageAttribute instance GHC.Show.Show AWSLambda.Events.SNSEvent.MessageAttribute instance GHC.Classes.Eq AWSLambda.Events.SNSEvent.MessageAttribute -- | Entry point for AWS Lambda handlers deployed with -- serverless-haskell plugin. module AWSLambda.Handler -- | Process incoming events from serverless-haskell using a -- provided function. -- -- The handler receives the input event given to the AWS Lambda function, -- and its return value is returned from the function. -- -- This is intended to be used as main, for example: -- --
--   import qualified Data.Aeson as Aeson
--   
--   import AWSLambda
--   
--   main = lambdaMain handler
--   
--   handler :: Aeson.Value -> IO [Int]
--   handler evt = do
--     putStrLn "This should go to logs"
--     print evt
--     pure [1, 2, 3]
--   
-- -- The handler function can receive arbitrary JSON values from custom -- invocations, or one of the events from the AWSLambda.Events -- module, such as S3Event: -- --
--   import AWSLambda.Events.S3Event
--   
--   handler :: S3Event -> IO ()
--   handler evt = do
--     print $ records evt
--   
-- -- If the Lambda function needs to process several types of events, use -- Alternative to combine several handlers: -- --
--   import AWSLambda
--   import AWSLambda.Events.S3Event
--   import Data.Aeson
--   import Data.Aeson.Alternative
--   
--   main = lambdaMain $ handlerS3 `alternative` handlerCustom
--   
--   handlerS3 :: S3Event -> IO ()
--   handlerS3 = _
--   
--   handlerCustom :: Value -> IO ()
--   handlerCustom = _
--   
-- -- When run outside the AWS Lambda environment, the input is read as JSON -- from the command line, and the result of the execution is printed, -- also as JSON, to the standard output. lambdaMain :: (FromJSON event, ToJSON res) => (event -> IO res) -> IO () module AWSLambda.Orphans instance Data.Aeson.Types.FromJSON.FromJSON Network.AWS.S3.Internal.BucketName instance Data.Aeson.Types.FromJSON.FromJSON Network.AWS.S3.Internal.ObjectKey instance Data.Aeson.Types.FromJSON.FromJSON Network.AWS.S3.Internal.ETag instance Data.Aeson.Types.FromJSON.FromJSON Network.AWS.S3.Types.Sum.Event -- | Based on -- https://github.com/aws/aws-lambda-dotnet/tree/master/Libraries/src/Amazon.Lambda.S3Events module AWSLambda.Events.S3Event newtype UserIdentityEntity UserIdentityEntity :: Text -> UserIdentityEntity [_uiePrincipalId] :: UserIdentityEntity -> Text uiePrincipalId :: Iso' UserIdentityEntity Text data S3BucketEntity S3BucketEntity :: !Text -> !BucketName -> !UserIdentityEntity -> S3BucketEntity [_sbeArn] :: S3BucketEntity -> !Text [_sbeName] :: S3BucketEntity -> !BucketName [_sbeOwnerIdentity] :: S3BucketEntity -> !UserIdentityEntity sbeOwnerIdentity :: Lens' S3BucketEntity UserIdentityEntity sbeName :: Lens' S3BucketEntity BucketName sbeArn :: Lens' S3BucketEntity Text data S3ObjectEntity S3ObjectEntity :: !(Maybe ETag) -> !ObjectKey -> !(Maybe Integer) -> !Text -> !(Maybe Text) -> S3ObjectEntity [_soeETag] :: S3ObjectEntity -> !(Maybe ETag) [_soeKey] :: S3ObjectEntity -> !ObjectKey [_soeSize] :: S3ObjectEntity -> !(Maybe Integer) [_soeSequencer] :: S3ObjectEntity -> !Text [_soeVersionId] :: S3ObjectEntity -> !(Maybe Text) soeVersionId :: Lens' S3ObjectEntity (Maybe Text) soeSize :: Lens' S3ObjectEntity (Maybe Integer) soeSequencer :: Lens' S3ObjectEntity Text soeKey :: Lens' S3ObjectEntity ObjectKey soeETag :: Lens' S3ObjectEntity (Maybe ETag) newtype RequestParametersEntity RequestParametersEntity :: Text -> RequestParametersEntity [_rpeSourceIPAddress] :: RequestParametersEntity -> Text rpeSourceIPAddress :: Iso' RequestParametersEntity Text data ResponseElementsEntity ResponseElementsEntity :: !Text -> !Text -> ResponseElementsEntity [_reeXAmzId2] :: ResponseElementsEntity -> !Text [_reeXAmzRequestId] :: ResponseElementsEntity -> !Text reeXAmzRequestId :: Lens' ResponseElementsEntity Text reeXAmzId2 :: Lens' ResponseElementsEntity Text data S3Entity S3Entity :: !S3BucketEntity -> !Text -> !S3ObjectEntity -> !Text -> S3Entity [_seBucket] :: S3Entity -> !S3BucketEntity [_seConfigurationId] :: S3Entity -> !Text [_seObject] :: S3Entity -> !S3ObjectEntity [_seS3SchemaVersion] :: S3Entity -> !Text seS3SchemaVersion :: Lens' S3Entity Text seObject :: Lens' S3Entity S3ObjectEntity seConfigurationId :: Lens' S3Entity Text seBucket :: Lens' S3Entity S3BucketEntity data S3EventNotification S3EventNotification :: !Region -> !Event -> !Text -> !UTCTime -> !Text -> !RequestParametersEntity -> !ResponseElementsEntity -> !S3Entity -> !UserIdentityEntity -> S3EventNotification [_senAwsRegion] :: S3EventNotification -> !Region [_senEventName] :: S3EventNotification -> !Event [_senEventSource] :: S3EventNotification -> !Text [_senEventTime] :: S3EventNotification -> !UTCTime [_senEventVersion] :: S3EventNotification -> !Text [_senRequestParameters] :: S3EventNotification -> !RequestParametersEntity [_senResponseElements] :: S3EventNotification -> !ResponseElementsEntity [_senS3] :: S3EventNotification -> !S3Entity [_senUserIdentity] :: S3EventNotification -> !UserIdentityEntity senUserIdentity :: Lens' S3EventNotification UserIdentityEntity senS3 :: Lens' S3EventNotification S3Entity senResponseElements :: Lens' S3EventNotification ResponseElementsEntity senRequestParameters :: Lens' S3EventNotification RequestParametersEntity senEventVersion :: Lens' S3EventNotification Text senEventTime :: Lens' S3EventNotification UTCTime senEventSource :: Lens' S3EventNotification Text senEventName :: Lens' S3EventNotification Event senAwsRegion :: Lens' S3EventNotification Region type S3Event = RecordsEvent S3EventNotification instance GHC.Show.Show AWSLambda.Events.S3Event.S3EventNotification instance GHC.Classes.Eq AWSLambda.Events.S3Event.S3EventNotification instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.S3Event.S3EventNotification instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.S3Event.S3Entity instance GHC.Show.Show AWSLambda.Events.S3Event.S3Entity instance GHC.Classes.Eq AWSLambda.Events.S3Event.S3Entity instance GHC.Show.Show AWSLambda.Events.S3Event.ResponseElementsEntity instance GHC.Classes.Eq AWSLambda.Events.S3Event.ResponseElementsEntity instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.S3Event.ResponseElementsEntity instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.S3Event.RequestParametersEntity instance GHC.Show.Show AWSLambda.Events.S3Event.RequestParametersEntity instance GHC.Classes.Eq AWSLambda.Events.S3Event.RequestParametersEntity instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.S3Event.S3ObjectEntity instance GHC.Show.Show AWSLambda.Events.S3Event.S3ObjectEntity instance GHC.Classes.Eq AWSLambda.Events.S3Event.S3ObjectEntity instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.S3Event.S3BucketEntity instance GHC.Show.Show AWSLambda.Events.S3Event.S3BucketEntity instance GHC.Classes.Eq AWSLambda.Events.S3Event.S3BucketEntity instance Data.Aeson.Types.FromJSON.FromJSON AWSLambda.Events.S3Event.UserIdentityEntity instance GHC.Show.Show AWSLambda.Events.S3Event.UserIdentityEntity instance GHC.Classes.Eq AWSLambda.Events.S3Event.UserIdentityEntity module AWSLambda.Events -- | Not yet implemented data DynamoDBEvent -- | Not yet implemented data SESEvent -- | Not yet implemented data CognitoEvent -- | Not yet implemented data CloudFormationEvent -- | Not yet implemented data CloudWatchLogsEvent -- | Not yet implemented data CloudWatchEventsEvent -- | Not yet implemented data CodeCommitEvent -- | Not yet implemented data ConfigEvent -- | Not yet implemented data AlexaEvent -- | Not yet implemented data LexEvent -- | Not yet implemented data APIGatewayEvent -- | Not yet implemented data IoTButtonEvent -- | Not yet implemented data CloudFrontEvent -- | Not yet implemented data FirehoseEvent -- | Not yet implemented data InvokeEvent -- | Sum type for all possible Lambda events. Parameterised on the type of -- SNS Events to be handled. See SNSEvent for details. data LambdaEvent snsMessage S3 :: !S3Event -> LambdaEvent snsMessage DynamoDB :: !DynamoDBEvent -> LambdaEvent snsMessage KinesisStream :: !KinesisEvent -> LambdaEvent snsMessage SNS :: !(SNSEvent snsMessage) -> LambdaEvent snsMessage SES :: !SESEvent -> LambdaEvent snsMessage Cognito :: !CognitoEvent -> LambdaEvent snsMessage CloudFormation :: !CloudFormationEvent -> LambdaEvent snsMessage CloudWatchLogs :: !CloudWatchLogsEvent -> LambdaEvent snsMessage CloudWatchEvents :: !CloudWatchEventsEvent -> LambdaEvent snsMessage CodeCommit :: !CodeCommitEvent -> LambdaEvent snsMessage Config :: !ConfigEvent -> LambdaEvent snsMessage Alexa :: !AlexaEvent -> LambdaEvent snsMessage Lex :: !LexEvent -> LambdaEvent snsMessage APIGateway :: !APIGatewayEvent -> LambdaEvent snsMessage IoTButton :: !IoTButtonEvent -> LambdaEvent snsMessage CloudFront :: !CloudFrontEvent -> LambdaEvent snsMessage Firehose :: !FirehoseEvent -> LambdaEvent snsMessage Invoke :: !InvokeEvent -> LambdaEvent snsMessage Custom :: !Value -> LambdaEvent snsMessage -- | Attempt to parse the various event types. Any valid JSON that can't be -- parsed as a specific event type will result in a Custom value. _Custom :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) Value _Invoke :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) InvokeEvent _Firehose :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) FirehoseEvent _CloudFront :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) CloudFrontEvent _IoTButton :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) IoTButtonEvent _APIGateway :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) APIGatewayEvent _Lex :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) LexEvent _Alexa :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) AlexaEvent _Config :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) ConfigEvent _CodeCommit :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) CodeCommitEvent _CloudWatchEvents :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) CloudWatchEventsEvent _CloudWatchLogs :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) CloudWatchLogsEvent _CloudFormation :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) CloudFormationEvent _Cognito :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) CognitoEvent _SES :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) SESEvent _SNS :: forall snsMessage_aIUp snsMessage_aJ35. Prism (LambdaEvent snsMessage_aJ35) (LambdaEvent snsMessage_aIUp) (SNSEvent snsMessage_aJ35) (SNSEvent snsMessage_aIUp) _KinesisStream :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) KinesisEvent _DynamoDB :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) DynamoDBEvent _S3 :: forall snsMessage_aIUp. Prism' (LambdaEvent snsMessage_aIUp) S3Event instance Data.Aeson.Types.FromJSON.FromJSON snsMessage => Data.Aeson.Types.FromJSON.FromJSON (AWSLambda.Events.LambdaEvent snsMessage) -- | Tools for running Haskell on AWS Lambda using Serverless. -- --

Usage

-- -- To deploy a Haskell function on AWS Lambda: -- -- -- --
--   npm init .
--   npm install --save serverless serverless-haskell
--   
-- -- -- --
--   provider:
--     name: aws
--     runtime: nodejs6.10
--   
--   functions:
--     myfunc:
--       handler: mypackage.mypackage-exe
--       # Here, mypackage is the Haskell package name and mypackage-exe is the
--       # executable name as defined in the Cabal file
--   
--   plugins:
--     - serverless-haskell
--   
-- -- -- -- The serverless-haskell plugin will build the package using -- Stack and upload it to AWS together with a JavaScript wrapper to pass -- the input and output from/to AWS Lambda. -- -- You can test the function and see the invocation results with sls -- invoke myfunc. -- --

Additional features

-- -- Configuration options are passed to the plugin under haskell -- key in custom section of serverless.yml. -- -- -- --
--   custom:
--     haskell:
--       stackBuildArgs:
--         - --pedantic
--         - --allow-different-user
--   
-- -- -- --
--   custom:
--     haskell:
--       arguments:
--         myfunc:
--           - --arg1
--           - --arg2
--           - arg3
--   
-- -- -- --
--   custom:
--     haskell:
--       extraLibraries:
--         - libpcre.so.3
--   
module AWSLambda -- | Process incoming events from serverless-haskell using a -- provided function. -- -- The handler receives the input event given to the AWS Lambda function, -- and its return value is returned from the function. -- -- This is intended to be used as main, for example: -- --
--   import qualified Data.Aeson as Aeson
--   
--   import AWSLambda
--   
--   main = lambdaMain handler
--   
--   handler :: Aeson.Value -> IO [Int]
--   handler evt = do
--     putStrLn "This should go to logs"
--     print evt
--     pure [1, 2, 3]
--   
-- -- The handler function can receive arbitrary JSON values from custom -- invocations, or one of the events from the AWSLambda.Events -- module, such as S3Event: -- --
--   import AWSLambda.Events.S3Event
--   
--   handler :: S3Event -> IO ()
--   handler evt = do
--     print $ records evt
--   
-- -- If the Lambda function needs to process several types of events, use -- Alternative to combine several handlers: -- --
--   import AWSLambda
--   import AWSLambda.Events.S3Event
--   import Data.Aeson
--   import Data.Aeson.Alternative
--   
--   main = lambdaMain $ handlerS3 `alternative` handlerCustom
--   
--   handlerS3 :: S3Event -> IO ()
--   handlerS3 = _
--   
--   handlerCustom :: Value -> IO ()
--   handlerCustom = _
--   
-- -- When run outside the AWS Lambda environment, the input is read as JSON -- from the command line, and the result of the execution is printed, -- also as JSON, to the standard output. lambdaMain :: (FromJSON event, ToJSON res) => (event -> IO res) -> IO () -- | Utilities for decoding JSON into one of the possible types and -- handling the resulting sum type. module Data.Aeson.Alternative -- | One of the two values that has been parsed from JSON data AlternativeJSON a b -- | Handle either of the two types that have been parsed from JSON alternative :: (a -> r) -> (b -> r) -> AlternativeJSON a b -> r instance (GHC.Show.Show b, GHC.Show.Show a) => GHC.Show.Show (Data.Aeson.Alternative.AlternativeJSON a b) instance (GHC.Classes.Ord b, GHC.Classes.Ord a) => GHC.Classes.Ord (Data.Aeson.Alternative.AlternativeJSON a b) instance (GHC.Classes.Eq b, GHC.Classes.Eq a) => GHC.Classes.Eq (Data.Aeson.Alternative.AlternativeJSON a b) instance (Data.Aeson.Types.FromJSON.FromJSON a, Data.Aeson.Types.FromJSON.FromJSON b) => Data.Aeson.Types.FromJSON.FromJSON (Data.Aeson.Alternative.AlternativeJSON a b)