Add log when generating layout

This commit is contained in:
2022-05-20 21:15:44 +01:00
parent 20d041fc59
commit da302aad0c
16 changed files with 155 additions and 94 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ overwriteLabel i f t ts = errorHead ("tried to overwriteLabel " ++ show i)
where
islabel (UseLabel j _) | i == j = True
islabel _ = False
update (Node cr _) = Node (f $ _unCompose cr) ts
update (Node x _) = Node (f $ _unCompose x) ts
passUntilUseAll :: SubCompTree a -> [SubCompTree a] -> SubCompTree a
passUntilUseAll (Node (UseAll x) _) ts' = Node (PassDown x) ts'
+7
View File
@@ -12,4 +12,11 @@ data ComposingNode a
| UseLabel {_composeIndex :: Int, _unCompose :: a} -- defaults to using no children
type SubCompTree a = Tree (ComposingNode a)
type CompTree a = Tree (SubCompTree a)
type LabSubCompTree a = (Tree (ComposingNode a),TreeSubLabelling)
type LabCompTree a = Tree (LabSubCompTree a)
data TreeSubLabelling = TreeSubLabelling
{ _topLabel :: String
, _subLabels :: Maybe (Tree TreeSubLabelling)
}
makeLenses ''ComposingNode
makeLenses ''TreeSubLabelling