Turn Shape into a stream

This commit is contained in:
2022-06-27 18:31:25 +01:00
parent 673e9b11fc
commit c7e720248d
11 changed files with 42 additions and 32 deletions
+7 -2
View File
@@ -3,14 +3,19 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
module Shape.Data
where
import Geometry.Data
import qualified Data.Vector.Fusion.Stream.Monadic as VS
import Data.Vector.Fusion.Util
import Control.Lens
type Shape = [ShapeObj]
type Shape = VS.Stream IO ShapeObj
instance Semigroup (VS.Stream IO ShapeObj) where
(<>) = (VS.++)
instance Monoid (VS.Stream IO ShapeObj) where
mempty = VS.empty
--_shVertices :: Shape -> [ShapeV]
--{-# INLINE _shVertices #-}