module Ribosome.Host.Class.Msgpack.Error where

newtype DecodeError =
  DecodeError { DecodeError -> Text
unDecodeError :: Text }
  deriving stock (DecodeError -> DecodeError -> Bool
(DecodeError -> DecodeError -> Bool)
-> (DecodeError -> DecodeError -> Bool) -> Eq DecodeError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DecodeError -> DecodeError -> Bool
$c/= :: DecodeError -> DecodeError -> Bool
== :: DecodeError -> DecodeError -> Bool
$c== :: DecodeError -> DecodeError -> Bool
Eq, Int -> DecodeError -> ShowS
[DecodeError] -> ShowS
DecodeError -> String
(Int -> DecodeError -> ShowS)
-> (DecodeError -> String)
-> ([DecodeError] -> ShowS)
-> Show DecodeError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DecodeError] -> ShowS
$cshowList :: [DecodeError] -> ShowS
show :: DecodeError -> String
$cshow :: DecodeError -> String
showsPrec :: Int -> DecodeError -> ShowS
$cshowsPrec :: Int -> DecodeError -> ShowS
Show, (forall x. DecodeError -> Rep DecodeError x)
-> (forall x. Rep DecodeError x -> DecodeError)
-> Generic DecodeError
forall x. Rep DecodeError x -> DecodeError
forall x. DecodeError -> Rep DecodeError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DecodeError x -> DecodeError
$cfrom :: forall x. DecodeError -> Rep DecodeError x
Generic)
  deriving newtype (String -> DecodeError
(String -> DecodeError) -> IsString DecodeError
forall a. (String -> a) -> IsString a
fromString :: String -> DecodeError
$cfromString :: String -> DecodeError
IsString)

-- instance ReportError DecodeError where
--   errorReport (Failed err) =
--     ErrorReport "error decoding response from neovim" ["DecodeError:", rendered] ERROR
--     where
--       rendered = renderStrict $ layoutPretty defaultLayoutOptions err