Documenting typing rules