{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Tree.Compose.Data where
import Data.Tree
import Control.Lens
data ComposingNode a
    = PassDown  {_unCompose :: a}
    | SplitDown {_unCompose :: a}
    | UseAll    {_unCompose :: a}
    | UseSome   {_composeIndices :: [Int], _unCompose :: a}
    | UseNone   {_unCompose :: a}
    | UseLabel  {_composeIndex :: Int, _unCompose :: a} -- defaults to using no children
type SubCompTree a = Tree (ComposingNode a)
type CompTree a = Tree (Tree (ComposingNode a))
makeLenses ''ComposingNode
