-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathconstant.m
More file actions
94 lines (76 loc) · 2.89 KB
/
constant.m
File metadata and controls
94 lines (76 loc) · 2.89 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
%-----------------------------------------------------------------------%
% Plasma constants
% vim: ts=4 sw=4 et
%
% Copyright (C) Plasma Team
% Distributed under the terms of the MIT License see ../LICENSE.code
%
% This module provides constants used in the compiler and other tools.
%
%-----------------------------------------------------------------------%
:- module constant.
%-----------------------------------------------------------------------%
:- interface.
:- import_module io.
:- func source_extension = string.
:- func typeres_extension = string.
:- func interface_extension = string.
:- func depends_extension = string.
:- func pz_text_extension = string.
:- func output_extension = string.
:- func library_extension = string.
:- func native_object_extension = string.
:- func native_dylib_extension = string.
:- func cpp_extension = string.
:- func c_header_extension = string.
:- func build_file = string.
:- func build_directory = string.
:- func ninja_rules_file = string.
:- func ninja_vars_file = string.
:- func ninja_build_file = string.
:- func import_whitelist_file_no_directroy = string.
%-----------------------------------------------------------------------%
:- func version_string = string.
% Print the version message.
%
:- pred version(string::in, io::di, io::uo) is det.
%-----------------------------------------------------------------------%
%-----------------------------------------------------------------------%
:- implementation.
:- import_module list.
:- import_module string.
%-----------------------------------------------------------------------%
source_extension = ".p".
typeres_extension = ".typeres".
interface_extension = ".pi".
depends_extension = ".dep".
pz_text_extension = ".pzt".
output_extension = ".pzo".
library_extension = ".pz".
native_object_extension = ".o".
native_dylib_extension = ".so".
cpp_extension = ".cpp".
c_header_extension = ".h".
build_file = "BUILD.plz".
build_directory = "_build".
ninja_rules_file = "rules.ninja".
ninja_vars_file = "vars.ninja".
ninja_build_file = "build.ninja".
% Ninja requires it uses this name.
import_whitelist_file_no_directroy = "include_whitelist.txt".
%-----------------------------------------------------------------------%
:- pragma foreign_decl("C", include_file("../runtime/pz_config.h")).
:- pragma foreign_proc("C",
version_string = (Version::out),
[promise_pure, thread_safe, will_not_call_mercury,
will_not_throw_exception],
"
Version = GC_STRDUP(PLASMA_VERSION_STRING);
").
version(Name, !IO) :-
io.format("%s, %s\n", [s(Name), s(version_string)], !IO),
io.write_string("https://plasmalang.org\n", !IO),
io.write_string("Copyright (C) 2015-2025 The Plasma Team\n", !IO),
io.write_string("Distributed under the MIT License\n", !IO).
%-----------------------------------------------------------------------%
%-----------------------------------------------------------------------%