Working element buffer object
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
--{-# LANGUAGE TemplateHaskell #-}
|
||||
module ShapePicture.Data
|
||||
where
|
||||
import Shape
|
||||
import Picture
|
||||
import Control.Lens
|
||||
data SPic = SPic
|
||||
{ _spShape :: Shape
|
||||
, _spPicture :: Picture
|
||||
}
|
||||
--import Control.Lens
|
||||
|
||||
instance Semigroup SPic where
|
||||
(<>) (SPic a b) (SPic x y) = SPic (a <> x) (b <>y)
|
||||
type SPic = (Shape, Picture)
|
||||
|
||||
instance Monoid SPic where
|
||||
mempty = SPic emptySH blank
|
||||
|
||||
makeLenses ''SPic
|
||||
_spShape :: SPic -> Shape
|
||||
_spShape = fst
|
||||
_spPicture :: SPic -> Picture
|
||||
_spPicture = snd
|
||||
|
||||
Reference in New Issue
Block a user