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

Filter GADT case splits on whether or not the index matches the inferred index #36

Open
ProofOfKeags opened this issue Nov 8, 2020 · 0 comments

Comments

@ProofOfKeags
Copy link

I am not sure whether to classify this as a bug or feature request but I encountered this today:

type JobMetadata :: AppTmpStatus -> Type
data JobMetadata a where
    Install ::StoreApp -> StoreAppVersionInfo -> JobMetadata 'Installing
    Backup ::JobMetadata 'CreatingBackup
    Restore ::JobMetadata 'RestoringBackup
    StopApp ::JobMetadata 'StoppingT
    RestartApp ::JobMetadata 'RestartingT

installInfo :: JobMetadata 'Installing -> (StoreApp, StoreAppVersionInfo)
installInfo = _

I got excited and attempted to use the tactics engine to autoderive "installInfo" for me but it got stuck. Confused, I decided to just do a case split and it put all of the cases into my editor instead of just the first one, which is telling me why it got stuck. I am not sure exactly how much context is available to the plugin at that site, but I think in theory it should be able to limit it down to the only constructor that will produce that GADT at that type index.

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

No branches or pull requests

1 participant