A very simple implementation of this approach.
An entry has multiple data declarations followed by one expression. Each entry is separated by an empty line;
Run generate "file"
to get generated constraints.
Run solve "file"
to get the type inferred.
This implementation is far from done.