#[derive(Debug,PartialEq,Eq)]
pub enum TopLevel {
    TableDecl(Clause<Type>),
    RowDecl(Clause<Expr>),
}

#[derive(Debug,PartialEq,Eq)]
pub struct Clause<T> {
    pub name: String,
    pub data: ClauseData<T>,
}

#[derive(Debug,PartialEq,Eq)]
pub enum Type {
    AtomType,
    IntType,
}

#[derive(Debug,PartialEq,Eq)]
pub enum ClauseData<T> {
    TupleClause(Vec<T>),
    RecordClause(Vec<Field<T>>),
}

#[derive(Debug,PartialEq,Eq)]
pub enum Expr {
    Var(String),
    Atom(String),
    Num(i64),
}

#[derive(Debug,PartialEq,Eq)]
pub struct Field<T> {
    pub name:  String,
    pub value: T,
}
