Move towards replacing F.foldM with streaming, using mutable accumulator

This commit is contained in:
2021-08-09 19:07:58 +02:00
parent 8cda9b4e1b
commit b580666c57
5 changed files with 35 additions and 38 deletions
+11
View File
@@ -22,6 +22,7 @@ data Verx = Verx
, _vxCol :: !Point4
, _vxType :: !VertexType
, _vxLayer :: !Int
, _vxShadNum :: !ShadNum
}
data VertexType
= PolyV
@@ -31,6 +32,16 @@ data VertexType
| ArcV !Point3
| EllV
newtype ShadNum = ShadNum { _unShadNum :: Int }
polyNum, polyzNum, bezNum, textNum, arcNum, ellNum :: ShadNum
polyNum = ShadNum 0
polyzNum = ShadNum 1
bezNum = ShadNum 2
textNum = ShadNum 3
arcNum = ShadNum 4
ellNum = ShadNum 5
type RGBA = Point4
type Color = Point4