I've just found the answer - it is because the order of files in command line.

Such fsc's call is succeeded:

J:\_Projecting\F#\demo>"E:\Program Files\FSharp-1.9.9.9\\bin\fsc.exe" -o:obj\Debug\demo.exe File2.fs Program.fs

Is it minor "bug", that will be fix in future F# releases ? :)

By on 4/4/2010 12:25 PM ()

I was looking for a reference to point you at but I can't seem to find it anywhere--my google fu is failing me. At any rate, this is not a bug; F# code is order dependent. You have to declare symbols before they're used.

See this excellent explanation from one of the architects of F# about why this is a good thing:

[link:cs.hubfs.net]

I've read his reasoning and while at first it seemed annoying personally I find hidden dependencies even more annoying and hard to resolve so I'm glad they've made this design decision.

By on 4/8/2010 5:21 AM ()

Hi Didro,
In your solution explorer are they in proper order, i.e. the referenced file Module1 is above Module2? As compiler takes solution explorer "order" into account, we have the option to move-up and move-down the order of the files by right click.

By on 4/7/2010 11:37 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper