I’ve been messing about a bit with F# on my Linux machine. I started by downloading and installing F# which wasn’t too difficult. I already had Mono installed, so it was just a matter of following the directions. I played with it a bit, got fsi running and thought that was pretty cool.
My next goal was to see if I could work with F# in MonoDevelop. I started with Google and found that work had already been done to support F# in MonoDevelop. This was available as source and the actual add-in needed to be compiled in MonoDevelop. I worked on that for a bit and my first problem was references. I did some digging and found that there were a number of packages I needed to install to provide everything the software required to compile. I got that done and ran into another issue. Fortunately another user provided a patch and I was all set. (Well once I figured out how to successfully apply the patch.)
Now I’ve bumped into a new problem that brings me full circle in a way. I’m trying to compile a code snippet taken from a Microsoft F# example. It’s short so I’ll just include the whole thing here.
let sqr x = x * x
let multiply x y = x * y
print_int(multiply 3 4)
Here's the issue - print_int comes from the F# Power Pack. That's o.k. though because the power pack is included with the technology preview version of F# that I installed. I just click on "References", choose to "Edit References" and then hop over to the ".Net Assembly" tab of the window, find the dll and add it. Here's a screenshot of the result once that is done.
But that doesn't work. When I try to build the project I get errors. Specifically this error, error FS0039: The value or constructor 'print_int' is not defined A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code.
I've tried to add an 'explicit' reference in any number of ways, but so far no joy. I've tried open statements but nothing seems to work no matter how stated. I'm stuck. It's a tad bit frustrating. I have another strategy to try though. My references that are listed on the "Packages" tab of the references editor work. I need to figure out how to get this thing moved over there. I assume that means packaging the dll somehow so that my system knows how to use it.
If you look closely at the warning after the errors on my build, it is "warning FS0000: Could not determine highest installed .NET framework version from Registry keys, using version 2.0"
That cracks me up every time I see it. I wonder why it isn't finding information in the Registry? I guess because I don't have one.