Conversation
Owner
|
Thanks for writing this up. I'm going to let this one simmer until we have a better idea of how the updated Lol will look, and how/whether that will change things. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of our email correspondence on this subject:
Currently, keys are generated on-demand which means that if it is never strictly necessary to generate a key, we don't. This has some unfortunate side effects
This can even effect the pretty-printed output when used with ERW:
prints
Note the lack of error rate logging. Since no keys are ever generated, ERW can't generate any error rate logging code so it doesn't appear in the pretty-printed output. After these changes in this PR, the same program outputs the expected
Note that while we could move this key generation into e.g.
add_/neg_etc., this would cause a substantial increase in their instance heads (GenSKCtxconstraint is required which means bringingt) into scope, etc.). It also wouldn't account for trivial examples likelam $ \x -> x.This PR adds an external dependency on the
type-listpackage for theInsertandUniontype families. The implementations of these are pretty trivial, but it seemed silly to reinvent them.The implementation of this PR could be made substantially simpler by pending changes to Lol (
Cycclass) which would allow aGenKeysthat just iterated over them'mapindices. Currently this won't work sincegetKeyneeds the full Cyc type which includes the tensor typet. This change would allow us to get rid ofAccumKeyTypesentirely.