Skip to content

Recursion tactic doesn't fire when deriving mutual recursion #1518

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
isovector opened this issue Mar 7, 2021 · 0 comments
Closed

Recursion tactic doesn't fire when deriving mutual recursion #1518

isovector opened this issue Mar 7, 2021 · 0 comments
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@isovector
Copy link
Collaborator

isovector commented Mar 7, 2021

From AutoThetaFix.hs test:

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

instance ( Functor f
           -- FIXME(sandy): Unfortunately, the recursion tactic fails to fire
           -- on this case. By explicitly adding the @Functor (Fix f)@
           -- dictionary, we can get Wingman to generate the right definition.
         , Functor (Fix f)
         ) => Functor (Fix f) where
  fmap = _

Note the FIXME. Recursion should be able to handle this just fine, but it doesn't! Unclear why, but I intend to find out.

@isovector isovector added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. component: wingman labels Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants