-- import Linear.V3
import Data.List
import Data.Function
-import qualified Data.Map as M
-import Data.Map ((!))
+import qualified Data.Map.Strict as M
+import Data.Map.Strict ((!))
import qualified Data.Set as S
type Block = (V3 Int, V3 Int)
vertexP :: Parser (V3 Int)
blocksP = blockP `sepBy` endOfLine
-blockP = cubify <$> (vertexP <* "~") <*> vertexP
+blockP = cubify <$> vertexP <* "~" <*> vertexP
where cubify (V3 x1 y1 z1) (V3 x2 y2 z2) =
( (V3 (min x1 x2) (min y1 y2) (min z1 z2))
, (V3 (max x1 x2) (max y1 y2) (max z1 z2))