OCamlチュートリアル
このウェブサイトはOCamlを学ぼうとする人たちの為の実際的で詳細なチュートリアルを集めたものである。
よく知られている通り、OCamlはアプリケーション開発のための高速、簡潔かつ強力な言語である。ここでは読者がすでにOCamlの処理系をインストールしているものと仮定する。
はじめに
- Up and Running
- はじめの一歩 — 基本中の基本
- モジュール
- ファイル名と拡張子 - en
- プログラミングのスタイル — en
データ構造
言語機能
エラー
- エラーハンドリング - en
- よくあるエラーメッセージ
外部リンク
Learn by Doing
- Try OCaml Online (by OCamlPro) allows you to immediately start learning OCaml in your browser, without installing it. Compiled as a single Javascript page, it gives you the full power of OCaml, even when your are disconnected from the network.
- PLEAC-OCaml provides OCaml solutions to the complete set of problems originally posed in the very successful Perl Cookbook. OCaml is one of only 3 languages for which the full set of solutions has been provided.
- Rosetta is a programming chrestomathy site. It provides solutions to the same task in many languages. Currently there are few tasks with OCaml solutions provided, but perhaps you would like to add new solutions.
Tutorials on OCaml
- The OCaml System (by Inria) is the official user's manual. The first part provides an introduction to the core language, objects and classes, and modules. Previous versions are here.
- OCaml for scientific computation (by Thomas Fischbacher), covers a broad sample of OCaml, from the basics to the C API.
- OCaml for Haskellers Some notes on the differences between OCaml and Haskell.
WikiBooks on OCaml
Both in french:
- fr.wikibooks.org/wiki/OCaml Introduction on functional programming using OCaml.
- fr.wikiversity.org/wiki/Premiers_pas_en_OCaml The basics of the OCaml language.
Tutorials on Tools
There are also tutorials that can be useful to learn how to use popular tools and libraries.
- Camlp5
- A Guide to Extension Points in OCaml (by whitequark), on using PPX, the syntax extensions API that superseded camlp4.
- Detecting use cases for GADTs in OCaml, (by Mads Hartmann), on using generalized algebraic data types in writing interpreters.
- OCaml Operator Lookup, for getting an explanation on the behaviour of an operator or syntax element, along with usage examples.