-- |The name of an RPC handler
module Ribosome.Host.Data.RpcName where

-- |This name is used for the function or command registered in Neovim as well as to internally identify a handler.
newtype RpcName =
  RpcName { RpcName -> Text
unRpcName :: Text }
  deriving stock (RpcName -> RpcName -> Bool
(RpcName -> RpcName -> Bool)
-> (RpcName -> RpcName -> Bool) -> Eq RpcName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RpcName -> RpcName -> Bool
$c/= :: RpcName -> RpcName -> Bool
== :: RpcName -> RpcName -> Bool
$c== :: RpcName -> RpcName -> Bool
Eq, Int -> RpcName -> ShowS
[RpcName] -> ShowS
RpcName -> String
(Int -> RpcName -> ShowS)
-> (RpcName -> String) -> ([RpcName] -> ShowS) -> Show RpcName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RpcName] -> ShowS
$cshowList :: [RpcName] -> ShowS
show :: RpcName -> String
$cshow :: RpcName -> String
showsPrec :: Int -> RpcName -> ShowS
$cshowsPrec :: Int -> RpcName -> ShowS
Show)
  deriving newtype (String -> RpcName
(String -> RpcName) -> IsString RpcName
forall a. (String -> a) -> IsString a
fromString :: String -> RpcName
$cfromString :: String -> RpcName
IsString, Eq RpcName
Eq RpcName
-> (RpcName -> RpcName -> Ordering)
-> (RpcName -> RpcName -> Bool)
-> (RpcName -> RpcName -> Bool)
-> (RpcName -> RpcName -> Bool)
-> (RpcName -> RpcName -> Bool)
-> (RpcName -> RpcName -> RpcName)
-> (RpcName -> RpcName -> RpcName)
-> Ord RpcName
RpcName -> RpcName -> Bool
RpcName -> RpcName -> Ordering
RpcName -> RpcName -> RpcName
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 :: RpcName -> RpcName -> RpcName
$cmin :: RpcName -> RpcName -> RpcName
max :: RpcName -> RpcName -> RpcName
$cmax :: RpcName -> RpcName -> RpcName
>= :: RpcName -> RpcName -> Bool
$c>= :: RpcName -> RpcName -> Bool
> :: RpcName -> RpcName -> Bool
$c> :: RpcName -> RpcName -> Bool
<= :: RpcName -> RpcName -> Bool
$c<= :: RpcName -> RpcName -> Bool
< :: RpcName -> RpcName -> Bool
$c< :: RpcName -> RpcName -> Bool
compare :: RpcName -> RpcName -> Ordering
$ccompare :: RpcName -> RpcName -> Ordering
Ord)