Skip to content

Split doesn't respect type indices #1710

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
googleson78 opened this issue Apr 11, 2021 · 2 comments
Closed

Split doesn't respect type indices #1710

googleson78 opened this issue Apr 11, 2021 · 2 comments
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@googleson78
Copy link
Contributor

Version:

0227133dc5651cdc2da367923f5a27592465de46

(current master)

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}

data A b where
  ATrue :: A True
  AFalse :: A False

f :: A True -> ()
f x = _

Doing a case split here generates both cases, even though one of them is unreachable.

I would expect only ATrue to be generated.

@jneira jneira added the type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. label Apr 13, 2021
@isovector
Copy link
Collaborator

I can't reproduce this. The result on my machine:

f :: A True -> ()
f ATrue = _

@isovector
Copy link
Collaborator

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

4 participants