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

What's the advantage of using if/else over case of #75

Open
PiotrJustyna opened this issue Sep 25, 2024 · 0 comments
Open

What's the advantage of using if/else over case of #75

PiotrJustyna opened this issue Sep 25, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@PiotrJustyna
Copy link
Owner

Here is what hlint suggests:

app/LayoutEngine.hs:(71,9)-(75,22): Suggestion: Use if
Found:
  case Records.getIconName i `elem` namesOfDependentIcons of
    True
      -> let newPositionedIcon = toPositionedIconWithParent i parent
         in
           newPositionedIcon
             : (firstLineDependents newPositionedIcon dependencyPlane) ++ acc
    False -> acc
Perhaps:
  (if Records.getIconName i `elem` namesOfDependentIcons then
       (let newPositionedIcon = toPositionedIconWithParent i parent
        in
          newPositionedIcon
            : (firstLineDependents newPositionedIcon dependencyPlane) ++ acc)
   else
       acc)
@PiotrJustyna PiotrJustyna added the question Further information is requested label Sep 25, 2024
@PiotrJustyna PiotrJustyna self-assigned this Sep 25, 2024
@PiotrJustyna PiotrJustyna changed the title hat's the advantage of using if/else over case of What's the advantage of using if/else over case of Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant