ocsigen/eliom — pull request #56 by benozol (2014-03-15 22:31:09+00:00)
Title: Allow only injection and escaping of values with concrete types (no variables)

This patch lets `js_of_eliom` fail on escaped or injected values (`%e` in client value or client section, respectively) with a variable in its type.

In the current work flow to type Eliom programs information flows only from server code to client code via `type_mli`. So we cannot check if a server side polymorphic variable should be concrete because of its usage as an escaped value. Nor can we enforce the polymorphicity of the escaped value in the client side. See @jpdeplaix's example in .

Injection of a value with variable in the type doesn't seem like a good idea either, the following compiles currently, because only the `.eliom` file is taken into account for typing:
```
$ cat test.eliom
{server{ let x = ref None }}
{client{ let _ = (%(!x) : float option) }}
```
```
$ cat test.eliomi
{server{ val x : int option ref }}
```

BTW, is there a name for the types which don't contain any variables? (In order to emit a *positive* error message.)