Welcome to hubFS: THE place for F# Sign in | Join | Help

Release notes for F# 1.1.12.5

The F# 1.1.12.5 release has been posted. This is mostly a minor bug-fixing release, with the exception of the first point below. Here are the full release notes.

High Precedence Application. A long-standing problem with the F# syntax is that method applications followed by property/field lookups such as obj.Method1(args).Method2(args).Property1.field2 have had to be written with very non-intuitive parentheses, e.g. ((obj.Method1(args)).Method2(args)).Property1.field2.

To fix this, this release incorporates a minor change in the F# syntax (with and without the #light syntax option). In particular, applications id(args) now have higher precedence (i.e. bind more tightly) than the dot-notation. This only applies when no spaces or other whitespace separate the identifier and the arguments.

--no-tailcalls now binary-format neutral. In prior versions the --no-tailcalls option was a global setting, hence requiring the use of special libraries that had tailcalls removed. Systems such as Mono now correctly support the .tail IL annotation and so a global version of this option is no longer required. The option is still supported, but will only affect the code being generated in the assembly currently being compiled and will not result in the selection of different runtime libraries.

Some revisions to the Microsoft.FSharp.Reflection API. Some functions have been renamed or moved to an inner module. Old versions of the functions have been marked Deprecated with an error message indicating the new version to use.

Most samples rewritten using #light.

Revert change to operator overloading made in 1.1.12.2 release.

The change to operator overloading in 1.1.12.2 was incorrect, as it disallows the use of legitimate .NET overloads. The upshot is that the basic operators now have the following signatures. These indicate that the two argument types and the return type may indeed all be different, and knowledge of the return type and the second argument type are not sufficient to resolve the overloading - a type annotation may be required to give the precise type of the first argument.

val inline (+)  : ^a -> ^b -> ^c when ^a : (static member (+)    : ^a * ^b -> ^c)
val inline (-)  : ^a -> ^b -> ^c when ^a : (static member (-)    : ^a * ^b -> ^c)
val inline ( * ): ^a -> ^b -> ^c when ^a : (static member ( * )  : ^a * ^b -> ^c)
val inline (/)  : ^a -> ^b -> ^c when ^a : (static member (/)    : ^a * ^b -> ^c)
val inline (%)  : ^a -> ^b -> ^c when ^a : (static member (%)  : ^a * ^b -> ^c)
val inline (mod): ^a -> ^b -> ^c when ^a : (static member (%)  : ^a * ^b -> ^c)

We are considering a design revision which would allow more restricted specifications of permitted overloads, but are currently erring on the side of generality, even at the cost of occasional additional type annotations.

Bug fixes.

700	F# Language	undentation should be allowed when () and {} immediately follow an "="
702	F# Compiler	unbound type variable problems for inner constrained polymorphic definitions
                        fix bug with #load in F# Interactive (module paths reference incorrect version after reload)
Samples101 failed to compile
fix minor bug with #light not at start-of-file
 
 

 

Published Saturday, September 23, 2006 1:59 PM by dsyme

Comments

# Intersting Finds: September 22

Saturday, September 23, 2006 9:43 AM by Jason Haley

# Intersting Finds: September 22

Saturday, September 23, 2006 9:50 AM by Jason Haley

# re: Release notes for F# 1.1.12.5

Hello,

Here are my findings regarding new fsharp version 1.1.12.5 on mono (1.1.17.1):

1) during installation I noticed, that there was a change: the *ntc.{exe,dll} files were removed. Actually, this is not a problem, but might be related to the following ones.

2) When performing AOT compilation, mono  reported some troubles:
<---snip--->
Mono Ahead of Time compiler - compiling assembly /opt/fsharp/bin/fslib10.dll
Code: 447067 Info: 27142 Ex Info: 12747 Class Info: 16443 PLT: 1219 GOT Info: 2864 GOT Info Offsets: 3500 GOT: 4728
Executing the native assembler: as  /tmp/mono_aot_8KPBGT -o /tmp/mono_aot_8KPBGT.o
Executing the native linker: ld -shared -o /opt/fsharp/bin/fslib10.dll.so /tmp/mono_aot_8KPBGT.o
Compiled 3209 out of 3525 methods (91%)
0 methods contain absolute addresses (0%)
0 methods contain wrapper references (0%)
0 methods contain lmf pointers (0%)
316 methods have other problems (8%)
Methods without GOT slots: 1401 (39%)
Direct calls: 1282 (36%)
GOT slot distribution:
methodconst: 2
switch: 175
class: 176
image: 1
vtable: 472
sflda: 173
ldstr: 130
ldtoken: 14
type_from_handle: 20
iid: 7
adjusted_iid: 12
AOT RESULT 0
<---snip--->

