module Data.TreeSeq.Strict where
import Control.Applicative (Applicative(..))
+import Control.DeepSeq (NFData(..))
import Control.Monad (Monad(..))
+import Data.Bool
import Data.Eq (Eq(..))
import Data.Foldable (Foldable(..))
import Data.Function (($), (.))
import Data.Ord (Ord(..))
import Data.Semigroup (Semigroup(..))
import Data.Sequence (Seq, ViewL(..))
+import Data.String (String)
import Data.Traversable (Traversable(..))
import GHC.Generics (Generic)
+import Prelude (seq)
import Text.Show (Show(..))
import qualified Data.List as List
import qualified Data.Sequence as Seq
instance Traversable Tree where
traverse f (Tree a ts) = Tree <$> f a <*> traverse (traverse f) ts
sequenceA (Tree a ts) = Tree <$> a <*> traverse sequenceA ts
+instance NFData a => NFData (Tree a) where
+ rnf (Tree a ts) = rnf a `seq` rnf ts
tree0 :: a -> Tree a
tree0 a = Tree a mempty