From 861ab57a431864d668f5527d20696651f83c9ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Tue, 2 Jun 2020 15:04:03 +0100 Subject: [PATCH] move solver_types to typesystem/ (because of dependencies. It should be merged with the AST really) --- src/passes/8-typer-new/heuristic_break_ctor.ml | 2 +- src/passes/8-typer-new/heuristic_specialize1.ml | 2 +- src/passes/8-typer-new/normalizer.ml | 2 +- src/passes/8-typer-new/solver.ml | 2 +- src/{passes/8-typer-new => stages/typesystem}/solver_types.ml | 0 src/stages/typesystem/typesystem.ml | 1 + 6 files changed, 5 insertions(+), 4 deletions(-) rename src/{passes/8-typer-new => stages/typesystem}/solver_types.ml (100%) diff --git a/src/passes/8-typer-new/heuristic_break_ctor.ml b/src/passes/8-typer-new/heuristic_break_ctor.ml index e676f2500..1c0c63e60 100644 --- a/src/passes/8-typer-new/heuristic_break_ctor.ml +++ b/src/passes/8-typer-new/heuristic_break_ctor.ml @@ -3,7 +3,7 @@ open Ast_typed.Misc open Ast_typed.Types -open Solver_types +open Typesystem.Solver_types let selector : (type_constraint_simpl, output_break_ctor) selector = (* find two rules with the shape x = k(var …) and x = k'(var' …) *) diff --git a/src/passes/8-typer-new/heuristic_specialize1.ml b/src/passes/8-typer-new/heuristic_specialize1.ml index 6e481fc12..271f695f6 100644 --- a/src/passes/8-typer-new/heuristic_specialize1.ml +++ b/src/passes/8-typer-new/heuristic_specialize1.ml @@ -6,7 +6,7 @@ module Core = Typesystem.Core open Ast_typed.Misc open Ast_typed.Types -open Solver_types +open Typesystem.Solver_types let selector : (type_constraint_simpl, output_specialize1) selector = (* find two rules with the shape (x = forall b, d) and x = k'(var' …) or vice versa *) diff --git a/src/passes/8-typer-new/normalizer.ml b/src/passes/8-typer-new/normalizer.ml index 8c391c2d5..5c6549c03 100644 --- a/src/passes/8-typer-new/normalizer.ml +++ b/src/passes/8-typer-new/normalizer.ml @@ -2,7 +2,7 @@ module Core = Typesystem.Core module Map = RedBlackTrees.PolyMap open Ast_typed.Misc open Ast_typed.Types -open Solver_types +open Typesystem.Solver_types (* sub-sub component: constraint normalizer: remove dupes and give structure * right now: union-find of unification vars diff --git a/src/passes/8-typer-new/solver.ml b/src/passes/8-typer-new/solver.ml index 0bcbe1260..c302befaf 100644 --- a/src/passes/8-typer-new/solver.ml +++ b/src/passes/8-typer-new/solver.ml @@ -4,7 +4,7 @@ module Map = RedBlackTrees.PolyMap module Set = RedBlackTrees.PolySet module UF = UnionFind.Poly2 open Ast_typed.Types -open Solver_types +open Typesystem.Solver_types (* sub-sub component: lazy selector (don't re-try all selectors every time) * For now: just re-try everytime *) diff --git a/src/passes/8-typer-new/solver_types.ml b/src/stages/typesystem/solver_types.ml similarity index 100% rename from src/passes/8-typer-new/solver_types.ml rename to src/stages/typesystem/solver_types.ml diff --git a/src/stages/typesystem/typesystem.ml b/src/stages/typesystem/typesystem.ml index 75d8ee5b8..852d7543c 100644 --- a/src/stages/typesystem/typesystem.ml +++ b/src/stages/typesystem/typesystem.ml @@ -1,3 +1,4 @@ module Core = Core module Shorthands = Shorthands module Misc = Misc +module Solver_types = Solver_types