Add generic derivations and To/FromJSON instances

This commit is contained in:
2022-07-25 22:49:18 +01:00
parent f5604ef429
commit b8e8413daa
99 changed files with 1406 additions and 517 deletions
+3 -3
View File
@@ -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