GetTypeContext returns type context containing all type vars, with /any bound.
(typeExpr ast.BaseTerm)
| 340 | |
| 341 | // GetTypeContext returns type context containing all type vars, with /any bound. |
| 342 | func GetTypeContext(typeExpr ast.BaseTerm) map[ast.Variable]ast.BaseTerm { |
| 343 | typeCtx := map[ast.Variable]ast.BaseTerm{} |
| 344 | typeVars := map[ast.Variable]bool{} |
| 345 | ast.AddVars(typeExpr, typeVars) |
| 346 | for v := range typeVars { |
| 347 | typeCtx[v] = ast.AnyBound |
| 348 | } |
| 349 | return typeCtx |
| 350 | } |