Here are the detailed release notes for F# 1.1.5.2.  (Note - new documentation for the F# library will soon be hosted on research.microsoft.com)

Description

Intellisense Interactive XMLDoc Help.   XMLDoc help for C# and VB libraries such as mscorlib.dll, System.dll and DirectX libraries is now shown interactively in Intellisense dropdown menus and balloon help, just as for F# documentation.

VS 2005 RTM support.  Actually this was the case for version 1.1.3.2, but there were some dangling references in the documentation to VS 2005 Beta 2 as a requirement.

Major correctness and performance improvements to F# Interactive (fsi.exe).   F# Interactive now correctly keeps track of the typing environment through the use of “open”  and “module” declarations.  It is also much, much faster than in previous releases, and much more thoroughly tested.

64-bit support.  F# compiler, F# Interactive and F# for Visual Studio now run correctly on x64 and ia64 machines.   A minor problem with the Abstract IL reader has been fixed, and means that F# can be used productively on 64bit machines.  The only remaining glitch is that fsi.exe should be NGEN’d independently on 64bit machines to get good startup performance (installation does not correctly perform this action).

Matrix Library. Microsoft.FSharp.Math.Matrix<_> has been added as a generic matrix type, with extensive MATLAB-like operations at Microsoft.FSharp.Math.MatrixOps<_> and Microsoft.FSharp.Math.MatrixOps.Generic;. The former are for floating point matrices Matrix<float> = matrix, and the latter are generic over all matrix types. The interface to this library is likely to be stable. Vector and RowVector types are also defined - their status sill undergo revision after a few releases.

Very Preliminary Linear Algebra. Microsoft.FSharp.Math.LinearAlgebra<_> contains a handful of very basic linear algebra functions.

Named arguments for attributes. Attribute specifications can now take named arguments, e.g.

[<DllImport("KERNEL32.DLL",

EntryPoint="MoveFileW",

SetLastError=true,

CharSet=CharSet.Unicode,

ExactSpelling=true,

CallingConvention=CallingConvention.StdCall)>]

let MoveFile ((src : string), (dst: string)) : bool = failwith "extern"

 

Abstract properties and properties in interfaces. Interfaces and classes may now define abstract properties and specify overrides and defaults for these. This is functionality that was not completed in the first release of the object model. e.g. in an interface definition:

type IEnvironment =

interface

/// A property indicating the maximum number of columns

abstract MaxColumns : int

/// A property indicating the maximum number of rows

abstract MaxRows : int

end

 

And in an implementation by a class:

type MyEnvironment =

class

interface IEnvironment with

member x.MaxColumns = 3

member x.MaxRows = 4

end

end

 

And in an implementation by an object expression:

{ new IEnvironment

with get_MaxColumns() = 3

and get_MaxRows() = 4 }

 

Compositional, Customizable Structured Printing. A preliminary but powerful approach to user-definable structured display of terms has been implemented in this release. The solution is different to the OCaml-style "Format" library and is instead based on the generation of intermediary "layout" objects. So far, a layout describes how words will fit next to each other and where the breaks (and indentations) will/can be.

A layout engine typically constructs most layouts using a generic algorithm based on the term structure of F# data accessed via Microsoft.FSharp.Experimental.Reflection. Types that wish to customize their structured format specification can implement the StructuredFormat.IFormattable interface, which must provide a function that generates a StructuredFormat.Layout value. An environment is passed to the object that provides a function to use to generate layout for recursive calls. Leaf objects such as numbers and strings can be left unformatted, which gives a formatting engine control over how these appear (e.g. culture specific formatting of numbers). A default formatting engine is provided in Microsoft.FSharp.MLLib.Pervasives.LayoutOps for formatting layouts to strings, channels and text buffers. This engine can be customized to some extent (e.g. by print width, depth, culture and floating-point number formatting) and is used by thw following functions:

  • Microsoft.FSharp.MLLib.Pervasives.print_any : 'a -> unit
  • Microsoft.FSharp.MLLib.Pervasives.prerr_any : 'a -> unit
  • Microsoft.FSharp.MLLib.Pervasives.output_any : out_channel -> 'a -> unit
  • Microsoft.FSharp.MLLib.Pervasives.any_to_string : 'a -> string

