{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TemplateHaskell #-}
module Reflex.Backend.Socket.Error
( SetupError(..)
, _GetAddrInfoError
, _UseAddrInfoError
) where
import Control.Exception (IOException)
import Data.List.NonEmpty (NonEmpty)
import GHC.Generics (Generic)
import Network.Socket (AddrInfo)
import Control.Lens.TH (makePrisms)
data SetupError
= GetAddrInfoError IOException
| UseAddrInfoError (NonEmpty (AddrInfo, IOException))
deriving (SetupError -> SetupError -> Bool
(SetupError -> SetupError -> Bool)
-> (SetupError -> SetupError -> Bool) -> Eq SetupError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetupError -> SetupError -> Bool
$c/= :: SetupError -> SetupError -> Bool
== :: SetupError -> SetupError -> Bool
$c== :: SetupError -> SetupError -> Bool
Eq, (forall x. SetupError -> Rep SetupError x)
-> (forall x. Rep SetupError x -> SetupError) -> Generic SetupError
forall x. Rep SetupError x -> SetupError
forall x. SetupError -> Rep SetupError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetupError x -> SetupError
$cfrom :: forall x. SetupError -> Rep SetupError x
Generic, Int -> SetupError -> ShowS
[SetupError] -> ShowS
SetupError -> String
(Int -> SetupError -> ShowS)
-> (SetupError -> String)
-> ([SetupError] -> ShowS)
-> Show SetupError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetupError] -> ShowS
$cshowList :: [SetupError] -> ShowS
show :: SetupError -> String
$cshow :: SetupError -> String
showsPrec :: Int -> SetupError -> ShowS
$cshowsPrec :: Int -> SetupError -> ShowS
Show)
$(makePrisms ''SetupError)