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

The "Could not generate equivalence" warning is not always emitted #5577

Closed
nad opened this issue Sep 25, 2021 · 1 comment · Fixed by #6231
Closed

The "Could not generate equivalence" warning is not always emitted #5577

nad opened this issue Sep 25, 2021 · 1 comment · Fixed by #6231
Assignees
Labels
cubical Cubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transp release blocker Issues blocking the next Agda release ux: warnings Issues relating to the reporting of warnings
Milestone

Comments

@nad
Copy link
Contributor

nad commented Sep 25, 2021

Now you can get a warning about how a certain definition by pattern matching "will not compute on transports by a path":

{-# OPTIONS --cubical #-}

data I : Set where
  i : I

data D : I  Set where
  c : D i

f :  x  D x  D x
f i c = c
Could not generate equivalence when splitting on indexed family,
the function will not compute on transports by a path.
  Reason: UnsupportedYet Injectivity
                           position:    0
                           type:        I
                           datatype:    I
                           parameters: 
                           indices:    
                           constructor: i
when checking the definition of f

However, I don't get this warning if I define the code above in a module that uses --without-K and import and use it in a module that uses --cubical. Perhaps it would make sense to emit this warning more often. For instance, it could be emitted at most once per module that uses --cubical or --erased-cubical, at the first use of a problematic definition that was imported from a module that uses --without-K.

@nad nad added cubical Cubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transp ux: warnings Issues relating to the reporting of warnings labels Sep 25, 2021
@nad nad added this to the 2.6.3 milestone Sep 25, 2021
@jespercockx jespercockx modified the milestones: 2.6.3, later Aug 27, 2022
@nad nad modified the milestones: later, 2.6.3 Oct 25, 2022
@nad nad added the release blocker Issues blocking the next Agda release label Oct 25, 2022
@nad
Copy link
Contributor Author

nad commented Oct 25, 2022

Now that we have the new option --cubical-compatible it might make sense to revisit this issue. I suggest that the warning should (by default) be emitted when --cubical-compatible is used, and that the warning should be turned off in the standard library's .agda-lib file.

@nad nad self-assigned this Oct 25, 2022
nad added a commit that referenced this issue Oct 25, 2022
To one that includes a switch from --without-K to
--cubical-compatible, and the deactivation of the NoEquivWhenSplitting
warning.
nad added a commit that referenced this issue Oct 25, 2022
@nad nad linked a pull request Oct 25, 2022 that will close this issue
nad added a commit that referenced this issue Oct 25, 2022
To one that includes a switch from --without-K to
--cubical-compatible, and the deactivation of the NoEquivWhenSplitting
warning.
nad added a commit that referenced this issue Oct 25, 2022
nad added a commit that referenced this issue Oct 25, 2022
To one that includes a switch from --without-K to
--cubical-compatible, and the deactivation of the NoEquivWhenSplitting
warning.
nad added a commit that referenced this issue Oct 25, 2022
nad added a commit that referenced this issue Oct 26, 2022
To one that includes a switch from --without-K to
--cubical-compatible, and the deactivation of the NoEquivWhenSplitting
warning.
@nad nad closed this as completed in f29188f Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cubical Cubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transp release blocker Issues blocking the next Agda release ux: warnings Issues relating to the reporting of warnings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants