Detailed announcement for F#

Here are the detailed release notes for F#

Attributes. Specification clarifications for attributes. Attributes now give warnings when used inappropriately. Attributes can now be referenced with or without the Attribute suffix, e.g. [<Obsolete(“this function is obsolete”)>] or [<ObsoleteAttribute(“this function is obsolete”)>].

Compilation Speed Optimizations. Improved compilation speeds, especially when using the –standalone flag.

VS Mode. Better response as now compacts less often. Now accepts all fsc.exe flags within the argument window: those irrelevant to type-checking are still used when the command line compiler is invoked.

Minor renamings. The .NET compiled names of some exceptions have changed to follow .NET library design guidelines

  • AssertFailure –> AssertionFailureException.

  • MatchFailure –> MatchFailureException.

  • Undefined –> UndefinedException.

The names from F# code are now either the above names or, when using MLLib, the equivalents Assert_failure, Match_failure and Undefined.

Turning off default augmentations for discriminated unions. By default F# dsicriminated unions are augmented with properties and methods such as member IsRed : bool,member Red : int -> Color and Red1 : Color -> int for a constructor Red of int in a type Color. Now that augmenetations are supported directly in the F# language it is often more convenient to manually design these augmentations. The default augmentations can now be suppressed by using the [<DefaultAugmentation(false)>] attribute. For example, the Option<‘a> type in the F# library is defined as:


/// The type of optional values. When used from other .NET languages the
/// empty option is the ‘null’ value.
type Option<‘a> = None | Some of ‘a

/// Augmentation
type Option<‘a>
member x.Item = match x with Some x -> x | None -> op_Raise (new System.IndexOutOfRangeException())
static member IsNone(x : Option<‘a>) = match x with None -> true | _ -> false
static member IsSome(x : Option<‘a>) = match x with Some _ -> true | _ -> false
static member None : Option<‘a> = None
static member Some(x) : Option<‘a> = Some(x)

Initial support for Microsoft.FSharp.Experimental.Collections With the completion of the F# support for members and augmentations we are moving the functionality of the MLLib collections to be co-designed libraries for functional and obejct oriented programming. The means that a functional programming API to the collection types will be offfered in MLLib, and a mixed object-oriented/functional API within FSLib. This will greatly improve the usability of the collection types from C# and other .NET languages, without losing the essence of OCaml-compatible ML programming. The first class we have applied this treatment to is Microsoft.FSharp.Experimental.Collections.HashTable and the related HashSet, CHashTable and CHashSet.

Some Changes to Generic Recursion. Some bugs were found in the support for generic recursion added in (unverifiable binaries could be produced in some situations).  Functions and values may still be given explicit type parameters, but recursive uses of explicitly paramaterized values must still currently be at invariant instantiations, as was always the case for versions prior to

Bug fixes. Several bug fixes related to attributes, generalization, enumerators and exception abbreviations, Arg.usage. Thanks to Martin Churchill, Dominic Cooney, SooHyoung Oh, Ondrej Rysavy, Robert Pickering, Greg Lee and Adam Granicz among others for reporting these bugs. Some other bugs recently recorded as fixed in out database are as follows:

443	F# Library  MLLib.Stream incorrect behaviours
442 F# Compiler print_any raises exceptions on singleton constructor values
452 F# Compiler Visual Studio and fsc.exe both have problems with unicode, reported by DOminic Cooney
440 F# Tools lex/yacc – partial parses of stdin require extra token before succeeding and discard buffered input
441 F# Compiler uncaught exceptions are not reported in user friendly way (no details of what they carry…)
444 F# Compiler records compile to classes with duplicate members names – a problem for debugging
445 F# Compiler serialisation of nil list fails
426 F# Compiler “end of file in string or comment” error doesn’t report start-of-string-or-comment
459 F# Compiler Undefined type variable problem
458 F# Compiler typechecker doesn’t decode all attributes correctly (decode_simple_cattr_data)
371 F# Compiler Support adding managed resources to .NET DLLs and EXEs
422 F# Compiler VideoPlayer sample gives error
406 F# Library Bignums package
470 F# Compiler Constructors and method can’t be overloaded betweeen 0/1 arguments
467 F# Library any_to_string on char fails on 1.1

Compiler for use with Mono. The binary fscb10ntc is a version of the F# compiler that is reported to work to some extent in conjunction with the Mono CLI implementation. Tailcalls have reported to cause problems on Mono, hence this is a “no tailcall” (ntc) version of the compiler. The matching “ntc” versions of the libraries are also included. This is also a CLI 1.0 binary to enable it to work with all versions of Mono, though generally reducing performance.

This version of the compiler is reported to be sluggish, presumably because of JIT overheasds (this version of the compiler performs fine when pre-compiled using NGEN and run on the Microsoft .NET Framework 1.1).  This means a reasonably fast machine may be required. It may also be worth investigating the use of Mono’s pre-compilation (mono –aot) in conjunction with this binary to improve startup times (pre-compilation is pretty much essential for compilers).

Comments (2)

  1. A second candidate release of F# 1.1 is now available (version;nbsp; This is primarily a bug-fix…

  2. A second candidate release of F# 1.1 is now available (version;nbsp; This is primarily a bug-fix…