Skip to content

Commit 3c26808

Browse files
Aligning the visualizer with the cleanup changes
1 parent 31c2368 commit 3c26808

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

visualizer/Main.hs

+6-8
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@
1919

2020
module Main where
2121

22-
import Data.RTree.Double.Strict (RTree, MBR)
23-
import qualified Data.RTree.Double.Strict as R
24-
import Data.RTree.Double.Strict.Debug
25-
import qualified Data.RTree.Double.Strict.Unsafe as R
22+
import Data.RTree.D2.Double (RTree, MBR)
23+
import qualified Data.RTree.D2.Double as R
24+
import qualified Data.RTree.D2.Double.Unsafe as R
2625

2726
import Control.Concurrent
2827
import Control.Exception
2928
import Control.Monad
3029
import qualified Data.ByteString.Char8 as BSC
3130
import Data.ByteString.Internal (ByteString (..))
3231
import Data.ByteString.Unsafe
33-
import Data.Colour
3432
import Data.Colour.Names
3533
import Data.Colour.SRGB
3634
import Data.Colour.RGBSpace.HSV
@@ -401,7 +399,7 @@ mbr (R.UnsafeMBR xmin ymin xmax ymax) rgb =
401399
]
402400

403401
visualize :: Mode -> RTree a -> [Point]
404-
visualize mode (R.Root r) = visual 0 r
402+
visualize mode = visual 0
405403
where
406404
wash i
407405
| i <= 0 = hsv (modeHue mode) 1 1
@@ -432,8 +430,8 @@ visualize mode (R.Root r) = visual 0 r
432430
R.Leaf4 ba _ bb _ bc _ bd _ ->
433431
mbr ba (toSRGB white) <> mbr bb (toSRGB white) <> mbr bc (toSRGB white) <> mbr bd (toSRGB white)
434432

435-
visualize _ (R.Leaf1 ba _) = mbr ba (toSRGB white)
436-
visualize _ R.Empty = []
433+
R.Leaf1 ba _ -> mbr ba (toSRGB white)
434+
R.Empty -> []
437435

438436

439437
draw :: State -> IO ()

0 commit comments

Comments
 (0)