module DataFlow.Core (
ID,
Value(..),
Attributes,
Diagram(..),
RootNode(..),
Flow(..),
Node(..)
) where
import Data.Map as M
type ID = String
data Value = String String
| Array [Value]
deriving (Eq)
instance Show Value where
show (String s) = s
show (Array vs) = show vs
type Attributes = M.Map String Value
data Diagram = Diagram Attributes [RootNode] [Flow]
deriving (Eq, Show)
data RootNode =
Node Node
| TrustBoundary ID Attributes [Node]
deriving (Eq, Show)
data Node =
InputOutput ID Attributes
| Function ID Attributes
| Database ID Attributes
deriving (Show, Eq)
data Flow = Flow ID ID Attributes
deriving (Show, Eq)