ghcide-2.5.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageHaskell2010

Development.IDE

Synopsis

Documentation

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

data ParseResult a #

The result of running a parser.

Constructors

POk

The parser has consumed a (possibly empty) prefix of the input and produced a result. Use getMessages to check for accumulated warnings and non-fatal errors.

Fields

  • PState

    The resulting parsing state. Can be used to resume parsing.

  • a

    The resulting value.

PFailed

The parser has consumed a (possibly empty) prefix of the input and failed.

Fields

action :: Action a -> Rules () #

type family RuleResult key #

The type mapping between the key or a rule and the resulting value.

Instances

Instances details
type RuleResult AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GenerateCore Source #

Convert to Core, requires TypeCheck*

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetBindings Source #

A IntervalMap telling us what is in scope at each point

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetFileContents Source #

Get the contents of a file, either dirty (if the buffer is modified) or Nothing to mean use from disk.

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetHieAst Source #

The uncompressed HieAST

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetLocatedImports Source #

Resolve the imports in a module to the file path of a module in the same package

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetModIface Source #

Get a module interface details, either from an interface file or a typechecked module

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetModIfaceFromDisk Source #

Read the module interface file from disk. Throws an error for VFS files. This is an internal rule, use GetModIface instead.

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetModIfaceFromDiskAndIndex Source #

GetModIfaceFromDisk and index the `.hie` file into the database. This is an internal rule, use GetModIface instead.

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetModSummary Source #

Generate a ModSummary that has enough information to be used to get .hi and .hie files. without needing to parse the entire source

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetModSummaryWithoutTimestamps Source #

Generate a ModSummary with the timestamps and preprocessed content elided, for more successful early cutoff

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetModificationTime Source #

Get the modification time of a file.

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetParsedModule Source #

The parse tree for the file using GetFileContents

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GetParsedModuleWithComments Source #

The parse tree for the file using GetFileContents, all comments included using Opt_KeepRawTokenStream

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GhcSession Source #

A GHC session that we reuse.

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GhcSessionDeps Source #

A GHC session preloaded with all the dependencies This rule is also responsible for calling ReportImportCycles for the direct dependencies

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult NeedsCompilation Source #

Does this module need to be compiled?

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult ReportImportCycles Source #

This rule is used to report import cycles. It depends on GetModuleGraph. We cannot report the cycles directly from GetModuleGraph since we can only report diagnostics for the current file.

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult TypeCheck Source #

The type checked version of this file, requires TypeCheck+

Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult LocalCompletions Source #

Produce completions info for a file

Instance details

Defined in Development.IDE.Plugin.Completions.Types

type RuleResult NonLocalCompletions Source # 
Instance details

Defined in Development.IDE.Plugin.Completions.Types

type RuleResult GetGlobalBindingTypeSigs Source # 
Instance details

Defined in Development.IDE.Plugin.TypeLenses

type RuleResult (Q k) Source # 
Instance details

Defined in Development.IDE.Types.Shake

type RuleResult (Q k) = A (RuleResult k)

data Rules a #

A computation that defines all the rules that form part of the computation graph.

Rules has access to IO through MonadIO. Use of IO is at your own risk: if you write Rules that throw exceptions, then you need to make sure to handle them yourself when you run the resulting Rules.

Instances

Instances details
MonadIO Rules 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

liftIO :: IO a -> Rules a #

Applicative Rules 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

pure :: a -> Rules a #

(<*>) :: Rules (a -> b) -> Rules a -> Rules b #

liftA2 :: (a -> b -> c) -> Rules a -> Rules b -> Rules c #

(*>) :: Rules a -> Rules b -> Rules b #

(<*) :: Rules a -> Rules b -> Rules a #

Functor Rules 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

fmap :: (a -> b) -> Rules a -> Rules b #

(<$) :: a -> Rules b -> Rules a #

Monad Rules 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(>>=) :: Rules a -> (a -> Rules b) -> Rules b #

(>>) :: Rules a -> Rules b -> Rules b #

return :: a -> Rules a #

Monoid a => Monoid (Rules a) 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

mempty :: Rules a #

mappend :: Rules a -> Rules a -> Rules a #

mconcat :: [Rules a] -> Rules a #

Semigroup a => Semigroup (Rules a) 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(<>) :: Rules a -> Rules a -> Rules a #

sconcat :: NonEmpty (Rules a) -> Rules a #

stimes :: Integral b => b -> Rules a -> Rules a #

data Action a #

An action representing something that can be run as part of a Rule.

Actions can be pure functions but also have access to IO via MonadIO and 'MonadUnliftIO. It should be assumed that actions throw exceptions, these can be caught with actionCatch. In particular, it is permissible to use the MonadFail instance, which will lead to an IOException.

Instances

Instances details
MonadFail Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

fail :: String -> Action a #

MonadIO Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

liftIO :: IO a -> Action a #

Applicative Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

pure :: a -> Action a #

(<*>) :: Action (a -> b) -> Action a -> Action b #

liftA2 :: (a -> b -> c) -> Action a -> Action b -> Action c #

(*>) :: Action a -> Action b -> Action b #

(<*) :: Action a -> Action b -> Action a #

Functor Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

fmap :: (a -> b) -> Action a -> Action b #

(<$) :: a -> Action b -> Action a #

Monad Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

(>>=) :: Action a -> (a -> Action b) -> Action b #

(>>) :: Action a -> Action b -> Action b #

return :: a -> Action a #

MonadCatch Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

catch :: Exception e => Action a -> (e -> Action a) -> Action a #

MonadMask Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

mask :: ((forall a. Action a -> Action a) -> Action b) -> Action b #

uninterruptibleMask :: ((forall a. Action a -> Action a) -> Action b) -> Action b #

generalBracket :: Action a -> (a -> ExitCase b -> Action c) -> (a -> Action b) -> Action (b, c) #

MonadThrow Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

throwM :: Exception e => e -> Action a #

MonadUnliftIO Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

withRunInIO :: ((forall a. Action a -> IO a) -> IO b) -> Action b #

data Range #

A range in a text document expressed as (zero-based) start and end positions.

If you want to specify a range that contains a line including the line ending character(s) then use an end position denoting the start of the next line. For example: ```ts { start: { line: 5, character: 23 } end : { line 6, character : 0 } } ```

Constructors

Range 

Fields

Instances

Instances details
FromJSON Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

ToJSON Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Generic Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Show Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

NFData Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

rnf :: Range -> () #

Eq Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

(==) :: Range -> Range -> Bool #

(/=) :: Range -> Range -> Bool #

Ord Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

(>=) :: Range -> Range -> Bool #

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

MapAge Range Source # 
Instance details

Defined in Development.IDE.Core.UseStale

Methods

mapAgeFrom :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked to Range -> Maybe (Tracked from Range) Source #

mapAgeTo :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked from Range -> Maybe (Tracked to Range) Source #

Hashable Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

hashWithSalt :: Int -> Range -> Int #

hash :: Range -> Int #

Pretty Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

pretty :: Range -> Doc ann #

prettyList :: [Range] -> Doc ann #

HasEnd Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasInsert InsertReplaceEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange AnnotatedTextEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange CallHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange CodeActionParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange CodeLens Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange ColorInformation Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange ColorPresentationParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Diagnostic Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentHighlight Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentLink Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentRangeFormattingParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentSymbol Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlayHintParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueEvaluatableExpression Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueText Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueVariableLookup Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Location Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange SelectionRange Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange SemanticTokensRangeParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange TextEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange TypeHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasReplace InsertReplaceEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelectionRange CallHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelectionRange DocumentSymbol Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelectionRange TypeHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasStart Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasStoppedLocation InlineValueContext Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasTargetRange LocationLink Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasTargetSelectionRange LocationLink Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasFromRanges CallHierarchyIncomingCall [Range] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasFromRanges CallHierarchyOutgoingCall [Range] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasOriginSelectionRange LocationLink (Maybe Range) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Hover (Maybe Range) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRanges LinkedEditingRanges [Range] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelection ShowDocumentParams (Maybe Range) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

