parseCoords :: [String] -> (Pos, Pos)
parseCoords s = (parseCoord c1, parseCoord c2)
  where (c1, c2) = case s of
          [a, "through", b] -> (a, b)
          _ -> error ("invalid coordinates " ++ unwords s)
parseCoords :: [String] -> (Pos, Pos)
parseCoords s = (parseCoord c1, parseCoord c2)
  where (c1, c2) = case s of
          [a, "through", b] -> (a, b)
          _ -> error ("invalid coordinates " ++ unwords s)
parseCoords s = (parseCoord c1, parseCoord c2)
  where (c1, c2) = case s of
          [a, "through", b] -> (a, b)
          _ -> error ("invalid coordinates " ++ unwords s)