To add to Mark the answer , it is also worth noting that many modules in F # are represented by different names in IL (and, therefore, non-F # languages), than they appear together with F # itself.
For example, this piece of code:
open System open System.Reflection open Microsoft.FSharp.Reflection let private core = AppDomain.CurrentDomain.GetAssemblies() |> Seq.find (fun a -> a.GetName().Name = "FSharp.Core") let private seqMod = core.GetTypes() |> Seq.filter FSharpType.IsModule |> Seq.find (fun t -> t.FullName = "Microsoft.FSharp.Collections.SeqModule")
Find the Seq module in FSharp.Core.
The FSharp.Reflection namespace has a bunch of helper methods that allow you to work with certain types of F # with System.Reflection a little less painful, so it's worth downloading a couple of assemblies in FSI and playing with them if you "I will do a lot of thinking with F # code .
You can create modules with "inappropriate" names, like this, using the CompiledName attribute - this is especially useful when you want a type and module with the same name. The usual convention (as shown with the Seq type / module) is to annotate the module with a compiled name.
[<CompiledName("MyTypeModule")>] module MyType = let getString m = match m with | MyType s -> s
source share