#include <TypeScheme.hxx>
Public Member Functions | |
| TypeScheme (boost::shared_ptr< Type > _tau, boost::shared_ptr< AST > _ast, boost::shared_ptr< TCConstraints > _tcc=boost::GC_NULL) | |
| bool | generalize (std::ostream &errStream, const sherpa::LexLoc &errLoc, boost::shared_ptr< const TSEnvironment > gamma, boost::shared_ptr< const InstEnvironment >instEnv, boost::shared_ptr< const AST > expr, boost::shared_ptr< TCConstraints >parentTCC, boost::shared_ptr< Trail > trail, GeneralizeMode gen) |
| boost::shared_ptr< Type > | type_instance () |
| boost::shared_ptr< TypeScheme > | ts_instance () |
| void | addConstraints (boost::shared_ptr< TCConstraints > _tcc) const |
| void | TransAddConstraints (boost::shared_ptr< TCConstraints > _tcc) const |
| std::string | asString (boost::shared_ptr< TvPrinter > tvP=TvPrinter::make(), bool norm=false) |
| void | asXML (boost::shared_ptr< TvPrinter > tvP, sherpa::INOstream &out) |
| std::string | asXML (boost::shared_ptr< TvPrinter > tvP=TvPrinter::make()) |
| void | collectAllFtvs () |
| void | collectftvs (boost::shared_ptr< const TSEnvironment > gamma) |
| bool | removeUnInstFtvs () |
| bool | normalizeConstruction (boost::shared_ptr< Trail > trail) |
| bool | solvePredicates (std::ostream &errStream, const sherpa::LexLoc &errLoc, boost::shared_ptr< const InstEnvironment > instEnv, boost::shared_ptr< Trail > trail) |
| bool | checkAmbiguity (std::ostream &errStream, const sherpa::LexLoc &errLoc) |
| bool | migratePredicates (boost::shared_ptr< TCConstraints > parentTCC) |
| bool | normalize () |
Static Public Member Functions | |
| static boost::shared_ptr< TypeScheme > | make (boost::shared_ptr< Type > _tau, boost::shared_ptr< AST > _ast, boost::shared_ptr< TCConstraints > _tcc=boost::GC_NULL) |
Data Fields | |
| boost::shared_ptr< Type > | tau |
| boost::shared_ptr< AST > | ast |
| TypeSet | ftvs |
| boost::shared_ptr< TCConstraints > | tcc |
Definition at line 57 of file TypeScheme.hxx.
| TypeScheme::TypeScheme | ( | boost::shared_ptr< Type > | _tau, | |
| boost::shared_ptr< AST > | _ast, | |||
| boost::shared_ptr< TCConstraints > | _tcc = boost::GC_NULL | |||
| ) |
Referenced by make().
| void TypeScheme::addConstraints | ( | boost::shared_ptr< TCConstraints > | _tcc | ) | const |
Referenced by ts_instance().
| std::string TypeScheme::asString | ( | boost::shared_ptr< TvPrinter > | tvP = TvPrinter::make(), |
|
| bool | norm = false | |||
| ) |
Referenced by checkAmbiguity(), and normalize().
| std::string TypeScheme::asXML | ( | boost::shared_ptr< TvPrinter > | tvP = TvPrinter::make() |
) |
| void TypeScheme::asXML | ( | boost::shared_ptr< TvPrinter > | tvP, | |
| sherpa::INOstream & | out | |||
| ) |
| bool TypeScheme::checkAmbiguity | ( | std::ostream & | errStream, | |
| const sherpa::LexLoc & | errLoc | |||
| ) |
Definition at line 932 of file TypePoly.cxx.
References asString(), sherpa::LexLoc::asString(), Options::debugTvP, ftvs, tau, and tcc.
| void TypeScheme::collectAllFtvs | ( | ) |
| void TypeScheme::collectftvs | ( | boost::shared_ptr< const TSEnvironment > | gamma | ) |
| bool TypeScheme::generalize | ( | std::ostream & | errStream, | |
| const sherpa::LexLoc & | errLoc, | |||
| boost::shared_ptr< const TSEnvironment > | gamma, | |||
| boost::shared_ptr< const InstEnvironment > | instEnv, | |||
| boost::shared_ptr< const AST > | expr, | |||
| boost::shared_ptr< TCConstraints > | parentTCC, | |||
| boost::shared_ptr< Trail > | trail, | |||
| GeneralizeMode | gen | |||
| ) |
| static boost::shared_ptr<TypeScheme> TypeScheme::make | ( | boost::shared_ptr< Type > | _tau, | |
| boost::shared_ptr< AST > | _ast, | |||
| boost::shared_ptr< TCConstraints > | _tcc = boost::GC_NULL | |||
| ) | [inline, static] |
Definition at line 80 of file TypeScheme.hxx.
References TypeScheme().
Referenced by bindIdentDef(), generalizePat(), InferInstance(), InferObject(), InferStruct(), InferTypeClass(), InferUnion(), Type::isConcrete(), ts_instance(), and typeInfer().
| bool TypeScheme::migratePredicates | ( | boost::shared_ptr< TCConstraints > | parentTCC | ) |
| bool TypeScheme::normalize | ( | ) |
Definition at line 171 of file TypeScheme.cxx.
References asString(), DEBUG, Options::debugTvP, ftvs, Type::Kmono, Type::Kpoly, and tcc.
Referenced by ts_instance(), and type_instance().
| bool TypeScheme::normalizeConstruction | ( | boost::shared_ptr< Trail > | trail | ) |
| bool TypeScheme::removeUnInstFtvs | ( | ) |
| bool TypeScheme::solvePredicates | ( | std::ostream & | errStream, | |
| const sherpa::LexLoc & | errLoc, | |||
| boost::shared_ptr< const InstEnvironment > | instEnv, | |||
| boost::shared_ptr< Trail > | trail | |||
| ) |
| void TypeScheme::TransAddConstraints | ( | boost::shared_ptr< TCConstraints > | _tcc | ) | const |
| shared_ptr< TypeScheme > TypeScheme::ts_instance | ( | ) |
Definition at line 94 of file TypeScheme.cxx.
References addConstraints(), ast, ftvs, boost::GC_NULL, TCConstraints::make(), make(), newTvar(), normalize(), tau, and tcc.
| shared_ptr< Type > TypeScheme::type_instance | ( | ) |
| boost::shared_ptr<AST> TypeScheme::ast |
Definition at line 65 of file TypeScheme.hxx.
Referenced by FixDefs(), isTrivialInit(), and ts_instance().
Definition at line 67 of file TypeScheme.hxx.
Referenced by checkAmbiguity(), collectAllFtvs(), normalize(), removeUnInstFtvs(), ts_instance(), and type_instance().
| boost::shared_ptr<Type> TypeScheme::tau |
Definition at line 59 of file TypeScheme.hxx.
Referenced by checkAmbiguity(), collectAllFtvs(), removeUnInstFtvs(), ts_instance(), and type_instance().
| boost::shared_ptr<TCConstraints> TypeScheme::tcc |
Definition at line 73 of file TypeScheme.hxx.
Referenced by checkAmbiguity(), collectAllFtvs(), normalize(), removeUnInstFtvs(), and ts_instance().
1.4.7