Logo fantomas

Fantomas.FCS.Text Namespace

Type/Module Description

Display

FileIndex (Module)

FileIndex (Type)

An index into a global tables of filenames

FormatOptions

A record of options to control structural formatting. For F# Interactive properties matching those of this value can be accessed via the 'fsi' value. Floating Point format given in the same format accepted by System.Double.ToString, e.g. f6 or g15. If ShowProperties is set the printing process will evaluate properties of the values being displayed. This may cause additional computation. The ShowIEnumerable is set the printing process will force the evaluation of IEnumerable objects to a small, finite depth, as determined by the printing parameters. This may lead to additional computation being performed during printing.

IEnvironment

ISourceText

Represents an input to the F# compiler

ISourceTextNew

Just like ISourceText, but with a checksum. Added as a separate type to avoid breaking changes.

Joint

Data representing joints in structured layouts of terms. The representation of this data type is only for the consumption of formatting engines.

Layout (Module)

A layout is a sequence of strings which have been joined together. The strings are classified as words, separators and left and right parenthesis. This classification determines where spaces are inserted. A joint is either unbreakable, breakable or broken. If a joint is broken the RHS layout occurs on the next line with optional indentation. A layout can be squashed to for given width which forces breaks as required.

Layout (Type)

Data representing structured layouts of terms.

Line

Functions related to converting between lines indexed at 0 and 1

Line0

Represents a line number when using zero-based line counting (used by Visual Studio)

LineDirectives

NotedSourceConstruct

pos

Represents a position in a file

Position (Module)

Position (Type)

Represents a position in a file

Position01

Represents a position using zero-based line counting (used by Visual Studio)

Range (Module)

Range (Type)

Represents a range within a file

range

Represents a range within a file

Range01

Represents a range using zero-based line counting (used by Visual Studio)

RichMessage

 Splices classified arguments into the holes of a message that comes from a resource file.

 A resource accessor returns a message that is already formatted, so the holes can no longer be told
 apart afterwards. Instead the message is formatted with a sentinel in place of each classified
 argument, and the sentinels are then replaced with the parts they stand for. This way the resource
 key stays a compile-checked member reference, and translations are free to reorder, repeat or drop
 holes.

 This is what the generated FSComp accessors taking classified arguments are built on. Call those
 directly where they exist; these take a function instead, for the messages that have no such
 overload - the ones from FSStrings:

     RichMessage.text (fun rich -> RecursionE().Format name (rich ty1) (rich ty2) (rich tpcs))

RichText (Module)

RichText (Type)

Represents text made of tagged parts, e.g. a diagnostic message in which types, identifiers and punctuation are classified, so that tooling is able to render them with colors. Text that carries no classification is represented as a single part tagged TextTag.Text, so that a plain string is always representable and Text is always equal to the original string. Two rich texts are equal when they read the same. Classification does not take part in equality, since the places that compare texts - such as deciding whether two types can be told apart in a message - are asking about what reaches the reader.

RichTextBuilder

Accumulates rich text. Adjacent parts with the same classification are merged, so that where one append ended is not visible in the result. AppendString has the same name and signature as the StringBuilder extension in lib.fs, so that message formatting code can be moved over to rich text without being rewritten, and can then be converted to emit classified parts one message at a time.

SourceText

Functions related to ISourceText objects

SourceTextNew

TaggedText (Module)

TaggedText (Type)

Represents text with a tag

TaggedTextWriter

TextTag

Represents the tag of some tagged text

Type something to start searching.