direction :: Parser Direction
direction
  =   try (string "N" *> pure N)
  <|> try (string "NE" *> pure NE)
  <|> try (string "E" *> pure E)
  <|> try (string "SE" *> pure SE)
  <|> try (string "S" *> pure S)
  <|> try (string "SW" *> pure SW)
  <|> try (string "W" *> pure W)
  <|> try (string "NW" *> pure NW)
  <?> "a direction"
direction :: Parser Direction
direction
  =   try (string "N" *> pure N)
  <|> try (string "NE" *> pure NE)
  <|> try (string "E" *> pure E)
  <|> try (string "SE" *> pure SE)
  <|> try (string "S" *> pure S)
  <|> try (string "SW" *> pure SW)
  <|> try (string "W" *> pure W)
  <|> try (string "NW" *> pure NW)
  <?> "a direction"
direction
  =   try (string "N" *> pure N)
  <|> try (string "NE" *> pure NE)
  <|> try (string "E" *> pure E)
  <|> try (string "SE" *> pure SE)
  <|> try (string "S" *> pure S)
  <|> try (string "SW" *> pure SW)
  <|> try (string "W" *> pure W)
  <|> try (string "NW" *> pure NW)
  <?> "a direction"