printBoxes :: (String,Point) -> [Box] -> (String,Point)
printBoxes (s,(p1,p2)) lb = (s++x++"\n"++y++"\n",(p1+1,p2))
  where z = if ((p1,p2),(p1+1,p2)) `elem` fst (head lb) then "-" else " "
        x = fst $ foldl printVertical (z,(p1,p2)) lb
        y = fst $ foldl printHorizontal ("*",(p1+1,p2)) lb
printBoxes :: (String,Point) -> [Box] -> (String,Point)
printBoxes (s,(p1,p2)) lb = (s++x++"\n"++y++"\n",(p1+1,p2))
  where z = if ((p1,p2),(p1+1,p2)) `elem` fst (head lb) then "-" else " "
        x = fst $ foldl printVertical (z,(p1,p2)) lb
        y = fst $ foldl printHorizontal ("*",(p1+1,p2)) lb
printBoxes (s,(p1,p2)) lb = (s++x++"\n"++y++"\n",(p1+1,p2))
  where z = if ((p1,p2),(p1+1,p2)) `elem` fst (head lb) then "-" else " "
        x = fst $ foldl printVertical (z,(p1,p2)) lb
        y = fst $ foldl printHorizontal ("*",(p1+1,p2)) lb