10 Commits

Author SHA1 Message Date
Andrei Paskevich
eae547d95f stdlib, examples: remove redundant "import" 2018-06-15 16:45:58 +02:00
Andrei Paskevich
7b0929a761 WhyML: "use/clone T" imports by default (in absence of "as")
For the previous behaviour (no import), write "use/clone T as T".

This shortens the most used "use/clone import" to simply "use/clone".
2018-06-15 16:45:58 +02:00
Guillaume Melquiond
27af960240 Avoid some backticks in documentation.
"\`\`" could have been used too, but it is a bit unreadable.
2018-06-14 08:14:06 +02:00
Guillaume Melquiond
1d78909383 Convert some more examples. 2018-06-14 08:07:01 +02:00
Andrei Paskevich
0ffeb3d4f7 WhyML: allow return types with names: f (a:int) : (x: int, ghost y: int)
These names are only visible under "ensures" but not under "returns".
If the result is named, the special variable "result" is not used.
In a tuple, either each component should be named, or none at all.
Underscores are allowed. Parentheses around the return type are required.
Each name must be given its own type: "f () : (x y: int)" is rejected.
Identifiers without cast are treated as types, not as names.
To name the result without giving its type, use "returns".
2018-06-07 19:38:49 +02:00
Claude Marche
f1f39f0f7d ported example sumrange 2017-10-19 15:22:34 +02:00
Claude Marche
0aad5f80e3 update sessions 2017-10-14 07:10:33 +02:00
Claude Marche
54a020333a in progress: update examples/sumrange
using now a let rec function for defining sum
2017-10-11 15:53:30 +02:00
Claude Marche
8d32a4c362 fix syntax for example sumrange 2017-10-09 16:36:59 +02:00
Claude Marche
e90c19bc43 example sumrange moved away from in_progress 2017-10-06 15:52:07 +02:00