Comments (4)
This paper has all the details of a resolution algorithm. It seems to be essentially the same as our subtyping as long as the codomain of implicit functions is matched before the domain (which causes recursive resolution).
The major required change is support for backtracking; we should probably just put a Prolog 'trail' style undo stack in the typing context. That should be both easier to implement and more performant than an explicit substitution state that could be discarded immutably.
The paper also includes type well-formedness rules that ensure termination of resolution. We might eventually also want the equivalent of UndecidableInstances
that just limits the resolution stack depth somewhat arbitrarily. Modular Implicits also seem to be a lot lazier about preventing nontermination.
from broom.
Also need to be able to block the resolution of an implicit whose type contains unification variables until the moment those unification variables go out of scope. This mechanism should also be useful for generativity polymorphism (related to #9).
from broom.
Actually using persistent union-find instead of a trail. Avoids complexity when undoing union operations and should only be slower by a constant factor. (Might even be faster since apparently a fast union-find might not be so fast when backtracking is required.)
from broom.
Switched to mutable union-find with backtracking.
from broom.
Related Issues (20)
- Check well-foundedness of recursion
- Complete initial type checker
- Generate executables
- Allow trailing semicolons and commas
- Report multiple type errors
- Add polymorphic variants
- Add struct and variant types
- Add GADTs
- Add kind system
- Add kind polymorphism
- Add levity monomorphism restrictions pass
- Syntax overhaul #n
- Solve diamond problem of implicit resolution
- Alphatize during typechecking
- Fix alphatization breakage from pattern match expansion
- Restore JS Cheney-on-the-MTA runtime
- Add Cheney-on-the-MTA "safepoints" to emitted JS
- Add non-graph ("CFG") IR
- Add branch condition control dependencies
- Eliminate parameter/argument tuples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broom.