orec

dynamic open records
IN THIS PACKAGE
Module Orec . Type_data
type mut =
| Nil_mutable

Type brand for getter field

type imm =
| Nil_immutable
type ('core_type, 'brand) getter =
| Nil_getter

Phantom type info carrier for updater and getter

type +'kind updater =
| Nil_updater
type top =
| Nil_top

Phantom type brand for const updater ( field ^= const ), function updater field |= f (field value) and delete updater

type only =
| Nil_bottom
type 'a fn = top * 'a * 'a
type 'a const = 'a * top * 'a
type 'a del = 'a * 'a * top
type any = top * top * top

A type 'a fn|const|del can be unified to any or only fn|const|del, whereas a type only fn|const|del is fixed

type ('ty, 'fy, 'brand) storage =
| Imm : ( 'a, 'a, imm ) storage
| Mut : ( 'a, 'a ref, mut ) storage

Storage type-level function

type ('ty_arg, 'ty_res) access =
| Opt : ( 'a, 'a option ) access
| Exn : ( 'a, 'a ) access

Failure handling phantom type : either exception or option