{-# LANGUAGE DeriveGeneric #-}

module HaskellWorks.Error.Types
  ( GenericError(..)
  , TimedOut(..)
  ) where

import           HaskellWorks.Polysemy.Prelude

newtype GenericError = GenericError
  { GenericError -> Text
message :: Text
  }
  deriving ((forall x. GenericError -> Rep GenericError x)
-> (forall x. Rep GenericError x -> GenericError)
-> Generic GenericError
forall x. Rep GenericError x -> GenericError
forall x. GenericError -> Rep GenericError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. GenericError -> Rep GenericError x
from :: forall x. GenericError -> Rep GenericError x
$cto :: forall x. Rep GenericError x -> GenericError
to :: forall x. Rep GenericError x -> GenericError
Generic, GenericError -> GenericError -> Bool
(GenericError -> GenericError -> Bool)
-> (GenericError -> GenericError -> Bool) -> Eq GenericError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GenericError -> GenericError -> Bool
== :: GenericError -> GenericError -> Bool
$c/= :: GenericError -> GenericError -> Bool
/= :: GenericError -> GenericError -> Bool
Eq, Int -> GenericError -> ShowS
[GenericError] -> ShowS
GenericError -> String
(Int -> GenericError -> ShowS)
-> (GenericError -> String)
-> ([GenericError] -> ShowS)
-> Show GenericError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GenericError -> ShowS
showsPrec :: Int -> GenericError -> ShowS
$cshow :: GenericError -> String
show :: GenericError -> String
$cshowList :: [GenericError] -> ShowS
showList :: [GenericError] -> ShowS
Show)

newtype TimedOut = TimedOut
  { TimedOut -> Text
message :: Text
  }
  deriving ((forall x. TimedOut -> Rep TimedOut x)
-> (forall x. Rep TimedOut x -> TimedOut) -> Generic TimedOut
forall x. Rep TimedOut x -> TimedOut
forall x. TimedOut -> Rep TimedOut x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. TimedOut -> Rep TimedOut x
from :: forall x. TimedOut -> Rep TimedOut x
$cto :: forall x. Rep TimedOut x -> TimedOut
to :: forall x. Rep TimedOut x -> TimedOut
Generic, TimedOut -> TimedOut -> Bool
(TimedOut -> TimedOut -> Bool)
-> (TimedOut -> TimedOut -> Bool) -> Eq TimedOut
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimedOut -> TimedOut -> Bool
== :: TimedOut -> TimedOut -> Bool
$c/= :: TimedOut -> TimedOut -> Bool
/= :: TimedOut -> TimedOut -> Bool
Eq, Int -> TimedOut -> ShowS
[TimedOut] -> ShowS
TimedOut -> String
(Int -> TimedOut -> ShowS)
-> (TimedOut -> String) -> ([TimedOut] -> ShowS) -> Show TimedOut
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimedOut -> ShowS
showsPrec :: Int -> TimedOut -> ShowS
$cshow :: TimedOut -> String
show :: TimedOut -> String
$cshowList :: [TimedOut] -> ShowS
showList :: [TimedOut] -> ShowS
Show)