nvim-hs-0.0.6: Haskell plugin backend for neovim

PortabilityGHC
Stabilityexperimental
Maintainerwoozletoff@gmail.com
Safe HaskellNone

Neovim.Plugin.IPC.Classes

Description

 

Synopsis

Documentation

data SomeMessage Source

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

forall msg . Message msg => SomeMessage msg 

class Typeable message => Message message whereSource

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 messageSource

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.

data FunctionCall Source

Haskell representation of supported Remote Procedure Call messages.

Constructors

FunctionCall FunctionName [Object] (TMVar (Either Object Object)) UTCTime

Method name, parameters, callback, timestamp

data Request Source

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 

Fields

reqMethod :: FunctionName

Name of the function to call.

reqId :: !Int64

Identifier to map the result to a function call invocation.

reqArgs :: [Object]

Arguments for the function.

data Notification Source

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

notMethod :: FunctionName

Name of the function to call.

notArgs :: [Object]

Arguments for the function.

module Data.Int

module Data.Time