I can't seem to find a compiler/plugin for mono. Does one exist?
You can download the F# zip file from Microsoft and then run (for example) "mono fsi.exe".
- Go here and download the fsharp.zip
- Unzip it and open the created folder (currently "FSharp-1.9.9.9")
- Open the terminal and run ./install-mono.sh as root (On some systems, it is necessary to convert the newline characters in that script from CRLF to LF)
This will give you the basic functionality which means you will be able to run "mono fsi.exe" and compiled F# apps as "mono myApp.exe".
Usefull tips:
It makes sense to create scripts for the compiler and F# interactive.
/usr/local/bin/fsc
#!/bin/sh exec /usr/bin/mono /usr/local/src/FSharp-1.9.9.9/bin/fsc.exe $@
/usr/local/bin/fsi
#!/bin/sh exec /usr/bin/mono /usr/local/src/FSharp-1.9.9.9/bin/fsi.exe $@
F# interactive (fsi.exe) is trying to reference System.Windows.Forms by default so in order to run it WinForms support in Mono will be required
fsi.exe works better in Xterm than in Gnome Terminal.
What Piotr Zurek said is basically what i did to get F# and mono to work on Ubuntu 9.04, with the following comments:
- Rember to install WinForm support with Mono. Otherwise you can't start fsi.exe.
- ./install-mono.sh should be run with root privileges (sudo ./install-mono.sh).
- Gnome Terminal dosn't play well with fsi.exe. Start a normal xterm and run fsi.exe whithin that.
Just beware, tail calls does not seem to work on Mono, so your application will probably run out of stack space rather quickly.