+{-# LANGUAGE BangPatterns #-}
-- | The Grid module just contains the Grid type and two constructors
-- for it. We hide the main Grid constructor because we don't want
-- to allow instantiation of a grid with h <= 0.
-- centered on that position. If there is no cube there (i.e. the
-- position is outside of the grid), it will throw an error.
cube_at :: Grid -> Int -> Int -> Int -> Cube
-cube_at g i j k
+cube_at !g !i !j !k
| i < 0 = error "i < 0 in cube_at"
| i >= xsize = error "i >= xsize in cube_at"
| j < 0 = error "j < 0 in cube_at"