-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathoptions.m
More file actions
79 lines (64 loc) · 2.63 KB
/
options.m
File metadata and controls
79 lines (64 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
%-----------------------------------------------------------------------%
% Plasma compiler options
% vim: ts=4 sw=4 et
%
% Copyright (C) Plasma Team
% Distributed under the terms of the MIT License see ../LICENSE.code
%
% The options structure for the Plasma compiler.
%
%-----------------------------------------------------------------------%
:- module options.
%-----------------------------------------------------------------------%
:- interface.
:- import_module bool.
:- import_module maybe.
:- import_module util.
:- import_module util.log.
%-----------------------------------------------------------------------%
:- type general_options
---> general_options(
% High-level options
go_dir :: string, % The directory of
% the input file.
go_source_dir :: string, % Trim this prefix
% from paths in error
% messages.
go_input_file :: string,
go_output_file :: string,
go_import_whitelist_file :: maybe(string),
go_module_name_check :: maybe(string),
go_warn_as_error :: bool,
% Diagnostic options.
go_verbose :: log_config,
go_dump_stages :: dump_stages,
go_write_output :: write_output,
go_report_timing :: report_timing
).
:- type compile_options
---> compile_options(
% Feature/optimisation options
% Although we're not generally implementing optimisations or
% these options control some optional transformations during
% compilation, by making them options they're easier toe
% test.
co_do_simplify :: do_simplify,
co_enable_tailcalls :: enable_tailcalls
).
:- type dump_stages
---> dump_stages
; dont_dump_stages.
:- type write_output
---> write_output
; dont_write_output.
:- type report_timing
---> no_timing
; report_command_times.
:- type do_simplify
---> do_simplify_pass
; skip_simplify_pass.
:- type enable_tailcalls
---> enable_tailcalls
; dont_enable_tailcalls.
%-----------------------------------------------------------------------%
%-----------------------------------------------------------------------%