as well as the F# Interactive pretty printer. The end result is that objects are converted to textual formats consistently and in a customizable way. Here is and example of the output generated, here for a matrix holding further matrices:

> open Math;;
> open MatrixOps.Generic;;
> let m = matrix [[1.0;2.0;3.0]];;
val m : Matrix<float>
> m;;
val it = matrix [[1.000000; 2.000000; 3.000000]]
> let m = matrix [[m];[m];[m]];;
val m : Matrix<Matrix<float> >
> m;;
val it = matrix
          [[matrix [[1.000000; 2.000000; 3.000000]]];
           [matrix [[1.000000; 2.000000; 3.000000]]];
           [matrix [[1.000000; 2.000000; 3.000000]]]]

Here is an example of customization of the structured layout to format complex numbers, without actually specifying the formats of the constituent components:

open StructuredFormat.LayoutOps

type Complex = { real: float; imaginary: float }

with

member x.r = x.real

member x.i = x.imaginary

interface StructuredFormat.IFormattable with

member x.GetLayout(env) =

objL (box x.r) ++ rightL "r" ++ sepL "+" ++ (objL (box x.i) $$ rightL "i")

end

end

 

Rename 'MLLib.Vector' to 'MLLib.ReadonlyArray'. 'Vector' and 'vector' are now used for Microsoft.FSharp.Math.Vector, mutable column vectors whose element type typically support certain element operations.

Bug Fixes.

470     F# Compiler    Constructors and method can't be overloaded betweeen 0/1 arguments
473     F# Compiler    Operator overloading bug
474     F# Visual Studio Pattern hints for lists showing operator names, also no testing for these
475     F# Visual Studio Pressing BAR causes poor menus to pop up in Visual Studio too often
478     F# Compiler    #use only processes one interaction per file
479     F# Compiler    fsi - ctrl-C during command line arg processing unhandled.
481     F# Compiler    fsi - syntax error recovery...
482     F# Language    any_to_string doesn't print arrays
483     F# Compiler    internal type variable error (reported by Karthik)
484     F# Compiler    overloaded indexer properties not correctly resolved (from F# Mailing list)
485     F# Compiler    uppercase non-constructor names used in patterns do not give a warning
486     F# Doc         Fix documentation bug (reported by Greg Chapman - thanks Greg!)
491     F# Library     Equality not implemented on matrices
492     F# Compiler    imperative type vars and type var bindings not being shown in error messages (reported by Karthik)
391     F# Compiler    F# not automatically usable on x64 boxes
372     F# Compiler    F# gives syntax error for OCaml top level expressions 
349     F# Compiler    Inferred constraints of the form "x :> obj" should be ignored (e.g not required in signatures)
250     F# Visual Studio Load on-the-fly XML documentation into Visual Studio
309     F# Compiler    import C# constrained polymorphism as F# constrained polymorphism
315     F# Visual Studio output does not go to console window by default
490     F# Library     Consistent approach to structured print layout needed

 

Known Issues

  • F# Interactive starts up slowly on 64-bit machines.  fsi.exe not NGEN'd (precompiled) on x64 and ia64 machines.  To workaround this run the ngen.exe tool from the 64-bit .NET Framework directory manually, using "ngen install bin\fsi.exe"
  • All versions: The warning "This recursive reference will be checked ..." appears when building some samples.  These are just letting you know that the code is using mutually-referential objects (value recursion). Use --no-warn 40 to ignore these. The program will run fine
  • VS 2003: When running FsVsPackageInstall.msi, it begins installation procedure but raise next error "Module C:\fsharp\bin\FsLangService.dll failed to register. HRESULT -2147024894. Contact your support personnel. [Exit Installation] [Try Again] [Continue]." Check that you set the FSHARP_TARGET_VS_VER environment variable to 7.1, as described in the installation notes