mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 14:57:03 +00:00
compiler/old_type_constraints.m:
As above.
compiler/type_constraints.m:
Make this file a placeholder for the new constraint based
type analysis algorithm I will soon start work on.
compiler/check_hlds.m:
Include the new (old) module.
compiler/mercury_compile_front_end.m:
Invoke one constraint based type analysis module or the other based on
the value of an option.
compiler/notes/compiler_design.html:
Document both modules.
43 lines
1.5 KiB
Mathematica
43 lines
1.5 KiB
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ft=mercury ts=4 sw=4 et
|
|
%---------------------------------------------------------------------------%
|
|
% Copyright (C) 2009-2012 The University of Melbourne.
|
|
% This file may only be copied under the terms of the GNU General
|
|
% Public License - see the file COPYING in the Mercury distribution.
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% File: type_constraints.m
|
|
%
|
|
% Typecheck all the predicates in the program using constraints.
|
|
%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module check_hlds.type_constraints.
|
|
:- interface.
|
|
|
|
:- import_module hlds.
|
|
:- import_module hlds.hlds_module.
|
|
:- import_module parse_tree.
|
|
:- import_module parse_tree.error_util.
|
|
|
|
:- import_module list.
|
|
|
|
% Typecheck the module using constraints.
|
|
%
|
|
:- pred typecheck_constraints(module_info::in, module_info::out,
|
|
list(error_spec)::out) is det.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
typecheck_constraints(!HLDS, Specs) :-
|
|
Specs = [].
|
|
|
|
%---------------------------------------------------------------------------%
|
|
:- end_module check_hlds.type_constraints.
|
|
%---------------------------------------------------------------------------%
|