This might be a problem of mono but previous fsharp version 1.1.12.3 didn't have the "methods have other problems" problem. Also, I am not persuaded this is really a problem (maybe just some sort of warning?), because I can use fsharp compiler. The output for other dlls was very similar to this one.

3) Different behavior of following code (name of the file on disk is gtksharp.fs):

<---snip--->
#light
#I @"/usr/lib/mono/gtk-sharp-2.0"
#r @"gtk-sharp.dll"
#r @"glib-sharp.dll"
open System
open Gtk

let _ =
   Application.Init()
   let window = new Window("gtk sharp application")
   window.Resize(200, 200)
   let label = new Label
   label.Text <- "testing fsharp"
   window.Add(label)
   window.ShowAll()
   window.DeleteEvent.Add( fun _ -> Application.Quit () )
   Application.Run()

<---snip--->

I compiled the above snippet of code with fscp10.exe, no complains from compiler, but when I run it, I got following:

<---snip--->
Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type.
 at <StartupCode>.Gtksharp._main () [0x00000]
<---snip--->

I adjusted code in a following way (not using anonymous function for application quit):
<---snip--->
#light
#I @"/usr/lib/mono/gtk-sharp-2.0"
#r @"gtk-sharp.dll"
#r @"glib-sharp.dll"
open System
open Gtk

let quit _ = Application.Quit ()

let _ =
   Application.Init()
   let window = new Window("gtk sharp application")
   window.Resize(200, 200)
   let label = new Label
   label.Text <- "testing fsharp"
   window.Add(label)
   window.ShowAll()
   window.DeleteEvent.Add( quit )
   //window.DeleteEvent.Add( fun _ -> Application.Quit () )
   Application.Run()
<---snip--->

And everything went ok.

Furthermore I had to adjust the code snippet this way (maybe not a bug but  valid syntax, I don't know) in order to compile with fsharp version 1.1.12.3. But it worked with anonymous function for application quit:

<---snip--->

#light
#I @"/usr/lib/mono/gtk-sharp-2.0"
#r @"gtk-sharp.dll"
#r @"glib-sharp.dll"
open System
open Gtk

//let quit _ = Application.Quit ()

let _ =
   Application.Init()
   let window = new Window("gtk sharp application")
   window.Resize(200, 200)
   //let label = new Label                  (*!!!*)
   let label = new Label ()                 (*!!!*)
   label.Text <- "testing fsharp"
   window.Add(label)
   window.ShowAll()
   //window.DeleteEvent.Add( quit )
   window.DeleteEvent.Add( fun _ -> Application.Quit () )
   Application.Run()

<---snip--->

Hope it helps,
Juraj
Sunday, September 24, 2006 5:37 AM by juhe

# re: Release notes for F# 1.1.12.5

@Juraj:

I don't think number 1 relates to any of the problems

I have no idea about number 2(might be fine at all or might be the System.Windows.Form code), so far doesn't give me any trouble

about your GTK app:
changing
window.DeleteEvent.Add( fun _ -> Application.Quit () )
to
window.DeleteEvent.AddHandler( fun _ _ -> Application.Quit () )
makes it work,
anyways my version:
#light
// references are gdk, glib & gtk version 2.8
open System
open Gtk

let quit _ = Application.Quit ()

let _ =
  Application.Init()
  let window = new Window("gtk sharp application")
  window.Resize(200, 200)
  let label = new Label() (* works without () too *)
  label.Text <- "testing fsharp"
  window.Add(label)
  window.ShowAll()
  window.DeleteEvent.AddHandler( fun _ _ -> Application.Quit () )
  Application.Run()
Sunday, September 24, 2006 12:31 PM by Mark

# re: Release notes for F# 1.1.12.5

I was able to download F# from an alternate link on microsoft research here
http://research.microsoft.com/research/downloads/default.aspx
Simply click on F# Compiler. I tried the one provided in the post, but apparently the link is broken.
Tuesday, September 26, 2006 2:25 PM by nyxtom

# F# on TIOBE (including a correction)

My good friend Ralf has pointed me at a brief mention of F# on the monthly TIOBE index , a programming
Saturday, October 21, 2006 6:56 PM by Don Syme's WebLog on F# and Other Research Projects
Anonymous comments are disabled