Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Examples of phantom types using Ocaml

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 estring
Octocat-spinner-32 rstring
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
README.md

phantom_types

Examples of phantom types using Ocaml

  • estring - My own attempt at Martin Jambon's example of phantom types at http://www.quora.com/Martin-Jambon/answers/Functional-Programming - Phantom types aren't actually that great here because you have to define all encodig types together, you can't extend it later on.

  • rstring - Phantom types are really good for making read-only versions of mutable structures. This one provides a read-only string interface

  • rarray - Read only array - left as exercise to reader

Something went wrong with that request. Please try again.