module Domain.Models.TypeCentricDoc where

import qualified Domain.Models.TypeString as TypeString
import Domain.Prelude hiding (Enum, Product, Sum)

type Doc =
  [(Text, Structure)]

data Structure
  = ProductStructure [(Text, NestedTypeExpression)]
  | SumStructure [(Text, [NestedTypeExpression])]
  | EnumStructure [Text]
  deriving (Int -> Structure -> ShowS
[Structure] -> ShowS
Structure -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Structure] -> ShowS
$cshowList :: [Structure] -> ShowS
show :: Structure -> String
$cshow :: Structure -> String
showsPrec :: Int -> Structure -> ShowS
$cshowsPrec :: Int -> Structure -> ShowS
Show)

data NestedTypeExpression
  = AppSeqNestedTypeExpression TypeString.AppSeq
  | StructureNestedTypeExpression Structure
  deriving (Int -> NestedTypeExpression -> ShowS
[NestedTypeExpression] -> ShowS
NestedTypeExpression -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NestedTypeExpression] -> ShowS
$cshowList :: [NestedTypeExpression] -> ShowS
show :: NestedTypeExpression -> String
$cshow :: NestedTypeExpression -> String
showsPrec :: Int -> NestedTypeExpression -> ShowS
$cshowsPrec :: Int -> NestedTypeExpression -> ShowS
Show)