ghcide-1.7.0.0: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.Spans.Common

Synopsis

Documentation

unqualIEWrapName :: IEWrappedName RdrName -> Text Source #

Shows IEWrappedName, without any modifier, qualifier or unique identifier.

data SpanDoc Source #

Constructors

SpanDocString HsDocString SpanDocUris

Extern module doc

SpanDocText [Text] SpanDocUris

Local module doc

Instances

Instances details
Eq SpanDoc Source # 
Instance details

Defined in Development.IDE.Spans.Common

Methods

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

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

Show SpanDoc Source # 
Instance details

Defined in Development.IDE.Spans.Common

Generic SpanDoc Source # 
Instance details

Defined in Development.IDE.Spans.Common

Associated Types

type Rep SpanDoc :: Type -> Type #

Methods

from :: SpanDoc -> Rep SpanDoc x #

to :: Rep SpanDoc x -> SpanDoc #

NFData SpanDoc Source # 
Instance details

Defined in Development.IDE.Spans.Common

Methods

rnf :: SpanDoc -> () #

type Rep SpanDoc Source # 
Instance details

Defined in Development.IDE.Spans.Common

data SpanDocUris Source #

Constructors

SpanDocUris 

Fields

Instances

Instances details
Eq SpanDocUris Source # 
Instance details

Defined in Development.IDE.Spans.Common

Show SpanDocUris Source # 
Instance details

Defined in Development.IDE.Spans.Common

Generic SpanDocUris Source # 
Instance details

Defined in Development.IDE.Spans.Common

Associated Types

type Rep SpanDocUris :: Type -> Type #

NFData SpanDocUris Source # 
Instance details

Defined in Development.IDE.Spans.Common

Methods

rnf :: SpanDocUris -> () #

type Rep SpanDocUris Source # 
Instance details

Defined in Development.IDE.Spans.Common

type Rep SpanDocUris = D1 ('MetaData "SpanDocUris" "Development.IDE.Spans.Common" "ghcide-1.7.0.0-Et6Gp1ZnqTjGFkpVtgQ7GA" 'False) (C1 ('MetaCons "SpanDocUris" 'PrefixI 'True) (S1 ('MetaSel ('Just "spanDocUriDoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "spanDocUriSrc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))

spanDocToMarkdown :: SpanDoc -> [Text] Source #

Convert SpanDoc to Markdown format.

Return a list Text includes haddock, document uri and source code uri, each item can be empty and must end with '\n' if exist. This is to prevent subsequent render problem caused by the missing newline.

Example:

For return value ["xxxx","yyyy"], if we concat the list with inserting a separate line(note by "---n"), it will result "xxxx---nyyyy" and can't be rendered as a normal doc. Therefore we check every item in the value to make sure they all end with '\n', this makes "xxxxn---nyyyn" and can be rendered correctly.