| Copyright | (c) Sebastian Witte |
|---|---|
| License | Apache-2.0 |
| Maintainer | woozletoff@gmail.com |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
Neovim.Plugin.IPC.Classes
Description
Synopsis
- data SomeMessage = Message msg => SomeMessage msg
- class Typeable message => Message message where
- data FunctionCall = FunctionCall FunctionName [Object] (TMVar (Either Object Object)) UTCTime
- data Request = Request {}
- data Notification = Notification {
- notMethod :: FunctionName
- notArgs :: [Object]
- data UTCTime
- getCurrentTime :: IO UTCTime
- data Int64
Documentation
data SomeMessage #
Taken from xmonad and based on ideas in /An Extensible Dynamically-Typed Hierarchy of Exceptions/, Simon Marlow, 2006.
User-extensible messages must be put into a value of this type, so that it can be sent to other plugins.
Constructors
| Message msg => SomeMessage msg |
class Typeable message => Message message where #
This class allows type safe casting of SomeMessage to an actual message.
The cast is successful if the type you're expecting matches the type in the
SomeMessage wrapper. This way, you can subscribe to an arbitrary message
type withouth having to pattern match on the constructors. This also allows
plugin authors to create their own message types without having to change the
core code of nvim-hs.
Methods
fromMessage :: SomeMessage -> Maybe message #
Try to convert a given message to a value of the message type we are
interested in. Will evaluate to Nothing for any other type.
Instances
| Message Notification # | |
Defined in Neovim.Plugin.IPC.Classes Methods fromMessage :: SomeMessage -> Maybe Notification # | |
| Message Request # | |
Defined in Neovim.Plugin.IPC.Classes Methods fromMessage :: SomeMessage -> Maybe Request # | |
| Message FunctionCall # | |
Defined in Neovim.Plugin.IPC.Classes Methods fromMessage :: SomeMessage -> Maybe FunctionCall # | |
| Message Message # | |
Defined in Neovim.RPC.Classes Methods fromMessage :: SomeMessage -> Maybe Message # | |
data FunctionCall #
Haskell representation of supported Remote Procedure Call messages.
Constructors
| FunctionCall FunctionName [Object] (TMVar (Either Object Object)) UTCTime | Method name, parameters, callback, timestamp |
Instances
| Pretty FunctionCall # | |
Defined in Neovim.Plugin.IPC.Classes | |
| Message FunctionCall # | |
Defined in Neovim.Plugin.IPC.Classes Methods fromMessage :: SomeMessage -> Maybe FunctionCall # | |
A request is a data type containing the method to call, its arguments and an identifier used to map the result to the function that has been called.
Constructors
| Request | |
Instances
| Eq Request # | |
| Ord Request # | |
Defined in Neovim.Plugin.IPC.Classes | |
| Show Request # | |
| Generic Request # | |
| NFData Request # | |
Defined in Neovim.Plugin.IPC.Classes | |
| Pretty Request # | |
Defined in Neovim.Plugin.IPC.Classes | |
| Message Request # | |
Defined in Neovim.Plugin.IPC.Classes Methods fromMessage :: SomeMessage -> Maybe Request # | |
| type Rep Request # | |
Defined in Neovim.Plugin.IPC.Classes type Rep Request = D1 (MetaData "Request" "Neovim.Plugin.IPC.Classes" "nvim-hs-1.0.0.3-Fiii6m9HuFoDSRid5WkazU" False) (C1 (MetaCons "Request" PrefixI True) (S1 (MetaSel (Just "reqMethod") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FunctionName) :*: (S1 (MetaSel (Just "reqId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int64) :*: S1 (MetaSel (Just "reqArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Object])))) | |
data Notification #
A notification is similar to a Request. It essentially does the same
thing, but the function is only called for its side effects. This type of
message is sent by neovim if the caller there does not care about the result
of the computation.
Constructors
| Notification | |
Fields
| |
Instances
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
Instances
| Eq UTCTime | |
| Data UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime # toConstr :: UTCTime -> Constr # dataTypeOf :: UTCTime -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) # gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r # gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime # | |
| Ord UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
| NFData UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
| FormatTime UTCTime | |
Defined in Data.Time.Format Methods formatCharacter :: Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> Maybe Int -> UTCTime -> String) # | |
| ParseTime UTCTime | |
Defined in Data.Time.Format.Parse | |
getCurrentTime :: IO UTCTime #
Get the current UTCTime from the system clock.
64-bit signed integer type