mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
075cab697b
Currently, the Haskell implementation of the DAML-LF type checker first branches on the pattern and then on the type of the scrutinee. This PR changes it to first branch on the type of the scrutinee and then on the pattern. This allows for destructing the type of the scrutinee only once intead of repeating it for each pattern. This should be good for performance, which is a nice side effect of this change. The main reason why I'm changing this is because we want to implement an exhaustiveness check. This seems rather complicated to achieve with the current implementation and will be significantly easier after this change. This PR is purely a refactoring and does not change the semantics of amnything. In particular, it does not touch the decision that default patterns match on anything, even no other pattern would match on the value. CHANGELOG_BEGIN CHANGELOG_END |
||
---|---|---|
.. | ||
src/DA/Daml/LF | ||
tests/DA/Daml/LF/Simplifier | ||
BUILD.bazel |