//
// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
//
// The contents of this file are covered under the licence agreement in the
// file "LICENCE" distributed with Cforall.
//
// GenPoly.h -- 
//
// Author           : Richard C. Bilson
// Created On       : Mon May 18 07:44:20 2015
// Last Modified By : Peter A. Buhr
// Last Modified On : Tue May 19 07:38:34 2015
// Update Count     : 1
//

#ifndef GENPOLY_H
#define GENPOLY_H

#include <map>
#include <string>
#include <iostream>
#include "SynTree/Declaration.h"

namespace GenPoly {
	typedef std::map< std::string, TypeDecl::Kind > TyVarMap;

	// considerAllTyVars allows ignoring the contents of the TyVarMap parameter, for the situations where
	// it is important only that a TypeInstType node exists.

	bool needsAdapter( FunctionType *adaptee, const TyVarMap &tyVarr );
	bool needsAdapter( FunctionType *adaptee, const TyVarMap &tyVars, bool considerAllTyVars );
	bool isPolyFun( FunctionType *fun, const TyVarMap &tyVars );
	bool isPolyVal( Type *type, const TyVarMap &tyVars );
	bool isPolyVal( Type *type, const TyVarMap &tyVars, bool considerAllTyVars );
	void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap );
} // namespace GenPoly

#endif // GENPOLY_H

// Local Variables: //
// tab-width: 4 //
// mode: c++ //
// compile-command: "make install" //
// End: //
