graph: Fix function specifications and fix the grid.Grid issue. It was caused by including "grid.sml" in pretty.sml although it wasn't required.