[Home] Module Microsoft.FSharp.Core.Pervasives


Pervasives: Additional bindings available at the top level

Values

ValueDescription
val ( @ ) : 'a list -> 'a list -> 'a list
Concatenate two lists.
val ( ^ ) : string -> string -> string
Concatenate two strings. The overlaoded operator '+' may also be used.
val any_to_layout : FormatOptions -> 'a -> Layout
Convert any value to a layout using the given formatting options. The layout can then be processed using formatting display engines such as those in the LayoutOps module. any_to_string and output_any are built using any_to_layout with default format options.
val any_to_string : 'a -> string
Convert any value to a string using a standard formatter Data is typically formatted in a structured format, e.g. lists are formatted using the "[1;2]" notation. The details of the format are not specified and may change from version to version and according to the flags given to the F# compiler. The format is intended to be human-readable, not machine readable. If alternative generic formats are required you should develop your own formatter, using the code in the implementation of this file as a starting point. Data from other .NET languages is formatted using a virtual call to Object.ToString() on the boxed version of the input.
val async : AsyncBuilder
val complex : float -> float -> complex
Constructs a complex number from both the real and imaginary part.
val decr : int ref -> unit
Decrement a mutable reference cell containing an integer
val dict : #seq<'a * 'b> -> IDictionary<'a,'b>
val eprintf : #TextWriterFormat<'a> -> 'a
Print to stderr using the given format
val eprintfn : #TextWriterFormat<'a> -> 'a
Print to stderr using the given format, and add a newline
val exit : int -> 'a
Exit the current hardware isolated process, if security settings permit, otherwise raise an exception. Calls System.Environment.Exit.
val failwithf : #StringFormat<'a,'d> -> 'a
Print to a string buffer and raise an exception with the given result. Helper printers must return strings.
val fprintf : TextWriter -> #TextWriterFormat<'a> -> 'a
Print to a file using the given format
val fprintfn : TextWriter -> #TextWriterFormat<'a> -> 'a
Print to a file using the given format, and add a newline
val incr : int ref -> unit
Increment a mutable reference cell containing an integer
val layout_as_string : FormatOptions -> 'a -> string
val matrix : #seq<'b> -> matrix when 'b :> seq<float>
Builds a matrix from a sequence of sequence of floats.
val output_any : #TextWriter -> 'a -> unit
Ouput any value to a channel using the same set of formatting rules as any_to_string
val prerr_any : 'a -> unit
Print any value to stderr using any_to_string.
val print_any : 'a -> unit
Print any value to stdin using any_to_string.
val printf : #TextWriterFormat<'a> -> 'a
Print to stdout using the given format
val printfn : #TextWriterFormat<'a> -> 'a
Print to stdout using the given format, and add a newline
val rowvec : #seq<float> -> rowvec
Builds a (row) vector from a sequence of floats.
val seq : #seq<'a> -> seq<'a>
val set : #seq<'a> -> Set<'a>
Builds a set from a sequence of objects.
val sprintf : #StringFormat<'a> -> 'a
Print to a string using the given format
[<OCamlCompatibilityAttribute
  ("This function currently converts floats to 32-bit integers by truncation. A future version of F# is likely to change 'truncate' to be an overloaded operator that works on floats, decimals and other types, and returns the same type as the input. Consider using 'float' or 'Float.to_int' instead in preparation for this change")>]
val truncate : float -> int
Truncates the digits of a floating point number and returns the whole number as an integer
val vector : #seq<float> -> vector
Builds a (column) vector from a sequence of floats.

Deprecated/Unsafe Type Definitions

TypeDescription
type FormatOptions

Note: This type alias is obsolete. Use Text.StructuredFormat.FormatOptions instead

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 evalution of IEnumerable objects to a small, finite depth, as determined by the printing parameters. This may lead to additional computation being performed during printing. From F# Interactive the default settings can be adjusted using, for example,
   open Microsoft.FSharp.Compiler.Interactive.Settings;;
   setPrintWidth 120;;
 
Note: an abbreviation for FormatOptions

Deprecated Values

ValueDescription
[<Obsolete
  ("This function is scheduled for deletion and should no longer be used")>]
val layout_to_string : FormatOptions -> Layout -> string

Note: This function is scheduled for deletion and should no longer be used

[<Obsolete
  ("This function is scheduled for deletion and should no longer be used")>]
val output_layout : FormatOptions -> #TextWriter -> Layout -> unit

Note: This function is scheduled for deletion and should no longer be used

[<Obsolete
  ("This function is scheduled for deletion and should no longer be used")>]
val squash_layout : FormatOptions -> Layout -> Layout

Note: This function is scheduled for deletion and should no longer be used

See Also

Microsoft.FSharp.Core


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19