Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.LSP.MetaModel.Types
Description
This defines the types of the LSP "metamodel", which is a machine-readable format specifying the types used in the LSP protocol.
The type system is quite typescript-y, which isn't surprising given that the whole protocol is very typescript-y.
A typescript version of the metamodel types can be found here, which is useful for constructing this Haskell model of them: https:/github.commicrosoftvscode-languageserver-nodeblobmaintoolssrcmetaModel.ts
Synopsis
- data MessageDirection
- data BaseTypeName
- data Property = Property {
- name :: Text
- type_ :: Type
- optional :: Maybe Bool
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data StructureLiteral = StructureLiteral {
- properties :: [Property]
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data Type
- = BaseType { }
- | ReferenceType {
- rtName :: Text
- | ArrayType { }
- | MapType { }
- | AndType { }
- | OrType { }
- | TupleType { }
- | StructureLiteralType { }
- | StringLiteralType {
- slValue :: Text
- | IntegerLiteralType {
- ilValue :: Integer
- | BooleanLiteralType {
- blValue :: Bool
- data Request = Request {
- method :: Text
- params :: Maybe Type
- result :: Type
- partialResult :: Maybe Type
- errorData :: Maybe Type
- registrationOptions :: Maybe Type
- messageDirection :: MessageDirection
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data Notification = Notification {
- method :: Text
- params :: Maybe Type
- registrationOptions :: Maybe Type
- messageDirection :: MessageDirection
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data Structure = Structure {
- name :: Text
- extends :: Maybe [Type]
- mixins :: Maybe [Type]
- properties :: [Property]
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data TypeAlias = TypeAlias {
- name :: Text
- type_ :: Type
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data TextOrInteger
- data EnumerationEntry = EnumerationEntry {
- name :: Text
- value :: TextOrInteger
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data Enumeration = Enumeration {
- name :: Text
- type_ :: Type
- values :: [EnumerationEntry]
- supportsCustomValues :: Maybe Bool
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data MetaData = MetaData {
- version :: Text
- data MetaModel = MetaModel {
- metaData :: MetaData
- requests :: [Request]
- notifications :: [Notification]
- structures :: [Structure]
- enumerations :: [Enumeration]
- typeAliases :: [TypeAlias]
- loadMetaModelFromFile :: FilePath -> Q Exp
Documentation
data MessageDirection #
What direction is this message sent in: server to client, client to server, or both?
Constructors
ServerToClient | |
ClientToServer | |
Both |
Instances
data BaseTypeName #
The "base types" in the metamodel.
Instances
A property of a structure.
Constructors
Property | |
Fields
|
data StructureLiteral #
An anonymous structure type.
Constructors
StructureLiteral | |
Fields
|
Instances
The various kinds of type in the metamodel.
Constructors
BaseType | |
Fields | |
ReferenceType | |
Fields
| |
ArrayType | |
MapType | |
AndType | |
OrType | |
TupleType | |
StructureLiteralType | |
Fields | |
StringLiteralType | |
Fields
| |
IntegerLiteralType | |
Fields
| |
BooleanLiteralType | |
Fields
|
A request message.
Constructors
Request | |
Fields
|
data Notification #
A notification message.
Constructors
Notification | |
Fields
|
Instances
A structure type.
Constructors
Structure | |
Fields
|
A type alias.
Constructors
TypeAlias | |
Fields
|
data TextOrInteger #
This is just 'string | int' on the typescript side, but it's convenient to have a proper type here.
Instances
data EnumerationEntry #
An entry in an enumeration.
Constructors
EnumerationEntry | |
Fields
|
Instances
data Enumeration #
An enumeration type.
Constructors
Enumeration | |
Fields
|
Instances
Metadata about the metamodel iteslf.
The entire metamodel.
Constructors
MetaModel | |
Fields
|
loadMetaModelFromFile :: FilePath -> Q Exp #