| 214 | } |
| 215 | |
| 216 | experimental::Type TypeEnvironment::resolveRecursive(Type _type) const |
| 217 | { |
| 218 | return std::visit(util::GenericVisitor{ |
| 219 | [&](TypeConstant const& _typeConstant) -> Type { |
| 220 | return TypeConstant{ |
| 221 | _typeConstant.constructor, |
| 222 | _typeConstant.arguments | ranges::views::transform([&](Type const& _argType) { |
| 223 | return resolveRecursive(_argType); |
| 224 | }) | ranges::to<std::vector<Type>> |
| 225 | }; |
| 226 | }, |
| 227 | [](TypeVariable const& _typeVar) -> Type { |
| 228 | return _typeVar; |
| 229 | }, |
| 230 | [](std::monostate _nothing) -> Type { |
| 231 | return _nothing; |
| 232 | } |
| 233 | }, resolve(_type)); |
| 234 | } |
| 235 | |
| 236 | Sort TypeEnvironment::sort(Type _type) const |
| 237 | { |