Hi,

AFAIK

and I'm happy to be corrected (as a newbie to F#), what you want is perfectly possible. Create a signature of the class in a file compiled before the use and then provide the implementation later.

Something like

1
2
3
myClass.fsi
useMyClass.fs
myClass.fs

See [link:msdn.microsoft.com] for details

Regards
Joe

By on 3/20/2010 12:25 PM ()

Thanks for the thought Joe but that's not exactly what I'm talking about.

--

Onorio

By on 3/20/2010 8:00 PM ()

AFAIK and I'm happy to be corrected (as a newbie to F#), what you want is perfectly possible. Create a signature of the class in a file compiled before the use and then provide the implementation later.

No, that is not how signature files work. Signature files provide a succinct summary of a file and enable portions to be hidden (e.g. control accessibility). They don't interact with F# "ordering" rules.

In F#, to use an entity, it must already be defined above (or be co-defined as part of a recursive group, e.g. "let rec f1 ... and f2 ..." or "type T1 ... and T2 ...").

By on 3/20/2010 1:19 PM ()

No, that is not how signature files work. Signature files provide a succinct summary of a file and enable portions to be hidden (e.g. control accessibility). They don't interact with F# "ordering" rules.

My mistake. Thanks for the correction.

By on 3/20/2010 2:44 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