halma/src/Game/Halma/Board.hs

Summary

Maintainability
Test Coverage

Use lambda-case
Open

    A.withText "HalmaDirection" $ \text ->
      case text of
        "N"  -> pure North
        "NE" -> pure Northeast
        "SE" -> pure Southeast
Severity: Minor
Found in halma/src/Game/Halma/Board.hs by hlint

Found

\ text ->
  case text of
      "N" -> pure North
      "NE" -> pure Northeast
      "SE" -> pure Southeast
      "S" -> pure South
      "SW" -> pure Southwest
      "NW" -> pure Northwest
      _ -> fail
             "expected a Halma direction (one of N, NE, SE, S, SW, NW)"

Perhaps

\case
    "N" -> pure North
    "NE" -> pure Northeast
    "SE" -> pure Southeast
    "S" -> pure South
    "SW" -> pure Southwest
    "NW" -> pure Northwest
    _ -> fail
           "expected a Halma direction (one of N, NE, SE, S, SW, NW)"

There are no issues that match your filters.

Category
Status