Skip to content
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

Add support for dependent types #1164

Merged
merged 10 commits into from
Aug 4, 2019
Merged

Conversation

Gabriella439
Copy link
Collaborator

... as standardized in dhall-lang/dhall-lang#669

It only existed for the pre-dependent-types type-checking fast path for
`let` expressions, which is gone
@Gabriella439 Gabriella439 merged commit 7f2f57f into master Aug 4, 2019
@Gabriella439 Gabriella439 deleted the gabriel/dependent_assert branch August 4, 2019 04:38
EggBaconAndSpam added a commit that referenced this pull request Aug 5, 2019
Removes the non-dependent let path. Needed since #1164 added support for
general dependent types.
EggBaconAndSpam added a commit that referenced this pull request Aug 7, 2019
Removes the "fast path" when typechecking `let`s whose bound expression
has a small type. This optimisation is no longer legal in the presence
of dependent types (as introduced in #1164).
mergify bot pushed a commit that referenced this pull request Aug 7, 2019
* Implement completion support

Completes the following:
- environment variables
- local imports
- identifiers in scope (as well as built-ins)
- record projections
- union constructors

* Add support for general dependent types

Removes the non-dependent let path. Needed since #1164 added support for
general dependent types.

* Remove unused import

* Use monad instance to cast between `Expr Src _`

As suggested by @Gabriel439: Use `typeOf (do _ <- expr; holeExpr)`
instead of `fmap undefined expr`. In the absence of `Embed` constructors
(in this case `Import`s) the two are equivalent.

* Simplify completeFromContext

Caught by @Gabriel439

* Remove debug code

* Add 1s timeout to listDirectory call

As pointed out by @Gabriel439, listDirectory can be a potentially
expensive operation. Adding a timeout should improve the user
experience.

* Fix unclean merge
mergify bot pushed a commit that referenced this pull request Aug 12, 2019
* Correctly handle dependent types in dhall-lsp-server

Removes the "fast path" when typechecking `let`s whose bound expression
has a small type. This optimisation is no longer legal in the presence
of dependent types (as introduced in #1164).

* Fix bad merge

* Remove redundant import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants