-
Notifications
You must be signed in to change notification settings - Fork 139
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
Excessive constraints generated by lemma applications #1944
Comments
I can't reproduce very well with Also, If I use
then I get only 19 constraints checked. Polymorphism is known to cause some explosions elsewhere. |
Yeah I think its the polymorphism that is responsible for the constraint explosions. |
I am using |
Any idea about the TH imports? |
Consider this schema:
where
N
is some constant integer greater than 1.I noticed that the number of constraints generated by this simple schema seems excessive. Here is some data, where "lemma applications" corresponds to the
N
above:Lemma application constraint generation.pdf
Visual summary:
The data covers a few variants:
"with TH" indicates that the imports
were included at the beginning of the file.
"without TH" indicates that those imports were not included at the beginning of the file.
"monomorphic with" indicates that
with
was retyped to bewith :: a -> a -> a
.So, why are so many constraints being generated (20,000+ for just 10 applications of the simple lemma!) and why does it depend on importing the TH modules (which are not used in the code) and whether
with
is monomorphic or not?The text was updated successfully, but these errors were encountered: