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

Solves #1853 #1854

Merged
merged 1 commit into from Jan 26, 2016
Merged

Solves #1853 #1854

merged 1 commit into from Jan 26, 2016

Conversation

nicodelpiano
Copy link
Contributor

The problem was the condition cond we were using: I compared it with an older version of the redundancy checker that worked well and changed that piece of code.

Now it's working fine:

module Main where

data Options = Foo | Bar | Baz

brokenPatternMatch :: Options -> Boolean
brokenPatternMatch Foo = true
brokenPatternMatch Foo = true
brokenPatternMatch Bar = false
brokenPatternMatch Baz = false

Throws:

  in module Main
  at /home/delpi/Desktop/Development/purescript/psctests/test.purs line 5, column 1 - line 6, column 1

    A case expression contains unreachable cases:

    Foo

  in value declaration brokenPatternMatch

paf31 added a commit that referenced this pull request Jan 26, 2016
@paf31 paf31 merged commit 2fffbcb into purescript:master Jan 26, 2016
@paf31
Copy link
Contributor

paf31 commented Jan 26, 2016

Thanks for looking into this!

@nicodelpiano
Copy link
Contributor Author

No problem Phil 👍, if there's another issue just let me know!

@garyb
Copy link
Member

garyb commented Jan 26, 2016

Nice work 👍

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

Successfully merging this pull request may close these issues.

None yet

3 participants