Ready for replacement of Either with bespoke data type for compo trees
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{-# 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}
|
||||
type SubCompTree a = Tree (ComposingNode a)
|
||||
type CompTree a = Tree (Tree (ComposingNode a))
|
||||
makeLenses ''ComposingNode
|
||||
Reference in New Issue
Block a user