Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
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 {}
- data StructureLiteral = StructureLiteral {
- properties :: [Property]
- documentation :: Maybe Text
- since :: Maybe Text
- proposed :: Maybe Bool
- deprecated :: Maybe Text
- data Type
- = BaseType { }
- | ReferenceType { }
- | ArrayType { }
- | MapType { }
- | AndType { }
- | OrType { }
- | TupleType { }
- | StructureLiteralType { }
- | StringLiteralType { }
- | IntegerLiteralType { }
- | BooleanLiteralType { }
- 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 {}
- data Structure = Structure {}
- data TypeAlias = TypeAlias {}
- data TextOrInteger
- data EnumerationEntry = EnumerationEntry {}
- data Enumeration = Enumeration {}
- data MetaData = MetaData {}
- data MetaModel = MetaModel {
- metaData :: MetaData
- requests :: [Request]
- notifications :: [Notification]
- structures :: [Structure]
- enumerations :: [Enumeration]
- typeAliases :: [TypeAlias]
- loadMetaModelFromFile :: FilePath -> Q Exp
Documentation
data MessageDirection Source #
What direction is this message sent in: server to client, client to server, or both?
Constructors
ServerToClient | |
ClientToServer | |
Both |
Instances
data BaseTypeName Source #
The "base types" in the metamodel.
Instances
A property of a structure.
Constructors
Property | |
data StructureLiteral Source #
An anonymous structure type.
Constructors
StructureLiteral | |
Fields
|
Instances
The various kinds of type in the metamodel.
Constructors
BaseType | |
Fields | |
ReferenceType | |
ArrayType | |
MapType | |
AndType | |
OrType | |
TupleType | |
StructureLiteralType | |
Fields | |
StringLiteralType | |
IntegerLiteralType | |
BooleanLiteralType | |
A request message.
Constructors
Request | |
Fields
|
data Notification Source #
A notification message.
Constructors
Notification | |
Fields
|
Instances
A structure type.
Constructors
Structure | |
Instances
FromJSON Structure Source # | |
Defined in Language.LSP.MetaModel.Types | |
ToJSON Structure Source # | |
Show Structure Source # | |
Eq Structure Source # | |
Ord Structure Source # | |
Lift Structure Source # | |
A type alias.
Constructors
TypeAlias | |
Instances
FromJSON TypeAlias Source # | |
Defined in Language.LSP.MetaModel.Types | |
ToJSON TypeAlias Source # | |
Show TypeAlias Source # | |
Eq TypeAlias Source # | |
Ord TypeAlias Source # | |
Lift TypeAlias Source # | |
data TextOrInteger Source #
This is just 'string | int' on the typescript side, but it's convenient to have a proper type here.
Instances
data EnumerationEntry Source #
An entry in an enumeration.
Constructors
EnumerationEntry | |
Instances
data Enumeration Source #
An enumeration type.
Constructors
Enumeration | |
Instances
Metadata about the metamodel iteslf.
The entire metamodel.
Constructors
MetaModel | |
Fields
|
Instances
FromJSON MetaModel Source # | |
Defined in Language.LSP.MetaModel.Types | |
ToJSON MetaModel Source # | |
Show MetaModel Source # | |
Eq MetaModel Source # | |
Ord MetaModel Source # | |
Lift MetaModel Source # | |