Gabriel Scherer
201091a080
Merge pull request #570 from lijunsong/tuple2record
...
MPR#7237 change 12-tuples in typeclass into record.
2016-05-11 13:39:20 -04:00
lijunsong
89c1fd7f83
use local open
2016-05-10 22:00:21 -07:00
Jacques Garrigue
fc4ddcb599
Merge branch 'trunk' of github.com:ocaml/ocaml into trunk
2016-05-11 08:39:19 +09:00
Jacques Garrigue
5331b57010
keep local constraints in Env.summary
2016-05-11 08:38:34 +09:00
Sébastien Hinderer
50147913ac
Call the '#' sign hash rather than sharp.
2016-05-09 16:34:40 +02:00
Jacques Garrigue
d2c6be000a
add locally created types to Env.local_constraints
2016-05-09 09:38:07 -04:00
Jacques Garrigue
deb1535f42
separate local constraints from types in Env.t, and use it for local open in patterns
2016-05-09 09:38:07 -04:00
octachron
96806cf633
GPR#187: local open for patterns
...
This commits extends the pattern syntax to support local open in
patterns. Four new constructions mirroring the expression constructions
are added
* `M.(pattern)`
* `M.[pattern_list]` ⟺ M.([pattern_list])
* `M.{labeled_pattern_list}` ⟺ M.({label_pattern_list})
* `M.[| .. |] ⟺ M.( [| .. |] )
At the typing phase, the construction `M.(pattern)` brings all
identifiers defined within M inside the scope and then proceed with the
typing of `pattern`. All others constructions are desugared to the
`M.(..)` construction during parsing.
Questionable implementation details:
* Currently, the local pattern open use the `type_open` function like
the local expression pattern. However, this implies that values defined
inside `M` are also brought to the scope. A specialized
`type_open_for_pattern` would be more efficient.
2016-05-09 09:35:05 -04:00
Jacques Garrigue
6712be88f0
add Path.compare
2016-05-09 09:35:05 -04:00
Gabriel Scherer
542fcdea6e
PR#7139: clearer formulation of warning on unused exceptions
2016-05-02 14:37:39 -04:00
lijunsong
3d4393a202
MPR#7237 change 12-tuples in typeclass into record.
2016-04-29 19:22:34 -07:00
Damien Doligez
520fb2df50
Merge tag 4.03.0 into trunk.
2016-04-28 16:13:21 +02:00
Gabriel Scherer
b61fe71bf1
minor: avoid confusing then/let/seq indentation
2016-04-20 06:54:38 -04:00
Jacques Garrigue
a8a5da4131
Fix PR#7234
2016-04-20 14:04:07 +09:00
Jacques Garrigue
390d0fa34e
Fix PR#7222
2016-04-15 23:51:32 +09:00
Jacques Garrigue
8667b66853
Fix PR#7214
2016-04-08 16:00:04 +09:00
Jacques Garrigue
eb5dd3ee34
Fix error handling in Ctype.unify_gadt
2016-04-08 15:53:23 +09:00
alainfrisch
7542c34f1d
Correctly print declarations of the (::) constructor.
2016-03-30 14:58:15 +02:00
alainfrisch
166ba71479
Merge branch '4.03' into trunk
2016-03-21 23:29:54 +01:00
alainfrisch
5edc0e38bd
MPR#7190: improve error message for inline records.
2016-03-21 22:41:25 +01:00
alainfrisch
0095905158
Merge branch '4.03' into trunk
2016-03-16 21:38:10 +01:00
Jacques Garrigue
2913cf11b0
Fix PR#7112
2016-03-16 18:23:46 +01:00
alainfrisch
502e4f9336
More warnings when compiling the compiler.
2016-03-15 22:46:35 +01:00
Alain Frisch
f4a29c6ca2
Merge branch '4.03_merged_in_trunk' of https://github.com/bobot/ocaml into bobot-4.03_merged_in_trunk
2016-03-15 22:09:24 +01:00
alainfrisch
43f90e9f58
Local let exceptions.
2016-03-15 22:02:55 +01:00
alainfrisch
ddb2826029
Fix #6677 : allow to disable warning 39 through an [@ocaml.warning] attribute on the first value binding.
2016-03-14 17:16:48 +01:00
alainfrisch
42a5b36bab
Fix probable bug.
...
"Probable" because this was found by code inspection after enabling warning 27. I assume
this could lead to an actual bug in the type-checker, but I have not tried to trigger it.
Fix confirmed by @garrigue.
2016-03-09 12:00:42 +01:00
Jacques Garrigue
05922fa6f9
Fix PR#7152: lower level of non-generalized variables to binding time of enclosing module
2016-03-06 23:17:45 +09:00
Jacques Garrigue
607b0f879e
Fix PR#7152: lower level of non-generalized variables to binding time of enclosing module
2016-03-06 23:15:55 +09:00
Jacques Garrigue
e21dd561b2
Fix PR#7160: Type synonym definitions can weaken gadt constructor types
2016-03-03 10:00:18 +09:00
Jacques Garrigue
a18af2a837
Fix PR#7160: Type synonym definitions can weaken gadt constructor types
2016-03-03 09:58:26 +09:00
Jacques Garrigue
df23448196
Fix PR#7113: -safe-string can break GADT compatibility check
2016-03-01 09:35:29 +09:00
Jacques Garrigue
c989c820fb
Fix PR#7113: -safe-string can break GADT compatibility check
2016-03-01 09:30:35 +09:00
Damien Doligez
5401ce8473
Update headers for the new license.
...
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez
ee8f71101b
clean up whitespace and cut long lines
2016-02-17 13:36:27 +01:00
Jacques Garrigue
b12e708ef4
Fix PR#7135: only warn about ground coercions in -principal mode
2016-02-05 10:54:24 +09:00
Will Crichton
50dd38d4b6
Add support for immediate attribute
2016-02-02 11:45:07 +00:00
Nicolas Ojeda Bar
e343dd0ba6
Adapt emit_external_warnings and error_if_has_deep_native_repr_attributes
2016-01-27 23:05:28 +01:00
Jeremie Dimino
43111b38cd
Replace uses of [Syntaxerr.ill_formed_ast] by asserts
...
All invariants are already checked by [Ast_invariants]
2016-01-27 18:41:12 +00:00
Damien Doligez
012cb8bd7b
Merge pull request #335 from hhugo/missing_cmi
...
GPR#335: Typing: unification error - warn about missing cmi
2016-01-27 15:35:49 +01:00
Thomas Refis
d9337d856d
Better type error location in presence of constraints
2016-01-26 10:48:34 +00:00
Jérémie Dimino
fe0968f080
Merge pull request #439 from mlasson/warnings_unboxed_untagged
...
More errors with unboxed and untagged attributes
2016-01-20 11:05:15 +00:00
Marc Lasson
934dd9a40b
More errors with unboxed and untagged attributes
...
This commit adds errors for bad uses of @untagged and
@unboxed attributes in external declarations.
There are three possible new errors:
- One when the external does not contain a native version of
the primitive,
- One when the attribute occurs deeply into the type,
- One when the attribute is applied to the whole function type.
2016-01-20 11:51:26 +01:00
alainfrisch
09bc267038
Simplify.
2016-01-19 23:42:54 +01:00
alainfrisch
87de6a160d
Useless bindings, unit patterns, whitespace.
2016-01-19 23:40:55 +01:00
Drup
6095df954e
Rename parsetree constants.
...
PConst -> Pconst
int -> integer
2016-01-18 00:12:38 +01:00
Nicolas Ojeda Bar
c242a29b12
Compile with -principal
2016-01-14 15:29:41 +01:00
Pierre Chambart
38ce618089
Make the Ident module identifiable
2016-01-12 18:01:25 +01:00
Mark Shinwell
91b475ef9e
Predef
2016-01-12 15:57:44 +01:00
Mark Shinwell
a76810c7ee
More things in Predef
2016-01-12 15:50:27 +01:00