F#をUbuntu上のMonoにインストールしてみた

fsharp.zipの入手


F# Downloads - Microsoft Research

"For Mono, …"とあるのでクリックすると以下のページに飛ぶので

Download: F# October 2009 CTP - Microsoft Download Center - Download Details

"fsharp.zip"をダウンロード。
ここでは、fsharp.zipを解凍して既にFSharp-1.9.7.8上にいるものとします。

Makefileの入手

checkinstall用のMakefileを書きました。
Makefile for checkinstall FSharp — Gist
これをFSharp-1.9.7.8の直下に置いてください。

コマンドを叩く

% sudo aptitude install cli-common-dev checkinstall
% make
% sudo checkinstall

できたパッケージをインストール

% sudo dpkg -i fsharp_1.9.7.8-1_i386.deb

プログラムを書いて実行してみる

(プログラムを書く)
% cat hello.fs
printfn "Hello, world!"

% fsc hello.fs
Microsoft F# Compiler, (c) Microsoft Corporation, All Rights Reserved
F# Version 1.9.7.8, compiling for .NET Framework Version v2.0.50727

warning FS0000: Could not determine highest installed .NET framework version from Registry keys, using version 2.0
% mono hello.exe
Hello, world!