-- |The fatal error type
module Ribosome.Host.Data.BootError where

-- |This type represents the singular fatal error used by Ribosome.
--
-- Contrary to all other errors, this one is used with 'Error' instead of 'Stop'.
-- It is only thrown from intialization code of interpreters when operation of the plugin is impossible due to the error
-- condition.
newtype BootError =
  BootError { BootError -> Text
unBootError :: Text }
  deriving stock (BootError -> BootError -> Bool
(BootError -> BootError -> Bool)
-> (BootError -> BootError -> Bool) -> Eq BootError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BootError -> BootError -> Bool
$c/= :: BootError -> BootError -> Bool
== :: BootError -> BootError -> Bool
$c== :: BootError -> BootError -> Bool
Eq, Int -> BootError -> ShowS
[BootError] -> ShowS
BootError -> String
(Int -> BootError -> ShowS)
-> (BootError -> String)
-> ([BootError] -> ShowS)
-> Show BootError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BootError] -> ShowS
$cshowList :: [BootError] -> ShowS
show :: BootError -> String
$cshow :: BootError -> String
showsPrec :: Int -> BootError -> ShowS
$cshowsPrec :: Int -> BootError -> ShowS
Show)
  deriving newtype (String -> BootError
(String -> BootError) -> IsString BootError
forall a. (String -> a) -> IsString a
fromString :: String -> BootError
$cfromString :: String -> BootError
IsString, Eq BootError
Eq BootError
-> (BootError -> BootError -> Ordering)
-> (BootError -> BootError -> Bool)
-> (BootError -> BootError -> Bool)
-> (BootError -> BootError -> Bool)
-> (BootError -> BootError -> Bool)
-> (BootError -> BootError -> BootError)
-> (BootError -> BootError -> BootError)
-> Ord BootError
BootError -> BootError -> Bool
BootError -> BootError -> Ordering
BootError -> BootError -> BootError
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: BootError -> BootError -> BootError
$cmin :: BootError -> BootError -> BootError
max :: BootError -> BootError -> BootError
$cmax :: BootError -> BootError -> BootError
>= :: BootError -> BootError -> Bool
$c>= :: BootError -> BootError -> Bool
> :: BootError -> BootError -> Bool
$c> :: BootError -> BootError -> Bool
<= :: BootError -> BootError -> Bool
$c<= :: BootError -> BootError -> Bool
< :: BootError -> BootError -> Bool
$c< :: BootError -> BootError -> Bool
compare :: BootError -> BootError -> Ordering
$ccompare :: BootError -> BootError -> Ordering
Ord)