#include "ir/ir.h"
#include "sema/sema.h"
using namespace std;
using namespace empathy;
using namespace empathy::util;
int main( int argc, char** argv )
{
// Just a dumping place for simple test code for now.
auto gg = TVEC( TSTR( "bar" ), TSID( gg ), VECOFLENGTH( N ), REPEAT( ANYTERM( U ) ) );
cout << gg << endl;
ir::Trie<> testTrie;
testTrie = Merge( testTrie, gg );
testTrie = Merge( testTrie, TVEC( TSID( blah ), TSTR( "bar" ) ) );
testTrie = Merge( testTrie, TVEC( TSID( foo ), TSTR( "bar" ) ) );
testTrie = Merge( testTrie, TVEC( TSID( blah ), TSTR( "meh" ) ) );
auto testTrie2 = testTrie;
testTrie = Merge( testTrie, TSTR( "bar" ) );
testTrie = Merge( testTrie, TSTR( "foo" ) );
testTrie = Merge( testTrie, TVEC() );
testTrie = Merge( testTrie, TVEC( TSID( gg ) ) );
ir::GraphVizDump( "dump2.dot", testTrie );
for( auto&& t : Enumerate( testTrie ) )
cout << t << endl;
cout << Compare( testTrie, testTrie2 ) << endl;
cout << Compare( testTrie2, testTrie2 ) << endl;
cout << Compare( testTrie, testTrie ) << endl;
cout << "\n";
sema::Hole testHole( "A"_sid, 1 );
auto holeExpr = testHole.toIRExpr();
cout << holeExpr << endl;
auto testHole2 = sema::Hole::FromIRExpr( holeExpr );
cout << testHole2.has_value() << endl;
cout << testHole2->toIRExpr() << endl;
return EXIT_SUCCESS;
}