type Rep Range = D1 ('MetaData "Range" "Language.LSP.Protocol.Internal.Types.Range" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "_start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Position) :*: S1 ('MetaSel ('Just "_end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Position)))

data Position #

Position in a text document expressed as zero-based line and character offset. Prior to 3.17 the offsets were always based on a UTF-16 string representation. So a string of the form a𐐀b the character offset of the character a is 0, the character offset of 𐐀 is 1 and the character offset of b is 3 since 𐐀 is represented using two code units in UTF-16. Since 3.17 clients and servers can agree on a different string encoding representation (e.g. UTF-8). The client announces it's supported encoding via the client capability `general.positionEncodings`. The value is an array of position encodings the client supports, with decreasing preference (e.g. the encoding at index `0` is the most preferred one). To stay backwards compatible the only mandatory encoding is UTF-16 represented via the string `utf-16`. The server can pick one of the encodings offered by the client and signals that encoding back to the client via the initialize result's property [`capabilities.positionEncoding`](#serverCapabilities). If the string value `utf-16` is missing from the client's capability `general.positionEncodings` servers can safely assume that the client supports UTF-16. If the server omits the position encoding in its initialize result the encoding defaults to the string value `utf-16`. Implementation considerations: since the conversion from one encoding into another requires the content of the file / line the conversion is best done where the file is read which is usually on the server side.

Positions are line end character agnostic. So you can not specify a position that denotes `r|n` or `n|` where `|` represents the character offset.

@since 3.17.0 - support for negotiated position encoding.

Constructors

Position 

Fields

  • _line :: UInt

    Line position in a document (zero-based).

    If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. If a line number is negative, it defaults to 0.

  • _character :: UInt

    Character offset on a line in a document (zero-based).

    The meaning of this offset is determined by the negotiated PositionEncodingKind.

    If the character value is greater than the line length it defaults back to the line length.

Instances

Instances details
FromJSON Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

ToJSON Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Generic Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Associated Types

type Rep Position :: Type -> Type #

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

Show Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

NFData Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Methods

rnf :: Position -> () #

Eq Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Ord Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Hashable Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Methods

hashWithSalt :: Int -> Position -> Int #

hash :: Position -> Int #

Pretty Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Methods

pretty :: Position -> Doc ann #

prettyList :: [Position] -> Doc ann #

HasCharacter Position UInt 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasEnd Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasLine Position UInt 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition CallHierarchyPrepareParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition CompletionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DeclarationParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DefinitionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DocumentHighlightParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DocumentOnTypeFormattingParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition HoverParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition ImplementationParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition InlayHint Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition LinkedEditingRangeParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition MonikerParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition PrepareRenameParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition ReferenceParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition RenameParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition SignatureHelpParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition TextDocumentPositionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition TypeDefinitionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition TypeHierarchyPrepareParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasStart Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPositions SelectionRangeParams [Position] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

type Rep Position = D1 ('MetaData "Position" "Language.LSP.Protocol.Internal.Types.Position" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "Position" 'PrefixI 'True) (S1 ('MetaSel ('Just "_line") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UInt) :*: S1 ('MetaSel ('Just "_character") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UInt)))

data Doc ann #

The abstract data type Doc ann represents pretty documents that have been annotated with data of type ann.

More specifically, a value of type Doc represents a non-empty set of possible layouts of a document. The layout functions select one of these possibilities, taking into account things like the width of the output document.

The annotation is an arbitrary piece of data associated with (part of) a document. Annotations may be used by the rendering backends in order to display output differently, such as

  • color information (e.g. when rendering to the terminal)
  • mouseover text (e.g. when rendering to rich HTML)
  • whether to show something or not (to allow simple or detailed versions)

The simplest way to display a Doc is via the Show class.

>>> putStrLn (show (vsep ["hello", "world"]))
hello
world

Instances

Instances details
Functor Doc

Alter the document’s annotations.

This instance makes Doc more flexible (because it can be used in Functor-polymorphic values), but fmap is much less readable compared to using reAnnotate in code that only works for Doc anyway. Consider using the latter when the type does not matter.

Instance details

Defined in Prettyprinter.Internal

Methods

fmap :: (a -> b) -> Doc a -> Doc b #

(<$) :: a -> Doc b -> Doc a #

IsString (Doc ann)
>>> pretty ("hello\nworld")
hello
world

This instance uses the Pretty Doc instance, and uses the same newline to line conversion.

Instance details

Defined in Prettyprinter.Internal

Methods

fromString :: String -> Doc ann #

Monoid (Doc ann)
mempty = emptyDoc
mconcat = hcat
>>> mappend "hello" "world" :: Doc ann
helloworld
Instance details

Defined in Prettyprinter.Internal

Methods

mempty :: Doc ann #

mappend :: Doc ann -> Doc ann -> Doc ann #

mconcat :: [Doc ann] -> Doc ann #

Semigroup (Doc ann)
x <> y = hcat [x, y]
>>> "hello" <> "world" :: Doc ann
helloworld
Instance details

Defined in Prettyprinter.Internal

Methods

(<>) :: Doc ann -> Doc ann -> Doc ann #

sconcat :: NonEmpty (Doc ann) -> Doc ann #

stimes :: Integral b => b -> Doc ann -> Doc ann #

Generic (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

Associated Types

type Rep (Doc ann) :: Type -> Type #

Methods

from :: Doc ann -> Rep (Doc ann) x #

to :: Rep (Doc ann) x -> Doc ann #

Show (Doc ann)

(show doc) prettyprints document doc with defaultLayoutOptions, ignoring all annotations.

Instance details

Defined in Prettyprinter.Internal

Methods

showsPrec :: Int -> Doc ann -> ShowS #

show :: Doc ann -> String #

showList :: [Doc ann] -> ShowS #

type Rep (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

type Rep (Doc ann) = D1 ('MetaData "Doc" "Prettyprinter.Internal" "prettyprinter-1.7.1-Fnq1Vt2JMTY81kvR0W9kdP" 'False) (((C1 ('MetaCons "Fail" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Empty" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Char" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)))) :+: (C1 ('MetaCons "Text" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: (C1 ('MetaCons "Line" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FlatAlt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)))))) :+: ((C1 ('MetaCons "Cat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann))) :+: (C1 ('MetaCons "Nest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann))) :+: C1 ('MetaCons "Union" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann))))) :+: ((C1 ('MetaCons "Column" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int -> Doc ann))) :+: C1 ('MetaCons "WithPageWidth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PageWidth -> Doc ann)))) :+: (C1 ('MetaCons "Nesting" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int -> Doc ann))) :+: C1 ('MetaCons "Annotated" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)))))))

pipe :: Doc ann #

>>> pipe
|

equals :: Doc ann #

>>> equals
=

backslash :: Doc ann #

>>> backslash
\

slash :: Doc ann #

>>> slash
/

dot :: Doc ann #

>>> dot
.

space :: Doc ann #

>>> "a" <> space <> "b"
a b

This is mostly used via <+>,

>>> "a" <+> "b"
a b

comma :: Doc ann #

>>> comma
,

colon :: Doc ann #

>>> colon
:

semi :: Doc ann #

>>> semi
;

rbrace :: Doc ann #

>>> rbrace
}

lbrace :: Doc ann #

>>> lbrace
{

rbracket :: Doc ann #

>>> rbracket
]

lbracket :: Doc ann #

>>> lbracket
[

rangle :: Doc ann #

>>> rangle
>

langle :: Doc ann #

>>> langle
<

rparen :: Doc ann #

>>> rparen
)

lparen :: Doc ann #

>>> lparen
(

dquote :: Doc ann #

>>> dquote
"

squote :: Doc ann #

>>> squote
'

braces :: Doc ann -> Doc ann #

>>> braces "·"
{·}

brackets :: Doc ann -> Doc ann #

>>> brackets "·"
[·]

angles :: Doc ann -> Doc ann #

>>> angles "·"
<·>

parens :: Doc ann -> Doc ann #

>>> parens "·"
(·)

dquotes :: Doc ann -> Doc ann #

>>> dquotes "·"
"·"

squotes :: Doc ann -> Doc ann #

>>> squotes "·"
'·'

layoutCompact :: Doc ann1 -> SimpleDocStream ann2 #

(layoutCompact x) lays out the document x without adding any indentation and without preserving annotations. Since no 'pretty' printing is involved, this layouter is very fast. The resulting output contains fewer characters than a prettyprinted version and can be used for output that is read by other programs.

>>> let doc = hang 4 (vsep ["lorem", "ipsum", hang 4 (vsep ["dolor", "sit"])])
>>> doc
lorem
    ipsum
    dolor
        sit
>>> let putDocCompact = renderIO System.IO.stdout . layoutCompact
>>> putDocCompact doc
lorem
ipsum
dolor
sit

layoutSmart :: LayoutOptions -> Doc ann -> SimpleDocStream ann #

A layout algorithm with more lookahead than layoutPretty, that introduces line breaks earlier if the content does not (or will not, rather) fit into one line.

Consider the following python-ish document,

>>> let fun x = hang 2 ("fun(" <> softline' <> x) <> ")"
>>> let doc = (fun . fun . fun . fun . fun) (align (list ["abcdef", "ghijklm"]))

which we’ll be rendering using the following pipeline (where the layout algorithm has been left open):

>>> import Data.Text.IO as T
>>> import Prettyprinter.Render.Text
>>> let hr = pipe <> pretty (replicate (26-2) '-') <> pipe
>>> let go layouter x = (T.putStrLn . renderStrict . layouter (LayoutOptions (AvailablePerLine 26 1))) (vsep [hr, x, hr])

If we render this using layoutPretty with a page width of 26 characters per line, all the fun calls fit into the first line so they will be put there:

>>> go layoutPretty doc
|------------------------|
fun(fun(fun(fun(fun(
                  [ abcdef
                  , ghijklm ])))))
|------------------------|

Note that this exceeds the desired 26 character page width. The same document, rendered with layoutSmart, fits the layout contstraints:

>>> go layoutSmart doc
|------------------------|
fun(
  fun(
    fun(
      fun(
        fun(
          [ abcdef
          , ghijklm ])))))
|------------------------|

The key difference between layoutPretty and layoutSmart is that the latter will check the potential document until it encounters a line with the same indentation or less than the start of the document. Any line encountered earlier is assumed to belong to the same syntactic structure. layoutPretty checks only the first line.

Consider for example the question of whether the As fit into the document below:

1 A
2   A
3  A
4 B
5   B

layoutPretty will check only line 1, ignoring whether e.g. line 2 might already be too wide. By contrast, layoutSmart stops only once it reaches line 4, where the B has the same indentation as the first A.

layoutPretty :: LayoutOptions -> Doc ann -> SimpleDocStream ann #

This is the default layout algorithm, and it is used by show, putDoc and hPutDoc.

layoutPretty commits to rendering something in a certain way if the next element fits the layout constraints; in other words, it has one SimpleDocStream element lookahead when rendering. Consider using the smarter, but a bit less performant, layoutSmart algorithm if the results seem to run off to the right before having lots of line breaks.

defaultLayoutOptions :: LayoutOptions #

The default layout options, suitable when you just want some output, and don’t particularly care about the details. Used by the Show instance, for example.

>>> defaultLayoutOptions
LayoutOptions {layoutPageWidth = AvailablePerLine 80 1.0}

removeTrailingWhitespace :: SimpleDocStream ann -> SimpleDocStream ann #

Remove all trailing space characters.

This has some performance impact, because it does an entire additional pass over the SimpleDocStream.

No trimming will be done inside annotations, which are considered to contain no (trimmable) whitespace, since the annotation might actually be about the whitespace, for example a renderer that colors the background of trailing whitespace, as e.g. git diff can be configured to do.

Historical note: Since v1.7.0, layoutPretty and layoutSmart avoid producing the trailing whitespace that was the original motivation for creating removeTrailingWhitespace. See https://github.com/quchen/prettyprinter/pull/139 for some background info.

fuse :: FusionDepth -> Doc ann -> Doc ann #

(fuse depth doc) combines text nodes so they can be rendered more efficiently. A fused document is always laid out identical to its unfused version.

When laying a Document out to a SimpleDocStream, every component of the input is translated directly to the simpler output format. This sometimes yields undesirable chunking when many pieces have been concatenated together.

For example

>>> "a" <> "b" <> pretty 'c' <> "d"
abcd

results in a chain of four entries in a SimpleDocStream, although this is fully equivalent to the tightly packed

>>> "abcd" :: Doc ann
abcd

which is only a single SimpleDocStream entry, and can be processed faster.

It is therefore a good idea to run fuse on concatenations of lots of small strings that are used many times:

>>> let oftenUsed = fuse Shallow ("a" <> "b" <> pretty 'c' <> "d")
>>> hsep (replicate 5 oftenUsed)
abcd abcd abcd abcd abcd

alterAnnotationsS :: (ann -> Maybe ann') -> SimpleDocStream ann -> SimpleDocStream ann' #

Change the annotation of a document to a different annotation, or none at all. alterAnnotations for SimpleDocStream.

Note that the Doc version is more flexible, since it allows changing a single annotation to multiple ones. (SimpleDocTree restores this flexibility again.)

reAnnotateS :: (ann -> ann') -> SimpleDocStream ann -> SimpleDocStream ann' #

Change the annotation of a document. reAnnotate for SimpleDocStream.

unAnnotateS :: SimpleDocStream ann -> SimpleDocStream xxx #

Remove all annotations. unAnnotate for SimpleDocStream.

alterAnnotations :: (ann -> [ann']) -> Doc ann -> Doc ann' #

Change the annotations of a Document. Individual annotations can be removed, changed, or replaced by multiple ones.

This is a general function that combines unAnnotate and reAnnotate, and it is useful for mapping semantic annotations (such as »this is a keyword«) to display annotations (such as »this is red and underlined«), because some backends may not care about certain annotations, while others may.

Annotations earlier in the new list will be applied earlier, i.e. returning [Bold, Green] will result in a bold document that contains green text, and not vice-versa.

Since this traverses the entire Doc tree, including parts that are not rendered due to other layouts fitting better, it is preferrable to reannotate after producing the layout by using alterAnnotationsS.

reAnnotate :: (ann -> ann') -> Doc ann -> Doc ann' #

Change the annotation of a Document.

Useful in particular to embed documents with one form of annotation in a more generally annotated document.

Since this traverses the entire Doc tree, including parts that are not rendered due to other layouts fitting better, it is preferrable to reannotate after producing the layout by using reAnnotateS.

Since reAnnotate has the right type and satisfies 'reAnnotate id = id', it is used to define the Functor instance of Doc.

unAnnotate :: Doc ann -> Doc xxx #

Remove all annotations.

Although unAnnotate is idempotent with respect to rendering,

unAnnotate . unAnnotate = unAnnotate

it should not be used without caution, for each invocation traverses the entire contained document. If possible, it is preferrable to unannotate after producing the layout by using unAnnotateS.

annotate :: ann -> Doc ann -> Doc ann #

Add an annotation to a Doc. This annotation can then be used by the renderer to e.g. add color to certain parts of the output. For a full tutorial example on how to use it, see the Prettyprinter.Render.Tutorials.StackMachineTutorial or Prettyprinter.Render.Tutorials.TreeRenderingTutorial modules.

This function is only relevant for custom formats with their own annotations, and not relevant for basic prettyprinting. The predefined renderers, e.g. Prettyprinter.Render.Text, should be enough for the most common needs.

surround :: Doc ann -> Doc ann -> Doc ann -> Doc ann #

(surround x l r) surrounds document x with l and r.

>>> surround "·" "A" "Z"
A·Z

This is merely an argument reordering of enclose, but allows for definitions like

>>> concatWith (surround dot) ["Prettyprinter", "Render", "Text"]
Prettyprinter.Render.Text

enclose #

Arguments

:: Doc ann

L

-> Doc ann

R

-> Doc ann

x

-> Doc ann

LxR

(enclose l r x) encloses document x between documents l and r using <>.

>>> enclose "A" "Z" "·"
A·Z
enclose l r x = l <> x <> r

plural #

Arguments

:: (Num amount, Eq amount) 
=> doc

1 case

-> doc

other cases

-> amount 
-> doc 

(plural n one many) is one if n is 1, and many otherwise. A typical use case is adding a plural "s".

>>> let things = [True]
>>> let amount = length things
>>> pretty things <+> "has" <+> pretty amount <+> plural "entry" "entries" amount
[True] has 1 entry

fillBreak #

Arguments

:: Int

Append spaces until the document is at least this wide

-> Doc ann 
-> Doc ann 

(fillBreak i x) first lays out the document x. It then appends spaces until the width is equal to i. If the width of x is already larger than i, the nesting level is increased by i and a line is appended. When we redefine ptype in the example given in fill to use fillBreak, we get a useful variation of the output:

>>> let types = [("empty","Doc"), ("nest","Int -> Doc -> Doc"), ("fillSep","[Doc] -> Doc")]
>>> let ptype (name, tp) = fillBreak 5 (pretty name) <+> "::" <+> pretty tp
>>> "let" <+> align (vcat (map ptype types))
let empty :: Doc
    nest  :: Int -> Doc -> Doc
    fillSep
          :: [Doc] -> Doc

fill #

Arguments

:: Int

Append spaces until the document is at least this wide

-> Doc ann 
-> Doc ann 

(fill i x) lays out the document x. It then appends spaces until the width is equal to i. If the width of x is already larger, nothing is appended.

This function is quite useful in practice to output a list of bindings:

>>> let types = [("empty","Doc"), ("nest","Int -> Doc -> Doc"), ("fillSep","[Doc] -> Doc")]
>>> let ptype (name, tp) = fill 5 (pretty name) <+> "::" <+> pretty tp
>>> "let" <+> align (vcat (map ptype types))
let empty :: Doc
    nest  :: Int -> Doc -> Doc
    fillSep :: [Doc] -> Doc

pageWidth :: (PageWidth -> Doc ann) -> Doc ann #

Layout a document depending on the page width, if one has been specified.

>>> let prettyPageWidth (AvailablePerLine l r) = "Width:" <+> pretty l <> ", ribbon fraction:" <+> pretty r
>>> let doc = "prefix" <+> pageWidth (brackets . prettyPageWidth)
>>> putDocW 32 (vsep [indent n doc | n <- [0,4,8]])
prefix [Width: 32, ribbon fraction: 1.0]
    prefix [Width: 32, ribbon fraction: 1.0]
        prefix [Width: 32, ribbon fraction: 1.0]

width :: Doc ann -> (Int -> Doc ann) -> Doc ann #

(width doc f) lays out the document doc, and makes the column width of it available to a function.

>>> let annotate doc = width (brackets doc) (\w -> " <- width:" <+> pretty w)
>>> align (vsep (map annotate ["---", "------", indent 3 "---", vsep ["---", indent 4 "---"]]))
[---] <- width: 5
[------] <- width: 8
[   ---] <- width: 8
[---
    ---] <- width: 8

nesting :: (Int -> Doc ann) -> Doc ann #

Layout a document depending on the current nesting level. align is implemented in terms of nesting.

>>> let doc = "prefix" <+> nesting (\l -> brackets ("Nested:" <+> pretty l))
>>> vsep [indent n doc | n <- [0,4,8]]
prefix [Nested: 0]
    prefix [Nested: 4]
        prefix [Nested: 8]

column :: (Int -> Doc ann) -> Doc ann #

Layout a document depending on which column it starts at. align is implemented in terms of column.

>>> column (\l -> "Columns are" <+> pretty l <> "-based.")
Columns are 0-based.
>>> let doc = "prefix" <+> column (\l -> "| <- column" <+> pretty l)
>>> vsep [indent n doc | n <- [0,4,8]]
prefix | <- column 7
    prefix | <- column 11
        prefix | <- column 15

punctuate #

Arguments

:: Doc ann

Punctuation, e.g. comma

-> [Doc ann] 
-> [Doc ann] 

(punctuate p xs) appends p to all but the last document in xs.

>>> let docs = punctuate comma (Util.words "lorem ipsum dolor sit amet")
>>> putDocW 80 (hsep docs)
lorem, ipsum, dolor, sit, amet

The separators are put at the end of the entries, which we can see if we position the result vertically:

>>> putDocW 20 (vsep docs)
lorem,
ipsum,
dolor,
sit,
amet

If you want put the commas in front of their elements instead of at the end, you should use tupled or, in general, encloseSep.

cat :: [Doc ann] -> Doc ann #

(cat xs) tries laying out the documents xs separated with nothing, and if this does not fit the page, separates them with newlines. This is what differentiates it from vcat, which always lays out its contents beneath each other.

>>> let docs = Util.words "lorem ipsum dolor"
>>> putDocW 80 ("Docs:" <+> cat docs)
Docs: loremipsumdolor

When there is enough space, the documents are put above one another:

>>> putDocW 10 ("Docs:" <+> cat docs)
Docs: lorem
ipsum
dolor
cat = group . vcat

fillCat :: [Doc ann] -> Doc ann #

(fillCat xs) concatenates documents xs horizontally with <> as long as it fits the page, then inserts a line' and continues doing that for all documents in xs. This is similar to how an ordinary word processor lays out the text if you just keep typing after you hit the maximum line length.

(line' means that if grouped, the documents are separated with nothing instead of newlines. See fillSep if you want a space instead.)

Observe the difference between fillSep and fillCat. fillSep concatenates the entries spaced when grouped:

>>> let docs = take 20 (cycle (["lorem", "ipsum", "dolor", "sit", "amet"]))
>>> putDocW 40 ("Grouped:" <+> group (fillSep docs))
Grouped: lorem ipsum dolor sit amet
lorem ipsum dolor sit amet lorem ipsum
dolor sit amet lorem ipsum dolor sit
amet

On the other hand, fillCat concatenates the entries directly when grouped:

>>> putDocW 40 ("Grouped:" <+> group (fillCat docs))
Grouped: loremipsumdolorsitametlorem
ipsumdolorsitametloremipsumdolorsitamet
loremipsumdolorsitamet

vcat :: [Doc ann] -> Doc ann #

(vcat xs) vertically concatenates the documents xs. If it is grouped, the line breaks are removed.

In other words vcat is like vsep, with newlines removed instead of replaced by spaces.

>>> let docs = Util.words "lorem ipsum dolor"
>>> vcat docs
lorem
ipsum
dolor
>>> group (vcat docs)
loremipsumdolor

Since grouping a vcat is rather common, cat is a built-in shortcut for it.

hcat :: [Doc ann] -> Doc ann #

(hcat xs) concatenates all documents xs horizontally with <> (i.e. without any spacing).

It is provided only for consistency, since it is identical to mconcat.

>>> let docs = Util.words "lorem ipsum dolor"
>>> hcat docs
loremipsumdolor

sep :: [Doc ann] -> Doc ann #

(sep xs) tries laying out the documents xs separated with spaces, and if this does not fit the page, separates them with newlines. This is what differentiates it from vsep, which always lays out its contents beneath each other.

>>> let doc = "prefix" <+> sep ["text", "to", "lay", "out"]
>>> putDocW 80 doc
prefix text to lay out

With a narrower layout, the entries are separated by newlines:

>>> putDocW 20 doc
prefix text
to
lay
out
sep = group . vsep

fillSep :: [Doc ann] -> Doc ann #

(fillSep xs) concatenates the documents xs horizontally with <+> as long as it fits the page, then inserts a line and continues doing that for all documents in xs. (line means that if grouped, the documents are separated with a space instead of newlines. Use fillCat if you do not want a space.)

Let's print some words to fill the line:

>>> let docs = take 20 (cycle ["lorem", "ipsum", "dolor", "sit", "amet"])
>>> putDocW 80 ("Docs:" <+> fillSep docs)
Docs: lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor
sit amet lorem ipsum dolor sit amet

The same document, printed at a width of only 40, yields

>>> putDocW 40 ("Docs:" <+> fillSep docs)
Docs: lorem ipsum dolor sit amet lorem
ipsum dolor sit amet lorem ipsum dolor
sit amet lorem ipsum dolor sit amet

vsep :: [Doc ann] -> Doc ann #

(vsep xs) concatenates all documents xs above each other. If a group undoes the line breaks inserted by vsep, the documents are separated with a space instead.

Using vsep alone yields

>>> "prefix" <+> vsep ["text", "to", "lay", "out"]
prefix text
to
lay
out

grouping a vsep separates the documents with a space if it fits the page (and does nothing otherwise). See the sep convenience function for this use case.

The align function can be used to align the documents under their first element:

>>> "prefix" <+> align (vsep ["text", "to", "lay", "out"])
prefix text
       to
       lay
       out

Since grouping a vsep is rather common, sep is a built-in for doing that.

hsep :: [Doc ann] -> Doc ann #

(hsep xs) concatenates all documents xs horizontally with <+>, i.e. it puts a space between all entries.

>>> let docs = Util.words "lorem ipsum dolor sit amet"
>>> hsep docs
lorem ipsum dolor sit amet

hsep does not introduce line breaks on its own, even when the page is too narrow:

>>> putDocW 5 (hsep docs)
lorem ipsum dolor sit amet

For automatic line breaks, consider using fillSep instead.

concatWith :: Foldable t => (Doc ann -> Doc ann -> Doc ann) -> t (Doc ann) -> Doc ann #

Concatenate all documents element-wise with a binary function.

concatWith _ [] = mempty
concatWith (**) [x,y,z] = x ** y ** z

Multiple convenience definitions based on concatWith are already predefined, for example:

hsep    = concatWith (<+>)
fillSep = concatWith (\x y -> x <> softline <> y)

This is also useful to define customized joiners:

>>> concatWith (surround dot) ["Prettyprinter", "Render", "Text"]
Prettyprinter.Render.Text

(<+>) :: Doc ann -> Doc ann -> Doc ann infixr 6 #

(x <+> y) concatenates document x and y with a space in between.

>>> "hello" <+> "world"
hello world
x <+> y = x <> space <> y

tupled :: [Doc ann] -> Doc ann #

Haskell-inspired variant of encloseSep with parentheses and comma as separator.

>>> let doc = tupled (map pretty [1,20,300,4000])
>>> putDocW 80 doc
(1, 20, 300, 4000)
>>> putDocW 10 doc
( 1
, 20
, 300
, 4000 )

list :: [Doc ann] -> Doc ann #

Haskell-inspired variant of encloseSep with braces and comma as separator.

>>> let doc = list (map pretty [1,20,300,4000])
>>> putDocW 80 doc
[1, 20, 300, 4000]
>>> putDocW 10 doc
[ 1
, 20
, 300
, 4000 ]

encloseSep #

Arguments

:: Doc ann

left delimiter

-> Doc ann

right delimiter

-> Doc ann

separator

-> [Doc ann]

input documents

-> Doc ann 

(encloseSep l r sep xs) concatenates the documents xs separated by sep, and encloses the resulting document by l and r.

The documents are laid out horizontally if that fits the page:

>>> let doc = "list" <+> align (encloseSep lbracket rbracket comma (map pretty [1,20,300,4000]))
>>> putDocW 80 doc
list [1,20,300,4000]

If there is not enough space, then the input is split into lines entry-wise therwise they are laid out vertically, with separators put in the front:

>>> putDocW 10 doc
list [1
     ,20
     ,300
     ,4000]

Note that doc contains an explicit call to align so that the list items are aligned vertically.

For putting separators at the end of entries instead, have a look at punctuate.

indent #

Arguments

:: Int

Number of spaces to increase indentation by

-> Doc ann 
-> Doc ann 

(indent i x) indents document x by i columns, starting from the current cursor position.

>>> let doc = reflow "The indent function indents these words!"
>>> putDocW 24 ("prefix" <> indent 4 doc)
prefix    The indent
          function
          indents these
          words!
indent i d = hang i ({i spaces} <> d)

hang #

Arguments

:: Int

Change of nesting level, relative to the start of the first line

-> Doc ann 
-> Doc ann 

(hang i x) lays out the document x with a nesting level set to the current column plus i. Negative values are allowed, and decrease the nesting level accordingly.

>>> let doc = reflow "Indenting these words with hang"
>>> putDocW 24 ("prefix" <+> hang 4 doc)
prefix Indenting these
           words with
           hang

This differs from nest, which is based on the current nesting level plus i. When you're not sure, try the more efficient nest first. In our example, this would yield

>>> let doc = reflow "Indenting these words with nest"
>>> putDocW 24 ("prefix" <+> nest 4 doc)
prefix Indenting these
    words with nest
hang i doc = align (nest i doc)

align :: Doc ann -> Doc ann #

(align x) lays out the document x with the nesting level set to the current column. It is used for example to implement hang.

As an example, we will put a document right above another one, regardless of the current nesting level. Without alignment, the second line is put simply below everything we've had so far:

>>> "lorem" <+> vsep ["ipsum", "dolor"]
lorem ipsum
dolor

If we add an align to the mix, the vsep's contents all start in the same column:

>>> "lorem" <+> align (vsep ["ipsum", "dolor"])
lorem ipsum
      dolor

flatAlt #

Arguments

:: Doc ann

Default

-> Doc ann

Preferred when grouped

-> Doc ann 

By default, (flatAlt x y) renders as x. However when grouped, y will be preferred, with x as the fallback for the case when y doesn't fit.

>>> let doc = flatAlt "a" "b"
>>> putDoc doc
a
>>> putDoc (group doc)
b
>>> putDocW 0 (group doc)
a

flatAlt is particularly useful for defining conditional separators such as

softline = group (flatAlt hardline " ")
>>> let hello = "Hello" <> softline <> "world!"
>>> putDocW 12 hello
Hello world!
>>> putDocW 11 hello
Hello
world!

Example: Haskell's do-notation

Expand

We can use this to render Haskell's do-notation nicely:

>>> let open        = flatAlt "" "{ "
>>> let close       = flatAlt "" " }"
>>> let separator   = flatAlt "" "; "
>>> let prettyDo xs = group ("do" <+> align (encloseSep open close separator xs))
>>> let statements  = ["name:_ <- getArgs", "let greet = \"Hello, \" <> name", "putStrLn greet"]

This is put into a single line with {;} style if it fits:

>>> putDocW 80 (prettyDo statements)
do { name:_ <- getArgs; let greet = "Hello, " <> name; putStrLn greet }

When there is not enough space the statements are broken up into lines nicely:

>>> putDocW 10 (prettyDo statements)
do name:_ <- getArgs
   let greet = "Hello, " <> name
   putStrLn greet

Notes

Users should be careful to choose x to be less wide than y. Otherwise, if y turns out not to fit the page, we fall back on an even wider layout:

>>> let ugly = group (flatAlt "even wider" "too wide")
>>> putDocW 7 ugly
even wider

Also note that group will flatten y:

>>> putDoc (group (flatAlt "x" ("y" <> line <> "y")))
y y

This also means that an "unflattenable" y which contains a hard linebreak will never be rendered:

>>> putDoc (group (flatAlt "x" ("y" <> hardline <> "y")))
x

group :: Doc ann -> Doc ann #

(group x) tries laying out x into a single line by removing the contained line breaks; if this does not fit the page, or when a hardline within x prevents it from being flattened, x is laid out without any changes.

The group function is key to layouts that adapt to available space nicely.

See vcat, line, or flatAlt for examples that are related, or make good use of it.

hardline :: Doc ann #

A hardline is always laid out as a line break, even when grouped or when there is plenty of space. Note that it might still be simply discarded if it is part of a flatAlt inside a group.

>>> let doc = "lorem ipsum" <> hardline <> "dolor sit amet"
>>> putDocW 1000 doc
lorem ipsum
dolor sit amet
>>> group doc
lorem ipsum
dolor sit amet

softline' :: Doc ann #

softline' is like softline, but behaves like mempty if the resulting output does not fit on the page (instead of space). In other words, line is to line' how softline is to softline'.

With enough space, we get direct concatenation:

>>> let doc = "ThisWord" <> softline' <> "IsWayTooLong"
>>> putDocW 80 doc
ThisWordIsWayTooLong

If we narrow the page to width 10, the layouter produces a line break:

>>> putDocW 10 doc
ThisWord
IsWayTooLong
softline' = group line'

softline :: Doc ann #

softline behaves like space if the resulting output fits the page, otherwise like line.

Here, we have enough space to put everything in one line:

>>> let doc = "lorem ipsum" <> softline <> "dolor sit amet"
>>> putDocW 80 doc
lorem ipsum dolor sit amet

If we narrow the page to width 10, the layouter produces a line break:

>>> putDocW 10 doc
lorem ipsum
dolor sit amet
softline = group line

line' :: Doc ann #

line' is like line, but behaves like mempty if the line break is undone by group (instead of space).

>>> let doc = "lorem ipsum" <> line' <> "dolor sit amet"
>>> doc
lorem ipsum
dolor sit amet
>>> group doc
lorem ipsumdolor sit amet

line :: Doc ann #

The line document advances to the next line and indents to the current nesting level.

>>> let doc = "lorem ipsum" <> line <> "dolor sit amet"
>>> doc
lorem ipsum
dolor sit amet

line behaves like space if the line break is undone by group:

>>> group doc
lorem ipsum dolor sit amet

nest #

Arguments

:: Int

Change of nesting level

-> Doc ann 
-> Doc ann 

(nest i x) lays out the document x with the current nesting level (indentation of the following lines) increased by i. Negative values are allowed, and decrease the nesting level accordingly.

>>> vsep [nest 4 (vsep ["lorem", "ipsum", "dolor"]), "sit", "amet"]
lorem
    ipsum
    dolor
sit
amet

See also

  • hang (nest relative to current cursor position instead of current nesting level)
  • align (set nesting level to current cursor position)
  • indent (increase indentation on the spot, padding with spaces).

emptyDoc :: Doc ann #

The empty document behaves like (pretty ""), so it has a height of 1. This may lead to surprising behaviour if we expect it to bear no weight inside e.g. vcat, where we get an empty line of output from it (parens for visibility only):

>>> vsep ["hello", parens emptyDoc, "world"]
hello
()
world

Together with <>, emptyDoc forms the Monoid Doc.

unsafeViaShow :: Show a => a -> Doc ann #

Convenience function to convert a Showable value /that must not contain newlines/ to a Doc. If there may be newlines, use viaShow instead.

viaShow :: Show a => a -> Doc ann #

Convenience function to convert a Showable value to a Doc. If the String does not contain newlines, consider using the more performant unsafeViaShow.

class Pretty a where #

Overloaded conversion to Doc.

Laws:

  1. output should be pretty. :-)

Minimal complete definition

pretty

Methods

pretty :: a -> Doc ann #

>>> pretty 1 <+> pretty "hello" <+> pretty 1.234
1 hello 1.234

prettyList :: [a] -> Doc ann #

prettyList is only used to define the instance Pretty a => Pretty [a]. In normal circumstances only the pretty function is used.

>>> prettyList [1, 23, 456]
[1, 23, 456]

Instances

Instances details
Pretty Void

Finding a good example for printing something that does not exist is hard, so here is an example of printing a list full of nothing.

>>> pretty ([] :: [Void])
[]
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Void -> Doc ann #

prettyList :: [Void] -> Doc ann #

Pretty Int16 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int16 -> Doc ann #

prettyList :: [Int16] -> Doc ann #

Pretty Int32 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int32 -> Doc ann #

prettyList :: [Int32] -> Doc ann #

Pretty Int64 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int64 -> Doc ann #

prettyList :: [Int64] -> Doc ann #

Pretty Int8 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int8 -> Doc ann #

prettyList :: [Int8] -> Doc ann #

Pretty Word16 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word16 -> Doc ann #

prettyList :: [Word16] -> Doc ann #

Pretty Word32 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word32 -> Doc ann #

prettyList :: [Word32] -> Doc ann #

Pretty Word64 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word64 -> Doc ann #

prettyList :: [Word64] -> Doc ann #

Pretty Word8 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word8 -> Doc ann #

prettyList :: [Word8] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Core.FileStore

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Core.OfInterest

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Core.Rules

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Core.Service

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Core.Shake

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.LSP.LanguageServer

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.LSP.Notifications

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Main

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Main.HeapStats

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Plugin.Completions

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Plugin.HLS

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Plugin.HLS.GhcIde

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Plugin.TypeLenses

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log Source # 
Instance details

Defined in Development.IDE.Session

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty Log 
Instance details

Defined in HIE.Bios.Types

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Pretty PluginError 
Instance details

Defined in Ide.Plugin.Error

Methods

pretty :: PluginError -> Doc ann #

prettyList :: [PluginError] -> Doc ann #

Pretty LspServerLog 
Instance details

Defined in Language.LSP.Server.Control

Methods

pretty :: LspServerLog -> Doc ann #

prettyList :: [LspServerLog] -> Doc ann #

Pretty LspCoreLog 
Instance details

Defined in Language.LSP.Server.Core

Methods

pretty :: LspCoreLog -> Doc ann #

prettyList :: [LspCoreLog] -> Doc ann #

Pretty VfsLog 
Instance details

Defined in Language.LSP.VFS

Methods

pretty :: VfsLog -> Doc ann #

prettyList :: [VfsLog] -> Doc ann #

Pretty AnnotatedTextEdit 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit

Pretty ApplyWorkspaceEditParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams

Pretty ApplyWorkspaceEditResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult

Pretty BaseSymbolInformation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.BaseSymbolInformation

Pretty CallHierarchyClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities

Pretty CallHierarchyIncomingCall 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall

Pretty CallHierarchyIncomingCallsParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams

Pretty CallHierarchyItem 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyItem

Pretty CallHierarchyOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyOptions

Pretty CallHierarchyOutgoingCall 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall

Pretty CallHierarchyOutgoingCallsParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams

Pretty CallHierarchyPrepareParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams

Pretty CallHierarchyRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions

Pretty CancelParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CancelParams

Methods

pretty :: CancelParams -> Doc ann #

prettyList :: [CancelParams] -> Doc ann #

Pretty ChangeAnnotation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ChangeAnnotation

Pretty ChangeAnnotationIdentifier 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier

Pretty ClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ClientCapabilities

Pretty CodeAction 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeAction

Methods

pretty :: CodeAction -> Doc ann #

prettyList :: [CodeAction] -> Doc ann #

Pretty CodeActionClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities

Pretty CodeActionContext 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeActionContext

Pretty CodeActionKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeActionKind

Methods

pretty :: CodeActionKind -> Doc ann #

prettyList :: [CodeActionKind] -> Doc ann #

Pretty CodeActionOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeActionOptions

Pretty CodeActionParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeActionParams

Pretty CodeActionRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions

Pretty CodeActionTriggerKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind

Pretty CodeDescription 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeDescription

Pretty CodeLens 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeLens

Methods

pretty :: CodeLens -> Doc ann #

prettyList :: [CodeLens] -> Doc ann #

Pretty CodeLensClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities

Pretty CodeLensOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeLensOptions

Pretty CodeLensParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeLensParams

Methods

pretty :: CodeLensParams -> Doc ann #

prettyList :: [CodeLensParams] -> Doc ann #

Pretty CodeLensRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions

Pretty CodeLensWorkspaceClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities

Pretty Color 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Color

Methods

pretty :: Color -> Doc ann #

prettyList :: [Color] -> Doc ann #

Pretty ColorInformation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ColorInformation

Pretty ColorPresentation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ColorPresentation

Pretty ColorPresentationParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ColorPresentationParams

Pretty Command 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Command

Methods

pretty :: Command -> Doc ann #

prettyList :: [Command] -> Doc ann #

Pretty CompletionClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities

Pretty CompletionContext 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionContext

Pretty CompletionItem 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionItem

Methods

pretty :: CompletionItem -> Doc ann #

prettyList :: [CompletionItem] -> Doc ann #

Pretty CompletionItemKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionItemKind

Pretty CompletionItemLabelDetails 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails

Pretty CompletionItemTag 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionItemTag

Pretty CompletionList 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionList

Methods

pretty :: CompletionList -> Doc ann #

prettyList :: [CompletionList] -> Doc ann #

Pretty CompletionOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionOptions

Pretty CompletionParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionParams

Pretty CompletionRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions

Pretty CompletionTriggerKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CompletionTriggerKind

Pretty ConfigurationItem 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ConfigurationItem

Pretty ConfigurationParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ConfigurationParams

Pretty CreateFile 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CreateFile

Methods

pretty :: CreateFile -> Doc ann #

prettyList :: [CreateFile] -> Doc ann #

Pretty CreateFileOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CreateFileOptions

Pretty CreateFilesParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.CreateFilesParams

Pretty Declaration 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Declaration

Methods

pretty :: Declaration -> Doc ann #

prettyList :: [Declaration] -> Doc ann #

Pretty DeclarationClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities

Pretty DeclarationLink 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeclarationLink

Pretty DeclarationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeclarationOptions

Pretty DeclarationParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeclarationParams

Pretty DeclarationRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions

Pretty Definition 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Definition

Methods

pretty :: Definition -> Doc ann #

prettyList :: [Definition] -> Doc ann #

Pretty DefinitionClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities

Pretty DefinitionLink 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DefinitionLink

Methods

pretty :: DefinitionLink -> Doc ann #

prettyList :: [DefinitionLink] -> Doc ann #

Pretty DefinitionOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DefinitionOptions

Pretty DefinitionParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DefinitionParams

Pretty DefinitionRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions

Pretty DeleteFile 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeleteFile

Methods

pretty :: DeleteFile -> Doc ann #

prettyList :: [DeleteFile] -> Doc ann #

Pretty DeleteFileOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeleteFileOptions

Pretty DeleteFilesParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DeleteFilesParams

Pretty Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Methods

pretty :: Diagnostic -> Doc ann #

prettyList :: [Diagnostic] -> Doc ann #

Pretty DiagnosticClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities

Pretty DiagnosticOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticOptions

Pretty DiagnosticRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions

Pretty DiagnosticRelatedInformation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation

Pretty DiagnosticServerCancellationData 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData

Pretty DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

Pretty DiagnosticTag 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticTag

Methods

pretty :: DiagnosticTag -> Doc ann #

prettyList :: [DiagnosticTag] -> Doc ann #

Pretty DiagnosticWorkspaceClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities

Pretty DidChangeConfigurationClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities

Pretty DidChangeConfigurationParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams

Pretty DidChangeConfigurationRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions

Pretty DidChangeNotebookDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams

Pretty DidChangeTextDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams

Pretty DidChangeWatchedFilesClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities

Pretty DidChangeWatchedFilesParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams

Pretty DidChangeWatchedFilesRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions

Pretty DidChangeWorkspaceFoldersParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams

Pretty DidCloseNotebookDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams

Pretty DidCloseTextDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams

Pretty DidOpenNotebookDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams

Pretty DidOpenTextDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams

Pretty DidSaveNotebookDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams

Pretty DidSaveTextDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams

Pretty DocumentColorClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities

Pretty DocumentColorOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentColorOptions

Pretty DocumentColorParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentColorParams

Pretty DocumentColorRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions

Pretty DocumentDiagnosticParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams

Pretty DocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport

Pretty DocumentDiagnosticReportKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind

Pretty DocumentDiagnosticReportPartialResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult

Pretty DocumentFilter 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentFilter

Methods

pretty :: DocumentFilter -> Doc ann #

prettyList :: [DocumentFilter] -> Doc ann #

Pretty DocumentFormattingClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities

Pretty DocumentFormattingOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions

Pretty DocumentFormattingParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentFormattingParams

Pretty DocumentFormattingRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions

Pretty DocumentHighlight 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentHighlight

Pretty DocumentHighlightClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities

Pretty DocumentHighlightKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentHighlightKind

Pretty DocumentHighlightOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions

Pretty DocumentHighlightParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentHighlightParams

Pretty DocumentHighlightRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions

Pretty DocumentLink 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentLink

Methods

pretty :: DocumentLink -> Doc ann #

prettyList :: [DocumentLink] -> Doc ann #

Pretty DocumentLinkClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities

Pretty DocumentLinkOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentLinkOptions

Pretty DocumentLinkParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentLinkParams

Pretty DocumentLinkRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions

Pretty DocumentOnTypeFormattingClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities

Pretty DocumentOnTypeFormattingOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions

Pretty DocumentOnTypeFormattingParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams

Pretty DocumentOnTypeFormattingRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions

Pretty DocumentRangeFormattingClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities

Pretty DocumentRangeFormattingOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions

Pretty DocumentRangeFormattingParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams

Pretty DocumentRangeFormattingRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions

Pretty DocumentSelector 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentSelector

Pretty DocumentSymbol 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentSymbol

Methods

pretty :: DocumentSymbol -> Doc ann #

prettyList :: [DocumentSymbol] -> Doc ann #

Pretty DocumentSymbolClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities

Pretty DocumentSymbolOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions

Pretty DocumentSymbolParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentSymbolParams

Pretty DocumentSymbolRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions

Pretty ErrorCodes 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ErrorCodes

Methods

pretty :: ErrorCodes -> Doc ann #

prettyList :: [ErrorCodes] -> Doc ann #

Pretty ExecuteCommandClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities

Pretty ExecuteCommandOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions

Pretty ExecuteCommandParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ExecuteCommandParams

Pretty ExecuteCommandRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions

Pretty ExecutionSummary 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ExecutionSummary

Pretty FailureHandlingKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FailureHandlingKind

Pretty FileChangeType 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileChangeType

Methods

pretty :: FileChangeType -> Doc ann #

prettyList :: [FileChangeType] -> Doc ann #

Pretty FileCreate 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileCreate

Methods

pretty :: FileCreate -> Doc ann #

prettyList :: [FileCreate] -> Doc ann #

Pretty FileDelete 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileDelete

Methods

pretty :: FileDelete -> Doc ann #

prettyList :: [FileDelete] -> Doc ann #

Pretty FileEvent 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileEvent

Methods

pretty :: FileEvent -> Doc ann #

prettyList :: [FileEvent] -> Doc ann #

Pretty FileOperationClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities

Pretty FileOperationFilter 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileOperationFilter

Pretty FileOperationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileOperationOptions

Pretty FileOperationPattern 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileOperationPattern

Pretty FileOperationPatternKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileOperationPatternKind

Pretty FileOperationPatternOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions

Pretty FileOperationRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions

Pretty FileRename 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileRename

Methods

pretty :: FileRename -> Doc ann #

prettyList :: [FileRename] -> Doc ann #

Pretty FileSystemWatcher 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FileSystemWatcher

Pretty FoldingRange 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FoldingRange

Methods

pretty :: FoldingRange -> Doc ann #

prettyList :: [FoldingRange] -> Doc ann #

Pretty FoldingRangeClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities

Pretty FoldingRangeKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FoldingRangeKind

Pretty FoldingRangeOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FoldingRangeOptions

Pretty FoldingRangeParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FoldingRangeParams

Pretty FoldingRangeRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions

Pretty FormattingOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FormattingOptions

Pretty FullDocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport

Pretty GeneralClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities

Pretty GlobPattern 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.GlobPattern

Methods

pretty :: GlobPattern -> Doc ann #

prettyList :: [GlobPattern] -> Doc ann #

Pretty Hover 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Hover

Methods

pretty :: Hover -> Doc ann #

prettyList :: [Hover] -> Doc ann #

Pretty HoverClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.HoverClientCapabilities

Pretty HoverOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.HoverOptions

Methods

pretty :: HoverOptions -> Doc ann #

prettyList :: [HoverOptions] -> Doc ann #

Pretty HoverParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.HoverParams

Methods

pretty :: HoverParams -> Doc ann #

prettyList :: [HoverParams] -> Doc ann #

Pretty HoverRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions

Pretty ImplementationClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities

Pretty ImplementationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ImplementationOptions

Pretty ImplementationParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ImplementationParams

Pretty ImplementationRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions

Pretty InitializeError 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InitializeError

Pretty InitializeParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InitializeParams

Pretty InitializeResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InitializeResult

Pretty InitializedParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InitializedParams

Pretty InlayHint 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHint

Methods

pretty :: InlayHint -> Doc ann #

prettyList :: [InlayHint] -> Doc ann #

Pretty InlayHintClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities

Pretty InlayHintKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHintKind

Methods

pretty :: InlayHintKind -> Doc ann #

prettyList :: [InlayHintKind] -> Doc ann #

Pretty InlayHintLabelPart 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHintLabelPart

Pretty InlayHintOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHintOptions

Pretty InlayHintParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHintParams

Pretty InlayHintRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions

Pretty InlayHintWorkspaceClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities

Pretty InlineValue 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValue

Methods

pretty :: InlineValue -> Doc ann #

prettyList :: [InlineValue] -> Doc ann #

Pretty InlineValueClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities

Pretty InlineValueContext 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueContext

Pretty InlineValueEvaluatableExpression 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression

Pretty InlineValueOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueOptions

Pretty InlineValueParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueParams

Pretty InlineValueRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions

Pretty InlineValueText 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueText

Pretty InlineValueVariableLookup 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup

Pretty InlineValueWorkspaceClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities

Pretty InsertReplaceEdit 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InsertReplaceEdit

Pretty InsertTextFormat 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InsertTextFormat

Pretty InsertTextMode 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.InsertTextMode

Methods

pretty :: InsertTextMode -> Doc ann #

prettyList :: [InsertTextMode] -> Doc ann #

Pretty LSPErrorCodes 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LSPErrorCodes

Methods

pretty :: LSPErrorCodes -> Doc ann #

prettyList :: [LSPErrorCodes] -> Doc ann #

Pretty LinkedEditingRangeClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities

Pretty LinkedEditingRangeOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions

Pretty LinkedEditingRangeParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams

Pretty LinkedEditingRangeRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions

Pretty LinkedEditingRanges 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LinkedEditingRanges

Pretty Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Methods

pretty :: Location -> Doc ann #

prettyList :: [Location] -> Doc ann #

Pretty LocationLink 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LocationLink

Methods

pretty :: LocationLink -> Doc ann #

prettyList :: [LocationLink] -> Doc ann #

Pretty LogMessageParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LogMessageParams

Pretty LogTraceParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.LogTraceParams

Methods

pretty :: LogTraceParams -> Doc ann #

prettyList :: [LogTraceParams] -> Doc ann #

Pretty MarkdownClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities

Pretty MarkedString 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MarkedString

Methods

pretty :: MarkedString -> Doc ann #

prettyList :: [MarkedString] -> Doc ann #

Pretty MarkupContent 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MarkupContent

Methods

pretty :: MarkupContent -> Doc ann #

prettyList :: [MarkupContent] -> Doc ann #

Pretty MarkupKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MarkupKind

Methods

pretty :: MarkupKind -> Doc ann #

prettyList :: [MarkupKind] -> Doc ann #

Pretty MessageActionItem 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MessageActionItem

Pretty MessageType 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MessageType

Methods

pretty :: MessageType -> Doc ann #

prettyList :: [MessageType] -> Doc ann #

Pretty Moniker 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Moniker

Methods

pretty :: Moniker -> Doc ann #

prettyList :: [Moniker] -> Doc ann #

Pretty MonikerClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities

Pretty MonikerKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MonikerKind

Methods

pretty :: MonikerKind -> Doc ann #

prettyList :: [MonikerKind] -> Doc ann #

Pretty MonikerOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MonikerOptions

Methods

pretty :: MonikerOptions -> Doc ann #

prettyList :: [MonikerOptions] -> Doc ann #

Pretty MonikerParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MonikerParams

Methods

pretty :: MonikerParams -> Doc ann #

prettyList :: [MonikerParams] -> Doc ann #

Pretty MonikerRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions

Pretty NotebookCell 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookCell

Methods

pretty :: NotebookCell -> Doc ann #

prettyList :: [NotebookCell] -> Doc ann #

Pretty NotebookCellArrayChange 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange

Pretty NotebookCellKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookCellKind

Pretty NotebookCellTextDocumentFilter 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter

Pretty NotebookDocument 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocument

Pretty NotebookDocumentChangeEvent 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent

Pretty NotebookDocumentClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities

Pretty NotebookDocumentFilter 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter

Pretty NotebookDocumentIdentifier 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier

Pretty NotebookDocumentSyncClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities

Pretty NotebookDocumentSyncOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions

Pretty NotebookDocumentSyncRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions

Pretty OptionalVersionedTextDocumentIdentifier 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier

Pretty ParameterInformation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ParameterInformation

Pretty PartialResultParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PartialResultParams

Pretty Pattern 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Pattern

Methods

pretty :: Pattern -> Doc ann #

prettyList :: [Pattern] -> Doc ann #

Pretty Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Methods

pretty :: Position -> Doc ann #

prettyList :: [Position] -> Doc ann #

Pretty PositionEncodingKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PositionEncodingKind

Pretty PrepareRenameParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PrepareRenameParams

Pretty PrepareRenameResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PrepareRenameResult

Pretty PrepareSupportDefaultBehavior 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior

Pretty PreviousResultId 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PreviousResultId

Pretty ProgressParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ProgressParams

Methods

pretty :: ProgressParams -> Doc ann #

prettyList :: [ProgressParams] -> Doc ann #

Pretty ProgressToken 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ProgressToken

Methods

pretty :: ProgressToken -> Doc ann #

prettyList :: [ProgressToken] -> Doc ann #

Pretty PublishDiagnosticsClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities

Pretty PublishDiagnosticsParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams

Pretty Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

pretty :: Range -> Doc ann #

prettyList :: [Range] -> Doc ann #

Pretty ReferenceClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities

Pretty ReferenceContext 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ReferenceContext

Pretty ReferenceOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ReferenceOptions

Pretty ReferenceParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ReferenceParams

Pretty ReferenceRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions

Pretty Registration 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Registration

Methods

pretty :: Registration -> Doc ann #

prettyList :: [Registration] -> Doc ann #

Pretty RegistrationParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RegistrationParams

Pretty RegularExpressionsClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities

Pretty RelatedFullDocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport

Pretty RelatedUnchangedDocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport

Pretty RelativePattern 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RelativePattern

Pretty RenameClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RenameClientCapabilities

Pretty RenameFile 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RenameFile

Methods

pretty :: RenameFile -> Doc ann #

prettyList :: [RenameFile] -> Doc ann #

Pretty RenameFileOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RenameFileOptions

Pretty RenameFilesParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RenameFilesParams

Pretty RenameOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RenameOptions

Methods

pretty :: RenameOptions -> Doc ann #

prettyList :: [RenameOptions] -> Doc ann #

Pretty RenameParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RenameParams

Methods

pretty :: RenameParams -> Doc ann #

prettyList :: [RenameParams] -> Doc ann #

Pretty RenameRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions

Pretty ResourceOperation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ResourceOperation

Pretty ResourceOperationKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ResourceOperationKind

Pretty SaveOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SaveOptions

Methods

pretty :: SaveOptions -> Doc ann #

prettyList :: [SaveOptions] -> Doc ann #

Pretty SelectionRange 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SelectionRange

Methods

pretty :: SelectionRange -> Doc ann #

prettyList :: [SelectionRange] -> Doc ann #

Pretty SelectionRangeClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities

Pretty SelectionRangeOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SelectionRangeOptions

Pretty SelectionRangeParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SelectionRangeParams

Pretty SelectionRangeRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions

Pretty SemanticTokenModifiers 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers

Pretty SemanticTokenTypes 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokenTypes

Pretty SemanticTokens 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokens

Methods

pretty :: SemanticTokens -> Doc ann #

prettyList :: [SemanticTokens] -> Doc ann #

Pretty SemanticTokensClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities

Pretty SemanticTokensDelta 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensDelta

Pretty SemanticTokensDeltaParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams

Pretty SemanticTokensDeltaPartialResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult

Pretty SemanticTokensEdit 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensEdit

Pretty SemanticTokensLegend 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensLegend

Pretty SemanticTokensOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensOptions

Pretty SemanticTokensParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensParams

Pretty SemanticTokensPartialResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult

Pretty SemanticTokensRangeParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams

Pretty SemanticTokensRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions

Pretty SemanticTokensWorkspaceClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities

Pretty ServerCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ServerCapabilities

Pretty SetTraceParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SetTraceParams

Methods

pretty :: SetTraceParams -> Doc ann #

prettyList :: [SetTraceParams] -> Doc ann #

Pretty ShowDocumentClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities

Pretty ShowDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ShowDocumentParams

Pretty ShowDocumentResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ShowDocumentResult

Pretty ShowMessageParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ShowMessageParams

Pretty ShowMessageRequestClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities

Pretty ShowMessageRequestParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams

Pretty SignatureHelp 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureHelp

Methods

pretty :: SignatureHelp -> Doc ann #

prettyList :: [SignatureHelp] -> Doc ann #

Pretty SignatureHelpClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities

Pretty SignatureHelpContext 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureHelpContext

Pretty SignatureHelpOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureHelpOptions

Pretty SignatureHelpParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureHelpParams

Pretty SignatureHelpRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions

Pretty SignatureHelpTriggerKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind

Pretty SignatureInformation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SignatureInformation

Pretty StaticRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions

Pretty SymbolInformation 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SymbolInformation

Pretty SymbolKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SymbolKind

Methods

pretty :: SymbolKind -> Doc ann #

prettyList :: [SymbolKind] -> Doc ann #

Pretty SymbolTag 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.SymbolTag

Methods

pretty :: SymbolTag -> Doc ann #

prettyList :: [SymbolTag] -> Doc ann #

Pretty TextDocumentChangeRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions

Pretty TextDocumentClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities

Pretty TextDocumentContentChangeEvent 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent

Pretty TextDocumentEdit 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentEdit

Pretty TextDocumentFilter 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentFilter

Pretty TextDocumentIdentifier 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier

Pretty TextDocumentItem 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentItem

Pretty TextDocumentPositionParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams

Pretty TextDocumentRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions

Pretty TextDocumentSaveReason 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason

Pretty TextDocumentSaveRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions

Pretty TextDocumentSyncClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities

Pretty TextDocumentSyncKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind

Pretty TextDocumentSyncOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions

Pretty TextEdit 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TextEdit

Methods

pretty :: TextEdit -> Doc ann #

prettyList :: [TextEdit] -> Doc ann #

Pretty TokenFormat 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TokenFormat

Methods

pretty :: TokenFormat -> Doc ann #

prettyList :: [TokenFormat] -> Doc ann #

Pretty TraceValues 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TraceValues

Methods

pretty :: TraceValues -> Doc ann #

prettyList :: [TraceValues] -> Doc ann #

Pretty TypeDefinitionClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities

Pretty TypeDefinitionOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions

Pretty TypeDefinitionParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeDefinitionParams

Pretty TypeDefinitionRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions

Pretty TypeHierarchyClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities

Pretty TypeHierarchyItem 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeHierarchyItem

Pretty TypeHierarchyOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions

Pretty TypeHierarchyPrepareParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams

Pretty TypeHierarchyRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions

Pretty TypeHierarchySubtypesParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams

Pretty TypeHierarchySupertypesParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams

Pretty UInitializeParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.UInitializeParams

Pretty UnchangedDocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport

Pretty UniquenessLevel 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.UniquenessLevel

Pretty Unregistration 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Unregistration

Methods

pretty :: Unregistration -> Doc ann #

prettyList :: [Unregistration] -> Doc ann #

Pretty UnregistrationParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.UnregistrationParams

Pretty VersionedNotebookDocumentIdentifier 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier

Pretty VersionedTextDocumentIdentifier 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier

Pretty WatchKind 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WatchKind

Methods

pretty :: WatchKind -> Doc ann #

prettyList :: [WatchKind] -> Doc ann #

Pretty WillSaveTextDocumentParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams

Pretty WindowClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WindowClientCapabilities

Pretty WorkDoneProgressBegin 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin

Pretty WorkDoneProgressCancelParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams

Pretty WorkDoneProgressCreateParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams

Pretty WorkDoneProgressEnd 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd

Pretty WorkDoneProgressOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions

Pretty WorkDoneProgressParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams

Pretty WorkDoneProgressReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport

Pretty WorkspaceClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities

Pretty WorkspaceDiagnosticParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams

Pretty WorkspaceDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport

Pretty WorkspaceDiagnosticReportPartialResult 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult

Pretty WorkspaceDocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport

Pretty WorkspaceEdit 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceEdit

Methods

pretty :: WorkspaceEdit -> Doc ann #

prettyList :: [WorkspaceEdit] -> Doc ann #

Pretty WorkspaceEditClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities

Pretty WorkspaceFolder 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceFolder

Pretty WorkspaceFoldersChangeEvent 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent

Pretty WorkspaceFoldersInitializeParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams

Pretty WorkspaceFoldersServerCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities

Pretty WorkspaceFullDocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport

Pretty WorkspaceSymbol 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceSymbol

Pretty WorkspaceSymbolClientCapabilities 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities

Pretty WorkspaceSymbolOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions

Pretty WorkspaceSymbolParams 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams

Pretty WorkspaceSymbolRegistrationOptions 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions

Pretty WorkspaceUnchangedDocumentDiagnosticReport 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport

Pretty SomeClientMethod 
Instance details

Defined in Language.LSP.Protocol.Message.Method

Pretty SomeServerMethod 
Instance details

Defined in Language.LSP.Protocol.Message.Method

Pretty SomeRegistration 
Instance details

Defined in Language.LSP.Protocol.Message.Registration

Pretty SomeUnregistration 
Instance details

Defined in Language.LSP.Protocol.Message.Registration

Pretty NotificationMessage 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Pretty RequestMessage 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Methods

pretty :: RequestMessage -> Doc ann #

prettyList :: [RequestMessage] -> Doc ann #

Pretty ResponseError 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Methods

pretty :: ResponseError -> Doc ann #

prettyList :: [ResponseError] -> Doc ann #

Pretty ResponseMessage 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Pretty Null 
Instance details

Defined in Language.LSP.Protocol.Types.Common

Methods

pretty :: Null -> Doc ann #

prettyList :: [Null] -> Doc ann #

Pretty UInt 
Instance details

Defined in Language.LSP.Protocol.Types.Common

Methods

pretty :: UInt -> Doc ann #

prettyList :: [UInt] -> Doc ann #

Pretty NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

pretty :: NormalizedUri -> Doc ann #

prettyList :: [NormalizedUri] -> Doc ann #

Pretty Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

pretty :: Uri -> Doc ann #

prettyList :: [Uri] -> Doc ann #

Pretty Text

Automatically converts all newlines to line.

>>> pretty ("hello\nworld" :: Text)
hello
world

Note that line can be undone by group:

>>> group (pretty ("hello\nworld" :: Text))
hello world

Manually use hardline if you definitely want newlines.

Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Pretty Text

(lazy Doc instance, identical to the strict version)

Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Pretty Integer
>>> pretty (2^123 :: Integer)
10633823966279326983230456482242756608
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Integer -> Doc ann #

prettyList :: [Integer] -> Doc ann #

Pretty Natural 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Natural -> Doc ann #

prettyList :: [Natural] -> Doc ann #

Pretty ()
>>> pretty ()
()

The argument is not used:

>>> pretty (error "Strict?" :: ())
()
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: () -> Doc ann #

prettyList :: [()] -> Doc ann #

Pretty Bool
>>> pretty True
True
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Bool -> Doc ann #

prettyList :: [Bool] -> Doc ann #

Pretty Char

Instead of (pretty 'n'), consider using line as a more readable alternative.

>>> pretty 'f' <> pretty 'o' <> pretty 'o'
foo
>>> pretty ("string" :: String)
string
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Char -> Doc ann #

prettyList :: [Char] -> Doc ann #

Pretty Double
>>> pretty (exp 1 :: Double)
2.71828182845904...
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Double -> Doc ann #

prettyList :: [Double] -> Doc ann #

Pretty Float
>>> pretty (pi :: Float)
3.1415927
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Float -> Doc ann #

prettyList :: [Float] -> Doc ann #

Pretty Int
>>> pretty (123 :: Int)
123
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int -> Doc ann #

prettyList :: [Int] -> Doc ann #

Pretty Word 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word -> Doc ann #

prettyList :: [Word] -> Doc ann #

Pretty a => Pretty (Identity a)
>>> pretty (Identity 1)
1
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Identity a -> Doc ann #

prettyList :: [Identity a] -> Doc ann #

Pretty (AString s) 
Instance details

Defined in Language.LSP.Protocol.Types.Singletons

Methods

pretty :: AString s -> Doc ann #

prettyList :: [AString s] -> Doc ann #

Pretty (AnInteger n) 
Instance details

Defined in Language.LSP.Protocol.Types.Singletons

Methods

pretty :: AnInteger n -> Doc ann #

prettyList :: [AnInteger n] -> Doc ann #

Pretty a => Pretty (NonEmpty a) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: NonEmpty a -> Doc ann #

prettyList :: [NonEmpty a] -> Doc ann #

Pretty a => Pretty (Maybe a)

Ignore Nothings, print Just contents.

>>> pretty (Just True)
True
>>> braces (pretty (Nothing :: Maybe Bool))
{}
>>> pretty [Just 1, Nothing, Just 3, Nothing]
[1, 3]
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Maybe a -> Doc ann #

prettyList :: [Maybe a] -> Doc ann #

Pretty a => Pretty [a]
>>> pretty [1,2,3]
[1, 2, 3]
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: [a] -> Doc ann #

prettyList :: [[a]] -> Doc ann #

Pretty (LspId m) 
Instance details

Defined in Language.LSP.Protocol.Message.LspId

Methods

pretty :: LspId m -> Doc ann #

prettyList :: [LspId m] -> Doc ann #

Pretty (TRegistration m) 
Instance details

Defined in Language.LSP.Protocol.Message.Registration

Methods

pretty :: TRegistration m -> Doc ann #

prettyList :: [TRegistration m] -> Doc ann #

Pretty (TUnregistration m) 
Instance details

Defined in Language.LSP.Protocol.Message.Registration

Methods

pretty :: TUnregistration m -> Doc ann #

prettyList :: [TUnregistration m] -> Doc ann #

ToJSON (MessageParams m) => Pretty (TNotificationMessage m) 
Instance details

Defined in Language.LSP.Protocol.Message.Types

ToJSON (MessageParams m) => Pretty (TRequestMessage m) 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Methods

pretty :: TRequestMessage m -> Doc ann #

prettyList :: [TRequestMessage m] -> Doc ann #

ToJSON (ErrorData m) => Pretty (TResponseError m) 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Methods

pretty :: TResponseError m -> Doc ann #

prettyList :: [TResponseError m] -> Doc ann #

(ToJSON (MessageResult m), ToJSON (ErrorData m)) => Pretty (TResponseMessage m) 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Methods

pretty :: TResponseMessage m -> Doc ann #

prettyList :: [TResponseMessage m] -> Doc ann #

(ToJSON a, ToJSON b) => Pretty (a |? b) 
Instance details

Defined in Language.LSP.Protocol.Types.Common

Methods

pretty :: (a |? b) -> Doc ann #

prettyList :: [a |? b] -> Doc ann #

(Pretty a1, Pretty a2) => Pretty (a1, a2)
>>> pretty (123, "hello")
(123, hello)
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: (a1, a2) -> Doc ann #

prettyList :: [(a1, a2)] -> Doc ann #

Pretty a => Pretty (Const a b) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Const a b -> Doc ann #

prettyList :: [Const a b] -> Doc ann #

KnownSymbol s => Pretty (TCustomMessage s f t) 
Instance details

Defined in Language.LSP.Protocol.Message.Types

Methods

pretty :: TCustomMessage s f t -> Doc ann #

prettyList :: [TCustomMessage s f t] -> Doc ann #

(Pretty a1, Pretty a2, Pretty a3) => Pretty (a1, a2, a3)
>>> pretty (123, "hello", False)
(123, hello, False)
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: (a1, a2, a3) -> Doc ann #

prettyList :: [(a1, a2, a3)] -> Doc ann #

data FusionDepth #

Fusion depth parameter, used by fuse.

Constructors

Shallow

Do not dive deep into nested documents, fusing mostly concatenations of text nodes together.

Deep

Recurse into all parts of the Doc, including different layout alternatives, and location-sensitive values such as created by nesting which cannot be fused before, but only during, the layout process. As a result, the performance cost of using deep fusion is often hard to predict, and depends on the interplay between page layout and document to prettyprint.

This value should only be used if profiling shows it is significantly faster than using Shallow.

data SimpleDocStream ann #

The data type SimpleDocStream represents laid out documents and is used by the display functions.

A simplified view is that Doc = [SimpleDocStream], and the layout functions pick one of the SimpleDocStreams based on which one fits the layout constraints best. This means that SimpleDocStream has all complexity contained in Doc resolved, making it very easy to convert it to other formats, such as plain text or terminal output.

To write your own Doc to X converter, it is therefore sufficient to convert from SimpleDocStream. The »Render« submodules provide some built-in converters to do so, and helpers to create own ones.

Constructors

SFail 
SEmpty 
SChar !Char (SimpleDocStream ann) 
SText !Int !Text (SimpleDocStream ann)

length is O(n), so we cache it in the Int field.

SLine !Int (SimpleDocStream ann)

Int = indentation level for the (next) line

SAnnPush ann (SimpleDocStream ann)

Add an annotation to the remaining document.

SAnnPop (SimpleDocStream ann)

Remove a previously pushed annotation.

Instances

Instances details
Foldable SimpleDocStream

Collect all annotations from a document.

Instance details

Defined in Prettyprinter.Internal

Methods

fold :: Monoid m => SimpleDocStream m -> m #

foldMap :: Monoid m => (a -> m) -> SimpleDocStream a -> m #

foldMap' :: Monoid m => (a -> m) -> SimpleDocStream a -> m #

foldr :: (a -> b -> b) -> b -> SimpleDocStream a -> b #

foldr' :: (a -> b -> b) -> b -> SimpleDocStream a -> b #

foldl :: (b -> a -> b) -> b -> SimpleDocStream a -> b #

foldl' :: (b -> a -> b) -> b -> SimpleDocStream a -> b #

foldr1 :: (a -> a -> a) -> SimpleDocStream a -> a #

foldl1 :: (a -> a -> a) -> SimpleDocStream a -> a #

toList :: SimpleDocStream a -> [a] #

null :: SimpleDocStream a -> Bool #

length :: SimpleDocStream a -> Int #

elem :: Eq a => a -> SimpleDocStream a -> Bool #

maximum :: Ord a => SimpleDocStream a -> a #

minimum :: Ord a => SimpleDocStream a -> a #

sum :: Num a => SimpleDocStream a -> a #

product :: Num a => SimpleDocStream a -> a #

Traversable SimpleDocStream

Transform a document based on its annotations, possibly leveraging Applicative effects.

Instance details

Defined in Prettyprinter.Internal

Methods

traverse :: Applicative f => (a -> f b) -> SimpleDocStream a -> f (SimpleDocStream b) #

sequenceA :: Applicative f => SimpleDocStream (f a) -> f (SimpleDocStream a) #

mapM :: Monad m => (a -> m b) -> SimpleDocStream a -> m (SimpleDocStream b) #

sequence :: Monad m => SimpleDocStream (m a) -> m (SimpleDocStream a) #

Functor SimpleDocStream

Alter the document’s annotations.

This instance makes SimpleDocStream more flexible (because it can be used in Functor-polymorphic values), but fmap is much less readable compared to using reAnnotateST in code that only works for SimpleDocStream anyway. Consider using the latter when the type does not matter.

Instance details

Defined in Prettyprinter.Internal

Methods

fmap :: (a -> b) -> SimpleDocStream a -> SimpleDocStream b #

(<$) :: a -> SimpleDocStream b -> SimpleDocStream a #

Generic (SimpleDocStream ann) 
Instance details

Defined in Prettyprinter.Internal

Associated Types

type Rep (SimpleDocStream ann) :: Type -> Type #

Methods

from :: SimpleDocStream ann -> Rep (SimpleDocStream ann) x #

to :: Rep (SimpleDocStream ann) x -> SimpleDocStream ann #

Show ann => Show (SimpleDocStream ann) 
Instance details

Defined in Prettyprinter.Internal

Eq ann => Eq (SimpleDocStream ann) 
Instance details

Defined in Prettyprinter.Internal

Ord ann => Ord (SimpleDocStream ann) 
Instance details

Defined in Prettyprinter.Internal

type Rep (SimpleDocStream ann) 
Instance details

Defined in Prettyprinter.Internal

type Rep (SimpleDocStream ann) = D1 ('MetaData "SimpleDocStream" "Prettyprinter.Internal" "prettyprinter-1.7.1-Fnq1Vt2JMTY81kvR0W9kdP" 'False) ((C1 ('MetaCons "SFail" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SEmpty" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SChar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleDocStream ann))))) :+: ((C1 ('MetaCons "SText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleDocStream ann)))) :+: C1 ('MetaCons "SLine" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleDocStream ann)))) :+: (C1 ('MetaCons "SAnnPush" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleDocStream ann))) :+: C1 ('MetaCons "SAnnPop" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleDocStream ann))))))

data PageWidth #

Maximum number of characters that fit in one line. The layout algorithms will try not to exceed the set limit by inserting line breaks when applicable (e.g. via softline').

Constructors

AvailablePerLine !Int !Double

Layouters should not exceed the specified space per line.

  • The Int is the number of characters, including whitespace, that fit in a line. A typical value is 80.
  • The Double is the ribbon with, i.e. the fraction of the total page width that can be printed on. This allows limiting the length of printable text per line. Values must be between 0 and 1, and 0.4 to 1 is typical.
Unbounded

Layouters should not introduce line breaks on their own.

Instances

Instances details
Show PageWidth 
Instance details

Defined in Prettyprinter.Internal

Eq PageWidth 
Instance details

Defined in Prettyprinter.Internal

Ord PageWidth 
Instance details

Defined in Prettyprinter.Internal

getClientConfig :: MonadLsp Config m => m Config #

Returns the current client configuration. It is not wise to permanently cache the returned value of this function, as clients can at runtime change their configuration.

lspClientLogRecorder :: LanguageContextEnv config -> Recorder (WithPriority Text) #

Creates a recorder that sends logs to the LSP client via window/logMessage notifications.

lspClientMessageRecorder :: LanguageContextEnv config -> Recorder (WithPriority Text) #

Creates a recorder that sends logs to the LSP client via window/showMessage notifications.

withBacklog :: (v -> Recorder a) -> IO (Recorder a, v -> IO ()) #

Given a Recorder that requires an argument, produces a Recorder that queues up messages until the argument is provided using the callback, at which point it sends the backlog and begins functioning normally.

makeDefaultHandleRecorder #

Arguments

:: MonadIO m 
=> Maybe [LoggingColumn]

built-in logging columns to display. Nothing uses the default

-> Lock

lock to take when outputting to handle

-> Handle

handle to output to

-> m (Recorder (WithPriority (Doc a))) 

withFileRecorder #

Arguments

:: MonadUnliftIO m 
=> FilePath

Log file path.

-> Maybe [LoggingColumn]

logging columns to display. Nothing uses defaultLoggingColumns

-> (Either IOException (Recorder (WithPriority (Doc d))) -> m a)

action given a recorder, or the exception if we failed to open the file

-> m a 

cfilter :: (a -> Bool) -> Recorder a -> Recorder a #

cmapIO :: (a -> IO b) -> Recorder b -> Recorder a #

cmap :: (a -> b) -> Recorder b -> Recorder a #

logWith :: (HasCallStack, MonadIO m) => Recorder (WithPriority msg) -> Priority -> msg -> m () #

logDebug :: Logger -> Text -> IO () #

logInfo :: Logger -> Text -> IO () #

logWarning :: Logger -> Text -> IO () #

logError :: Logger -> Text -> IO () #

data Priority #

Constructors

Debug

Verbose debug logging.

Info

Useful information in case an error has to be understood.

Warning

These error messages should not occur in a expected usage, and should be investigated.

Error

Such log messages must never occur in expected usage.

Instances

Instances details
Bounded Priority 
Instance details

Defined in Ide.Logger

Enum Priority 
Instance details

Defined in Ide.Logger

Read Priority 
Instance details

Defined in Ide.Logger

Show Priority 
Instance details

Defined in Ide.Logger

Eq Priority 
Instance details

Defined in Ide.Logger

Ord Priority 
Instance details

Defined in Ide.Logger

newtype Logger #

Note that this is logging actions _of the program_, not of the user. You shouldn't call warning/error if the user has caused an error, only if our code has gone wrong and is itself erroneous (e.g. we threw an exception).

Constructors

Logger 

Fields

Instances

Instances details
Monoid Logger 
Instance details

Defined in Ide.Logger

Semigroup Logger 
Instance details

Defined in Ide.Logger

data WithPriority a #

Constructors

WithPriority 

Instances

Instances details
Functor WithPriority 
Instance details

Defined in Ide.Logger

Methods

fmap :: (a -> b) -> WithPriority a -> WithPriority b #

(<$) :: a -> WithPriority b -> WithPriority a #

newtype Recorder msg #

Note that this is logging actions _of the program_, not of the user. You shouldn't call warning/error if the user has caused an error, only if our code has gone wrong and is itself erroneous (e.g. we threw an exception).

Constructors

Recorder 

Fields

Instances

Instances details
Contravariant Recorder 
Instance details

Defined in Ide.Logger

Methods

contramap :: (a' -> a) -> Recorder a -> Recorder a' #

(>$) :: b -> Recorder b -> Recorder a #

Monoid (Recorder msg) 
Instance details

Defined in Ide.Logger

Methods

mempty :: Recorder msg #

mappend :: Recorder msg -> Recorder msg -> Recorder msg #

mconcat :: [Recorder msg] -> Recorder msg #

Semigroup (Recorder msg) 
Instance details

Defined in Ide.Logger

Methods

(<>) :: Recorder msg -> Recorder msg -> Recorder msg #

sconcat :: NonEmpty (Recorder msg) -> Recorder msg #

stimes :: Integral b => b -> Recorder msg -> Recorder msg #

renderStrict :: SimpleDocStream ann -> Text #

(renderStrict sdoc) takes the output sdoc from a rendering function and transforms it to strict text.

data NormalizedUri #

A normalized Uri.

If you want to use a URI as a map key, use this type. It is important to normalize the percent encoding in the URI since URIs that only differ when it comes to the percent-encoding should be treated as equivalent.

NormalizedUri has a cached hash in order to make it especially fast in a hash map.

Instances

Instances details
Generic NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Associated Types

type Rep NormalizedUri :: Type -> Type #

Read NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Show NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

NFData NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

rnf :: NormalizedUri -> () #

Eq NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Ord NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Hashable NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Pretty NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

pretty :: NormalizedUri -> Doc ann #

prettyList :: [NormalizedUri] -> Doc ann #

HasVfsMap VFS (Map NormalizedUri VirtualFile) 
Instance details

Defined in Language.LSP.VFS

type Rep NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep NormalizedUri = D1 ('MetaData "NormalizedUri" "Language.LSP.Protocol.Types.Uri" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "NormalizedUri" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

data Diagnostic #

Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.

Constructors

Diagnostic 

Fields

  • _range :: Range

    The range at which the message applies

  • _severity :: Maybe DiagnosticSeverity

    The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.

  • _code :: Maybe (Int32 |? Text)

    The diagnostic's code, which usually appear in the user interface.

  • _codeDescription :: Maybe CodeDescription

    An optional property to describe the error code. Requires the code field (above) to be present/not null.

    Since: lsp-types-3.16.0

  • _source :: Maybe Text

    A human-readable string describing the source of this diagnostic, e.g. typescript or 'super lint'. It usually appears in the user interface.

  • _message :: Text

    The diagnostic's message. It usually appears in the user interface

  • _tags :: Maybe [DiagnosticTag]

    Additional metadata about the diagnostic.

    Since: lsp-types-3.15.0

  • _relatedInformation :: Maybe [DiagnosticRelatedInformation]

    An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

  • _data_ :: Maybe Value

    A data entry field that is preserved between a `textDocument/publishDiagnostics` notification and `textDocument/codeAction` request.

    Since: lsp-types-3.16.0

Instances

Instances details
FromJSON Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

ToJSON Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Generic Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Associated Types

type Rep Diagnostic :: Type -> Type #

Show Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

NFData Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Methods

rnf :: Diagnostic -> () #

Eq Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Ord Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Hashable Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Pretty Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

Methods

pretty :: Diagnostic -> Doc ann #

prettyList :: [Diagnostic] -> Doc ann #

HasMessage Diagnostic Text 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Diagnostic Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasCode Diagnostic (Maybe (Int32 |? Text)) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasCodeDescription Diagnostic (Maybe CodeDescription) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasData_ Diagnostic (Maybe Value) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasDiagnostics CodeAction (Maybe [Diagnostic]) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasDiagnostics CodeActionContext [Diagnostic] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasDiagnostics PublishDiagnosticsParams [Diagnostic] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasItems FullDocumentDiagnosticReport [Diagnostic] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasItems RelatedFullDocumentDiagnosticReport [Diagnostic] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasItems WorkspaceFullDocumentDiagnosticReport [Diagnostic] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRelatedInformation Diagnostic (Maybe [DiagnosticRelatedInformation]) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSeverity Diagnostic (Maybe DiagnosticSeverity) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSource Diagnostic (Maybe Text) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasTags Diagnostic (Maybe [DiagnosticTag]) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Diagnostic 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Diagnostic

data DiagnosticSeverity #

The diagnostic's severity.

Constructors

DiagnosticSeverity_Error

Reports an error.

DiagnosticSeverity_Warning

Reports a warning.

DiagnosticSeverity_Information

Reports an information.

DiagnosticSeverity_Hint

Reports a hint.

Instances

Instances details
FromJSON DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

ToJSON DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

Generic DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

Associated Types

type Rep DiagnosticSeverity :: Type -> Type #

Show DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

NFData DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

Methods

rnf :: DiagnosticSeverity -> () #

Eq DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

Ord DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

Hashable DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

LspEnum DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

Associated Types

type EnumBaseType DiagnosticSeverity #

Pretty DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

HasSeverity Diagnostic (Maybe DiagnosticSeverity) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

type Rep DiagnosticSeverity = D1 ('MetaData "DiagnosticSeverity" "Language.LSP.Protocol.Internal.Types.DiagnosticSeverity" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) ((C1 ('MetaCons "DiagnosticSeverity_Error" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DiagnosticSeverity_Warning" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DiagnosticSeverity_Information" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DiagnosticSeverity_Hint" 'PrefixI 'False) (U1 :: Type -> Type)))
type EnumBaseType DiagnosticSeverity 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.DiagnosticSeverity

data Location #

Represents a location inside a resource, such as a line inside a text file.

Constructors

Location 

Fields

Instances

Instances details
FromJSON Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

ToJSON Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Generic Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Associated Types

type Rep Location :: Type -> Type #

Methods

from :: Location -> Rep Location x #

to :: Rep Location x -> Location #

Show Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

NFData Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Methods

rnf :: Location -> () #

Eq Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Ord Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Hashable Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Methods

hashWithSalt :: Int -> Location -> Int #

hash :: Location -> Int #

Pretty Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Methods

pretty :: Location -> Doc ann #

prettyList :: [Location] -> Doc ann #

HasLocation DiagnosticRelatedInformation Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasLocation SymbolInformation Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Location Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri Location Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

Methods

uri :: Lens' Location Uri #

HasLocation InlayHintLabelPart (Maybe Location) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

type Rep Location = D1 ('MetaData "Location" "Language.LSP.Protocol.Internal.Types.Location" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) (S1 ('MetaSel ('Just "_uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uri) :*: S1 ('MetaSel ('Just "_range") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Range)))

newtype Uri #

The Uri type in the LSP specification.

Constructors

Uri 

Fields

Instances

Instances details
FromJSON Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

FromJSONKey Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

ToJSON Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

ToJSONKey Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Generic Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Associated Types

type Rep Uri :: Type -> Type #

Methods

from :: Uri -> Rep Uri x #

to :: Rep Uri x -> Uri #

Read Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Show Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

showsPrec :: Int -> Uri -> ShowS #

show :: Uri -> String #

showList :: [Uri] -> ShowS #

NFData Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

rnf :: Uri -> () #

Eq Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

(==) :: Uri -> Uri -> Bool #

(/=) :: Uri -> Uri -> Bool #

Ord Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

compare :: Uri -> Uri -> Ordering #

(<) :: Uri -> Uri -> Bool #

(<=) :: Uri -> Uri -> Bool #

(>) :: Uri -> Uri -> Bool #

(>=) :: Uri -> Uri -> Bool #

max :: Uri -> Uri -> Uri #

min :: Uri -> Uri -> Uri #

Hashable Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

hashWithSalt :: Int -> Uri -> Int #

hash :: Uri -> Int #

Pretty Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

pretty :: Uri -> Doc ann #

prettyList :: [Uri] -> Doc ann #

HasDocument NotebookCell Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasHref CodeDescription Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasNewUri RenameFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasOldUri RenameFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasTargetUri LocationLink Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri CallHierarchyItem Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri CreateFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri DeleteFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri FileEvent Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

Methods

uri :: Lens' FileEvent Uri #

HasUri Location Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

Methods

uri :: Lens' Location Uri #

HasUri NotebookDocument Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri NotebookDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri OptionalVersionedTextDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri PreviousResultId Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri PublishDiagnosticsParams Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri ShowDocumentParams Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri TextDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri TextDocumentItem Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri TypeHierarchyItem Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri VersionedNotebookDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri VersionedTextDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri WorkspaceFolder Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri WorkspaceFullDocumentDiagnosticReport Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri WorkspaceUnchangedDocumentDiagnosticReport Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasChanges WorkspaceEdit (Maybe (Map Uri [TextEdit])) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRelatedDocuments RelatedFullDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRelatedDocuments RelatedUnchangedDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasBaseUri RelativePattern (WorkspaceFolder |? Uri) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRelatedDocuments DocumentDiagnosticReportPartialResult (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport)) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRootUri InitializeParams (Uri |? Null) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRootUri UInitializeParams (Uri |? Null) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep Uri = D1 ('MetaData "Uri" "Language.LSP.Protocol.Types.Uri" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'True) (C1 ('MetaCons "Uri" 'PrefixI 'True) (S1 ('MetaSel ('Just "getUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data NormalizedFilePath #

A file path that is already normalized.

The NormalizedUri is cached to avoided repeated normalisation when we need to compute them (which is a lot).

This is one of the most performance critical parts of HLS, do not modify it without profiling.

Instances

Instances details
IsString NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Generic NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Associated Types

type Rep NormalizedFilePath :: Type -> Type #

Show NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Binary NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

NFData NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

rnf :: NormalizedFilePath -> () #

Eq NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Ord NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Hashable NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep NormalizedFilePath = D1 ('MetaData "NormalizedFilePath" "Language.LSP.Protocol.Types.Uri" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "NormalizedFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NormalizedUri) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text)))

uriToFilePath' :: Uri -> Maybe FilePath Source #

We use an empty string as a filepath when we don’t have a file. However, haskell-lsp doesn’t support that in uriToFilePath and given that it is not a valid filepath it does not make sense to upstream a fix. So we have our own wrapper here that supports empty filepaths.

readSrcSpan :: ReadS RealSrcSpan Source #

Parser for the GHC output format

type FileDiagnostic = (NormalizedFilePath, ShowDiagnostic, Diagnostic) Source #

Human readable diagnostics for a specific file.

This type packages a pretty printed, human readable error message along with the related source location so that we can display the error on either the console or in the IDE at the right source location.

data ShowDiagnostic Source #

Defines whether a particular diagnostic should be reported back to the user.

One important use case is "missing signature" code lenses, for which we need to enable the corresponding warning during type checking. However, we do not want to show the warning unless the programmer asks for it (#261).

Constructors

ShowDiag

Report back to the user

HideDiag

Hide from user

type IdeResultNoDiagnosticsEarlyCutoff v = (Maybe ByteString, Maybe v) Source #

an IdeResult with a fingerprint

type IdeResult v = ([FileDiagnostic], Maybe v) Source #

The result of an IDE operation. Warnings and errors are in the Diagnostic, and a value is in the Maybe. For operations that throw an error you expect a non-empty list of diagnostics, at least one of which is an error, and a Nothing. For operations that succeed you expect perhaps some warnings and a Just. For operations that depend on other failing operations you may get empty diagnostics and a Nothing, to indicate this phase throws no fresh errors but still failed.

A rule on a file should only return diagnostics for that given file. It should not propagate diagnostic errors through multiple phases.

modifyDynFlags :: GhcMonad m => (DynFlags -> DynFlags) -> m () Source #

Used to modify dyn flags in preference to calling setSessionDynFlags, since that function also reloads packages (which is very slow).

lookupPackageConfig :: Unit -> HscEnv -> Maybe UnitInfo Source #

Given a Unit try and find the associated PackageConfig in the environment.

textToStringBuffer :: Text -> StringBuffer Source #

Convert from the text package to the GHC StringBuffer. Currently implemented somewhat inefficiently (if it ever comes up in a profile).

printRdrName :: RdrName -> String Source #

Pretty print a RdrName wrapping operators in parens

printName :: Name -> String Source #

Pretty print a Name wrapping operators in parens

evalGhcEnv :: HscEnv -> Ghc b -> IO b Source #

Run a Ghc monad value using an existing HscEnv. Sets up and tears down all the required pieces, but designed to be more efficient than a standard runGhc.

moduleImportPath :: NormalizedFilePath -> ModuleName -> Maybe FilePath Source #

Given a module location, and its parse tree, figure out what is the include directory implied by it. For example, given the file /usr/Test/Foo/Bar.hs with the module name Foo.Bar the directory /usr/Test should be on the include path to find sibling modules.

readFileUtf8 :: FilePath -> IO Text Source #

Read a UTF8 file, with lenient decoding, so it will never raise a decoding error.

fingerprintToBS :: Fingerprint -> ByteString Source #

Convert a Fingerprint to a ByteString by copying the byte across. Will produce an 8 byte unreadable ByteString.

hDuplicateTo' :: Handle -> Handle -> IO () Source #

A slightly modified version of hDuplicateTo from GHC. Importantly, it avoids the bug listed in https://gitlab.haskell.org/ghc/ghc/merge_requests/2318.

printOutputable :: Outputable a => a -> Text Source #

Print a GHC value in defaultUserStyle without unique symbols. It uses showSDocUnsafe with unsafeGlobalDynFlags internally.

This is the most common print utility. It will do something additionally compared to what the Outputable instance does.

  1. print with a user-friendly style: a_a4ME as a.
  2. unescape escape sequences of printable unicode characters within a pair of double quotes

diagFromErrMsg :: Text -> DynFlags -> MsgEnvelope DecoratedSDoc -> [FileDiagnostic] Source #

Produce a GHC-style error from a source span and a message.

srcSpanToRange :: SrcSpan -> Maybe Range Source #

Convert a GHC SrcSpan to a DAML compiler Range

srcSpanToFilename :: SrcSpan -> Maybe FilePath Source #

Extract a file name from a GHC SrcSpan (use message for unhelpful ones) FIXME This may not be an _absolute_ file name, needs fixing.

toDSeverity :: Severity -> Maybe DiagnosticSeverity Source #

Convert a GHC severity to a DAML compiler Severity. Severities below Warning level are dropped (returning Nothing).

diagFromStrings :: Text -> DiagnosticSeverity -> [(SrcSpan, String)] -> [FileDiagnostic] Source #

Produce a bag of GHC-style errors (ErrorMessages) from the given (optional) locations and message strings.

diagFromString :: Text -> DiagnosticSeverity -> SrcSpan -> String -> [FileDiagnostic] Source #

Produce a GHC-style error from a source span and a message.

noSpan :: String -> SrcSpan Source #

Produces an "unhelpful" source span with the given string.

zeroSpan Source #

Arguments

:: FastString

file path of span

-> RealSrcSpan 

creates a span with zero length in the filename of the argument passed

catchSrcErrors :: DynFlags -> Text -> IO a -> IO (Either [FileDiagnostic] a) Source #

Catch the errors thrown by GHC (SourceErrors and compiler-internal exceptions like Panic or InstallationError), and turn them into diagnostics

data HscEnvEq Source #

An HscEnv with equality. Two values are considered equal if they are created with the same call to newHscEnvEq or updateHscEnvEq.

Instances

Instances details
Show HscEnvEq Source # 
Instance details

Defined in Development.IDE.Types.HscEnvEq

NFData HscEnvEq Source # 
Instance details

Defined in Development.IDE.Types.HscEnvEq

Methods

rnf :: HscEnvEq -> () #

Eq HscEnvEq Source # 
Instance details

Defined in Development.IDE.Types.HscEnvEq

Hashable HscEnvEq Source # 
Instance details

Defined in Development.IDE.Types.HscEnvEq

Methods

hashWithSalt :: Int -> HscEnvEq -> Int #

hash :: HscEnvEq -> Int #

hscEnvWithImportPaths :: HscEnvEq -> HscEnv Source #

Unwrap the HscEnv with the original import paths. Used only for locating imports

data GhcSessionIO Source #

Constructors

GhcSessionIO 

Instances

Instances details
Generic GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GhcSessionIO :: Type -> Type #

Show GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GhcSessionIO -> () #

Eq GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GhcSessionIO = D1 ('MetaData "GhcSessionIO" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GhcSessionIO" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GhcSessionIO Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data IdeGhcSession Source #

Constructors

IdeGhcSession 

Fields

Instances

Instances details
Show IdeGhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData IdeGhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: IdeGhcSession -> () #

data AddWatchedFile Source #

Constructors

AddWatchedFile 

Instances

Instances details
Generic AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep AddWatchedFile :: Type -> Type #

Show AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: AddWatchedFile -> () #

Eq AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep AddWatchedFile = D1 ('MetaData "AddWatchedFile" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "AddWatchedFile" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult AddWatchedFile Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data GetClientSettings Source #

Get the client config stored in the ide state

Constructors

GetClientSettings 

Instances

Instances details
Generic GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetClientSettings :: Type -> Type #

Show GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetClientSettings -> () #

Eq GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetClientSettings = D1 ('MetaData "GetClientSettings" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetClientSettings" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetClientSettings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data GetModSummary Source #

Constructors

GetModSummary 

Instances

Instances details
Generic GetModSummary Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetModSummary :: Type -> Type #

Show GetModSummary Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetModSummary Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetModSummary -> () #

Eq GetModSummary Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetModSummary Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModSummary Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModSummary = D1 ('MetaData "GetModSummary" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetModSummary" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetModSummary Source #

Generate a ModSummary that has enough information to be used to get .hi and .hie files. without needing to parse the entire source

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetModSummaryWithoutTimestamps Source #

Instances

Instances details
Generic GetModSummaryWithoutTimestamps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetModSummaryWithoutTimestamps :: Type -> Type #

Show GetModSummaryWithoutTimestamps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetModSummaryWithoutTimestamps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Eq GetModSummaryWithoutTimestamps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetModSummaryWithoutTimestamps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModSummaryWithoutTimestamps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModSummaryWithoutTimestamps = D1 ('MetaData "GetModSummaryWithoutTimestamps" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetModSummaryWithoutTimestamps" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetModSummaryWithoutTimestamps Source #

Generate a ModSummary with the timestamps and preprocessed content elided, for more successful early cutoff

Instance details

Defined in Development.IDE.Core.RuleTypes

data IsFileOfInterest Source #

Constructors

IsFileOfInterest 

Instances

Instances details
Generic IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep IsFileOfInterest :: Type -> Type #

Show IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: IsFileOfInterest -> () #

Eq IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep IsFileOfInterest = D1 ('MetaData "IsFileOfInterest" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "IsFileOfInterest" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult IsFileOfInterest Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data GetModIface Source #

Constructors

GetModIface 

Instances

Instances details
Generic GetModIface Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetModIface :: Type -> Type #

Show GetModIface Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetModIface Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetModIface -> () #

Eq GetModIface Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetModIface Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModIface Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModIface = D1 ('MetaData "GetModIface" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetModIface" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetModIface Source #

Get a module interface details, either from an interface file or a typechecked module

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetModIfaceFromDiskAndIndex Source #

Instances

Instances details
Generic GetModIfaceFromDiskAndIndex Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetModIfaceFromDiskAndIndex :: Type -> Type #

Show GetModIfaceFromDiskAndIndex Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetModIfaceFromDiskAndIndex Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Eq GetModIfaceFromDiskAndIndex Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetModIfaceFromDiskAndIndex Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModIfaceFromDiskAndIndex Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModIfaceFromDiskAndIndex = D1 ('MetaData "GetModIfaceFromDiskAndIndex" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetModIfaceFromDiskAndIndex" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetModIfaceFromDiskAndIndex Source #

GetModIfaceFromDisk and index the `.hie` file into the database. This is an internal rule, use GetModIface instead.

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetModIfaceFromDisk Source #

Constructors

GetModIfaceFromDisk 

Instances

Instances details
Generic GetModIfaceFromDisk Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetModIfaceFromDisk :: Type -> Type #

Show GetModIfaceFromDisk Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetModIfaceFromDisk Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetModIfaceFromDisk -> () #

Eq GetModIfaceFromDisk Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetModIfaceFromDisk Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModIfaceFromDisk Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModIfaceFromDisk = D1 ('MetaData "GetModIfaceFromDisk" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetModIfaceFromDisk" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetModIfaceFromDisk Source #

Read the module interface file from disk. Throws an error for VFS files. This is an internal rule, use GetModIface instead.

Instance details

Defined in Development.IDE.Core.RuleTypes

newtype GhcSessionDeps Source #

Constructors

GhcSessionDeps_ 

Fields

  • fullModSummary :: Bool

    Load full ModSummary values in the GHC session. Required for interactive evaluation, but leads to more cache invalidations

Bundled Patterns

pattern GhcSessionDeps :: GhcSessionDeps 

Instances

Instances details
Show GhcSessionDeps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GhcSessionDeps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GhcSessionDeps -> () #

Eq GhcSessionDeps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GhcSessionDeps Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type RuleResult GhcSessionDeps Source #

A GHC session preloaded with all the dependencies This rule is also responsible for calling ReportImportCycles for the direct dependencies

Instance details

Defined in Development.IDE.Core.RuleTypes

data GhcSession Source #

Constructors

GhcSession 

Instances

Instances details
Generic GhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GhcSession :: Type -> Type #

Show GhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GhcSession -> () #

Eq GhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GhcSession Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GhcSession = D1 ('MetaData "GhcSession" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GhcSession" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GhcSession Source #

A GHC session that we reuse.

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetBindings Source #

Constructors

GetBindings 

Instances

Instances details
Generic GetBindings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetBindings :: Type -> Type #

Show GetBindings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetBindings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetBindings -> () #

Eq GetBindings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetBindings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetBindings Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetBindings = D1 ('MetaData "GetBindings" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetBindings" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetBindings Source #

A IntervalMap telling us what is in scope at each point

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetHieAst Source #

Constructors

GetHieAst 

Instances

Instances details
Generic GetHieAst Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetHieAst :: Type -> Type #

Show GetHieAst Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetHieAst Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetHieAst -> () #

Eq GetHieAst Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetHieAst Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetHieAst Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetHieAst = D1 ('MetaData "GetHieAst" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetHieAst" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetHieAst Source #

The uncompressed HieAST

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetDocMap Source #

Constructors

GetDocMap 

Instances

Instances details
Generic GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetDocMap :: Type -> Type #

Show GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetDocMap -> () #

Eq GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetDocMap = D1 ('MetaData "GetDocMap" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetDocMap" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetDocMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data TypeCheck Source #

Constructors

TypeCheck 

Instances

Instances details
Generic TypeCheck Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep TypeCheck :: Type -> Type #

Show TypeCheck Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData TypeCheck Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: TypeCheck -> () #

Eq TypeCheck Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable TypeCheck Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep TypeCheck Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep TypeCheck = D1 ('MetaData "TypeCheck" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "TypeCheck" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult TypeCheck Source #

The type checked version of this file, requires TypeCheck+

Instance details

Defined in Development.IDE.Core.RuleTypes

data ReportImportCycles Source #

Constructors

ReportImportCycles 

Instances

Instances details
Generic ReportImportCycles Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep ReportImportCycles :: Type -> Type #

Show ReportImportCycles Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData ReportImportCycles Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: ReportImportCycles -> () #

Eq ReportImportCycles Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable ReportImportCycles Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep ReportImportCycles Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep ReportImportCycles = D1 ('MetaData "ReportImportCycles" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "ReportImportCycles" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult ReportImportCycles Source #

This rule is used to report import cycles. It depends on GetModuleGraph. We cannot report the cycles directly from GetModuleGraph since we can only report diagnostics for the current file.

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetModuleGraph Source #

Constructors

GetModuleGraph 

Instances

Instances details
Generic GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetModuleGraph :: Type -> Type #

Show GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetModuleGraph -> () #

Eq GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModuleGraph = D1 ('MetaData "GetModuleGraph" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetModuleGraph" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetModuleGraph Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data NeedsCompilation Source #

Constructors

NeedsCompilation 

Instances

Instances details
Generic NeedsCompilation Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep NeedsCompilation :: Type -> Type #

Show NeedsCompilation Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData NeedsCompilation Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: NeedsCompilation -> () #

Eq NeedsCompilation Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable NeedsCompilation Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep NeedsCompilation Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep NeedsCompilation = D1 ('MetaData "NeedsCompilation" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "NeedsCompilation" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult NeedsCompilation Source #

Does this module need to be compiled?

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetLocatedImports Source #

Constructors

GetLocatedImports 

Instances

Instances details
Generic GetLocatedImports Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetLocatedImports :: Type -> Type #

Show GetLocatedImports Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetLocatedImports Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetLocatedImports -> () #

Eq GetLocatedImports Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetLocatedImports Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetLocatedImports Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetLocatedImports = D1 ('MetaData "GetLocatedImports" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetLocatedImports" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetLocatedImports Source #

Resolve the imports in a module to the file path of a module in the same package

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetParsedModuleWithComments Source #

Instances

Instances details
Generic GetParsedModuleWithComments Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetParsedModuleWithComments :: Type -> Type #

Show GetParsedModuleWithComments Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetParsedModuleWithComments Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Eq GetParsedModuleWithComments Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetParsedModuleWithComments Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetParsedModuleWithComments Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetParsedModuleWithComments = D1 ('MetaData "GetParsedModuleWithComments" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetParsedModuleWithComments" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetParsedModuleWithComments Source #

The parse tree for the file using GetFileContents, all comments included using Opt_KeepRawTokenStream

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetParsedModule Source #

Constructors

GetParsedModule 

Instances

Instances details
Generic GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetParsedModule :: Type -> Type #

Show GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetParsedModule -> () #

Eq GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetParsedModule Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetParsedModule = D1 ('MetaData "GetParsedModule" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetParsedModule" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetParsedModule Source #

The parse tree for the file using GetFileContents

Instance details

Defined in Development.IDE.Core.RuleTypes

data ModSummaryResult Source #

Constructors

ModSummaryResult 

Fields

Instances

Instances details
Show ModSummaryResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData ModSummaryResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: ModSummaryResult -> () #

data IsFileOfInterestResult Source #

Instances

Instances details
Generic IsFileOfInterestResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep IsFileOfInterestResult :: Type -> Type #

Show IsFileOfInterestResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData IsFileOfInterestResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: IsFileOfInterestResult -> () #

Eq IsFileOfInterestResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable IsFileOfInterestResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep IsFileOfInterestResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep IsFileOfInterestResult = D1 ('MetaData "IsFileOfInterestResult" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "NotFOI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IsFOI" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileOfInterestStatus)))

data FileOfInterestStatus Source #

Constructors

OnDisk 
Modified 

Fields

Instances

Instances details
Generic FileOfInterestStatus Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep FileOfInterestStatus :: Type -> Type #

Show FileOfInterestStatus Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData FileOfInterestStatus Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: FileOfInterestStatus -> () #

Eq FileOfInterestStatus Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable FileOfInterestStatus Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep FileOfInterestStatus Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep FileOfInterestStatus = D1 ('MetaData "FileOfInterestStatus" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "OnDisk" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Modified" 'PrefixI 'True) (S1 ('MetaSel ('Just "firstOpen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))

data GetFileExists Source #

Constructors

GetFileExists 

Instances

Instances details
Generic GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetFileExists :: Type -> Type #

Show GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetFileExists -> () #

Eq GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetFileExists = D1 ('MetaData "GetFileExists" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetFileExists" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetFileExists Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data GetFileContents Source #

Constructors

GetFileContents 

Instances

Instances details
Generic GetFileContents Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetFileContents :: Type -> Type #

Show GetFileContents Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetFileContents Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetFileContents -> () #

Eq GetFileContents Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetFileContents Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetFileContents Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetFileContents = D1 ('MetaData "GetFileContents" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetFileContents" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetFileContents Source #

Get the contents of a file, either dirty (if the buffer is modified) or Nothing to mean use from disk.

Instance details

Defined in Development.IDE.Core.RuleTypes

data FileVersion Source #

Either the mtime from disk or an LSP version LSP versions always compare as greater than on disk versions

Instances

Instances details
Generic FileVersion Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep FileVersion :: Type -> Type #

Show FileVersion Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData FileVersion Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: FileVersion -> () #

Eq FileVersion Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Ord FileVersion Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep FileVersion Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep FileVersion = D1 ('MetaData "FileVersion" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "ModificationTime" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 POSIXTime)) :+: C1 ('MetaCons "VFSVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int32)))

newtype GetModificationTime Source #

Constructors

GetModificationTime_ 

Fields

Instances

Instances details
Generic GetModificationTime Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetModificationTime :: Type -> Type #

Show GetModificationTime Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetModificationTime Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetModificationTime -> () #

Eq GetModificationTime Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetModificationTime Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModificationTime Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetModificationTime = D1 ('MetaData "GetModificationTime" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'True) (C1 ('MetaCons "GetModificationTime_" 'PrefixI 'True) (S1 ('MetaSel ('Just "missingFileDiagnostics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
type RuleResult GetModificationTime Source #

Get the modification time of a file.

Instance details

Defined in Development.IDE.Core.RuleTypes

data DocAndKindMap Source #

Constructors

DKMap 

Instances

Instances details
Show DocAndKindMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData DocAndKindMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: DocAndKindMap -> () #

data HieKind a where Source #

Instances

Instances details
NFData (HieKind a) Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: HieKind a -> () #

data HieAstResult Source #

Save the uncompressed AST here, we compress it just before writing to disk

Constructors

forall a.Typeable a => HAR 

Fields

Instances

Instances details
Show HieAstResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData HieAstResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: HieAstResult -> () #

data HiFileResult Source #

Constructors

HiFileResult 

Fields

Instances

Instances details
Show HiFileResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData HiFileResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: HiFileResult -> () #

data TcModuleResult Source #

Contains the typechecked module and the OrigNameCache entry for that module.

Constructors

TcModuleResult 

Fields

Instances

Instances details
Show TcModuleResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData TcModuleResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: TcModuleResult -> () #

newtype ImportMap Source #

Constructors

ImportMap 

Fields

Instances

Instances details
Show ImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData ImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: ImportMap -> () #

data GetImportMap Source #

Constructors

GetImportMap 

Instances

Instances details
Generic GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetImportMap :: Type -> Type #

Show GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetImportMap -> () #

Eq GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetImportMap = D1 ('MetaData "GetImportMap" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetImportMap" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetImportMap Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data GetLinkable Source #

Constructors

GetLinkable 

Instances

Instances details
Generic GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetLinkable :: Type -> Type #

Show GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetLinkable -> () #

Eq GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetLinkable = D1 ('MetaData "GetLinkable" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetLinkable" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetLinkable Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data LinkableResult Source #

Constructors

LinkableResult 

Fields

Instances

Instances details
Show LinkableResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData LinkableResult Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: LinkableResult -> () #

data GenerateCore Source #

Constructors

GenerateCore 

Instances

Instances details
Generic GenerateCore Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GenerateCore :: Type -> Type #

Show GenerateCore Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GenerateCore Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GenerateCore -> () #

Eq GenerateCore Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GenerateCore Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GenerateCore Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GenerateCore = D1 ('MetaData "GenerateCore" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GenerateCore" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GenerateCore Source #

Convert to Core, requires TypeCheck*

Instance details

Defined in Development.IDE.Core.RuleTypes

data GetKnownTargets Source #

Constructors

GetKnownTargets 

Instances

Instances details
Generic GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep GetKnownTargets :: Type -> Type #

Show GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: GetKnownTargets -> () #

Eq GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Ord GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep GetKnownTargets = D1 ('MetaData "GetKnownTargets" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "GetKnownTargets" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetKnownTargets Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

data LinkableType Source #

Instances

Instances details
Generic LinkableType Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep LinkableType :: Type -> Type #

Show LinkableType Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

NFData LinkableType Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Methods

rnf :: LinkableType -> () #

Eq LinkableType Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Ord LinkableType Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

Hashable LinkableType Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep LinkableType Source # 
Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep LinkableType = D1 ('MetaData "LinkableType" "Development.IDE.Core.RuleTypes" "ghcide-2.5.0.0-FXD8of4zg5MGRRhTNvOFwl" 'False) (C1 ('MetaCons "ObjectLinkable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BCOLinkable" 'PrefixI 'False) (U1 :: Type -> Type))

encodeLinkableType :: Maybe LinkableType -> ByteString Source #

Encode the linkable into an ordered bytestring. This is used to drive an ordered "newness" predicate in the NeedsCompilation build rule.

data FastResult a Source #

A (maybe) stale result now, and an up to date one later

Constructors

FastResult 

Fields

newtype IdeAction a Source #

IdeActions are used when we want to return a result immediately, even if it is stale Useful for UI actions like hover, completion where we don't want to block.

Run via runIdeAction.

Constructors

IdeAction 

Instances

Instances details
MonadIO IdeAction Source # 
Instance details

Defined in Development.IDE.Core.Shake

Methods

liftIO :: IO a -> IdeAction a #

Applicative IdeAction Source # 
Instance details

Defined in Development.IDE.Core.Shake

Methods

pure :: a -> IdeAction a #

(<*>) :: IdeAction (a -> b) -> IdeAction a -> IdeAction b #

liftA2 :: (a -> b -> c) -> IdeAction a -> IdeAction b -> IdeAction c #

(*>) :: IdeAction a -> IdeAction b -> IdeAction b #

(<*) :: IdeAction a -> IdeAction b -> IdeAction a #

Functor IdeAction Source # 
Instance details

Defined in Development.IDE.Core.Shake

Methods

fmap :: (a -> b) -> IdeAction a -> IdeAction b #

(<$) :: a -> IdeAction b -> IdeAction a #

Monad IdeAction Source # 
Instance details

Defined in Development.IDE.Core.Shake

Methods

(>>=) :: IdeAction a -> (a -> IdeAction b) -> IdeAction b #

(>>) :: IdeAction a -> IdeAction b -> IdeAction b #

return :: a -> IdeAction a #

MonadReader ShakeExtras IdeAction Source # 
Instance details

Defined in Development.IDE.Core.Shake

Semigroup a => Semigroup (IdeAction a) Source # 
Instance details

Defined in Development.IDE.Core.Shake

Methods

(<>) :: IdeAction a -> IdeAction a -> IdeAction a #

sconcat :: NonEmpty (IdeAction a) -> IdeAction a #

stimes :: Integral b => b -> IdeAction a -> IdeAction a #

data IdeState Source #

A Shake database plus persistent store. Can be thought of as storing mappings from (FilePath, k) to RuleResult k.

Instances

Instances details
MonadReader (ReactorChan, IdeState) (ServerM c) Source # 
Instance details

Defined in Development.IDE.LSP.Server

type IdeRule k v = (RuleResult k ~ v, ShakeValue k, Show v, Typeable v, NFData v) Source #

data ShakeExtras Source #

Instances

Instances details
MonadReader ShakeExtras IdeAction Source # 
Instance details

Defined in Development.IDE.Core.Shake

getClientConfigAction :: Action Config Source #

Returns the client configuration, creating a build dependency. You should always use this function when accessing client configuration from build rules.

define :: IdeRule k v => Recorder (WithPriority Log) -> (k -> NormalizedFilePath -> Action (IdeResult v)) -> Rules () Source #

Define a new Rule without early cutoff

use :: IdeRule k v => k -> NormalizedFilePath -> Action (Maybe v) Source #

Request a Rule result if available

useWithStale :: IdeRule k v => k -> NormalizedFilePath -> Action (Maybe (v, PositionMapping)) Source #

Request a Rule result, it not available return the last computed result, if any, which may be stale

useWithStale_ :: IdeRule k v => k -> NormalizedFilePath -> Action (v, PositionMapping) Source #

Request a Rule result, it not available return the last computed result which may be stale.

Throws an BadDependency exception which is caught by the rule system if none available.

WARNING: Not suitable for PluginHandlers. Use useWithStaleE instead.

useWithStaleFast :: IdeRule k v => k -> NormalizedFilePath -> IdeAction (Maybe (v, PositionMapping)) Source #

Lookup value in the database and return with the stale value immediately Will queue an action to refresh the value. Might block the first time the rule runs, but never blocks after that.

useWithStaleFast' :: IdeRule k v => k -> NormalizedFilePath -> IdeAction (FastResult v) Source #

Same as useWithStaleFast but lets you wait for an up to date result

useNoFile :: IdeRule k v => k -> Action (Maybe v) Source #

useNoFile_ :: IdeRule k v => k -> Action v Source #

uses_ :: (Traversable f, IdeRule k v) => k -> f NormalizedFilePath -> Action (f v) Source #

Plural version of use_

Throws an BadDependency exception which is caught by the rule system if none available.

WARNING: Not suitable for PluginHandlers. Use usesE instead.

uses :: (Traversable f, IdeRule k v) => k -> f NormalizedFilePath -> Action (f (Maybe v)) Source #

Plural version of use

defineEarlyCutoff :: IdeRule k v => Recorder (WithPriority Log) -> RuleBody k v -> Rules () Source #

Define a new Rule with early cutoff

data Plugin c Source #

Instances

Instances details
Monoid (Plugin c) Source # 
Instance details

Defined in Development.IDE.Plugin

Methods

mempty :: Plugin c #

mappend :: Plugin c -> Plugin c -> Plugin c #

mconcat :: [Plugin c] -> Plugin c #

Semigroup (Plugin c) Source # 
Instance details

Defined in Development.IDE.Plugin

Methods

(<>) :: Plugin c -> Plugin c -> Plugin c #

sconcat :: NonEmpty (Plugin c) -> Plugin c #

stimes :: Integral b => b -> Plugin c -> Plugin c #

Default (Plugin c) Source # 
Instance details

Defined in Development.IDE.Plugin

Methods

def :: Plugin c #

data IdeConfiguration Source #

Lsp client relevant configuration details

getFileContents :: NormalizedFilePath -> Action (UTCTime, Maybe Text) Source #

Returns the modification time and the contents. For VFS paths, the modification time is the current time.

getFileExists :: NormalizedFilePath -> Action Bool Source #

Returns True if the file exists

getAtPoint :: NormalizedFilePath -> Position -> IdeAction (Maybe (Maybe Range, [Text])) Source #

Try to get hover text for the name under point.

getParsedModule :: NormalizedFilePath -> Action (Maybe ParsedModule) Source #

Parse the contents of a haskell file.