about summary refs log tree commit diff
path: root/src/fix-ng/eval.hh
blob: 5fcb648a74031f9fb4e6fd3ae0c0abeb0afdef67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef __EVAL_H
#define __EVAL_H

#include <map>

#include "fix-expr.hh"


typedef map<Expr, Expr> NormalForms;
//typedef map<Path, PathSet> PkgPaths;
//typedef map<Path, Hash> PkgHashes;

struct EvalState 
{
    NormalForms normalForms;
    //    PkgPaths pkgPaths;
    //    PkgHashes pkgHashes; /* normalised package hashes */
    Expr blackHole;

    EvalState();
};


/* Evaluate an expression to normal form. */
Expr evalExpr(EvalState & state, Expr e);

/* Evaluate an expression read from the given file to normal form. */
Expr evalFile(EvalState & state, const Path & path);


#endif /* !__EVAL_H */