daml/compiler
Martin Huschenbett 075cab697b
damlc: Rotate type checking of case expressions by 90 degrees (#7873)
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
2020-11-04 13:06:00 +01:00
..
daml-extension Remove version header from vscode snippet (#7452) 2020-09-21 16:59:47 +02:00
daml-lf-ast damlc: Rotate type checking of case expressions by 90 degrees (#7873) 2020-11-04 13:06:00 +01:00
daml-lf-proto choice observers, prep (#7548) 2020-10-21 11:15:18 +01:00
daml-lf-reader DEL-8132 extract DAML LF haskell libraries (scripted) (#7246) 2020-09-01 12:09:26 +10:00
daml-lf-tools damlc: Rotate type checking of case expressions by 90 degrees (#7873) 2020-11-04 13:06:00 +01:00
daml-lf-verify choice observers, prep (#7548) 2020-10-21 11:15:18 +01:00
daml-licenses Connectify user-facing output (#7624) 2020-10-09 15:45:02 +02:00
damlc Represent overlap modes at the type level. (#7864) 2020-11-03 12:40:36 +00:00
ghcide Get ghcide from the new upstream repo (#2867) 2019-09-11 08:57:48 +02:00
hie-core Get ghcide from the new upstream repo (#2867) 2019-09-11 08:57:48 +02:00
lsp-tests Deprecate the "daml 1.2" version header. (#7513) 2020-09-29 13:14:59 +00:00
repl-service Cache computation of top-level values at definition level (#7818) 2020-10-28 13:39:20 +00:00
scenario-service LF: remove control of input/output value/transaction versions. (#7858) 2020-11-02 20:02:53 +01:00
README.md open-sourcing daml 2019-04-04 09:33:38 +01:00

DAML Compiler

This directory contains several libraries used by and the executable for the DAML compiler.

Libraries

  • daml-lf-ast: The DAML-LF AST and type checker.