diff options
Diffstat (limited to 'tuplr.hpp')
-rw-r--r-- | tuplr.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -366,8 +366,8 @@ struct Funcs : public list< pair<AType*, CFunction> > { }; /// Closure (first-class function with captured lexical bindings) -struct AClosure : public ATuple { - AClosure(Cursor c, ASymbol* fn, ATuple* p, const string& n="") +struct AFn : public ATuple { + AFn(Cursor c, ASymbol* fn, ATuple* p, const string& n="") : ATuple(c, fn, p, NULL), name(n) {} bool operator==(const AST& rhs) const { return this == &rhs; } void constrain(TEnv& tenv, Constraints& c) const; @@ -389,8 +389,8 @@ struct ACall : public ATuple { }; /// Definition special form, e.g. "(def x 2)" -struct ADefinition : public ACall { - ADefinition(const SExp& e, const ATuple& t) : ACall(e, t) {} +struct ADef : public ACall { + ADef(const SExp& e, const ATuple& t) : ACall(e, t) {} ASymbol* sym() const { ASymbol* sym = at(1)->to<ASymbol*>(); if (!sym) { @@ -543,8 +543,8 @@ struct TEnv : public Env< const ASymbol*, pair<AST*, AType*> > { } static Subst unify(const Constraints& c); - typedef map<const AST*, AType*> Vars; - typedef map<const AClosure*, const AType*> GenericTypes; + typedef map<const AST*, AType*> Vars; + typedef map<const AFn*, const AType*> GenericTypes; Vars vars; GenericTypes genericTypes; PEnv& penv; |