-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Construct bools as false instead of true #1599
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would indeed be more coherent, thanks for the change.
Could you update the tests accordingly and add a changelog entry ?
Other primitive types are constructed as "zero" or "empty" values, e.g., ints are `0`, strings are `""`. By analogy, `bool` should be constructed as `false` rather than `true` (or it should propose both).
Thanks, done. I got the following error when running the tests, but they also happen on my machine at before this PR, so I don't think it's related:
|
Thanks! Yes, these tests depend on ppxlib, I guess it's not installed on your switch. |
from bcc32/patch-1
CHANGES: Fri May 26 15:23:42 CEST 2023 + merlin binary - Allow monadic IO in dot protocol (ocaml/merlin#1581) - Add a `scope` option to the `occurrences` command in preparation for the upcoming `project-wide-occurrences` feature (ocaml/merlin#1596) - Construct bool-typed holes as `false` instead of `true` in the `construct` command, for consistency (ocaml/merlin#1599). - Add a hook to configure system command for spawning ppxes when Merlin is used as a library. (ocaml/merlin#1585) - Implement an all-or-nothing cache for the PPX phase (ocaml/merlin#1584) - Cleanup functors caches when backtracking, to avoid memory leaks (ocaml/merlin#1609, fixes ocaml/merlin#1529 and ocaml-lsp#1032) - Fix `construct` results ordering for sum types sand poly variants (ocaml/merlin#1603) - Fix object method completion not working (ocaml/merlin#1606, fixes ocaml/merlin#1575) - Improve context detection for package types (ocaml/merlin#1608, fixes ocaml/merlin#1607) - Fix incorrect locations for string literals (ocaml/merlin#1574) - Fixed an issue that caused `errors` to erroneously alert about missing `cmi` files (ocaml/merlin#1577) - Prevent destruct from crashing on closed variant types (ocaml/merlin#1602, fixes ocaml/merlin#1601) - Improve longident parsing (ocaml/merlin#1612, fixes ocaml/merlin#945) + editor modes - emacs: call the user's configured completion UI in `merlin-construct` (ocaml/merlin#1598) + test suite - Add missing dependency to a test using ppxlib (ocaml/merlin#1583) - Add tests for the new PPX phase cache (ocaml/merlin#1584) - Add and update tests for `construct` ordering (ocaml/merlin#1603)
CHANGES: Fri May 26 15:23:42 CEST 2023 + merlin binary - Allow monadic IO in dot protocol (ocaml/merlin#1581) - Add a `scope` option to the `occurrences` command in preparation for the upcoming `project-wide-occurrences` feature (ocaml/merlin#1596) - Construct bool-typed holes as `false` instead of `true` in the `construct` command, for consistency (ocaml/merlin#1599). - Add a hook to configure system command for spawning ppxes when Merlin is used as a library. (ocaml/merlin#1585) - Implement an all-or-nothing cache for the PPX phase (ocaml/merlin#1584) - Cleanup functors caches when backtracking, to avoid memory leaks (ocaml/merlin#1609, fixes ocaml/merlin#1529 and ocaml-lsp#1032) - Fix `construct` results ordering for sum types sand poly variants (ocaml/merlin#1603) - Fix object method completion not working (ocaml/merlin#1606, fixes ocaml/merlin#1575) - Improve context detection for package types (ocaml/merlin#1608, fixes ocaml/merlin#1607) - Fix incorrect locations for string literals (ocaml/merlin#1574) - Fixed an issue that caused `errors` to erroneously alert about missing `cmi` files (ocaml/merlin#1577) - Prevent destruct from crashing on closed variant types (ocaml/merlin#1602, fixes ocaml/merlin#1601) - Improve longident parsing (ocaml/merlin#1612, fixes ocaml/merlin#945) + editor modes - emacs: call the user's configured completion UI in `merlin-construct` (ocaml/merlin#1598) + test suite - Add missing dependency to a test using ppxlib (ocaml/merlin#1583) - Add tests for the new PPX phase cache (ocaml/merlin#1584) - Add and update tests for `construct` ordering (ocaml/merlin#1603)
CHANGES: Fri May 26 15:23:42 CEST 2023 + merlin binary - Allow monadic IO in dot protocol (ocaml/merlin#1581) - Add a `scope` option to the `occurrences` command in preparation for the upcoming `project-wide-occurrences` feature (ocaml/merlin#1596) - Construct bool-typed holes as `false` instead of `true` in the `construct` command, for consistency (ocaml/merlin#1599). - Add a hook to configure system command for spawning ppxes when Merlin is used as a library. (ocaml/merlin#1585) - Implement an all-or-nothing cache for the PPX phase (ocaml/merlin#1584) - Cleanup functors caches when backtracking, to avoid memory leaks (ocaml/merlin#1609, fixes ocaml/merlin#1529 and ocaml-lsp#1032) - Fix `construct` results ordering for sum types sand poly variants (ocaml/merlin#1603) - Fix object method completion not working (ocaml/merlin#1606, fixes ocaml/merlin#1575) - Improve context detection for package types (ocaml/merlin#1608, fixes ocaml/merlin#1607) - Fix incorrect locations for string literals (ocaml/merlin#1574) - Fixed an issue that caused `errors` to erroneously alert about missing `cmi` files (ocaml/merlin#1577) - Prevent destruct from crashing on closed variant types (ocaml/merlin#1602, fixes ocaml/merlin#1601) - Improve longident parsing (ocaml/merlin#1612, fixes ocaml/merlin#945) + editor modes - emacs: call the user's configured completion UI in `merlin-construct` (ocaml/merlin#1598) + test suite - Add missing dependency to a test using ppxlib (ocaml/merlin#1583) - Add tests for the new PPX phase cache (ocaml/merlin#1584) - Add and update tests for `construct` ordering (ocaml/merlin#1603) [new release] merlin, merlin-lib and dot-merlin-reader (4.9-414) CHANGES: Fri May 26 15:23:42 CEST 2023 + merlin binary - Allow monadic IO in dot protocol (ocaml/merlin#1581) - Add a `scope` option to the `occurrences` command in preparation for the upcoming `project-wide-occurrences` feature (ocaml/merlin#1596) - Construct bool-typed holes as `false` instead of `true` in the `construct` command, for consistency (ocaml/merlin#1599). - Add a hook to configure system command for spawning ppxes when Merlin is used as a library. (ocaml/merlin#1585) - Implement an all-or-nothing cache for the PPX phase (ocaml/merlin#1584) - Cleanup functors caches when backtracking, to avoid memory leaks (ocaml/merlin#1609, fixes ocaml/merlin#1529 and ocaml-lsp#1032) - Fix `construct` results ordering for sum types sand poly variants (ocaml/merlin#1603) - Fix object method completion not working (ocaml/merlin#1606, fixes ocaml/merlin#1575) - Improve context detection for package types (ocaml/merlin#1608, fixes ocaml/merlin#1607) - Fix incorrect locations for string literals (ocaml/merlin#1574) - Fixed an issue that caused `errors` to erroneously alert about missing `cmi` files (ocaml/merlin#1577) - Prevent destruct from crashing on closed variant types (ocaml/merlin#1602, fixes ocaml/merlin#1601) - Improve longident parsing (ocaml/merlin#1612, fixes ocaml/merlin#945) + editor modes - emacs: call the user's configured completion UI in `merlin-construct` (ocaml/merlin#1598) + test suite - Add missing dependency to a test using ppxlib (ocaml/merlin#1583) - Add tests for the new PPX phase cache (ocaml/merlin#1584) - Add and update tests for `construct` ordering (ocaml/merlin#1603)
CHANGES: unreleased + merlin binary - Preview support for OCaml 5.1-alpha1. Short path is temporary disabled and inline records might not behave as expected. - Allow monadic IO in dot protocol (ocaml/merlin#1581) - Add a `scope` option to the `occurrences` command in preparation for the upcoming `project-wide-occurrences` feature (ocaml/merlin#1596) - Construct bool-typed holes as `false` instead of `true` in the `construct` command, for consistency (ocaml/merlin#1599). - Add a hook to configure system command for spawning ppxes when Merlin is used as a library. (ocaml/merlin#1585) - Implement an all-or-nothing cache for the PPX phase (ocaml/merlin#1584) - Cleanup functors caches when backtracking, to avoid memory leaks (ocaml/merlin#1609, fixes ocaml/merlin#1529 and ocaml-lsp#1032) - Fix `construct` results ordering for sum types sand poly variants (ocaml/merlin#1603) - Fix object method completion not working (ocaml/merlin#1606, fixes ocaml/merlin#1575) - Improve context detection for package types (ocaml/merlin#1608, fixes ocaml/merlin#1607) - Fix incorrect locations for string literals (ocaml/merlin#1574) - Fixed an issue that caused `errors` to erroneously alert about missing `cmi` files (ocaml/merlin#1577) - Prevent destruct from crashing on closed variant types (ocaml/merlin#1602, fixes ocaml/merlin#1601) - Improve longident parsing (ocaml/merlin#1612, fixes ocaml/merlin#945) + editor modes - emacs: call the user's configured completion UI in `merlin-construct` (ocaml/merlin#1598) + test suite - Add missing dependency to a test using ppxlib (ocaml/merlin#1583) - Add tests for the new PPX phase cache (ocaml/merlin#1584) - Add and update tests for `construct` ordering (ocaml/merlin#1603)
Other primitive types are constructed as "zero" or "empty" values, e.g., ints are
0
, strings are""
. By analogy,bool
should be constructed asfalse
rather thantrue
(or it should propose both).