This module contains the definition of data types to represent entity/relationship diagrams and an I/O operation to read them from a term file.
Author: Michael Hanus, Marion Mueller
Version: May 2017
| readERDTermFile
                  :: String -> IO ERDRead an ERD specification from a file containing a single ERD term. | 
| writeERDTermFile
                  :: ERD -> IO StringWrites an ERD term into a file with name ERDMODELNAME.erdtermand returns the absolute path name of the generated term file. | 
Data type to represent entity/relationship diagrams.
Constructors:
ERD
                    ::  ERDName ->  [Entity] ->  [Relationship] -> ERD
              
              Type synonym: ERDName = String
            
Constructors:
              Type synonym: EName = String
            
Constructors:
              Type synonym: AName = String
            
Constructors:
NoKey
                    :: Key
              PKey
                    :: Key
              Unique
                    :: Key
              
              Type synonym: Null = Bool
            
Constructors:
IntDom
                    ::  (Maybe Int) -> Domain
              FloatDom
                    ::  (Maybe Float) -> Domain
              CharDom
                    ::  (Maybe Char) -> Domain
              StringDom
                    ::  (Maybe String) -> Domain
              BoolDom
                    ::  (Maybe Bool) -> Domain
              DateDom
                    ::  (Maybe CalendarTime) -> Domain
              UserDefined
                    ::  String ->  (Maybe String) -> Domain
              KeyDom
                    ::  String -> Domain
              Constructors:
              Type synonym: RName = String
            
Constructors:
REnd
                    ::  EName ->  Role ->  Cardinality -> REnd
              
              Type synonym: Role = String
            
Cardinality of a relationship w.r.t. some entity. The cardinality is either a fixed number (e.g., (Exactly 1) representing the cardinality (1,1)) or an interval (e.g., (Between 1 (Max 4)) representing the cardinality (1,4), or (Between 0 Infinite) representing the cardinality (0,n)).
Constructors:
Exactly
                    ::  Int -> Cardinality
              Between
                    ::  Int ->  MaxValue -> Cardinality
              The upper bound of a cardinality which is either a finite number or infinite.
Constructors:
Max
                    ::  Int -> MaxValue
              Infinite
                    :: MaxValue
              | 
                       Read an ERD specification from a file containing a single ERD term. | 
| 
                       
                      Writes an ERD term into a file with name  |