between :: Pos -> Pos -> [Pos]
between (sx, sy) (ex, ey)
  | sx == ex =
    [ (sx, y)
    | y <-
       if sy < ey
         then [sy .. ey - 1]
         else reverse [ey + 1 .. sy] ]
  | sy == ey =
    [ (x, sy)
    | x <-
       if sx < ex
         then [sx .. ex - 1]
         else reverse [ex + 1 .. sx] ]
  | otherwise = []
between :: Pos -> Pos -> [Pos]
between (sx, sy) (ex, ey)
  | sx == ex =
    [ (sx, y)
    | y <-
       if sy < ey
         then [sy .. ey - 1]
         else reverse [ey + 1 .. sy] ]
  | sy == ey =
    [ (x, sy)
    | x <-
       if sx < ex
         then [sx .. ex - 1]
         else reverse [ex + 1 .. sx] ]
  | otherwise = []
between (sx, sy) (ex, ey)
  | sx == ex =
    [ (sx, y)
    | y <-
       if sy < ey
         then [sy .. ey - 1]
         else reverse [ey + 1 .. sy] ]
  | sy == ey =
    [ (x, sy)
    | x <-
       if sx < ex
         then [sx .. ex - 1]
         else reverse [ex + 1 .. sx] ]
  | otherwise = []