Skip to content

Tactics plugin fails to solve program involving two different instantiations for fmap #561

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

Closed
siraben opened this issue Nov 2, 2020 · 2 comments
Labels

Comments

@siraben
Copy link

siraben commented Nov 2, 2020

Consider

data Fix f a = Fix (f (Fix f a))

instance Functor f => Functor (Fix f) where
  fmap f (Fix x) = _

The tactics plugin fails to fill the hole. One potential solution would be

instance Functor f => Functor (Fix f) where
  fmap f (Fix x) = Fix (fmap (fmap f) x)

Where the first fmap is on the functor f and the second fmap is on the functor Fix f (i.e. recursive call for this instance of fmap). According to @isovector the two different types for fmap combined with the way recursive calls are handled result in the tactic plugin failing to find a solution.

This has been tested as of commit 6c14163.

@isovector
Copy link
Collaborator

This is (half) fixed in #1347, but also broken due to #1346.

@isovector
Copy link
Collaborator

Closing this in favor of #1346 which better describes the problem.

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

No branches or pull requests

3 participants