Add generic derivations and To/FromJSON instances
This commit is contained in:
@@ -7,9 +7,9 @@ import ShapePicture
|
||||
drawBlock :: BlockDraw -> Block -> SPic
|
||||
drawBlock bd = case bd of
|
||||
BlockDrawMempty -> const mempty
|
||||
BlockDraws bds -> \bl -> foldMap (flip drawBlock bl) bds
|
||||
BlockDrawColHeightPoss col h ps -> const $ noPic $ colorSH col (upperPrismPoly h $ ps)
|
||||
BlockDrawBlSh x -> \bl -> noPic $ doBlSh x bl
|
||||
BlockDraws bds -> \bl -> foldMap (`drawBlock` bl) bds
|
||||
BlockDrawColHeightPoss col h ps -> const $ noPic $ colorSH col (upperPrismPoly h ps)
|
||||
BlockDrawBlSh x -> noPic . doBlSh x
|
||||
|
||||
doBlSh :: BlSh -> Block -> Shape
|
||||
doBlSh bs = case bs of
|
||||
|
||||
Reference in New Issue
Block a user