Add sources for unification type errors.

This commit is contained in:
2020-09-09 15:26:04 -07:00
parent 80f181cbb6
commit 1f7a53ccf6
3 changed files with 25 additions and 15 deletions

View File

@@ -4,6 +4,8 @@
#include <string>
#include <vector>
#include <set>
#include <optional>
#include "location.hh"
struct type_mgr;
@@ -88,7 +90,7 @@ struct type_mgr {
type_ptr new_type();
type_ptr new_arrow_type();
void unify(type_ptr l, type_ptr r);
void unify(type_ptr l, type_ptr r, const std::optional<yy::location>& loc = std::nullopt);
type_ptr substitute(
const std::map<std::string, type_ptr>& subst,
const type_ptr& t) const;