File: VIPs.md

package info (click to toggle)
ocaml 5.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,372 kB
  • sloc: ml: 370,196; ansic: 52,820; sh: 27,396; asm: 5,462; makefile: 3,679; python: 974; awk: 278; javascript: 273; perl: 59; fortran: 21; cs: 9
file content (20 lines) | stat: -rw-r--r-- 580 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# VIPs

A VIP is a common syntax error, for which a good error message should be
given.

## Structures versus signatures

Everything that is allowed in a structure but forbidden in a signature,
or vice-versa, is a VIP. For instance, writing:

```
  exception A = B
```

is allowed in a structure, but forbidden in a signature. (Here, we might
wish to make the error message depend on the lookahead token; the token
`=` suggests that the user confuses a structure and a signature.)

Similarly, writing `struct` where `sig` is expected, or vice-versa, is
probably a common mistake.