Mid strictifying
This commit is contained in:
+17
-8
@@ -49,8 +49,8 @@ data RenderType
|
||||
deriving Generic
|
||||
instance NFData RenderType
|
||||
|
||||
type RGBA = (Float,Float,Float,Float)
|
||||
type Color = (Float,Float,Float,Float)
|
||||
type RGBA = Point4
|
||||
type Color = Point4
|
||||
|
||||
data FTree a
|
||||
= FBranch (a -> a) (FTree a)
|
||||
@@ -103,15 +103,24 @@ instance Functor (RTree a) where
|
||||
fmap f (RBranches i ts) = RBranches i $ fmap (fmap f) ts
|
||||
fmap f (RLeaf x) = RLeaf (f x)
|
||||
|
||||
flat2 :: (a,a) -> [a]
|
||||
flat2 (x,y) = [x,y]
|
||||
flat3 :: (a,a,a) -> [a]
|
||||
flat3 (x,y,z) = [x,y,z]
|
||||
flat4 :: (a,a,a,a) -> [a]
|
||||
flat4 (x,y,z,w) = [x,y,z,w]
|
||||
flat2 :: V2 a -> [a]
|
||||
flat2 (V2 x y) = [x,y]
|
||||
flat3 :: V3 a -> [a]
|
||||
flat3 (V3 x y z) = [x,y,z]
|
||||
flat4 :: V4 a -> [a]
|
||||
flat4 (V4 x y z w) = [x,y,z,w]
|
||||
{-# INLINE flat2 #-}
|
||||
{-# INLINE flat3 #-}
|
||||
{-# INLINE flat4 #-}
|
||||
tflat2 :: (a,a) -> [a]
|
||||
tflat2 (x,y) = [x,y]
|
||||
tflat3 :: (a,a,a) -> [a]
|
||||
tflat3 (x,y,z) = [x,y,z]
|
||||
tflat4 :: (a,a,a,a) -> [a]
|
||||
tflat4 (x,y,z,w) = [x,y,z,w]
|
||||
{-# INLINE tflat2 #-}
|
||||
{-# INLINE tflat3 #-}
|
||||
{-# INLINE tflat4 #-}
|
||||
|
||||
type Picture = [Verx]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user