[Home] Module Microsoft.FSharp.MLLib.Pervasives


Pervasives: The default environment for F# code that uses MLLib.

Types

TypeDescription
type big_int Note: an abbreviation for bigint
type bigint Note: an abbreviation for BigInt
type bignum Note: an abbreviation for BigNum
type byref

Deprecated: The type constructor 'byref' should not be used directly in F# code, except to annotate the type of a method argument when providing an implementation for a member. Other uses of this type constructor may result in unverifiable code being generated.

The compiler-special type to represent By Ref arguments: see the F# Language Specification Note: an abbreviation for 'a byref
type channel_format Formatting specifications specialized to channel formats Note: an abbreviation for ('a,unit) kchannel_format
type exn Note: an abbreviation for Exception
type format The type associated with format strings. Typically only the compiler generates values of this type. Note: an abbreviation for ('a,'b,'c,'c) format4
type format4 Printf. See the 'Printf' module for other variations on Printf. The type associated with format strings. Typically only the compiler generates values of this type. Note: an abbreviation for ('a,'b,'c,'d) Format4
type format_options A record of options to control structural formatting
type fpclass
type in_channel An abstraction over binary and textual input channels
type kchannel_format Formatting specifications specialized to channel formats Note: an abbreviation for ('a,out_channel,unit,'d) format4
type kstring_format Formatting specifications specialized to string-producing formats Note: an abbreviation for ('a,unit,string,'d) format4
type list The type of simple immutable lists Note: an abbreviation for 'a List
type matrix The type of floating-point matrices. See Microsoft.FSharp.Math Note: an abbreviation for matrix
type num Note: an abbreviation for bignum
type open_flag
type option The type of None/Some options Note: an abbreviation for Option<'a>
type out_channel An abstraction over binary and textual output channels
type ref The type of pointers to mutable reference cells Note: an abbreviation for Ref<'a>
type string_format Formatting specifications specialized to string-producing formats Note: an abbreviation for ('a,string) kstring_format

Exceptions

ExceptionDescription
exception Assert_failure The exception thrown by 'assert' failures. A future release of F# may map this exception to a corresponding .NET exception. Note: an abbreviation for AssertionFailureException
exception Division_by_zero
exception End_of_file
exception Exit
exception Failure The exception thrown by [[failure]] and many other F# functions A future release of F# may map this exception to a corresponding .NET exception. Note: an abbreviation for FailureException
exception Invalid_argument The exception thrown by [[invalid_arg]] and misues of F# library functions A future release of F# may map this exception to a corresponding .NET exception. Note: an abbreviation for InvalidArgumentException
exception Match_failure Non-exhaustive match failures will raise Match failures A future release of F# may map this exception to a corresponding .NET exception. Note: an abbreviation for MatchFailureException
exception Not_found
exception Out_of_memory
exception Stack_overflow

Values

ValueDescription
val ( ! ) : 'a ref -> 'a
Dereference a mutable reference cell
val ( $* ) : overloaded
Associate other operator values with their corresponding
val ( $*$ ) : overloaded
val ( % ) : overloaded
val ( %* ) : overloaded
val ( %*% ) : overloaded
val ( %*= ) : overloaded
val ( &&& ) : overloaded
val ( * ) : overloaded
val ( *$ ) : overloaded
val ( *$= ) : overloaded
val ( *% ) : overloaded
val ( *%= ) : overloaded
val ( ** ) : float -> float -> float
val ( *. ) : float -> float -> float
val ( *= ) : overloaded
val ( + ) : overloaded
val ( +. ) : float -> float -> float
val ( += ) : overloaded
val ( - ) : overloaded
val ( -. ) : float -> float -> float
val ( -= ) : overloaded
val ( .% ) : overloaded
val ( .%= ) : overloaded
val ( .() ) : 'a array -> int -> 'a
1-D array lookup
val ( .()<- ) : 'a array -> int -> 'a -> unit
val ( .(,) ) : 'a [,] -> int * int -> 'a
2-D array lookup
val ( .(,)<- ) : 'a [,] -> int * int -> 'a -> unit
2-D array assignment
val ( .(,,) ) : 'a [,,] -> int * int * int -> 'a
3-D array lookup
val ( .(,,)<- ) : 'a [,,] -> int * int * int -> 'a -> unit
3-D array assignment
val ( .* ) : overloaded
val ( .*= ) : overloaded
val ( .+ ) : overloaded
val ( .+= ) : overloaded
val ( ./ ) : overloaded
val ( ./= ) : overloaded
val ( .[] ) : string -> int -> char
val ( .^ ) : overloaded
val ( .^= ) : overloaded
val ( / ) : overloaded
val ( /. ) : float -> float -> float
val ( /= ) : overloaded
val ( := ) : 'a ref -> 'a -> unit
Assign to a mutable reference cell
val ( < ) : 'a -> 'a -> bool
Structural less-than comparison
val ( << ) : ('b -> 'c) -> ('a -> 'b) -> ('a -> 'c)
val ( <<< ) : overloaded
val ( <= ) : 'a -> 'a -> bool
Structural less-than-or-equal comparison
val ( <> ) : 'a -> 'a -> bool
Structural inequality
val ( <| ) : ('a -> 'b) -> 'a -> 'b
val ( = ) : 'a -> 'a -> bool
Structural equality
val ( > ) : 'a -> 'a -> bool
Structural greater-than
val ( >= ) : 'a -> 'a -> bool
Structural greater-than-or-equal
val ( >> ) : ('a -> 'b) -> ('b -> 'c) -> ('a -> 'c)
val ( >>> ) : overloaded
val ( @ ) : 'a list -> 'a list -> 'a list
val ( ^ ) : string -> string -> string
val ( ^^^ ) : overloaded
val ( |> ) : 'a -> ('a -> 'b) -> 'b
val ( ||| ) : overloaded
val ( ~+ ) : overloaded
val ( ~+. ) : float -> float
val ( ~- ) : overloaded
val ( ~-. ) : float -> float
val ( ~~~ ) : overloaded
val abs : int -> int
Absolute value of the given integer
val abs_float : float -> float
val acos : float -> float
val any_to_layout : format_options -> '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 asin : float -> float
val asr : overloaded
val atan : float -> float
val atan2 : float -> float -> float
val binary_reader_to_in_channel : #BinaryReader -> in_channel
Link .NET IO with the out_channel/in_channel model
val binary_writer_to_out_channel : #BinaryWriter -> out_channel
Link .NET IO with the out_channel/in_channel model
val bool_of_string : string -> bool
val box : 'a -> obj
Universal representations Convert any value to a runtime-type tagged object
val ceil : float -> float
val char_of_int : int -> char
val classify_float : float -> fpclass
val close_in : in_channel -> unit
Close the channel
val close_out : out_channel -> unit
Close the given output channel
val compare : 'a -> 'a -> int
Structural comparison
val cos : float -> float
val cosh : float -> float
val decr : int ref -> unit
Decrement a mutable reference cell containing an integer
val exit : int -> 'a when default 'a  = obj
Exiting Exit the current hardware isolated process, if security settings permit, otherwise raise an exception. Calls System.Environment.Exit.
val exp : float -> float
val failwith : string -> 'a
Throw a 'Failure' exception
val float : int -> float
val float32 : int -> float32
val float32_of_int : int -> float32
val float32_of_string : string -> float32
val float_of_int : int -> float
val float_of_string : string -> float
val floor : float -> float
val flush : out_channel -> unit
Flush all pending output on the channel to the physical output device.
val fprintf : out_channel -> 'a channel_format -> 'a
Print to a file using the given format
val fst : ('a * 'b) -> 'a
val hash : 'a -> int
The "hash" function is a structural hash function. It is guaranteed to return equal hash values for items that are guaranteed to be equal according to the polymorphic equality function Pervasives.(=) (i.e. the standard "=" operator).
val hashq : 'a -> int
The "hashq" function is guaranteed to return equal hash values for reference types that are guaranteed to be equal according to the physical equality. It should not be used for non-reference types (i.e. types that are .NET value types). It may be used on records containing mutable fields. A future version of F# may constrain the type of hashq to ensure this. The definition of reference types is given in the .NET manual.
val ignore : 'a -> unit
val in_channel_length : in_channel -> int
Return the length of the input channel
val in_channel_to_binary_reader : in_channel -> BinaryReader
Use to access the underlying stream-based objects for the channel
val in_channel_to_stream : in_channel -> Stream
Use to access the underlying stream-based objects, e.g. for advanced settings related to encodings. These operations may fail if the operation is not supported for the given stream Beware that accessing the underlying stream may circumvent the buffering and encodings being applied to a channel.
val in_channel_to_stream_reader : in_channel -> StreamReader
Use to access the underlying stream-based objects for the channel
val in_channel_to_text_reader : in_channel -> TextReader
Use to access the underlying stream-based objects for the channel
val incr : int ref -> unit
Increment a mutable reference cell containing an integer
val infinity : float
val input : in_channel -> byte [] -> int -> int -> int
Attempt to input bytes from the channel. Does not block if the bytes are not available. For text channels this only accepts characters with a UTF16 encoding that fits in a byte, e.g. ASCII. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
val input_binary_int : in_channel -> int
Input a binary integer from a binary channel. Compatible with output_binary_int.
val input_byte : in_channel -> int
Input a single byte. For text channels this only accepts characters with a UTF16 encoding that fits in a byte, e.g. ASCII. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
val input_char : in_channel -> char
Input a single character. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
val input_line : in_channel -> string
Input a single line. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
val input_value : in_channel -> 'a
Input a single serialized value from a binary stream. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
val int_neg : int -> int
Negation on integers of the 'int' type
val int_of_char : char -> int
val int_of_float : float -> int
val int_of_float32 : float32 -> int
val int_of_string : string -> int
val invalid_arg : string -> 'a
Throw an Invalid_argument exception
val land : overloaded
val layout_to_string : format_options -> Layout -> string
val ldexp : float -> int -> float
val lnot : overloaded
val log : float -> float
val log10 : float -> float
val lor : overloaded
val lsl : overloaded
val lsr : overloaded
val lxor : overloaded
val max : 'a -> 'a -> 'a
Maximum based on structural comparison
val max_float : float
val max_int : int
The higher representable value in the 'int' type
val min : 'a -> 'a -> 'a
Minimum based on structural comparison
val min_float : float
val min_int : int
The lowest representable value in the 'int' type
val mod : overloaded
val mod_float : float -> float -> float
val modf : float -> float * float
val nan : float
val neg_infinity : float
val not : bool -> bool
val open_in : string -> in_channel
Open the given file to read in text-mode using the System.Text.Encoding.Default encoding
val open_in_bin : string -> in_channel
Open the given file to read in binary-mode
val open_in_encoded : #Encoding -> string -> in_channel
Open the given file to read in text-mode using the given encoding
val open_in_gen : flags:open_flag list -> int -> string -> in_channel
Open the given file in the mode specified by the given flags
val open_in_utf8 : string -> in_channel
Open the given file to read in text-mode using the UTF8 encoding
val open_out : string -> out_channel
Open the given file to write in text-mode using the System.Text.Encoding.Default encoding
val open_out_bin : string -> out_channel
Open the given file to write in binary-mode
val open_out_encoded : #Encoding -> string -> out_channel
Open the given file to write in text-mode using the given encoding
val open_out_gen : open_flag list -> int -> string -> out_channel
Open the given file to write in the mode according to the specified flags
val open_out_utf8 : string -> out_channel
Open the given file to write in text-mode using the UTF8 encoding
val out_channel_length : out_channel -> int
Return the length of the output channel. Raise an exception if not an app
val out_channel_to_binary_writer : out_channel -> BinaryWriter
Use to access the underlying stream-based objects for the channel
val out_channel_to_stream : out_channel -> Stream
Use to access the underlying stream-based objects for the channel
val out_channel_to_stream_writer : out_channel -> StreamWriter
Use to access the underlying stream-based objects for the channel
val out_channel_to_text_writer : out_channel -> TextWriter
Use to access the underlying stream-based objects for the channel
val output : out_channel -> byte [] -> start:int -> length:int -> unit
Write the given range of bytes to the output channel
val output_any : out_channel -> 'a -> unit
Ouput any value to a channel using the same set of formatting rules as any_to_string
val output_binary_int : out_channel -> int -> unit
Write the given integer to the output channel in binary format. Only valid on binary channels.
val output_byte : out_channel -> int -> unit
Write the given byte to the output channel.
val output_bytearray : out_channel -> byte [] -> unit
Write all the given bytes to the output channel.
val output_char : out_channel -> char -> unit
Write the given Unicode character to the output channel.
val output_layout : format_options -> out_channel -> Layout -> unit
val output_string : out_channel -> string -> unit
Write the given Unicode string to the output channel.
val output_value : out_channel -> 'a -> unit
Serialize the given value to the output channel.
val pos_in : in_channel -> int
Report the current position in the input channel
val pos_out : out_channel -> int
Return the current position in the output channel, measured from the start of the channel. Not valid on all channels.
val pred : int -> int
n-1 (no overflow checking)
val prerr_any : 'a -> unit
Print any value to stderr using any_to_string.
val prerr_char : char -> unit
Print a character to the stderr stream
val prerr_endline : string -> unit
val prerr_float : float -> unit
val prerr_int : int -> unit
val prerr_newline : unit -> unit
val prerr_string : string -> unit
val print : 'a -> unit
Print any value to stdin using any_to_string. Same as print_any.
val print_any : 'a -> unit
Print any value to stdin using any_to_string.
val print_char : char -> unit
val print_endline : string -> unit
val print_float : float -> unit
val print_int : int -> unit
val print_newline : unit -> unit
val print_string : string -> unit
val printf : 'a channel_format -> 'a
Print to stdout using the given format
val raise : #exn -> 'a
Throw an exception
val read_float : unit -> float
Read a floating point number from the console.
val read_int : unit -> int
Read an integer from the console.
val read_line : unit -> string
Read a line from the console, without the end-of-line character.
val really_input : in_channel -> byte [] -> int -> int -> unit
Reads bytes from the channel. Blocks if the bytes are not available. For text channels this only accepts characters with a UTF16 encoding that fits in a byte, e.g. ASCII. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
val ref : 'a -> 'a ref
Create a mutable reference cell
val rethrow : unit -> 'a
'rethrow' is a special function that may only be used in catch blocks Using it in a first class way or outside a catch block will result in a binary that cannot be verified. This condition is not checked in this version of F# but may be checked in a later version.
val seek_in : in_channel -> int -> unit
Reads bytes from the channel. Blocks if the bytes are not available. For text channels this only accepts UTF-16 bytes with an encoding less than 256. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
val seek_out : out_channel -> int -> unit
Set the current position in the output channel, measured from the start of the channel.
val set_binary_mode_in : in_channel -> bool -> unit
Set the binary mode to true or false. If the binary mode is changed from "true" to "false" then a StreamReader is created to read the binary stream. The StreamReader uses the default text encoding System.Text.Encoding.Default
val set_binary_mode_out : out_channel -> bool -> unit
Set the binary mode. If the binary mode is changed from "true" to "false" then a StreamWriter is created to write the binary stream. The StreamWriter uses the default text encoding System.Text.Encoding.Default.
val sin : float -> float
val sinh : float -> float
val snd : ('a * 'b) -> 'b
val sprintf : 'a string_format -> 'a
Print to a string using the given format
val sqrt : float -> float
val squash_layout : format_options -> Layout -> Layout
val stderr : out_channel
A channel based on System.Console.Error.
val stdin : in_channel
A channel based on System.Console.In.
val stdout : out_channel
A channel based on System.Console.Out.
val stream_reader_to_in_channel : #StreamReader -> in_channel
Link .NET IO with the out_channel/in_channel model
val stream_to_in_channel : #Encoding -> #Stream -> in_channel
Wrap a stream by creating a StreamReader for the stream and then wrapping is as an input channel. A text encoding must be given, e.g. System.Text.Encoding.UTF8
val stream_to_out_channel : #Encoding -> #Stream -> out_channel
Wrap a stream by creating a StreamWriter for the stream and then wrapping is as an output channel. A text encoding must be given, e.g. System.Text.Encoding.UTF8
val stream_writer_to_out_channel : #StreamWriter -> out_channel
Link .NET IO with the out_channel/in_channel model
val string_of_bool : bool -> string
val string_of_float : float -> string
val string_of_float32 : float32 -> string
val string_of_int : int -> string
val succ : int -> int
n+1 (no overflow checking)
val tan : float -> float
val tanh : float -> float
val text_reader_to_in_channel : #TextReader -> in_channel
Link .NET IO with the out_channel/in_channel model
val text_writer_to_out_channel : #TextWriter -> out_channel
Link .NET IO with the out_channel/in_channel model
val truncate : float -> int
val unbox : obj -> 'a
Attempt to convert a runtime-type tagged object back to a value.

Deprecated Values

ValueDescription
val ( != ) : 'a -> 'a -> bool

Deprecated: The use of the OCaml-compatible physical equality operator '!=' is not recommended except in cross-compiled code. You probably want to use structual inequality '<>', or else use 'not (Obj.eq x y)' instead

val ( == ) : 'a -> 'a -> bool

Deprecated: The use of the OCaml-compatible physical equality operator '==' is not recommended except in cross-compiled code. You probably want to use structural equality '=', or else use '(Obj.eq x y)' instead

Equality based on object identity and/or calls to System.Equals. Returns 'true' for two F# objects where mutation of data in mutable fields of one affects mutation of data in the other. Otherwise unspecified, except: - will return 'true' if (=) returns true - hashq will return equal hashes if (==) returns 'true'
val byte_to_int : byte -> int

Deprecated: This function is obsolete, use Byte.to_int or System.Convert.ToInt32 instead

val float32_to_string : float32 -> string

Deprecated: This function is obsolete, use Float32.to_string or System.Single.ToString instead

val float_to_string : float -> string

Deprecated: This function is obsolete, use Float.to_string or System.Double.ToString instead

val int64_to_int : int64 -> int

Deprecated: This function is obsolete, use Int64.to_int or System.Convert.ToInt64 instead

val int_to_byte : int -> byte

Deprecated: This function is obsolete, use Byte.of_int or System.Convert.ToByte instead

val int_to_char : int -> char

Deprecated: This function is obsolete, use Char.chr or System.Convert.ToChar instead

val int_to_int64 : int -> int64

Deprecated: This function is obsolete, use Int32.to_int64 or System.Convert.ToInt64 instead

val int_to_string : int -> string

Deprecated: This function is obsolete, use Int32.to_string or System.Int32.ToString instead

val string_to_float : string -> float

Deprecated: This function is obsolete, use Float.of_string or System.Double.Parse instead

val string_to_float32 : string -> float32

Deprecated: This function is obsolete, use Float32.of_string or System.Single.Parse instead

val unsafe_really_input : in_channel -> byte [] -> int -> int -> unit

Deprecated: For F# code unsafe_really_input is identical to really_input.

See Also

Microsoft.FSharp.MLLib


Documentation for assembly mllib, version 1.1.10.1, generated using F# version 1.1.10.1