2 * Copyright (c) 2017, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
11 constant_name
: string;
12 constant_value
: Typed_value.t
option;
13 constant_initializer_instrs
: Instruction_sequence.t
option;
16 (* Interestingly, HHAS does not represent the declared types of constants,
17 unlike formal parameters and return types. We might consider fixing this. *)
19 (* Also interestingly, abstract constants are not emitted at all. *)
21 let make constant_name constant_value constant_initializer_instrs
=
22 { constant_name
; constant_value
; constant_initializer_instrs
}
24 let name hhas_constant
= hhas_constant
.constant_name
26 let value hhas_constant
= hhas_constant
.constant_value
28 let initializer_instrs hhas_constant
=
29 hhas_constant
.constant_initializer_instrs