/*
** Automatically generated from `error_spec.m'
** by the Mercury compiler,
** version rotd-2026-07-20
** configured for x86_64-pc-linux-gnu.
** Do not edit.
**
** The autoconfigured grade settings governing
** the generation of this C file were
**
** TAG_BITS=2
** UNBOXED_FLOAT=no
** UNBOXED_INT64S=no
** PREGENERATED_DIST=yes
** HIGHLEVEL_CODE=yes
**
** END_OF_C_GRADE_INFO
*/


// :- module parse_tree.error_spec.
// :- implementation.

/*
INIT mercury__parse_tree__error_spec__init
ENDINIT
*/

#include "parse_tree.error_spec.mih"


#include "array.mih"
#include "assoc_list.mih"
#include "bitmap.mih"
#include "bool.mih"
#include "builtin.mih"
#include "char.mih"
#include "construct.mih"
#include "cord.mih"
#include "counter.mih"
#include "deconstruct.mih"
#include "edit_distance.mih"
#include "edit_seq.mih"
#include "enum.mih"
#include "getopt.mih"
#include "int.mih"
#include "integer.mih"
#include "io.mih"
#include "libs.mih"
#include "list.mih"
#include "map.mih"
#include "maybe.mih"
#include "mdbcomp.mih"
#include "one_or_more.mih"
#include "ops.mih"
#include "pair.mih"
#include "parse_tree.mih"
#include "pretty_printer.mih"
#include "private_builtin.mih"
#include "require.mih"
#include "set.mih"
#include "set_ordlist.mih"
#include "sparse_bitset.mih"
#include "std_util.mih"
#include "stream.mih"
#include "string.mih"
#include "term.mih"
#include "term_context.mih"
#include "time.mih"
#include "tree234.mih"
#include "type_desc.mih"
#include "uint.mih"
#include "unit.mih"
#include "univ.mih"
#include "varset.mih"
#include "libs.file_util.mih"
#include "libs.globals.mih"
#include "libs.op_mode.mih"
#include "libs.optdb_help.mih"
#include "libs.optimization_options.mih"
#include "libs.option_categories.mih"
#include "libs.options.mih"
#include "libs.trace_params.mih"
#include "mdbcomp.feedback.mih"
#include "mdbcomp.prim_data.mih"
#include "mdbcomp.sym_name.mih"
#include "parse_tree.file_names.mih"
#include "parse_tree.find_module.mih"
#include "parse_tree.parse_tree_out_term.mih"
#include "parse_tree.parse_tree_output.mih"
#include "parse_tree.prog_data.mih"
#include "parse_tree.prog_data_pragma.mih"
#include "parse_tree.prog_item.mih"
#include "parse_tree.prog_type.mih"
#include "parse_tree.prog_util.mih"
#include "parse_tree.set_of_var.mih"
#include "parse_tree.var_db.mih"
#include "parse_tree.var_table.mih"
#include "string.builder.mih"
#include "string.format.mih"
#include "string.parse_util.mih"
#include "mdbcomp.feedback.feedback_info.mih"




static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__set_ordlist__pti_set_ordlist_1__plain_term_context__type_ctor_info_term_context_0;

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__edit_seq__pti_change_hunk_1__plain_builtin__type_ctor_info_string_0;

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__list__pti_list_1__plain_parse_tree__error_spec__type_ctor_info_format_piece_0;

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__edit_seq__pti_diff_1__plain_builtin__type_ctor_info_string_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_1;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_2;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_actual_severity_0[3];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_actual_severity_0[3];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_actual_severity_0[3];

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_1;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_2;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_3;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_4;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_color_name_0[5];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_color_name_0[5];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_color_name_0[5];

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_0[2];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_0[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_1[1];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_1[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_1;

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_component_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_2[2];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_2[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_2;

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__maybe__ti_maybe_1term_context__type_ctor_info_term_context_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_3[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_3[4];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_diag_msg_0_3[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_3;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_4[1];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_4[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_4;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_2[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_3[2];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_msg_0[4];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_msg_0[5];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_msg_0[5];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_0[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_1[2];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_diag_msg_component_0_1[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_1;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_2[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_2;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_msg_component_0[3];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_msg_component_0[3];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_msg_component_0[3];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_0[5];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_0[5];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_1[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_1[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_1;

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_2[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_2[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_2;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_spec_0[3];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_spec_0[3];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_spec_0[3];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_0[5];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_0[5];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_1[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_1[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_1;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_2[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_2[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_2;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_err_spec_0[3];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_err_spec_0[3];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_err_spec_0[3];

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_err_spec_0;

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_warn_spec_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_errs_warns_0_0[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_errs_warns_0_0;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_errs_warns_0_0[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_errs_warns_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_errs_warns_0[1];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_errs_warns_0[1];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_0[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_1[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_1;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_2[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_2;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_3[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_3;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_4[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_4;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_5[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_5;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_6[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_6;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_7[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_7;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_8[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_8;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_9;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_10;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_11;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_12[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_12;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_13[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_13;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_14[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_14;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_15[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_15;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_16[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_16;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_17[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_17;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_18[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_18;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_19[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_19;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_20[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_20;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_21[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_21;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_22[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_22;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_23[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_23;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_24[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_24;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_25[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_25;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_26[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_26;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_27[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_27;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_28[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_28;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_29[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_29;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_30[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_30;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_31[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_31;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_32[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_32;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_33[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_33;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_34[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_34;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_35[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_35;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_36[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_36[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_36;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_37[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_37[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_37;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_38[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_38[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_38;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_39[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_39[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_39;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_40[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_40;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_41[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_41;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_42[2];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_42[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_42;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_43[2];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_43[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_43;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_44;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_45[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_45;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_46;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_47[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_47[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_47;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_48[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_48[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_48;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_49[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_49;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_0[5];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_2[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_3[43];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_format_piece_0[4];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_format_piece_0[50];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_format_piece_0[50];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_0[5];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_0[5];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_1[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_1[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_1;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_2[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_2[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_2;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_info_spec_0[3];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_info_spec_0[3];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_info_spec_0[3];

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_1;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_lp_piece_kind_0[2];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_lp_piece_kind_0[2];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_lp_piece_kind_0[2];

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_1;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_maybe_always_treat_as_first_0[2];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_maybe_always_treat_as_first_0[2];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_maybe_always_treat_as_first_0[2];

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_1;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_mode_report_control_0[2];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_mode_report_control_0[2];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_mode_report_control_0[2];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_module_file_id_0_0[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_module_file_id_0_0;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_module_file_id_0_0[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_module_file_id_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_module_file_id_0[1];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_module_file_id_0[1];

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_1;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_rp_piece_kind_0[2];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_rp_piece_kind_0[2];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_rp_piece_kind_0[2];

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_1;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_same_but_for_case_0[2];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_same_but_for_case_0[2];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_same_but_for_case_0[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_0;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_1;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_2;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_3;

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__maybe__ti_maybe_1parse_tree__error_spec__type_ctor_info_module_file_id_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_4[2];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_4;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_5;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_6;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_7;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_8;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_9;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_10;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_11;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_12;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_13;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_14;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_15;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_16;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_17;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_18[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_phase_0_18[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_18;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_19;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_20;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_21;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_22;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_23[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_phase_0_23[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_23;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_24;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_25;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_26;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_27;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_28;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_29;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_30;

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_31;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_0[29];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_2[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_3[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_phase_0[4];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_phase_0[32];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_phase_0[32];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_0_1[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_0_1[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_1;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_0_2[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_0_2[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_2;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_0[3];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_0[3];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_0[3];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_err_0_0;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_err_0_0[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_err_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_err_0[1];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_err_0[1];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_info_0_0[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_info_0_0[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_info_0_0;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_info_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_info_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_info_0[1];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_info_0[1];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_warn_0_0[1];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_warn_0_0[1];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_warn_0_0;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_warn_0_1[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_warn_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_warn_0[1];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_warn_0[1];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_std_diag_msg_0_0[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_std_diag_msg_0_0[4];

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_std_diag_msg_0_0[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_msg_0_0;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_std_diag_msg_0_3[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_std_diag_msg_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_std_diag_msg_0[1];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_std_diag_msg_0[1];

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_std_diag_msg_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_std_diag_spec_0_0[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_std_diag_spec_0_0[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_spec_0_0;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_std_diag_spec_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_std_diag_spec_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_std_diag_spec_0[1];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_std_diag_spec_0[1];

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_0;

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_1;

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_verbose_always_or_once_0[2];

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_verbose_always_or_once_0[2];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_verbose_always_or_once_0[2];

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_0[5];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_0[5];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_0;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_1[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_1[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_1;

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_2[4];

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_2[4];

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_2;

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_0[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_1[1];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_2[1];

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_warn_spec_0[3];

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_warn_spec_0[3];

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_warn_spec_0[3];

static MR_String MR_CALL 
parse_tree__error_spec__IntroducedFrom__func__maybe_construct_did_you_mean_pieces__1235__1_1_f_0(
  MR_String HeadVar__1_8);

static void MR_CALL 
parse_tree__error_spec____Compare____same_but_for_case_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____same_but_for_case_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2);

static MR_bool MR_CALL 
parse_tree__error_spec__is_nl_piece_1_p_0(
  MR_Word Piece_2);

static MR_Unsigned MR_CALL 
parse_tree__error_spec__case_sensitive_replacement_cost_2_f_0(
  MR_Char CharA_4,
  MR_Char CharB_5);

static MR_bool MR_CALL 
parse_tree__error_spec__name_is_close_enough_4_p_0(
  MR_Unsigned Cost_5,
  MR_String Query_6,
  MR_Unsigned QueryLenU_7,
  MR_String Name_8);

static MR_bool MR_CALL 
parse_tree__error_spec__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_110_97_109_101_95_105_115_95_99_108_111_115_101_95_101_110_111_117_103_104_95_95_91_50_93_95_48_4_p_0(
  MR_Unsigned Cost_5,
  MR_Unsigned QueryLenU_7,
  MR_String Name_8);

static void MR_CALL 
parse_tree__error_spec__diff_seq_line_to_pieces_2_p_0(
  MR_Word Diff_3,
  MR_Word * Pieces_4);

static void MR_CALL 
parse_tree__error_spec__change_hunk_to_pieces_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec__change_hunk_to_pieces_2_p_0(
  MR_Word ChangeHunk_3,
  MR_Word * ChangeHunkPieces_4);

static void MR_CALL 
parse_tree__error_spec__accumulate_contexts_in_msg_3_p_0(
  MR_Word Msg_4,
  MR_Word STATE_VARIABLE_Contexts_0_8,
  MR_Word * STATE_VARIABLE_Contexts_9);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_split_line_pieces__ho1_6_p_0(
  MR_Word MaybeColorA_8,
  MR_Word MaybeColorB_9,
  MR_Word LastSuffixB_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho49_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho48_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho47_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho46_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho45_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho44_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho43_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho42_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho41_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho40_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho39_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho38_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho37_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho36_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho35_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho34_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho33_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho32_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho31_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho30_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho29_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho28_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho26_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static MR_Box MR_CALL 
parse_tree__error_spec__maybe_construct_prefixed_did_you_mean_pieces_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1);

static MR_Box MR_CALL 
parse_tree__error_spec__maybe_construct_did_you_mean_pieces_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1);

static void MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_4(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static MR_bool MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1);

static MR_Box MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0(
  MR_String BaseName_5,
  MR_Word CandidateNames_6,
  MR_Word TransformFunc_7,
  MR_Word * DidYouMeanPieces_8);

static void MR_CALL 
parse_tree__error_spec__is_any_suggestion_same_but_for_case_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec__is_any_suggestion_same_but_for_case_3_p_0(
  MR_Word BaseNameLowerChars_1,
  MR_Word HeadVar__2_2,
  MR_Word * HeadVar__3_3);

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho27_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14);

static void MR_CALL 
parse_tree__error_spec__construct_diff_for_string_seqs_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec__accumulate_contexts_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec__color_pieces_2_f_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1);

static MR_bool MR_CALL 
parse_tree__error_spec__color_pieces_2_f_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1);

static MR_Word MR_CALL 
parse_tree__error_spec__indented_list_loop_1_f_0(
  MR_Word HeadVar__1_1);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____actual_severity_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____actual_severity_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____color_name_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____color_name_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_msg_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____diag_msg_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_msg_component_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____diag_msg_component_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____diag_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____err_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____err_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____errs_warns_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____errs_warns_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____format_piece_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____format_piece_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____info_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____info_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____lp_piece_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____lp_piece_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____maybe_always_treat_as_first_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____maybe_always_treat_as_first_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____mode_report_control_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____mode_report_control_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____module_file_id_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____module_file_id_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____rp_piece_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____rp_piece_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____same_but_for_case_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____same_but_for_case_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_phase_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____spec_phase_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_err_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_err_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_warn_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_warn_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____std_diag_msg_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____std_diag_msg_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____std_diag_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____std_diag_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____verbose_always_or_once_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____verbose_always_or_once_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____warn_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
parse_tree__error_spec____Compare____warn_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);


static /* final */ const MR_Box parse_tree__error_spec_scalar_common_1[28][2];

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_2[1][1];

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_4[2][4];

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_5[10][3];

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_6[3][6];

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_7[4][5];

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_8[1][7];


struct parse_tree__error_spec__vector_common_type_3_0_s {
  const MR_String parse_tree__error_spec__vector_common_type_3_0__vct_3_f_0;
};

static /* final */ const struct parse_tree__error_spec__vector_common_type_3_0_s parse_tree__error_spec_vector_common_3[42];



static /* final */ const MR_Box parse_tree__error_spec_scalar_common_1[28][2] = {
  /* row   0 */
  {
    ((MR_Box) (&mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1)),
    ((MR_Box) (&mercury__term_context__term_context__type_ctor_info_term_context_0))
  },
  /* row   1 */
  {
    ((MR_Box) (&mercury__edit_seq__edit_seq__type_ctor_info_change_hunk_1)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
  /* row   2 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0))
  },
  /* row   3 */
  {
    ((MR_Box) (&mercury__edit_seq__edit_seq__type_ctor_info_diff_1)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
  /* row   4 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&mercury__term_context__term_context__type_ctor_info_term_context_0))
  },
  /* row   5 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_component_0))
  },
  /* row   6 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_0))
  },
  /* row   7 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_err_spec_0))
  },
  /* row   8 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_warn_spec_0))
  },
  /* row   9 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_module_file_id_0))
  },
  /* row  10 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 39U)),
    ((MR_Box) ((MR_Integer) 1))
  },
  /* row  11 */
  {
    ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[10]))),
    ((MR_Box) ((MR_Unsigned) 0U))
  },
  /* row  12 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 39U)),
    ((MR_Box) ((MR_Integer) -1))
  },
  /* row  13 */
  {
    ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[12]))),
    ((MR_Box) ((MR_Unsigned) 0U))
  },
  /* row  14 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 9U)),
    ((MR_Box) ((MR_String) "diag_spec id:"))
  },
  /* row  15 */
  {
    ((MR_Box) ((MR_Unsigned) 12U)),
    ((MR_Box) ((MR_Unsigned) 0U))
  },
  /* row  16 */
  {
    ((MR_Box) ((MR_String) "...")),
    ((MR_Box) ((MR_Unsigned) 0U))
  },
  /* row  17 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 9U)),
    ((MR_Box) ((MR_String) "(Did you mean"))
  },
  /* row  18 */
  {
    ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[17]))),
    ((MR_Box) ((MR_Unsigned) 0U))
  },
  /* row  19 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 8U)),
    ((MR_Box) ((MR_String) "\?)"))
  },
  /* row  20 */
  {
    ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[19]))),
    ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])))
  },
  /* row  21 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 9U)),
    ((MR_Box) ((MR_String) "Note the lower-vs-upper case difference.)"))
  },
  /* row  22 */
  {
    ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[21]))),
    ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])))
  },
  /* row  23 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 8U)),
    ((MR_Box) ((MR_String) "\?"))
  },
  /* row  24 */
  {
    ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[23]))),
    ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[22])))
  },
  /* row  25 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_character_0))
  },
  /* row  26 */
  {
    ((MR_Box) (MR_Word) ((MR_Unsigned) 8U)),
    ((MR_Box) ((MR_String) ","))
  },
  /* row  27 */
  {
    ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[26]))),
    ((MR_Box) ((MR_Unsigned) 0U))
  },
};

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_2[1][1] = {
  /* row   0 */
  { (MR_Box) (((((MR_Unsigned) 0U << 4)) | (((((MR_Unsigned) 0U << 3)) | (((((MR_Unsigned) 0U << 2)) | (((MR_Unsigned) 0U << 1)))))))) },
};

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_4[2][4] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0))
  },
  /* row   1 */
  {
    ((MR_Box) ((MR_Unsigned) 2U)),
    ((MR_Box) ((MR_Unsigned) 2U)),
    ((MR_Box) (&parse_tree__error_spec_scalar_common_5[5])),
    ((MR_Box) ((MR_Unsigned) 2U))
  },
};

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_5[10][3] = {
  /* row   0 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_4[0])),
    ((MR_Box) (parse_tree__error_spec__color_pieces_2_f_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   1 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_4[0])),
    ((MR_Box) (parse_tree__error_spec__color_pieces_2_f_0_2)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   2 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_6[0])),
    ((MR_Box) (parse_tree__error_spec__accumulate_contexts_3_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   3 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_7[0])),
    ((MR_Box) (parse_tree__error_spec__construct_diff_for_string_seqs_4_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   4 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_7[1])),
    ((MR_Box) (parse_tree__error_spec__is_any_suggestion_same_but_for_case_3_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   5 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_6[1])),
    ((MR_Box) (parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   6 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_7[1])),
    ((MR_Box) (parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_3)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   7 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_7[1])),
    ((MR_Box) (parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_4)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   8 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_7[2])),
    ((MR_Box) (parse_tree__error_spec__maybe_construct_did_you_mean_pieces_3_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   9 */
  {
    ((MR_Box) (&parse_tree__error_spec_scalar_common_7[3])),
    ((MR_Box) (parse_tree__error_spec__change_hunk_to_pieces_2_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
};

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_6[3][6] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_0)),
    ((MR_Box) (&parse_tree__error_spec__set_ordlist__pti_set_ordlist_1__plain_term_context__type_ctor_info_term_context_0)),
    ((MR_Box) (&parse_tree__error_spec__set_ordlist__pti_set_ordlist_1__plain_term_context__type_ctor_info_term_context_0))
  },
  /* row   1 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_character_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_character_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_uint_0))
  },
  /* row   2 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
};

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_7[4][5] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) (&parse_tree__error_spec__edit_seq__pti_change_hunk_1__plain_builtin__type_ctor_info_string_0)),
    ((MR_Box) (&parse_tree__error_spec__list__pti_list_1__plain_parse_tree__error_spec__type_ctor_info_format_piece_0))
  },
  /* row   1 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_character_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_character_0))
  },
  /* row   2 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
  /* row   3 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) (&parse_tree__error_spec__edit_seq__pti_diff_1__plain_builtin__type_ctor_info_string_0)),
    ((MR_Box) (&parse_tree__error_spec__list__pti_list_1__plain_parse_tree__error_spec__type_ctor_info_format_piece_0))
  },
};

static /* final */ const MR_Box parse_tree__error_spec_scalar_common_8[1][7] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 4)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_uint_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_uint_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
};


static /* final */ const struct parse_tree__error_spec__vector_common_type_3_0_s parse_tree__error_spec_vector_common_3[42] = {
  /* row   0 */   { (MR_String) "zero" },
  /* row   1 */   { (MR_String) "one" },
  /* row   2 */   { (MR_String) "two" },
  /* row   3 */   { (MR_String) "three" },
  /* row   4 */   { (MR_String) "four" },
  /* row   5 */   { (MR_String) "five" },
  /* row   6 */   { (MR_String) "six" },
  /* row   7 */   { (MR_String) "seven" },
  /* row   8 */   { (MR_String) "eight" },
  /* row   9 */   { (MR_String) "nine" },
  /* row  10 */   { (MR_String) "ten" },
  /* row  11 */   { (MR_String) "zero" },
  /* row  12 */   { (MR_String) "one" },
  /* row  13 */   { (MR_String) "two" },
  /* row  14 */   { (MR_String) "three" },
  /* row  15 */   { (MR_String) "four" },
  /* row  16 */   { (MR_String) "five" },
  /* row  17 */   { (MR_String) "six" },
  /* row  18 */   { (MR_String) "seven" },
  /* row  19 */   { (MR_String) "eight" },
  /* row  20 */   { (MR_String) "nine" },
  /* row  21 */   { (MR_String) "ten" },
  /* row  22 */   { (MR_String) "first" },
  /* row  23 */   { (MR_String) "second" },
  /* row  24 */   { (MR_String) "third" },
  /* row  25 */   { (MR_String) "fourth" },
  /* row  26 */   { (MR_String) "fifth" },
  /* row  27 */   { (MR_String) "sixth" },
  /* row  28 */   { (MR_String) "seventh" },
  /* row  29 */   { (MR_String) "eighth" },
  /* row  30 */   { (MR_String) "ninth" },
  /* row  31 */   { (MR_String) "tenth" },
  /* row  32 */   { (MR_String) "first" },
  /* row  33 */   { (MR_String) "second" },
  /* row  34 */   { (MR_String) "third" },
  /* row  35 */   { (MR_String) "fourth" },
  /* row  36 */   { (MR_String) "fifth" },
  /* row  37 */   { (MR_String) "sixth" },
  /* row  38 */   { (MR_String) "seventh" },
  /* row  39 */   { (MR_String) "eighth" },
  /* row  40 */   { (MR_String) "ninth" },
  /* row  41 */   { (MR_String) "tenth" },
};


#include "array.mh"
#include "bitmap.mh"
#include "io.mh"
#include "string.mh"
#include "time.mh"
#include "io.stream_ops.mh"


static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__set_ordlist__pti_set_ordlist_1__plain_term_context__type_ctor_info_term_context_0 = {
  &mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1,
  { (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0) }
};

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__edit_seq__pti_change_hunk_1__plain_builtin__type_ctor_info_string_0 = {
  &mercury__edit_seq__edit_seq__type_ctor_info_change_hunk_1,
  { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) }
};

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__list__pti_list_1__plain_parse_tree__error_spec__type_ctor_info_format_piece_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0) }
};

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__error_spec__edit_seq__pti_diff_1__plain_builtin__type_ctor_info_string_0 = {
  &mercury__edit_seq__edit_seq__type_ctor_info_diff_1,
  { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) }
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_0 = {
  (MR_String) "actual_severity_error",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_1 = {
  (MR_String) "actual_severity_warning",
  INT32_C(1)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_2 = {
  (MR_String) "actual_severity_informational",
  INT32_C(2)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_actual_severity_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_2
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_actual_severity_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_actual_severity_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_actual_severity_0[3] = {
  (MR_Integer) 0,
  (MR_Integer) 2,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_actual_severity_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____actual_severity_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____actual_severity_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "actual_severity",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_actual_severity_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_actual_severity_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_actual_severity_0,

};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_0 = {
  (MR_String) "color_subject",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_1 = {
  (MR_String) "color_correct",
  INT32_C(1)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_2 = {
  (MR_String) "color_incorrect",
  INT32_C(2)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_3 = {
  (MR_String) "color_inconsistent",
  INT32_C(3)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_4 = {
  (MR_String) "color_hint",
  INT32_C(4)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_color_name_0[5] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_4
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_color_name_0[5] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_4,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_color_name_0_0
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_color_name_0[5] = {
  (MR_Integer) 4,
  (MR_Integer) 0,
  (MR_Integer) 3,
  (MR_Integer) 2,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_color_name_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____color_name_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____color_name_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "color_name",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_color_name_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_color_name_0 },
  (MR_Integer) 5,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_color_name_0,

};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0) }
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_0[2] = {
  (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_0[2] = {
  (MR_String) "simplest_context",
  (MR_String) "simplest_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_0 = {
  (MR_String) "msg",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_1[1] = { (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0) };

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_1[1] = { (MR_String) "simplestnc_pieces" };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_1 = {
  (MR_String) "no_ctxt_msg",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_1,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_1,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_component_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_component_0) }
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_2[2] = {
  (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_component_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_2[2] = {
  (MR_String) "simple_context",
  (MR_String) "simple_components"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_2 = {
  (MR_String) "simple_msg",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_2,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__maybe__ti_maybe_1term_context__type_ctor_info_term_context_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0) }
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_3[4] = {
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__maybe__ti_maybe_1term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_maybe_always_treat_as_first_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_uint_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_component_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_3[4] = {
  (MR_String) "gen_context",
  (MR_String) "gen_treat_as_first",
  (MR_String) "gen_extra_indent",
  (MR_String) "gen_components"
};

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_diag_msg_0_3[4] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_3 = {
  (MR_String) "gen_msg",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 0,
  INT32_C(3),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_3,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_3,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_diag_msg_0_3,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_4[1] = { (MR_PseudoTypeInfo) (&parse_tree__error_spec__maybe__ti_maybe_1term_context__type_ctor_info_term_context_0) };

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_4[1] = { (MR_String) "blank_context" };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_4 = {
  (MR_String) "blank_msg",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 1,
  INT32_C(4),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_0_4,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_msg_0_4,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_2 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_3[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_4
};

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_msg_0[4] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(2),
    MR_SECTAG_REMOTE_FULL_WORD,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_msg_0[5] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_4,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_0_2
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_msg_0[5] = {
  (MR_Integer) 2,
  (MR_Integer) 3,
  (MR_Integer) 4,
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____diag_msg_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____diag_msg_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "diag_msg",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_msg_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_msg_0 },
  (MR_Integer) 5,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_msg_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_0[1] = { (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_0 = {
  (MR_String) "always",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_1[2] = {
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_verbose_always_or_once_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_diag_msg_component_0_1[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_1 = {
  (MR_String) "verbose_only",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_1,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_diag_msg_component_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_2[2] = {
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_2 = {
  (MR_String) "verbose_and_nonverbose",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_msg_component_0_2,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_2 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_msg_component_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_msg_component_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_msg_component_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_msg_component_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_msg_component_0[3] = {
  (MR_Integer) 0,
  (MR_Integer) 2,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_component_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____diag_msg_component_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____diag_msg_component_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "diag_msg_component",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_msg_component_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_msg_component_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_msg_component_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_0[5] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_0[5] = {
  (MR_String) "s_id",
  (MR_String) "s_spec_severity",
  (MR_String) "s_spec_phase",
  (MR_String) "s_spec_context",
  (MR_String) "s_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_0 = {
  (MR_String) "spec",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_1[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_1[4] = {
  (MR_String) "ncs_id",
  (MR_String) "ncs_spec_severity",
  (MR_String) "ncs_spec_phase",
  (MR_String) "ncs_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_1 = {
  (MR_String) "no_ctxt_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_1,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_1,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_0) }
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_2[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_2[4] = {
  (MR_String) "gs_id",
  (MR_String) "gs_severity",
  (MR_String) "gs_phase",
  (MR_String) "gs_msgs"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_2 = {
  (MR_String) "gen_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_diag_spec_0_2,
  parse_tree__error_spec__parse_tree__error_spec__field_names_diag_spec_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_2 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_spec_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_diag_spec_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_spec_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_diag_spec_0_0
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_spec_0[3] = {
  (MR_Integer) 2,
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_spec_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____diag_spec_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____diag_spec_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "diag_spec",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_diag_spec_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_diag_spec_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_diag_spec_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_0[5] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_err_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_0[5] = {
  (MR_String) "s_id",
  (MR_String) "s_spec_severity",
  (MR_String) "s_spec_phase",
  (MR_String) "s_spec_context",
  (MR_String) "s_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_0 = {
  (MR_String) "spec",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_1[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_err_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_1[4] = {
  (MR_String) "ncs_id",
  (MR_String) "ncs_spec_severity",
  (MR_String) "ncs_spec_phase",
  (MR_String) "ncs_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_1 = {
  (MR_String) "no_ctxt_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_1,
  parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_1,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_2[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_err_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_2[4] = {
  (MR_String) "gs_id",
  (MR_String) "gs_severity",
  (MR_String) "gs_phase",
  (MR_String) "gs_msgs"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_2 = {
  (MR_String) "gen_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_err_spec_0_2,
  parse_tree__error_spec__parse_tree__error_spec__field_names_err_spec_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_2 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_err_spec_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_err_spec_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_err_spec_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_err_spec_0_0
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_err_spec_0[3] = {
  (MR_Integer) 2,
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_err_spec_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____err_spec_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____err_spec_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "err_spec",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_err_spec_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_err_spec_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_err_spec_0,

};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_err_spec_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_err_spec_0) }
};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_warn_spec_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_warn_spec_0) }
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_errs_warns_0_0[2] = {
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_err_spec_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_warn_spec_0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_errs_warns_0_0 = {
  (MR_String) "errs_warns",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_errs_warns_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_errs_warns_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_errs_warns_0_0 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_errs_warns_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_errs_warns_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_errs_warns_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_errs_warns_0_0 };

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_errs_warns_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_errs_warns_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____errs_warns_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____errs_warns_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "errs_warns",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_errs_warns_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_errs_warns_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_errs_warns_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_0[2] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_0 = {
  (MR_String) "invis_order_default_start",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_1[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_1 = {
  (MR_String) "fixed",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_1,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_2[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_2 = {
  (MR_String) "quote",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 0,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_2,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_3[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_3 = {
  (MR_String) "int_fixed",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 1,
  INT32_C(3),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_3,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_4[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_4 = {
  (MR_String) "int_name",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 2,
  INT32_C(4),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_4,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_5[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_uint_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_5 = {
  (MR_String) "uint_fixed",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 3,
  INT32_C(5),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_5,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_6[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_uint_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_6 = {
  (MR_String) "uint_name",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 4,
  INT32_C(6),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_6,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_7[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_7 = {
  (MR_String) "nth_fixed",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 5,
  INT32_C(7),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_7,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_8[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_uint_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_8 = {
  (MR_String) "unth_fixed",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 6,
  INT32_C(8),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_8,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_9 = {
  (MR_String) "lower_case_next_if_not_first",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(9),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_10 = {
  (MR_String) "upper_case_next",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 1,
  INT32_C(10),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_11 = {
  (MR_String) "treat_next_as_first",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 2,
  INT32_C(11),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_12[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_12 = {
  (MR_String) "prefix",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 7,
  INT32_C(12),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_12,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_13[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_13 = {
  (MR_String) "suffix",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 8,
  INT32_C(13),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_13,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_14[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_14 = {
  (MR_String) "words",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 9,
  INT32_C(14),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_14,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_15[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_15 = {
  (MR_String) "words_quote",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 10,
  INT32_C(15),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_15,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_16[1] = { (MR_PseudoTypeInfo) (&mdbcomp__sym_name__mdbcomp__sym_name__type_ctor_info_sym_name_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_16 = {
  (MR_String) "qual_sym_name",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 11,
  INT32_C(16),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_16,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_17[1] = { (MR_PseudoTypeInfo) (&mdbcomp__sym_name__mdbcomp__sym_name__type_ctor_info_sym_name_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_17 = {
  (MR_String) "unqual_sym_name",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 12,
  INT32_C(17),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_17,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_18[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_name_arity_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_18 = {
  (MR_String) "name_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 13,
  INT32_C(18),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_18,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_19[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_sym_name_arity_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_19 = {
  (MR_String) "qual_sym_name_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 14,
  INT32_C(19),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_19,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_20[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_sym_name_arity_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_20 = {
  (MR_String) "unqual_sym_name_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 15,
  INT32_C(20),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_20,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_21[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_pf_sym_name_arity_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_21 = {
  (MR_String) "qual_pf_sym_name_pred_form_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 16,
  INT32_C(21),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_21,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_22[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_pf_sym_name_arity_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_22 = {
  (MR_String) "unqual_pf_sym_name_pred_form_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 17,
  INT32_C(22),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_22,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_23[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_pred_pf_name_arity_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_23 = {
  (MR_String) "qual_pf_sym_name_user_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 18,
  INT32_C(23),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_23,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_24[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_pred_pf_name_arity_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_24 = {
  (MR_String) "unqual_pf_sym_name_user_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 19,
  INT32_C(24),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_24,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_25[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_type_ctor_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_25 = {
  (MR_String) "qual_type_ctor",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 20,
  INT32_C(25),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_25,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_26[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_type_ctor_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_26 = {
  (MR_String) "unqual_type_ctor",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 21,
  INT32_C(26),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_26,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_27[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_inst_ctor_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_27 = {
  (MR_String) "qual_inst_ctor",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 22,
  INT32_C(27),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_27,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_28[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_inst_ctor_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_28 = {
  (MR_String) "unqual_inst_ctor",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 23,
  INT32_C(28),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_28,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_29[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mode_ctor_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_29 = {
  (MR_String) "qual_mode_ctor",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 24,
  INT32_C(29),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_29,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_30[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mode_ctor_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_30 = {
  (MR_String) "unqual_mode_ctor",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 25,
  INT32_C(30),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_30,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_31[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_class_id_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_31 = {
  (MR_String) "qual_class_id",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 26,
  INT32_C(31),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_31,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_32[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_class_id_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_32 = {
  (MR_String) "unqual_class_id",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 27,
  INT32_C(32),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_32,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_33[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_33 = {
  (MR_String) "qual_cons_id_and_maybe_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 28,
  INT32_C(33),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_33,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_34[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_34 = {
  (MR_String) "unqual_cons_id_and_maybe_arity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 29,
  INT32_C(34),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_34,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_35[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_35 = {
  (MR_String) "qual_top_ctor_of_type",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 30,
  INT32_C(35),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_35,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_36[1] = { (MR_PseudoTypeInfo) (&mdbcomp__prim_data__mdbcomp__prim_data__type_ctor_info_pred_or_func_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_36[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_36 = {
  (MR_String) "p_or_f",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 31,
  INT32_C(36),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_36,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_36,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_37[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_37[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 2
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_37 = {
  (MR_String) "purity_desc",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 32,
  INT32_C(37),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_37,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_37,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_38[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_38[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 2
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_38 = {
  (MR_String) "a_purity_desc",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 33,
  INT32_C(38),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_38,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_38,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_39[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_39[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 2
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_39 = {
  (MR_String) "purity_desc_article",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 34,
  INT32_C(39),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_39,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_39,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_40[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_40 = {
  (MR_String) "decl",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 35,
  INT32_C(40),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_40,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_41[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_41 = {
  (MR_String) "pragma_decl",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 36,
  INT32_C(41),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_41,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_42[2] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_lp_piece_kind_0)
};

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_42[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_42 = {
  (MR_String) "left_paren_maybe_nl_inc",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 37,
  INT32_C(42),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_42,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_42,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_43[2] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_rp_piece_kind_0)
};

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_43[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_43 = {
  (MR_String) "maybe_nl_dec_right_paren",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 38,
  INT32_C(43),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_43,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_43,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_44 = {
  (MR_String) "nl",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 3,
  INT32_C(44),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_45[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0) };

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_45 = {
  (MR_String) "nl_indent_delta",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 39,
  INT32_C(45),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_45,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_46 = {
  (MR_String) "blank_line",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 4,
  INT32_C(46),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_47[1] = { (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_color_name_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_47[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 3
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_47 = {
  (MR_String) "not_for_general_use_start_color",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 40,
  INT32_C(47),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_47,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_47,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_48[1] = { (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_color_name_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_48[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 3
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_48 = {
  (MR_String) "not_for_general_use_end_color",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 41,
  INT32_C(48),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_48,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_format_piece_0_48,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_49[2] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_49 = {
  (MR_String) "invis_order_default_end",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 42,
  INT32_C(49),
  parse_tree__error_spec__parse_tree__error_spec__field_types_format_piece_0_49,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_0[5] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_9,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_10,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_11,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_44,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_46
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_3[43] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_4,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_5,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_6,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_7,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_8,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_12,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_13,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_14,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_15,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_16,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_17,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_18,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_19,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_20,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_21,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_22,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_23,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_24,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_25,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_26,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_27,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_28,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_29,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_30,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_31,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_32,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_33,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_34,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_35,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_36,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_37,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_38,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_39,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_40,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_41,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_42,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_43,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_45,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_47,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_48,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_49
};

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_format_piece_0[4] = {
  {
    UINT32_C(5),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(43),
    MR_SECTAG_REMOTE_FULL_WORD,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_format_piece_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_format_piece_0[50] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_38,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_46,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_40,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_4,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_49,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_42,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_9,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_43,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_18,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_44,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_45,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_48,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_47,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_7,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_36,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_41,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_12,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_37,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_39,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_31,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_33,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_27,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_29,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_21,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_23,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_16,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_19,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_35,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_25,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_13,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_11,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_5,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_6,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_32,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_34,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_28,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_30,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_22,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_24,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_17,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_20,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_26,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_8,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_10,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_14,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_format_piece_0_15
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_format_piece_0[50] = {
  (MR_Integer) 7,
  (MR_Integer) 3,
  (MR_Integer) 32,
  (MR_Integer) 4,
  (MR_Integer) 5,
  (MR_Integer) 35,
  (MR_Integer) 36,
  (MR_Integer) 16,
  (MR_Integer) 46,
  (MR_Integer) 9,
  (MR_Integer) 47,
  (MR_Integer) 34,
  (MR_Integer) 19,
  (MR_Integer) 33,
  (MR_Integer) 48,
  (MR_Integer) 49,
  (MR_Integer) 28,
  (MR_Integer) 43,
  (MR_Integer) 11,
  (MR_Integer) 29,
  (MR_Integer) 44,
  (MR_Integer) 26,
  (MR_Integer) 41,
  (MR_Integer) 27,
  (MR_Integer) 42,
  (MR_Integer) 31,
  (MR_Integer) 45,
  (MR_Integer) 24,
  (MR_Integer) 39,
  (MR_Integer) 25,
  (MR_Integer) 40,
  (MR_Integer) 22,
  (MR_Integer) 37,
  (MR_Integer) 23,
  (MR_Integer) 38,
  (MR_Integer) 30,
  (MR_Integer) 17,
  (MR_Integer) 20,
  (MR_Integer) 0,
  (MR_Integer) 21,
  (MR_Integer) 2,
  (MR_Integer) 18,
  (MR_Integer) 8,
  (MR_Integer) 10,
  (MR_Integer) 12,
  (MR_Integer) 13,
  (MR_Integer) 1,
  (MR_Integer) 15,
  (MR_Integer) 14,
  (MR_Integer) 6
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____format_piece_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____format_piece_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "format_piece",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_format_piece_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_format_piece_0 },
  (MR_Integer) 50,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_format_piece_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_0[5] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_info_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_0[5] = {
  (MR_String) "s_id",
  (MR_String) "s_spec_severity",
  (MR_String) "s_spec_phase",
  (MR_String) "s_spec_context",
  (MR_String) "s_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_0 = {
  (MR_String) "spec",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_1[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_info_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_1[4] = {
  (MR_String) "ncs_id",
  (MR_String) "ncs_spec_severity",
  (MR_String) "ncs_spec_phase",
  (MR_String) "ncs_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_1 = {
  (MR_String) "no_ctxt_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_1,
  parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_1,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_2[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_info_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_2[4] = {
  (MR_String) "gs_id",
  (MR_String) "gs_severity",
  (MR_String) "gs_phase",
  (MR_String) "gs_msgs"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_2 = {
  (MR_String) "gen_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_info_spec_0_2,
  parse_tree__error_spec__parse_tree__error_spec__field_names_info_spec_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_2 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_info_spec_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_info_spec_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_info_spec_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_info_spec_0_0
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_info_spec_0[3] = {
  (MR_Integer) 2,
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_info_spec_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____info_spec_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____info_spec_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "info_spec",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_info_spec_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_info_spec_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_info_spec_0,

};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_0 = {
  (MR_String) "lp_plain",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_1 = {
  (MR_String) "lp_suffix",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_lp_piece_kind_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_1
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_lp_piece_kind_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_lp_piece_kind_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_lp_piece_kind_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_lp_piece_kind_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____lp_piece_kind_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____lp_piece_kind_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "lp_piece_kind",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_lp_piece_kind_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_lp_piece_kind_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_lp_piece_kind_0,

};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_0 = {
  (MR_String) "always_treat_as_first",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_1 = {
  (MR_String) "treat_based_on_posn",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_maybe_always_treat_as_first_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_1
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_maybe_always_treat_as_first_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_maybe_always_treat_as_first_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_maybe_always_treat_as_first_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_maybe_always_treat_as_first_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____maybe_always_treat_as_first_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____maybe_always_treat_as_first_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "maybe_always_treat_as_first",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_maybe_always_treat_as_first_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_maybe_always_treat_as_first_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_maybe_always_treat_as_first_0,

};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_0 = {
  (MR_String) "report_in_any_mode",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_1 = {
  (MR_String) "report_only_if_in_all_modes",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_mode_report_control_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_1
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_mode_report_control_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_mode_report_control_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_mode_report_control_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_mode_report_control_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____mode_report_control_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____mode_report_control_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "mode_report_control",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_mode_report_control_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_mode_report_control_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_mode_report_control_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_module_file_id_0_0[2] = {
  (MR_PseudoTypeInfo) (&mdbcomp__sym_name__mdbcomp__sym_name__type_ctor_info_sym_name_0),
  (MR_PseudoTypeInfo) (&parse_tree__file_names__parse_tree__file_names__type_ctor_info_ext_0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_module_file_id_0_0 = {
  (MR_String) "module_file_id",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_module_file_id_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_module_file_id_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_module_file_id_0_0 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_module_file_id_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_module_file_id_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_module_file_id_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_module_file_id_0_0 };

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_module_file_id_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_module_file_id_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____module_file_id_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____module_file_id_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "module_file_id",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_module_file_id_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_module_file_id_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_module_file_id_0,

};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_0 = {
  (MR_String) "rp_plain",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_1 = {
  (MR_String) "rp_prefix",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_rp_piece_kind_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_1
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_rp_piece_kind_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_rp_piece_kind_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_rp_piece_kind_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_rp_piece_kind_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____rp_piece_kind_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____rp_piece_kind_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "rp_piece_kind",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_rp_piece_kind_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_rp_piece_kind_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_rp_piece_kind_0,

};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_0 = {
  (MR_String) "all_have_non_case_difference",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_1 = {
  (MR_String) "some_have_only_case_difference",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_same_but_for_case_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_1
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_same_but_for_case_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_same_but_for_case_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_same_but_for_case_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_same_but_for_case_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____same_but_for_case_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____same_but_for_case_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "same_but_for_case",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_same_but_for_case_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_same_but_for_case_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_same_but_for_case_0,

};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_0 = {
  (MR_String) "phase_options",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_1 = {
  (MR_String) "phase_check_libs",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 1,
  INT32_C(1),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_2 = {
  (MR_String) "phase_make_target",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 2,
  INT32_C(2),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_3 = {
  (MR_String) "phase_make_int",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 3,
  INT32_C(3),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__maybe__ti_maybe_1parse_tree__error_spec__type_ctor_info_module_file_id_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_module_file_id_0) }
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_4[2] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__maybe__ti_maybe_1parse_tree__error_spec__type_ctor_info_module_file_id_0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_4 = {
  (MR_String) "phase_find_files",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(4),
  parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_4,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_5 = {
  (MR_String) "phase_read_files",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 4,
  INT32_C(5),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_6 = {
  (MR_String) "phase_write_files",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 5,
  INT32_C(6),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_7 = {
  (MR_String) "phase_module_name",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 6,
  INT32_C(7),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_8 = {
  (MR_String) "phase_t2pt",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 7,
  INT32_C(8),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_9 = {
  (MR_String) "phase_tim_check_invalid_type",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 8,
  INT32_C(9),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_10 = {
  (MR_String) "phase_tim_check_invalid_inst_mode",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 9,
  INT32_C(10),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_11 = {
  (MR_String) "phase_tim_check",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 10,
  INT32_C(11),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_12 = {
  (MR_String) "phase_type_repn",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 11,
  INT32_C(12),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_13 = {
  (MR_String) "phase_pt2h",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 12,
  INT32_C(13),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_14 = {
  (MR_String) "phase_expand_types",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 13,
  INT32_C(14),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_15 = {
  (MR_String) "phase_type_check",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 14,
  INT32_C(15),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_16 = {
  (MR_String) "phase_inst_check",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 15,
  INT32_C(16),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_17 = {
  (MR_String) "phase_polymorphism",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 16,
  INT32_C(17),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_18[1] = { (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_mode_report_control_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_phase_0_18[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_18 = {
  (MR_String) "phase_mode_check",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(18),
  parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_18,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_phase_0_18,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_19 = {
  (MR_String) "phase_purity_check",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 17,
  INT32_C(19),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_20 = {
  (MR_String) "phase_detism_check",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 18,
  INT32_C(20),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_21 = {
  (MR_String) "phase_fact_table_check",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 19,
  INT32_C(21),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_22 = {
  (MR_String) "phase_oisu_check",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 20,
  INT32_C(22),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_23[1] = { (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_mode_report_control_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_phase_0_23[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_23 = {
  (MR_String) "phase_simplify",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(3),
  (MR_Integer) -1,
  INT32_C(23),
  parse_tree__error_spec__parse_tree__error_spec__field_types_spec_phase_0_23,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_phase_0_23,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_24 = {
  (MR_String) "phase_direct_arg_in_out",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 21,
  INT32_C(24),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_25 = {
  (MR_String) "phase_style",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 22,
  INT32_C(25),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_26 = {
  (MR_String) "phase_dead_code",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 23,
  INT32_C(26),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_27 = {
  (MR_String) "phase_termination_analysis",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 24,
  INT32_C(27),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_28 = {
  (MR_String) "phase_accumulator_intro",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 25,
  INT32_C(28),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_29 = {
  (MR_String) "phase_auto_parallelism",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 26,
  INT32_C(29),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_30 = {
  (MR_String) "phase_interface_gen",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 27,
  INT32_C(30),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_31 = {
  (MR_String) "phase_code_gen",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 28,
  INT32_C(31),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_0[29] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_5,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_6,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_7,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_8,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_9,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_10,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_11,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_12,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_13,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_14,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_15,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_16,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_17,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_19,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_20,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_21,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_22,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_24,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_25,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_26,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_27,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_28,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_29,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_30,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_31
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_4 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_18 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_3[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_23 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_phase_0[4] = {
  {
    UINT32_C(29),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_phase_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_phase_0[32] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_28,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_29,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_31,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_26,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_20,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_24,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_14,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_21,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_4,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_16,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_30,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_3,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_18,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_7,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_22,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_17,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_13,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_19,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_5,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_23,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_25,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_8,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_27,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_11,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_10,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_9,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_15,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_12,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_phase_0_6
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_phase_0[32] = {
  (MR_Integer) 17,
  (MR_Integer) 2,
  (MR_Integer) 13,
  (MR_Integer) 12,
  (MR_Integer) 9,
  (MR_Integer) 21,
  (MR_Integer) 31,
  (MR_Integer) 15,
  (MR_Integer) 24,
  (MR_Integer) 28,
  (MR_Integer) 27,
  (MR_Integer) 26,
  (MR_Integer) 30,
  (MR_Integer) 19,
  (MR_Integer) 7,
  (MR_Integer) 29,
  (MR_Integer) 10,
  (MR_Integer) 18,
  (MR_Integer) 14,
  (MR_Integer) 20,
  (MR_Integer) 5,
  (MR_Integer) 8,
  (MR_Integer) 16,
  (MR_Integer) 22,
  (MR_Integer) 6,
  (MR_Integer) 23,
  (MR_Integer) 4,
  (MR_Integer) 25,
  (MR_Integer) 0,
  (MR_Integer) 1,
  (MR_Integer) 11,
  (MR_Integer) 3
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____spec_phase_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____spec_phase_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "spec_phase",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_phase_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_phase_0 },
  (MR_Integer) 32,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_phase_0,

};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_0 = {
  (MR_String) "severity_error",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_0_1[1] = { (MR_PseudoTypeInfo) (&libs__options__libs__options__type_ctor_info_option_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_0_1[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 10
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_1 = {
  (MR_String) "severity_warning",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_0_1,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_0_2[1] = { (MR_PseudoTypeInfo) (&libs__options__libs__options__type_ctor_info_option_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_0_2[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 10
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_2 = {
  (MR_String) "severity_informational",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_0_2,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_0_2,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_2 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_0[3] = {
  (MR_Integer) 0,
  (MR_Integer) 2,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____spec_severity_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____spec_severity_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "spec_severity",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_0,

};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_err_0_0 = {
  (MR_String) "severity_error",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_err_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_err_0_0 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_err_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_err_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_err_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_err_0_0 };

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_err_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_err_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____spec_severity_err_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____spec_severity_err_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "spec_severity_err",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_err_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_err_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_err_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_info_0_0[1] = { (MR_PseudoTypeInfo) (&libs__options__libs__options__type_ctor_info_option_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_info_0_0[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 10
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_info_0_0 = {
  (MR_String) "severity_informational",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_info_0_0,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_info_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_info_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_info_0_0 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_info_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_info_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_info_0_0 };

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____spec_severity_info_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____spec_severity_info_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "spec_severity_info",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_info_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_info_0 },
  (MR_Integer) 1,
  UINT16_C(4),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_info_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_warn_0_0[1] = { (MR_PseudoTypeInfo) (&libs__options__libs__options__type_ctor_info_option_0) };

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_warn_0_0[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 10
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_warn_0_0 = {
  (MR_String) "severity_warning",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_spec_severity_warn_0_0,
  NULL,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_spec_severity_warn_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_warn_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_warn_0_0 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_warn_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_spec_severity_warn_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_warn_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_spec_severity_warn_0_0 };

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_warn_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_warn_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(2),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____spec_severity_warn_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____spec_severity_warn_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "spec_severity_warn",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_spec_severity_warn_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_spec_severity_warn_0 },
  (MR_Integer) 1,
  UINT16_C(4),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_spec_severity_warn_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_std_diag_msg_0_0[4] = {
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__maybe__ti_maybe_1term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_maybe_always_treat_as_first_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_uint_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_component_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_std_diag_msg_0_0[4] = {
  (MR_String) "gen_context",
  (MR_String) "gen_treat_as_first",
  (MR_String) "gen_extra_indent",
  (MR_String) "gen_components"
};

static const MR_DuArgLocn parse_tree__error_spec__parse_tree__error_spec__field_locns_std_diag_msg_0_0[4] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_msg_0_0 = {
  (MR_String) "gen_msg",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 0,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_std_diag_msg_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_names_std_diag_msg_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_locns_std_diag_msg_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_std_diag_msg_0_3[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_msg_0_0 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_std_diag_msg_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_REMOTE_FULL_WORD,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_std_diag_msg_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_std_diag_msg_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_msg_0_0 };

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_std_diag_msg_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_std_diag_msg_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____std_diag_msg_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____std_diag_msg_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "std_diag_msg",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_std_diag_msg_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_std_diag_msg_0 },
  (MR_Integer) 1,
  UINT16_C(4),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_std_diag_msg_0,

};

static const MR_FA_TypeInfo_Struct1 parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_std_diag_msg_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_std_diag_msg_0) }
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_std_diag_spec_0_0[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_std_diag_msg_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_std_diag_spec_0_0[4] = {
  (MR_String) "gs_id",
  (MR_String) "gs_severity",
  (MR_String) "gs_phase",
  (MR_String) "gs_msgs"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_spec_0_0 = {
  (MR_String) "gen_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_std_diag_spec_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_names_std_diag_spec_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_std_diag_spec_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_spec_0_0 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_std_diag_spec_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_std_diag_spec_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_std_diag_spec_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_std_diag_spec_0_0 };

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_std_diag_spec_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_std_diag_spec_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____std_diag_spec_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____std_diag_spec_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "std_diag_spec",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_std_diag_spec_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_std_diag_spec_0 },
  (MR_Integer) 1,
  UINT16_C(4),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_std_diag_spec_0,

};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_0 = {
  (MR_String) "verbose_always",
  INT32_C(0)
};

static const MR_EnumFunctorDesc parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_1 = {
  (MR_String) "verbose_once",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_verbose_always_or_once_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_1
};

static const MR_EnumFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_verbose_always_or_once_0[2] = {
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_0,
  &parse_tree__error_spec__parse_tree__error_spec__enum_functor_desc_verbose_always_or_once_0_1
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_verbose_always_or_once_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_verbose_always_or_once_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (parse_tree__error_spec____Unify____verbose_always_or_once_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____verbose_always_or_once_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "verbose_always_or_once",
  { parse_tree__error_spec__parse_tree__error_spec__enum_name_ordered_verbose_always_or_once_0 },
  { parse_tree__error_spec__parse_tree__error_spec__enum_ordinal_ordered_verbose_always_or_once_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_verbose_always_or_once_0,

};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_0[5] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_warn_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_0[5] = {
  (MR_String) "s_id",
  (MR_String) "s_spec_severity",
  (MR_String) "s_spec_phase",
  (MR_String) "s_spec_context",
  (MR_String) "s_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_0 = {
  (MR_String) "spec",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_0,
  parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_1[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_warn_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_format_piece_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_1[4] = {
  (MR_String) "ncs_id",
  (MR_String) "ncs_spec_severity",
  (MR_String) "ncs_spec_phase",
  (MR_String) "ncs_spec_pieces"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_1 = {
  (MR_String) "no_ctxt_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_1,
  parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_1,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_2[4] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_warn_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0),
  (MR_PseudoTypeInfo) (&parse_tree__error_spec__list__ti_list_1parse_tree__error_spec__type_ctor_info_diag_msg_0)
};

static const MR_ConstString parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_2[4] = {
  (MR_String) "gs_id",
  (MR_String) "gs_severity",
  (MR_String) "gs_phase",
  (MR_String) "gs_msgs"
};

static const MR_DuFunctorDesc parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_2 = {
  (MR_String) "gen_spec",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  parse_tree__error_spec__parse_tree__error_spec__field_types_warn_spec_0_2,
  parse_tree__error_spec__parse_tree__error_spec__field_names_warn_spec_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_0[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_0 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_1[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_1 };

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_2[1] = { &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_2 };

static const MR_DuPtagLayout parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_warn_spec_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    parse_tree__error_spec__parse_tree__error_spec__du_stag_ordered_warn_spec_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_warn_spec_0[3] = {
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_2,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_1,
  &parse_tree__error_spec__parse_tree__error_spec__du_functor_desc_warn_spec_0_0
};

static const MR_Integer parse_tree__error_spec__parse_tree__error_spec__functor_number_map_warn_spec_0[3] = {
  (MR_Integer) 2,
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_warn_spec_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (parse_tree__error_spec____Unify____warn_spec_0_0_10001)),
  ((MR_Box) (parse_tree__error_spec____Compare____warn_spec_0_0_10001)),
  (MR_String) "parse_tree.error_spec",
  (MR_String) "warn_spec",
  { parse_tree__error_spec__parse_tree__error_spec__du_name_ordered_warn_spec_0 },
  { parse_tree__error_spec__parse_tree__error_spec__du_ptag_ordered_warn_spec_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  parse_tree__error_spec__parse_tree__error_spec__functor_number_map_warn_spec_0,

};

static MR_String MR_CALL 
parse_tree__error_spec__IntroducedFrom__func__maybe_construct_did_you_mean_pieces__1235__1_1_f_0(
  MR_String HeadVar__1_8)
{
  MR_String HeadVar__2_9;
  MR_Box conv0_HeadVar__2_9;

  conv0_HeadVar__2_9 = mercury__std_util__id_1_f_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), ((MR_Box) (HeadVar__1_8)));
  HeadVar__2_9 = ((MR_String) (conv0_HeadVar__2_9));
  return HeadVar__2_9;
}

void MR_CALL 
parse_tree__error_spec____Compare____warn_spec_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____diag_spec_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____warn_spec_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____diag_spec_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____verbose_always_or_once_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____verbose_always_or_once_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____std_diag_spec_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____diag_spec_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____std_diag_spec_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____diag_spec_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____std_diag_msg_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____diag_msg_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____std_diag_msg_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____diag_msg_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_warn_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____spec_severity_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_warn_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____spec_severity_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____spec_severity_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____spec_severity_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_err_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____spec_severity_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_err_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____spec_severity_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____same_but_for_case_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____same_but_for_case_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____rp_piece_kind_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____rp_piece_kind_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____module_file_id_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    mdbcomp__sym_name____Compare____sym_name_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      parse_tree__file_names____Compare____ext_0_0(HeadVar__1_1, ArgX2_7, ArgY2_8);
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____module_file_id_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = mdbcomp__sym_name____Unify____sym_name_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
      succeeded = parse_tree__file_names____Unify____ext_0_0(ArgX2_5, ArgY2_6);
  }
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____mode_report_control_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____mode_report_control_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____maybe_always_treat_as_first_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____maybe_always_treat_as_first_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____lp_piece_kind_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____lp_piece_kind_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____info_spec_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____diag_spec_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____info_spec_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____diag_spec_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____format_piece_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_109 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_110 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_109 == CastY_110);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Integer IndexX_4;
    MR_Integer IndexY_5;

    parse_tree__error_spec____Index____format_piece_0_0(HeadVar__2_2, &IndexX_4);
    parse_tree__error_spec____Index____format_piece_0_0(HeadVar__3_3, &IndexY_5);
    succeeded = (IndexX_4 < IndexY_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 1;
    else
    {
      succeeded = (IndexX_4 > IndexY_5);
      if (succeeded)
        *HeadVar__1_1 = (MR_Integer) 2;
      else
      {
        MR_Word CompareResult_6;

        switch (MR_tag((MR_Word) HeadVar__2_2)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              CompareResult_6 = (MR_Integer) 0;
              succeeded = MR_TRUE;
            }
            break;
          case (MR_Integer) 1:
            {
              MR_Integer ArgX1_7 = ((MR_Integer) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Integer ArgY1_8;
              MR_String ArgX2_10 = ((MR_String) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_String ArgY2_11;
              MR_Word SubResult1_9;

              succeeded = ((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 1);
              if (succeeded)
              {
                ArgY1_8 = ((MR_Integer) ((MR_hl_field(1, HeadVar__3_3, 0))));
                ArgY2_11 = ((MR_String) ((MR_hl_field(1, HeadVar__3_3, 1))));
                succeeded = (ArgX1_7 < ArgY1_8);
                if (succeeded)
                {
                  SubResult1_9 = (MR_Integer) 1;
                  succeeded = MR_TRUE;
                }
                else
                {
                  succeeded = (ArgX1_7 > ArgY1_8);
                  if (succeeded)
                  {
                    SubResult1_9 = (MR_Integer) 2;
                    succeeded = MR_TRUE;
                  }
                }
                if (succeeded)
                  CompareResult_6 = SubResult1_9;
                else
                  mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX2_10, ArgY2_11);
                succeeded = MR_TRUE;
              }
            }
            break;
          case (MR_Integer) 2:
            {
              MR_String ArgX1_12 = ((MR_String) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_String ArgY1_13;

              succeeded = ((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 2);
              if (succeeded)
              {
                ArgY1_13 = ((MR_String) ((MR_hl_field(2, HeadVar__3_3, 0))));
                mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_12, ArgY1_13);
                succeeded = MR_TRUE;
              }
            }
            break;
          case (MR_Integer) 3:
            switch (((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0))))) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                {
                  MR_String ArgX1_14 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_15;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 0)));
                  if (succeeded)
                  {
                    ArgY1_15 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_14, ArgY1_15);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 1:
                {
                  MR_Integer ArgX1_16 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Integer ArgY1_17;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 1)));
                  if (succeeded)
                  {
                    ArgY1_17 = ((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    succeeded = (ArgX1_16 < ArgY1_17);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (ArgX1_16 > ArgY1_17);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 2:
                {
                  MR_Integer ArgX1_18 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Integer ArgY1_19;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 2)));
                  if (succeeded)
                  {
                    ArgY1_19 = ((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    succeeded = (ArgX1_18 < ArgY1_19);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (ArgX1_18 > ArgY1_19);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 3:
                {
                  MR_Unsigned ArgX1_20 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Unsigned ArgY1_21;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 3)));
                  if (succeeded)
                  {
                    ArgY1_21 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    succeeded = (ArgX1_20 < ArgY1_21);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (ArgX1_20 > ArgY1_21);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 4:
                {
                  MR_Unsigned ArgX1_22 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Unsigned ArgY1_23;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 4)));
                  if (succeeded)
                  {
                    ArgY1_23 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    succeeded = (ArgX1_22 < ArgY1_23);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (ArgX1_22 > ArgY1_23);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 5:
                {
                  MR_Integer ArgX1_24 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Integer ArgY1_25;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 5)));
                  if (succeeded)
                  {
                    ArgY1_25 = ((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    succeeded = (ArgX1_24 < ArgY1_25);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (ArgX1_24 > ArgY1_25);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 6:
                {
                  MR_Unsigned ArgX1_26 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Unsigned ArgY1_27;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 6)));
                  if (succeeded)
                  {
                    ArgY1_27 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    succeeded = (ArgX1_26 < ArgY1_27);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (ArgX1_26 > ArgY1_27);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 7:
                {
                  MR_String ArgX1_28 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_29;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 7)));
                  if (succeeded)
                  {
                    ArgY1_29 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_28, ArgY1_29);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 8:
                {
                  MR_String ArgX1_30 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_31;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 8)));
                  if (succeeded)
                  {
                    ArgY1_31 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_30, ArgY1_31);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 9:
                {
                  MR_String ArgX1_32 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_33;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 9)));
                  if (succeeded)
                  {
                    ArgY1_33 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_32, ArgY1_33);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 10:
                {
                  MR_String ArgX1_34 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_35;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 10)));
                  if (succeeded)
                  {
                    ArgY1_35 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_34, ArgY1_35);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 11:
                {
                  MR_Word ArgX1_36 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_37;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 11)));
                  if (succeeded)
                  {
                    ArgY1_37 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mdbcomp__sym_name____Compare____sym_name_0_0(&CompareResult_6, ArgX1_36, ArgY1_37);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 12:
                {
                  MR_Word ArgX1_38 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_39;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 12)));
                  if (succeeded)
                  {
                    ArgY1_39 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mdbcomp__sym_name____Compare____sym_name_0_0(&CompareResult_6, ArgX1_38, ArgY1_39);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 13:
                {
                  MR_Word ArgX1_40 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_41;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 13)));
                  if (succeeded)
                  {
                    ArgY1_41 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____name_arity_0_0(&CompareResult_6, ArgX1_40, ArgY1_41);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 14:
                {
                  MR_Word ArgX1_42 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_43;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 14)));
                  if (succeeded)
                  {
                    ArgY1_43 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____sym_name_arity_0_0(&CompareResult_6, ArgX1_42, ArgY1_43);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 15:
                {
                  MR_Word ArgX1_44 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_45;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 15)));
                  if (succeeded)
                  {
                    ArgY1_45 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____sym_name_arity_0_0(&CompareResult_6, ArgX1_44, ArgY1_45);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 16:
                {
                  MR_Word ArgX1_46 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_47;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 16)));
                  if (succeeded)
                  {
                    ArgY1_47 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____pf_sym_name_arity_0_0(&CompareResult_6, ArgX1_46, ArgY1_47);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 17:
                {
                  MR_Word ArgX1_48 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_49;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 17)));
                  if (succeeded)
                  {
                    ArgY1_49 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____pf_sym_name_arity_0_0(&CompareResult_6, ArgX1_48, ArgY1_49);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 18:
                {
                  MR_Word ArgX1_50 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_51;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 18)));
                  if (succeeded)
                  {
                    ArgY1_51 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____pred_pf_name_arity_0_0(&CompareResult_6, ArgX1_50, ArgY1_51);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 19:
                {
                  MR_Word ArgX1_52 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_53;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 19)));
                  if (succeeded)
                  {
                    ArgY1_53 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____pred_pf_name_arity_0_0(&CompareResult_6, ArgX1_52, ArgY1_53);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 20:
                {
                  MR_Word ArgX1_54 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_55;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 20)));
                  if (succeeded)
                  {
                    ArgY1_55 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____type_ctor_0_0(&CompareResult_6, ArgX1_54, ArgY1_55);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 21:
                {
                  MR_Word ArgX1_56 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_57;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 21)));
                  if (succeeded)
                  {
                    ArgY1_57 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____type_ctor_0_0(&CompareResult_6, ArgX1_56, ArgY1_57);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 22:
                {
                  MR_Word ArgX1_58 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_59;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 22)));
                  if (succeeded)
                  {
                    ArgY1_59 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____inst_ctor_0_0(&CompareResult_6, ArgX1_58, ArgY1_59);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 23:
                {
                  MR_Word ArgX1_60 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_61;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 23)));
                  if (succeeded)
                  {
                    ArgY1_61 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____inst_ctor_0_0(&CompareResult_6, ArgX1_60, ArgY1_61);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 24:
                {
                  MR_Word ArgX1_62 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_63;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 24)));
                  if (succeeded)
                  {
                    ArgY1_63 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____mode_ctor_0_0(&CompareResult_6, ArgX1_62, ArgY1_63);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 25:
                {
                  MR_Word ArgX1_64 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_65;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 25)));
                  if (succeeded)
                  {
                    ArgY1_65 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____mode_ctor_0_0(&CompareResult_6, ArgX1_64, ArgY1_65);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 26:
                {
                  MR_Word ArgX1_66 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_67;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 26)));
                  if (succeeded)
                  {
                    ArgY1_67 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____class_id_0_0(&CompareResult_6, ArgX1_66, ArgY1_67);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 27:
                {
                  MR_Word ArgX1_68 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_69;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 27)));
                  if (succeeded)
                  {
                    ArgY1_69 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____class_id_0_0(&CompareResult_6, ArgX1_68, ArgY1_69);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 28:
                {
                  MR_Word ArgX1_70 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_71;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 28)));
                  if (succeeded)
                  {
                    ArgY1_71 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____cons_id_0_0(&CompareResult_6, ArgX1_70, ArgY1_71);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 29:
                {
                  MR_Word ArgX1_72 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_73;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 29)));
                  if (succeeded)
                  {
                    ArgY1_73 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____cons_id_0_0(&CompareResult_6, ArgX1_72, ArgY1_73);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 30:
                {
                  MR_Word ArgX1_74 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Word ArgY1_75;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 30)));
                  if (succeeded)
                  {
                    ArgY1_75 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    parse_tree__prog_data____Compare____mer_type_0_0(&CompareResult_6, ArgX1_74, ArgY1_75);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 31:
                {
                  MR_Word ArgX1_76 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                  MR_Word ArgY1_77;
                  MR_Integer Var_170;
                  MR_Integer Var_171;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 31)));
                  if (succeeded)
                  {
                    ArgY1_77 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 1);
                    Var_170 = (MR_Integer) (ArgX1_76);
                    Var_171 = (MR_Integer) (ArgY1_77);
                    succeeded = (Var_170 < Var_171);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (Var_170 > Var_171);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 32:
                {
                  MR_Word ArgX1_78 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                  MR_Word ArgY1_79;
                  MR_Integer Var_172;
                  MR_Integer Var_173;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 32)));
                  if (succeeded)
                  {
                    ArgY1_79 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 3);
                    Var_172 = (MR_Integer) (ArgX1_78);
                    Var_173 = (MR_Integer) (ArgY1_79);
                    succeeded = (Var_172 < Var_173);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (Var_172 > Var_173);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 33:
                {
                  MR_Word ArgX1_80 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                  MR_Word ArgY1_81;
                  MR_Integer Var_160;
                  MR_Integer Var_161;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 33)));
                  if (succeeded)
                  {
                    ArgY1_81 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 3);
                    Var_160 = (MR_Integer) (ArgX1_80);
                    Var_161 = (MR_Integer) (ArgY1_81);
                    succeeded = (Var_160 < Var_161);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (Var_160 > Var_161);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 34:
                {
                  MR_Word ArgX1_82 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                  MR_Word ArgY1_83;
                  MR_Integer Var_174;
                  MR_Integer Var_175;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 34)));
                  if (succeeded)
                  {
                    ArgY1_83 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 3);
                    Var_174 = (MR_Integer) (ArgX1_82);
                    Var_175 = (MR_Integer) (ArgY1_83);
                    succeeded = (Var_174 < Var_175);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (Var_174 > Var_175);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 35:
                {
                  MR_String ArgX1_84 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_85;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 35)));
                  if (succeeded)
                  {
                    ArgY1_85 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_84, ArgY1_85);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 36:
                {
                  MR_String ArgX1_86 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_87;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 36)));
                  if (succeeded)
                  {
                    ArgY1_87 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX1_86, ArgY1_87);
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 37:
                {
                  MR_String ArgX1_88 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_89;
                  MR_Word ArgX2_91 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                  MR_Word ArgY2_92;
                  MR_Word SubResult1_90;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 37)));
                  if (succeeded)
                  {
                    ArgY1_89 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    ArgY2_92 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 2))) & (MR_Integer) 1);
                    mercury__private_builtin__builtin_compare_string_3_p_0(&SubResult1_90, ArgX1_88, ArgY1_89);
                    succeeded = (SubResult1_90 != (MR_Integer) 0);
                    if (succeeded)
                      CompareResult_6 = SubResult1_90;
                    else
                    {
                      MR_Integer Var_162 = (MR_Integer) (ArgX2_91);
                      MR_Integer Var_163 = (MR_Integer) (ArgY2_92);

                      succeeded = (Var_162 < Var_163);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 1;
                      else
                      {
                        succeeded = (Var_162 > Var_163);
                        if (succeeded)
                          CompareResult_6 = (MR_Integer) 2;
                        else
                          CompareResult_6 = (MR_Integer) 0;
                      }
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 38:
                {
                  MR_String ArgX1_93 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_String ArgY1_94;
                  MR_Word ArgX2_96 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                  MR_Word ArgY2_97;
                  MR_Word SubResult1_95;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 38)));
                  if (succeeded)
                  {
                    ArgY1_94 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    ArgY2_97 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 2))) & (MR_Integer) 1);
                    mercury__private_builtin__builtin_compare_string_3_p_0(&SubResult1_95, ArgX1_93, ArgY1_94);
                    succeeded = (SubResult1_95 != (MR_Integer) 0);
                    if (succeeded)
                      CompareResult_6 = SubResult1_95;
                    else
                    {
                      MR_Integer Var_164 = (MR_Integer) (ArgX2_96);
                      MR_Integer Var_165 = (MR_Integer) (ArgY2_97);

                      succeeded = (Var_164 < Var_165);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 1;
                      else
                      {
                        succeeded = (Var_164 > Var_165);
                        if (succeeded)
                          CompareResult_6 = (MR_Integer) 2;
                        else
                          CompareResult_6 = (MR_Integer) 0;
                      }
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 39:
                {
                  MR_Integer ArgX1_98 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Integer ArgY1_99;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 39)));
                  if (succeeded)
                  {
                    ArgY1_99 = ((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    succeeded = (ArgX1_98 < ArgY1_99);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (ArgX1_98 > ArgY1_99);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 40:
                {
                  MR_Word ArgX1_100 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 7);
                  MR_Word ArgY1_101;
                  MR_Integer Var_168;
                  MR_Integer Var_169;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 40)));
                  if (succeeded)
                  {
                    ArgY1_101 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 7);
                    Var_168 = (MR_Integer) (ArgX1_100);
                    Var_169 = (MR_Integer) (ArgY1_101);
                    succeeded = (Var_168 < Var_169);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (Var_168 > Var_169);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 41:
                {
                  MR_Word ArgX1_102 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 7);
                  MR_Word ArgY1_103;
                  MR_Integer Var_166;
                  MR_Integer Var_167;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 41)));
                  if (succeeded)
                  {
                    ArgY1_103 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 7);
                    Var_166 = (MR_Integer) (ArgX1_102);
                    Var_167 = (MR_Integer) (ArgY1_103);
                    succeeded = (Var_166 < Var_167);
                    if (succeeded)
                      CompareResult_6 = (MR_Integer) 1;
                    else
                    {
                      succeeded = (Var_166 > Var_167);
                      if (succeeded)
                        CompareResult_6 = (MR_Integer) 2;
                      else
                        CompareResult_6 = (MR_Integer) 0;
                    }
                    succeeded = MR_TRUE;
                  }
                }
                break;
              case (MR_Integer) 42:
                {
                  MR_Integer ArgX1_104 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                  MR_Integer ArgY1_105;
                  MR_String ArgX2_107 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 2))));
                  MR_String ArgY2_108;
                  MR_Word SubResult1_106;

                  succeeded = ((((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0)))) == (MR_Integer) 42)));
                  if (succeeded)
                  {
                    ArgY1_105 = ((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 1))));
                    ArgY2_108 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 2))));
                    succeeded = (ArgX1_104 < ArgY1_105);
                    if (succeeded)
                    {
                      SubResult1_106 = (MR_Integer) 1;
                      succeeded = MR_TRUE;
                    }
                    else
                    {
                      succeeded = (ArgX1_104 > ArgY1_105);
                      if (succeeded)
                      {
                        SubResult1_106 = (MR_Integer) 2;
                        succeeded = MR_TRUE;
                      }
                    }
                    if (succeeded)
                      CompareResult_6 = SubResult1_106;
                    else
                      mercury__private_builtin__builtin_compare_string_3_p_0(&CompareResult_6, ArgX2_107, ArgY2_108);
                    succeeded = MR_TRUE;
                  }
                }
                break;
            }
            break;
        }
        if (succeeded)
          *HeadVar__1_1 = CompareResult_6;
        else
          {
            mercury__private_builtin__compare_error_0_p_0();
            return;
          }
      }
    }
  }
}

void MR_CALL 
parse_tree__error_spec____Index____format_piece_0_0(
  MR_Word HeadVar__1_1,
  MR_Integer * HeadVar__2_2)
{
  switch (MR_tag((MR_Word) HeadVar__1_1)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      switch (MR_unmkbody(HeadVar__1_1)) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          *HeadVar__2_2 = (MR_Integer) 9;
          break;
        case (MR_Integer) 1:
          *HeadVar__2_2 = (MR_Integer) 10;
          break;
        case (MR_Integer) 2:
          *HeadVar__2_2 = (MR_Integer) 11;
          break;
        case (MR_Integer) 3:
          *HeadVar__2_2 = (MR_Integer) 44;
          break;
        case (MR_Integer) 4:
          *HeadVar__2_2 = (MR_Integer) 46;
          break;
      }
      break;
    case (MR_Integer) 1:
      *HeadVar__2_2 = (MR_Integer) 0;
      break;
    case (MR_Integer) 2:
      *HeadVar__2_2 = (MR_Integer) 1;
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          *HeadVar__2_2 = (MR_Integer) 2;
          break;
        case (MR_Integer) 1:
          *HeadVar__2_2 = (MR_Integer) 3;
          break;
        case (MR_Integer) 2:
          *HeadVar__2_2 = (MR_Integer) 4;
          break;
        case (MR_Integer) 3:
          *HeadVar__2_2 = (MR_Integer) 5;
          break;
        case (MR_Integer) 4:
          *HeadVar__2_2 = (MR_Integer) 6;
          break;
        case (MR_Integer) 5:
          *HeadVar__2_2 = (MR_Integer) 7;
          break;
        case (MR_Integer) 6:
          *HeadVar__2_2 = (MR_Integer) 8;
          break;
        case (MR_Integer) 7:
          *HeadVar__2_2 = (MR_Integer) 12;
          break;
        case (MR_Integer) 8:
          *HeadVar__2_2 = (MR_Integer) 13;
          break;
        case (MR_Integer) 9:
          *HeadVar__2_2 = (MR_Integer) 14;
          break;
        case (MR_Integer) 10:
          *HeadVar__2_2 = (MR_Integer) 15;
          break;
        case (MR_Integer) 11:
          *HeadVar__2_2 = (MR_Integer) 16;
          break;
        case (MR_Integer) 12:
          *HeadVar__2_2 = (MR_Integer) 17;
          break;
        case (MR_Integer) 13:
          *HeadVar__2_2 = (MR_Integer) 18;
          break;
        case (MR_Integer) 14:
          *HeadVar__2_2 = (MR_Integer) 19;
          break;
        case (MR_Integer) 15:
          *HeadVar__2_2 = (MR_Integer) 20;
          break;
        case (MR_Integer) 16:
          *HeadVar__2_2 = (MR_Integer) 21;
          break;
        case (MR_Integer) 17:
          *HeadVar__2_2 = (MR_Integer) 22;
          break;
        case (MR_Integer) 18:
          *HeadVar__2_2 = (MR_Integer) 23;
          break;
        case (MR_Integer) 19:
          *HeadVar__2_2 = (MR_Integer) 24;
          break;
        case (MR_Integer) 20:
          *HeadVar__2_2 = (MR_Integer) 25;
          break;
        case (MR_Integer) 21:
          *HeadVar__2_2 = (MR_Integer) 26;
          break;
        case (MR_Integer) 22:
          *HeadVar__2_2 = (MR_Integer) 27;
          break;
        case (MR_Integer) 23:
          *HeadVar__2_2 = (MR_Integer) 28;
          break;
        case (MR_Integer) 24:
          *HeadVar__2_2 = (MR_Integer) 29;
          break;
        case (MR_Integer) 25:
          *HeadVar__2_2 = (MR_Integer) 30;
          break;
        case (MR_Integer) 26:
          *HeadVar__2_2 = (MR_Integer) 31;
          break;
        case (MR_Integer) 27:
          *HeadVar__2_2 = (MR_Integer) 32;
          break;
        case (MR_Integer) 28:
          *HeadVar__2_2 = (MR_Integer) 33;
          break;
        case (MR_Integer) 29:
          *HeadVar__2_2 = (MR_Integer) 34;
          break;
        case (MR_Integer) 30:
          *HeadVar__2_2 = (MR_Integer) 35;
          break;
        case (MR_Integer) 31:
          *HeadVar__2_2 = (MR_Integer) 36;
          break;
        case (MR_Integer) 32:
          *HeadVar__2_2 = (MR_Integer) 37;
          break;
        case (MR_Integer) 33:
          *HeadVar__2_2 = (MR_Integer) 38;
          break;
        case (MR_Integer) 34:
          *HeadVar__2_2 = (MR_Integer) 39;
          break;
        case (MR_Integer) 35:
          *HeadVar__2_2 = (MR_Integer) 40;
          break;
        case (MR_Integer) 36:
          *HeadVar__2_2 = (MR_Integer) 41;
          break;
        case (MR_Integer) 37:
          *HeadVar__2_2 = (MR_Integer) 42;
          break;
        case (MR_Integer) 38:
          *HeadVar__2_2 = (MR_Integer) 43;
          break;
        case (MR_Integer) 39:
          *HeadVar__2_2 = (MR_Integer) 45;
          break;
        case (MR_Integer) 40:
          *HeadVar__2_2 = (MR_Integer) 47;
          break;
        case (MR_Integer) 41:
          *HeadVar__2_2 = (MR_Integer) 48;
          break;
        case (MR_Integer) 42:
          *HeadVar__2_2 = (MR_Integer) 49;
          break;
      }
      break;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____format_piece_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_103 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_104 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_103 == CastY_104);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Integer CastX_101 = (MR_Integer) (HeadVar__1_1);
          MR_Integer CastY_102 = (MR_Integer) (HeadVar__2_2);

          succeeded = (CastY_102 == CastX_101);
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Integer ArgX1_3 = ((MR_Integer) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Integer ArgY1_4;
          MR_String ArgX2_5 = ((MR_String) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_String ArgY2_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Integer) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_String) ((MR_hl_field(1, HeadVar__2_2, 1))));
            succeeded = (ArgX1_3 == ArgY1_4);
            if (succeeded)
              succeeded = (strcmp(ArgX2_5, ArgY2_6) == 0);
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_String ArgX1_7 = ((MR_String) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_String ArgY1_8;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_8 = ((MR_String) ((MR_hl_field(2, HeadVar__2_2, 0))));
            succeeded = (strcmp(ArgX1_7, ArgY1_8) == 0);
          }
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_String ArgX1_9 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_10;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 0)));
              if (succeeded)
              {
                ArgY1_10 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (strcmp(ArgX1_9, ArgY1_10) == 0);
              }
            }
            break;
          case (MR_Integer) 1:
            {
              MR_Integer ArgX1_11 = ((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Integer ArgY1_12;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 1)));
              if (succeeded)
              {
                ArgY1_12 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (ArgX1_11 == ArgY1_12);
              }
            }
            break;
          case (MR_Integer) 2:
            {
              MR_Integer ArgX1_13 = ((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Integer ArgY1_14;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 2)));
              if (succeeded)
              {
                ArgY1_14 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (ArgX1_13 == ArgY1_14);
              }
            }
            break;
          case (MR_Integer) 3:
            {
              MR_Unsigned ArgX1_15 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Unsigned ArgY1_16;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 3)));
              if (succeeded)
              {
                ArgY1_16 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (ArgX1_15 == ArgY1_16);
              }
            }
            break;
          case (MR_Integer) 4:
            {
              MR_Unsigned ArgX1_17 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Unsigned ArgY1_18;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 4)));
              if (succeeded)
              {
                ArgY1_18 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (ArgX1_17 == ArgY1_18);
              }
            }
            break;
          case (MR_Integer) 5:
            {
              MR_Integer ArgX1_19 = ((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Integer ArgY1_20;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 5)));
              if (succeeded)
              {
                ArgY1_20 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (ArgX1_19 == ArgY1_20);
              }
            }
            break;
          case (MR_Integer) 6:
            {
              MR_Unsigned ArgX1_21 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Unsigned ArgY1_22;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 6)));
              if (succeeded)
              {
                ArgY1_22 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (ArgX1_21 == ArgY1_22);
              }
            }
            break;
          case (MR_Integer) 7:
            {
              MR_String ArgX1_23 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_24;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 7)));
              if (succeeded)
              {
                ArgY1_24 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (strcmp(ArgX1_23, ArgY1_24) == 0);
              }
            }
            break;
          case (MR_Integer) 8:
            {
              MR_String ArgX1_25 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_26;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 8)));
              if (succeeded)
              {
                ArgY1_26 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (strcmp(ArgX1_25, ArgY1_26) == 0);
              }
            }
            break;
          case (MR_Integer) 9:
            {
              MR_String ArgX1_27 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_28;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 9)));
              if (succeeded)
              {
                ArgY1_28 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (strcmp(ArgX1_27, ArgY1_28) == 0);
              }
            }
            break;
          case (MR_Integer) 10:
            {
              MR_String ArgX1_29 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_30;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 10)));
              if (succeeded)
              {
                ArgY1_30 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (strcmp(ArgX1_29, ArgY1_30) == 0);
              }
            }
            break;
          case (MR_Integer) 11:
            {
              MR_Word ArgX1_31 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_32;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 11)));
              if (succeeded)
              {
                ArgY1_32 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = mdbcomp__sym_name____Unify____sym_name_0_0(ArgX1_31, ArgY1_32);
              }
            }
            break;
          case (MR_Integer) 12:
            {
              MR_Word ArgX1_33 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_34;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 12)));
              if (succeeded)
              {
                ArgY1_34 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = mdbcomp__sym_name____Unify____sym_name_0_0(ArgX1_33, ArgY1_34);
              }
            }
            break;
          case (MR_Integer) 13:
            {
              MR_Word ArgX1_35 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_36;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 13)));
              if (succeeded)
              {
                ArgY1_36 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____name_arity_0_0(ArgX1_35, ArgY1_36);
              }
            }
            break;
          case (MR_Integer) 14:
            {
              MR_Word ArgX1_37 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_38;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 14)));
              if (succeeded)
              {
                ArgY1_38 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____sym_name_arity_0_0(ArgX1_37, ArgY1_38);
              }
            }
            break;
          case (MR_Integer) 15:
            {
              MR_Word ArgX1_39 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_40;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 15)));
              if (succeeded)
              {
                ArgY1_40 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____sym_name_arity_0_0(ArgX1_39, ArgY1_40);
              }
            }
            break;
          case (MR_Integer) 16:
            {
              MR_Word ArgX1_41 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_42;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 16)));
              if (succeeded)
              {
                ArgY1_42 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____pf_sym_name_arity_0_0(ArgX1_41, ArgY1_42);
              }
            }
            break;
          case (MR_Integer) 17:
            {
              MR_Word ArgX1_43 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_44;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 17)));
              if (succeeded)
              {
                ArgY1_44 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____pf_sym_name_arity_0_0(ArgX1_43, ArgY1_44);
              }
            }
            break;
          case (MR_Integer) 18:
            {
              MR_Word ArgX1_45 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_46;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 18)));
              if (succeeded)
              {
                ArgY1_46 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____pred_pf_name_arity_0_0(ArgX1_45, ArgY1_46);
              }
            }
            break;
          case (MR_Integer) 19:
            {
              MR_Word ArgX1_47 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_48;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 19)));
              if (succeeded)
              {
                ArgY1_48 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____pred_pf_name_arity_0_0(ArgX1_47, ArgY1_48);
              }
            }
            break;
          case (MR_Integer) 20:
            {
              MR_Word ArgX1_49 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_50;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 20)));
              if (succeeded)
              {
                ArgY1_50 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____type_ctor_0_0(ArgX1_49, ArgY1_50);
              }
            }
            break;
          case (MR_Integer) 21:
            {
              MR_Word ArgX1_51 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_52;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 21)));
              if (succeeded)
              {
                ArgY1_52 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____type_ctor_0_0(ArgX1_51, ArgY1_52);
              }
            }
            break;
          case (MR_Integer) 22:
            {
              MR_Word ArgX1_53 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_54;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 22)));
              if (succeeded)
              {
                ArgY1_54 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____inst_ctor_0_0(ArgX1_53, ArgY1_54);
              }
            }
            break;
          case (MR_Integer) 23:
            {
              MR_Word ArgX1_55 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_56;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 23)));
              if (succeeded)
              {
                ArgY1_56 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____inst_ctor_0_0(ArgX1_55, ArgY1_56);
              }
            }
            break;
          case (MR_Integer) 24:
            {
              MR_Word ArgX1_57 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_58;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 24)));
              if (succeeded)
              {
                ArgY1_58 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____mode_ctor_0_0(ArgX1_57, ArgY1_58);
              }
            }
            break;
          case (MR_Integer) 25:
            {
              MR_Word ArgX1_59 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_60;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 25)));
              if (succeeded)
              {
                ArgY1_60 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____mode_ctor_0_0(ArgX1_59, ArgY1_60);
              }
            }
            break;
          case (MR_Integer) 26:
            {
              MR_Word ArgX1_61 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_62;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 26)));
              if (succeeded)
              {
                ArgY1_62 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____class_id_0_0(ArgX1_61, ArgY1_62);
              }
            }
            break;
          case (MR_Integer) 27:
            {
              MR_Word ArgX1_63 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_64;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 27)));
              if (succeeded)
              {
                ArgY1_64 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____class_id_0_0(ArgX1_63, ArgY1_64);
              }
            }
            break;
          case (MR_Integer) 28:
            {
              MR_Word ArgX1_65 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_66;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 28)));
              if (succeeded)
              {
                ArgY1_66 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____cons_id_0_0(ArgX1_65, ArgY1_66);
              }
            }
            break;
          case (MR_Integer) 29:
            {
              MR_Word ArgX1_67 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_68;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 29)));
              if (succeeded)
              {
                ArgY1_68 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____cons_id_0_0(ArgX1_67, ArgY1_68);
              }
            }
            break;
          case (MR_Integer) 30:
            {
              MR_Word ArgX1_69 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_70;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 30)));
              if (succeeded)
              {
                ArgY1_70 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = parse_tree__prog_data____Unify____mer_type_0_0(ArgX1_69, ArgY1_70);
              }
            }
            break;
          case (MR_Integer) 31:
            {
              MR_Word ArgX1_71 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 1);
              MR_Word ArgY1_72;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 31)));
              if (succeeded)
              {
                ArgY1_72 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                succeeded = (ArgX1_71 == ArgY1_72);
              }
            }
            break;
          case (MR_Integer) 32:
            {
              MR_Word ArgX1_73 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 3);
              MR_Word ArgY1_74;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 32)));
              if (succeeded)
              {
                ArgY1_74 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                succeeded = (ArgX1_73 == ArgY1_74);
              }
            }
            break;
          case (MR_Integer) 33:
            {
              MR_Word ArgX1_75 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 3);
              MR_Word ArgY1_76;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 33)));
              if (succeeded)
              {
                ArgY1_76 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                succeeded = (ArgX1_75 == ArgY1_76);
              }
            }
            break;
          case (MR_Integer) 34:
            {
              MR_Word ArgX1_77 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 3);
              MR_Word ArgY1_78;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 34)));
              if (succeeded)
              {
                ArgY1_78 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                succeeded = (ArgX1_77 == ArgY1_78);
              }
            }
            break;
          case (MR_Integer) 35:
            {
              MR_String ArgX1_79 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_80;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 35)));
              if (succeeded)
              {
                ArgY1_80 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (strcmp(ArgX1_79, ArgY1_80) == 0);
              }
            }
            break;
          case (MR_Integer) 36:
            {
              MR_String ArgX1_81 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_82;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 36)));
              if (succeeded)
              {
                ArgY1_82 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (strcmp(ArgX1_81, ArgY1_82) == 0);
              }
            }
            break;
          case (MR_Integer) 37:
            {
              MR_String ArgX1_83 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_84;
              MR_Word ArgX2_85 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 2))) & (MR_Integer) 1);
              MR_Word ArgY2_86;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 37)));
              if (succeeded)
              {
                ArgY1_84 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_86 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                succeeded = (strcmp(ArgX1_83, ArgY1_84) == 0);
                if (succeeded)
                  succeeded = (ArgX2_85 == ArgY2_86);
              }
            }
            break;
          case (MR_Integer) 38:
            {
              MR_String ArgX1_87 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_String ArgY1_88;
              MR_Word ArgX2_89 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 2))) & (MR_Integer) 1);
              MR_Word ArgY2_90;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 38)));
              if (succeeded)
              {
                ArgY1_88 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_90 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                succeeded = (strcmp(ArgX1_87, ArgY1_88) == 0);
                if (succeeded)
                  succeeded = (ArgX2_89 == ArgY2_90);
              }
            }
            break;
          case (MR_Integer) 39:
            {
              MR_Integer ArgX1_91 = ((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Integer ArgY1_92;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 39)));
              if (succeeded)
              {
                ArgY1_92 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = (ArgX1_91 == ArgY1_92);
              }
            }
            break;
          case (MR_Integer) 40:
            {
              MR_Word ArgX1_93 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 7);
              MR_Word ArgY1_94;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 40)));
              if (succeeded)
              {
                ArgY1_94 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 7);
                succeeded = (ArgX1_93 == ArgY1_94);
              }
            }
            break;
          case (MR_Integer) 41:
            {
              MR_Word ArgX1_95 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 7);
              MR_Word ArgY1_96;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 41)));
              if (succeeded)
              {
                ArgY1_96 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 7);
                succeeded = (ArgX1_95 == ArgY1_96);
              }
            }
            break;
          case (MR_Integer) 42:
            {
              MR_Integer ArgX1_97 = ((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Integer ArgY1_98;
              MR_String ArgX2_99 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_String ArgY2_100;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 42)));
              if (succeeded)
              {
                ArgY1_98 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_100 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 2))));
                succeeded = (ArgX1_97 == ArgY1_98);
                if (succeeded)
                  succeeded = (strcmp(ArgX2_99, ArgY2_100) == 0);
              }
            }
            break;
        }
        break;
    }
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____errs_warns_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[7]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[8]), HeadVar__1_1, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____errs_warns_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_10_10;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[7]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_10_10 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[8]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_10_10, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
    }
  }
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____err_spec_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = (MR_Word) (HeadVar__2_2);
  MR_Word Cast_HeadVar2_5 = (MR_Word) (HeadVar__3_3);

  parse_tree__error_spec____Compare____diag_spec_0_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____err_spec_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = (MR_Word) (HeadVar__1_1);
  MR_Word Cast_HeadVar2_4 = (MR_Word) (HeadVar__2_2);

  succeeded = parse_tree__error_spec____Unify____diag_spec_0_0(Cast_HeadVar1_3, Cast_HeadVar2_4);
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____diag_spec_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_40 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_41 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_40 == CastY_41);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_String ArgX1_4 = ((MR_String) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_String ArgY1_5 = ((MR_String) ((MR_hl_field(0, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
              MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
              MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
              MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
              MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
              MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
              MR_Word ArgX5_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
              MR_Word ArgY5_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 4))));
              MR_Word SubResult1_6;

              mercury__private_builtin__builtin_compare_string_3_p_0(&SubResult1_6, ArgX1_4, ArgY1_5);
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
              {
                MR_Word SubResult2_9;

                parse_tree__error_spec____Compare____spec_severity_0_0(&SubResult2_9, ArgX2_7, ArgY2_8);
                succeeded = (SubResult2_9 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_9;
                else
                {
                  MR_Word SubResult3_12;

                  parse_tree__error_spec____Compare____spec_phase_0_0(&SubResult3_12, ArgX3_10, ArgY3_11);
                  succeeded = (SubResult3_12 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_12;
                  else
                  {
                    MR_Word SubResult4_15;

                    mercury__term_context____Compare____term_context_0_0(&SubResult4_15, ArgX4_13, ArgY4_14);
                    succeeded = (SubResult4_15 != (MR_Integer) 0);
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_15;
                    else
                      mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), HeadVar__1_1, ((MR_Box) (ArgX5_16)), ((MR_Box) (ArgY5_17)));
                  }
                }
              }
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_String ArgX1_18 = ((MR_String) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_String ArgY1_19 = ((MR_String) ((MR_hl_field(1, HeadVar__3_3, 0))));
              MR_Word ArgX2_21 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_22 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
              MR_Word ArgX3_24 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
              MR_Word ArgY3_25 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 2))));
              MR_Word ArgX4_27 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
              MR_Word ArgY4_28 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 3))));
              MR_Word SubResult1_20;

              mercury__private_builtin__builtin_compare_string_3_p_0(&SubResult1_20, ArgX1_18, ArgY1_19);
              succeeded = (SubResult1_20 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_20;
              else
              {
                MR_Word SubResult2_23;

                parse_tree__error_spec____Compare____spec_severity_0_0(&SubResult2_23, ArgX2_21, ArgY2_22);
                succeeded = (SubResult2_23 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_23;
                else
                {
                  MR_Word SubResult3_26;

                  parse_tree__error_spec____Compare____spec_phase_0_0(&SubResult3_26, ArgX3_24, ArgY3_25);
                  succeeded = (SubResult3_26 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_26;
                  else
                    mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), HeadVar__1_1, ((MR_Box) (ArgX4_27)), ((MR_Box) (ArgY4_28)));
                }
              }
            }
            break;
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_String ArgX1_29 = ((MR_String) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_String ArgY1_30 = ((MR_String) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Word ArgX2_32 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Word ArgY2_33 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word ArgX3_35 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
              MR_Word ArgY3_36 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 2))));
              MR_Word ArgX4_38 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 3))));
              MR_Word ArgY4_39 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 3))));
              MR_Word SubResult1_31;

              mercury__private_builtin__builtin_compare_string_3_p_0(&SubResult1_31, ArgX1_29, ArgY1_30);
              succeeded = (SubResult1_31 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_31;
              else
              {
                MR_Word SubResult2_34;

                parse_tree__error_spec____Compare____spec_severity_0_0(&SubResult2_34, ArgX2_32, ArgY2_33);
                succeeded = (SubResult2_34 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_34;
                else
                {
                  MR_Word SubResult3_37;

                  parse_tree__error_spec____Compare____spec_phase_0_0(&SubResult3_37, ArgX3_35, ArgY3_36);
                  succeeded = (SubResult3_37 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_37;
                  else
                    mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[6]), HeadVar__1_1, ((MR_Box) (ArgX4_38)), ((MR_Box) (ArgY4_39)));
                }
              }
            }
            break;
        }
        break;
    }
}

void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_8 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_9 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_8 == CastY_9);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 0;
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_4 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 1023);
              MR_Word ArgY1_5 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 0))) & (MR_Integer) 1023);
              MR_Integer Var_14 = (MR_Integer) (ArgX1_4);
              MR_Integer Var_15 = (MR_Integer) (ArgY1_5);

              succeeded = (Var_14 < Var_15);
              if (succeeded)
                *HeadVar__1_1 = (MR_Integer) 1;
              else
              {
                succeeded = (Var_14 > Var_15);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 2;
                else
                  *HeadVar__1_1 = (MR_Integer) 0;
              }
            }
            break;
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_6 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1023);
              MR_Word ArgY1_7 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 0))) & (MR_Integer) 1023);
              MR_Integer Var_12 = (MR_Integer) (ArgX1_6);
              MR_Integer Var_13 = (MR_Integer) (ArgY1_7);

              succeeded = (Var_12 < Var_13);
              if (succeeded)
                *HeadVar__1_1 = (MR_Integer) 1;
              else
              {
                succeeded = (Var_12 > Var_13);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 2;
                else
                  *HeadVar__1_1 = (MR_Integer) 0;
              }
            }
            break;
        }
        break;
    }
}

void MR_CALL 
parse_tree__error_spec____Compare____spec_phase_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_16 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_17 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_16 == CastY_17);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Integer IndexX_4;
    MR_Integer IndexY_5;

    parse_tree__error_spec____Index____spec_phase_0_0(HeadVar__2_2, &IndexX_4);
    parse_tree__error_spec____Index____spec_phase_0_0(HeadVar__3_3, &IndexY_5);
    succeeded = (IndexX_4 < IndexY_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 1;
    else
    {
      succeeded = (IndexX_4 > IndexY_5);
      if (succeeded)
        *HeadVar__1_1 = (MR_Integer) 2;
      else
      {
        MR_Word CompareResult_6;

        switch (MR_tag((MR_Word) HeadVar__2_2)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              CompareResult_6 = (MR_Integer) 0;
              succeeded = MR_TRUE;
            }
            break;
          case (MR_Integer) 1:
            {
              MR_String ArgX1_7 = ((MR_String) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_String ArgY1_8;
              MR_Word ArgX2_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_11;
              MR_Word SubResult1_9;

              succeeded = ((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 1);
              if (succeeded)
              {
                ArgY1_8 = ((MR_String) ((MR_hl_field(1, HeadVar__3_3, 0))));
                ArgY2_11 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
                mercury__private_builtin__builtin_compare_string_3_p_0(&SubResult1_9, ArgX1_7, ArgY1_8);
                succeeded = (SubResult1_9 != (MR_Integer) 0);
                if (succeeded)
                  CompareResult_6 = SubResult1_9;
                else
                  mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[9]), &CompareResult_6, ((MR_Box) (ArgX2_10)), ((MR_Box) (ArgY2_11)));
                succeeded = MR_TRUE;
              }
            }
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_12 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
              MR_Word ArgY1_13;
              MR_Integer Var_22;
              MR_Integer Var_23;

              succeeded = ((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 2);
              if (succeeded)
              {
                ArgY1_13 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 0))) & (MR_Integer) 1);
                Var_22 = (MR_Integer) (ArgX1_12);
                Var_23 = (MR_Integer) (ArgY1_13);
                succeeded = (Var_22 < Var_23);
                if (succeeded)
                  CompareResult_6 = (MR_Integer) 1;
                else
                {
                  succeeded = (Var_22 > Var_23);
                  if (succeeded)
                    CompareResult_6 = (MR_Integer) 2;
                  else
                    CompareResult_6 = (MR_Integer) 0;
                }
                succeeded = MR_TRUE;
              }
            }
            break;
          case (MR_Integer) 3:
            {
              MR_Word ArgX1_14 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 0))) & (MR_Integer) 1);
              MR_Word ArgY1_15;
              MR_Integer Var_24;
              MR_Integer Var_25;

              succeeded = ((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 3);
              if (succeeded)
              {
                ArgY1_15 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 0))) & (MR_Integer) 1);
                Var_24 = (MR_Integer) (ArgX1_14);
                Var_25 = (MR_Integer) (ArgY1_15);
                succeeded = (Var_24 < Var_25);
                if (succeeded)
                  CompareResult_6 = (MR_Integer) 1;
                else
                {
                  succeeded = (Var_24 > Var_25);
                  if (succeeded)
                    CompareResult_6 = (MR_Integer) 2;
                  else
                    CompareResult_6 = (MR_Integer) 0;
                }
                succeeded = MR_TRUE;
              }
            }
            break;
        }
        if (succeeded)
          *HeadVar__1_1 = CompareResult_6;
        else
          {
            mercury__private_builtin__compare_error_0_p_0();
            return;
          }
      }
    }
  }
}

void MR_CALL 
parse_tree__error_spec____Index____spec_phase_0_0(
  MR_Word HeadVar__1_1,
  MR_Integer * HeadVar__2_2)
{
  switch (MR_tag((MR_Word) HeadVar__1_1)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      switch (MR_unmkbody(HeadVar__1_1)) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          *HeadVar__2_2 = (MR_Integer) 0;
          break;
        case (MR_Integer) 1:
          *HeadVar__2_2 = (MR_Integer) 1;
          break;
        case (MR_Integer) 2:
          *HeadVar__2_2 = (MR_Integer) 2;
          break;
        case (MR_Integer) 3:
          *HeadVar__2_2 = (MR_Integer) 3;
          break;
        case (MR_Integer) 4:
          *HeadVar__2_2 = (MR_Integer) 5;
          break;
        case (MR_Integer) 5:
          *HeadVar__2_2 = (MR_Integer) 6;
          break;
        case (MR_Integer) 6:
          *HeadVar__2_2 = (MR_Integer) 7;
          break;
        case (MR_Integer) 7:
          *HeadVar__2_2 = (MR_Integer) 8;
          break;
        case (MR_Integer) 8:
          *HeadVar__2_2 = (MR_Integer) 9;
          break;
        case (MR_Integer) 9:
          *HeadVar__2_2 = (MR_Integer) 10;
          break;
        case (MR_Integer) 10:
          *HeadVar__2_2 = (MR_Integer) 11;
          break;
        case (MR_Integer) 11:
          *HeadVar__2_2 = (MR_Integer) 12;
          break;
        case (MR_Integer) 12:
          *HeadVar__2_2 = (MR_Integer) 13;
          break;
        case (MR_Integer) 13:
          *HeadVar__2_2 = (MR_Integer) 14;
          break;
        case (MR_Integer) 14:
          *HeadVar__2_2 = (MR_Integer) 15;
          break;
        case (MR_Integer) 15:
          *HeadVar__2_2 = (MR_Integer) 16;
          break;
        case (MR_Integer) 16:
          *HeadVar__2_2 = (MR_Integer) 17;
          break;
        case (MR_Integer) 17:
          *HeadVar__2_2 = (MR_Integer) 19;
          break;
        case (MR_Integer) 18:
          *HeadVar__2_2 = (MR_Integer) 20;
          break;
        case (MR_Integer) 19:
          *HeadVar__2_2 = (MR_Integer) 21;
          break;
        case (MR_Integer) 20:
          *HeadVar__2_2 = (MR_Integer) 22;
          break;
        case (MR_Integer) 21:
          *HeadVar__2_2 = (MR_Integer) 24;
          break;
        case (MR_Integer) 22:
          *HeadVar__2_2 = (MR_Integer) 25;
          break;
        case (MR_Integer) 23:
          *HeadVar__2_2 = (MR_Integer) 26;
          break;
        case (MR_Integer) 24:
          *HeadVar__2_2 = (MR_Integer) 27;
          break;
        case (MR_Integer) 25:
          *HeadVar__2_2 = (MR_Integer) 28;
          break;
        case (MR_Integer) 26:
          *HeadVar__2_2 = (MR_Integer) 29;
          break;
        case (MR_Integer) 27:
          *HeadVar__2_2 = (MR_Integer) 30;
          break;
        case (MR_Integer) 28:
          *HeadVar__2_2 = (MR_Integer) 31;
          break;
      }
      break;
    case (MR_Integer) 1:
      *HeadVar__2_2 = (MR_Integer) 4;
      break;
    case (MR_Integer) 2:
      *HeadVar__2_2 = (MR_Integer) 18;
      break;
    case (MR_Integer) 3:
      *HeadVar__2_2 = (MR_Integer) 23;
      break;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_spec_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_29 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_30 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_29 == CastY_30);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word TypeInfo_34_34;
          MR_String ArgX1_3 = ((MR_String) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_String ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
          MR_Word ArgY2_6;
          MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
          MR_Word ArgY3_8;
          MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
          MR_Word ArgY4_10;
          MR_Word ArgX5_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 4))));
          MR_Word ArgY5_12;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_String) ((MR_hl_field(0, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
            ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
            ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
            ArgY5_12 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
            succeeded = (strcmp(ArgX1_3, ArgY1_4) == 0);
            if (succeeded)
            {
              succeeded = parse_tree__error_spec____Unify____spec_severity_0_0(ArgX2_5, ArgY2_6);
              if (succeeded)
              {
                succeeded = parse_tree__error_spec____Unify____spec_phase_0_0(ArgX3_7, ArgY3_8);
                if (succeeded)
                {
                  succeeded = mercury__term_context____Unify____term_context_0_0(ArgX4_9, ArgY4_10);
                  if (succeeded)
                  {
                    TypeInfo_34_34 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
                    succeeded = mercury__builtin__unify_2_p_0(TypeInfo_34_34, ((MR_Box) (ArgX5_11)), ((MR_Box) (ArgY5_12)));
                  }
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_32_32;
          MR_String ArgX1_13 = ((MR_String) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_String ArgY1_14;
          MR_Word ArgX2_15 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_16;
          MR_Word ArgX3_17 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 2))));
          MR_Word ArgY3_18;
          MR_Word ArgX4_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 3))));
          MR_Word ArgY4_20;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_14 = ((MR_String) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_16 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            ArgY3_18 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
            ArgY4_20 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
            succeeded = (strcmp(ArgX1_13, ArgY1_14) == 0);
            if (succeeded)
            {
              succeeded = parse_tree__error_spec____Unify____spec_severity_0_0(ArgX2_15, ArgY2_16);
              if (succeeded)
              {
                succeeded = parse_tree__error_spec____Unify____spec_phase_0_0(ArgX3_17, ArgY3_18);
                if (succeeded)
                {
                  TypeInfo_32_32 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_32_32, ((MR_Box) (ArgX4_19)), ((MR_Box) (ArgY4_20)));
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_31_31;
          MR_String ArgX1_21 = ((MR_String) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_String ArgY1_22;
          MR_Word ArgX2_23 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Word ArgY2_24;
          MR_Word ArgX3_25 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 2))));
          MR_Word ArgY3_26;
          MR_Word ArgX4_27 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 3))));
          MR_Word ArgY4_28;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_22 = ((MR_String) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_24 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
            ArgY3_26 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
            ArgY4_28 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 3))));
            succeeded = (strcmp(ArgX1_21, ArgY1_22) == 0);
            if (succeeded)
            {
              succeeded = parse_tree__error_spec____Unify____spec_severity_0_0(ArgX2_23, ArgY2_24);
              if (succeeded)
              {
                succeeded = parse_tree__error_spec____Unify____spec_phase_0_0(ArgX3_25, ArgY3_26);
                if (succeeded)
                {
                  TypeInfo_31_31 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[6]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_31_31, ((MR_Box) (ArgX4_27)), ((MR_Box) (ArgY4_28)));
                }
              }
            }
          }
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
          MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

          succeeded = (CastY_8 == CastX_7);
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word ArgX1_3 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 0))) & (MR_Integer) 1023);
          MR_Word ArgY1_4;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 1023);
            succeeded = (ArgX1_3 == ArgY1_4);
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word ArgX1_5 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 0))) & (MR_Integer) 1023);
          MR_Word ArgY1_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_6 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1023);
            succeeded = (ArgX1_5 == ArgY1_6);
          }
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_phase_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_13 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_14 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_13 == CastY_14);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Integer CastX_11 = (MR_Integer) (HeadVar__1_1);
          MR_Integer CastY_12 = (MR_Integer) (HeadVar__2_2);

          succeeded = (CastY_12 == CastX_11);
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_15_15;
          MR_String ArgX1_3 = ((MR_String) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_String ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_4 = ((MR_String) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            succeeded = (strcmp(ArgX1_3, ArgY1_4) == 0);
            if (succeeded)
            {
              TypeInfo_15_15 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[9]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_15_15, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word ArgX1_7 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 0))) & (MR_Integer) 1);
          MR_Word ArgY1_8;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_8 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
            succeeded = (ArgX1_7 == ArgY1_8);
          }
        }
        break;
      case (MR_Integer) 3:
        {
          MR_Word ArgX1_9 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 0))) & (MR_Integer) 1);
          MR_Word ArgY1_10;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3);
          if (succeeded)
          {
            ArgY1_10 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 0))) & (MR_Integer) 1);
            succeeded = (ArgX1_9 == ArgY1_10);
          }
        }
        break;
    }
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____diag_msg_component_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_16 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_17 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_16 == CastY_17);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));

              mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), HeadVar__1_1, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_6 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 1);
              MR_Word ArgY1_7 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 0))) & (MR_Integer) 1);
              MR_Word ArgX2_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
              MR_Word SubResult1_8;
              MR_Integer Var_23 = (MR_Integer) (ArgX1_6);
              MR_Integer Var_24 = (MR_Integer) (ArgY1_7);

              succeeded = (Var_23 < Var_24);
              if (succeeded)
              {
                SubResult1_8 = (MR_Integer) 1;
                succeeded = MR_TRUE;
              }
              else
              {
                succeeded = (Var_23 > Var_24);
                if (succeeded)
                {
                  SubResult1_8 = (MR_Integer) 2;
                  succeeded = MR_TRUE;
                }
              }
              if (succeeded)
                *HeadVar__1_1 = SubResult1_8;
              else
                mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), HeadVar__1_1, ((MR_Box) (ArgX2_9)), ((MR_Box) (ArgY2_10)));
            }
            break;
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_11 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_12 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Word ArgX2_14 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Word ArgY2_15 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word SubResult1_13;

              mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), &SubResult1_13, ((MR_Box) (ArgX1_11)), ((MR_Box) (ArgY1_12)));
              succeeded = (SubResult1_13 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_13;
              else
                mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), HeadVar__1_1, ((MR_Box) (ArgX2_14)), ((MR_Box) (ArgY2_15)));
            }
            break;
        }
        break;
    }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_msg_component_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_13 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_14 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_13 == CastY_14);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word TypeInfo_15_15;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
            TypeInfo_15_15 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_15_15, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_18_18;
          MR_Word ArgX1_5 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 0))) & (MR_Integer) 1);
          MR_Word ArgY1_6;
          MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_8;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_6 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 1);
            ArgY2_8 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            succeeded = (ArgX1_5 == ArgY1_6);
            if (succeeded)
            {
              TypeInfo_18_18 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_18_18, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_16_16;
          MR_Word TypeInfo_17_17;
          MR_Word ArgX1_9 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_10;
          MR_Word ArgX2_11 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Word ArgY2_12;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_10 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_12 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
            TypeInfo_16_16 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_16_16, ((MR_Box) (ArgX1_9)), ((MR_Box) (ArgY1_10)));
            if (succeeded)
            {
              TypeInfo_17_17 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_17_17, ((MR_Box) (ArgX2_11)), ((MR_Box) (ArgY2_12)));
            }
          }
        }
        break;
    }
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____diag_msg_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_29 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_30 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_29 == CastY_30);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
              MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
              MR_Word SubResult1_6;

              mercury__term_context____Compare____term_context_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
                mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), HeadVar__1_1, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Word ArgY1_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));

              mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), HeadVar__1_1, ((MR_Box) (ArgX1_9)), ((MR_Box) (ArgY1_10)));
            }
            break;
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_11 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_12 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Word ArgX2_14 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Word ArgY2_15 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word SubResult1_13;

              mercury__term_context____Compare____term_context_0_0(&SubResult1_13, ArgX1_11, ArgY1_12);
              succeeded = (SubResult1_13 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_13;
              else
                mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[5]), HeadVar__1_1, ((MR_Box) (ArgX2_14)), ((MR_Box) (ArgY2_15)));
            }
            break;
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    {
                      MR_Word ArgX1_16 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_17 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_19 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                      MR_Word ArgY2_20 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 2))) & (MR_Integer) 1);
                      MR_Unsigned ArgX3_22 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 3))));
                      MR_Unsigned ArgY3_23 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 3))));
                      MR_Word ArgX4_25 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                      MR_Word ArgY4_26 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 4))));
                      MR_Word SubResult1_18;

                      mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[4]), &SubResult1_18, ((MR_Box) (ArgX1_16)), ((MR_Box) (ArgY1_17)));
                      succeeded = (SubResult1_18 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_18;
                      else
                      {
                        MR_Word SubResult2_21;
                        MR_Integer Var_41 = (MR_Integer) (ArgX2_19);
                        MR_Integer Var_42 = (MR_Integer) (ArgY2_20);

                        succeeded = (Var_41 < Var_42);
                        if (succeeded)
                        {
                          SubResult2_21 = (MR_Integer) 1;
                          succeeded = MR_TRUE;
                        }
                        else
                        {
                          succeeded = (Var_41 > Var_42);
                          if (succeeded)
                          {
                            SubResult2_21 = (MR_Integer) 2;
                            succeeded = MR_TRUE;
                          }
                        }
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_21;
                        else
                        {
                          MR_Word SubResult3_24;

                          succeeded = (ArgX3_22 < ArgY3_23);
                          if (succeeded)
                          {
                            SubResult3_24 = (MR_Integer) 1;
                            succeeded = MR_TRUE;
                          }
                          else
                          {
                            succeeded = (ArgX3_22 > ArgY3_23);
                            if (succeeded)
                            {
                              SubResult3_24 = (MR_Integer) 2;
                              succeeded = MR_TRUE;
                            }
                          }
                          if (succeeded)
                            *HeadVar__1_1 = SubResult3_24;
                          else
                            mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[5]), HeadVar__1_1, ((MR_Box) (ArgX4_25)), ((MR_Box) (ArgY4_26)));
                        }
                      }
                    }
                    break;
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 1:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 1:
                    {
                      MR_Word ArgX1_27 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_28 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));

                      mercury__builtin__compare_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[4]), HeadVar__1_1, ((MR_Box) (ArgX1_27)), ((MR_Box) (ArgY1_28)));
                    }
                    break;
                }
                break;
            }
            break;
        }
        break;
    }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_msg_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_23 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_24 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_23 == CastY_24);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word TypeInfo_29_29;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
          MR_Word ArgY2_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
            succeeded = mercury__term_context____Unify____term_context_0_0(ArgX1_3, ArgY1_4);
            if (succeeded)
            {
              TypeInfo_29_29 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_29_29, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
            }
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_30_30;
          MR_Word ArgX1_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Word ArgY1_8;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_8 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
            TypeInfo_30_30 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_30_30, ((MR_Box) (ArgX1_7)), ((MR_Box) (ArgY1_8)));
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_32_32;
          MR_Word ArgX1_9 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_10;
          MR_Word ArgX2_11 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Word ArgY2_12;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_10 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_12 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
            succeeded = mercury__term_context____Unify____term_context_0_0(ArgX1_9, ArgY1_10);
            if (succeeded)
            {
              TypeInfo_32_32 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[5]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_32_32, ((MR_Box) (ArgX2_11)), ((MR_Box) (ArgY2_12)));
            }
          }
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word TypeInfo_26_26;
              MR_Word TypeInfo_27_27;
              MR_Word ArgX1_13 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_14;
              MR_Word ArgX2_15 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 2))) & (MR_Integer) 1);
              MR_Word ArgY2_16;
              MR_Unsigned ArgX3_17 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 3))));
              MR_Unsigned ArgY3_18;
              MR_Word ArgX4_19 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 4))));
              MR_Word ArgY4_20;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 0)));
              if (succeeded)
              {
                ArgY1_14 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_16 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                ArgY3_18 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 3))));
                ArgY4_20 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                TypeInfo_26_26 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[4]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_26_26, ((MR_Box) (ArgX1_13)), ((MR_Box) (ArgY1_14)));
                if (succeeded)
                {
                  succeeded = (ArgX2_15 == ArgY2_16);
                  if (succeeded)
                  {
                    succeeded = (ArgX3_17 == ArgY3_18);
                    if (succeeded)
                    {
                      TypeInfo_27_27 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[5]);
                      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_27_27, ((MR_Box) (ArgX4_19)), ((MR_Box) (ArgY4_20)));
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 1:
            {
              MR_Word TypeInfo_25_25;
              MR_Word ArgX1_21 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_22;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 1)));
              if (succeeded)
              {
                ArgY1_22 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                TypeInfo_25_25 = (MR_Word) (&parse_tree__error_spec_scalar_common_1[4]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_25_25, ((MR_Box) (ArgX1_21)), ((MR_Box) (ArgY1_22)));
              }
            }
            break;
        }
        break;
    }
  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____color_name_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____color_name_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
parse_tree__error_spec____Compare____actual_severity_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
parse_tree__error_spec____Unify____actual_severity_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

static MR_bool MR_CALL 
parse_tree__error_spec__is_nl_piece_1_p_0(
  MR_Word Piece_2)
{
  MR_bool succeeded;

  if ((Piece_2 == (MR_Word) ((MR_Unsigned) 12U)))
    succeeded = MR_TRUE;
  else
  if (((((MR_tag((MR_Word) Piece_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, Piece_2, 0)))) == (MR_Integer) 39))))
    succeeded = MR_TRUE;
  else
    succeeded = MR_FALSE;
  return succeeded;
}

static MR_Unsigned MR_CALL 
parse_tree__error_spec__case_sensitive_replacement_cost_2_f_0(
  MR_Char CharA_4,
  MR_Char CharB_5)
{
  MR_bool succeeded;
  MR_Unsigned ReplacementCost_6;
  MR_Char LowerCharA_7;
  MR_Char LowerCharB_8;

  mercury__char__to_lower_2_p_0(CharA_4, &LowerCharA_7);
  mercury__char__to_lower_2_p_0(CharB_5, &LowerCharB_8);
  succeeded = (LowerCharA_7 == LowerCharB_8);
  if (succeeded)
    ReplacementCost_6 = (MR_Unsigned) 1U;
  else
    ReplacementCost_6 = (MR_Unsigned) 2U;
  return ReplacementCost_6;
}

static MR_bool MR_CALL 
parse_tree__error_spec__name_is_close_enough_4_p_0(
  MR_Unsigned Cost_5,
  MR_String Query_6,
  MR_Unsigned QueryLenU_7,
  MR_String Name_8)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_110_97_109_101_95_105_115_95_99_108_111_115_101_95_101_110_111_117_103_104_95_95_91_50_93_95_48_4_p_0(Cost_5, QueryLenU_7, Name_8);
  return succeeded;
}

static MR_bool MR_CALL 
parse_tree__error_spec__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_110_97_109_101_95_105_115_95_99_108_111_115_101_95_101_110_111_117_103_104_95_95_91_50_93_95_48_4_p_0(
  MR_Unsigned Cost_5,
  MR_Unsigned QueryLenU_7,
  MR_String Name_8)
{
  MR_bool succeeded;
  MR_Integer NameLen_9;
  MR_Unsigned NameLenU_10;
  MR_Unsigned MinLenU_11;
  MR_Unsigned MaxLenU_12;
  MR_Unsigned MaxAcceptableLen_13;
  MR_Unsigned MaxAcceptableCost_14;
  MR_Unsigned Var_17;

  mercury__string__count_code_points_2_p_0(Name_8, &NameLen_9);
  NameLenU_10 = mercury__uint__cast_from_int_1_f_0(NameLen_9);
  MinLenU_11 = mercury__uint__min_2_f_0(QueryLenU_7, NameLenU_10);
  MaxLenU_12 = mercury__uint__max_2_f_0(QueryLenU_7, NameLenU_10);
  Var_17 = (MaxLenU_12 - MinLenU_11);
  succeeded = (Var_17 <= (MR_Unsigned) 1U);
  if (succeeded)
  {
    MR_Unsigned Var_19;

    Var_19 = mercury__uint__f_slash_2_f_0(MaxLenU_12, (MR_Unsigned) 3U);
    MaxAcceptableLen_13 = mercury__uint__max_2_f_0(Var_19, (MR_Unsigned) 1U);
  }
  else
  {
    MR_Unsigned Var_22 = (MaxLenU_12 + (MR_Unsigned) 2U);

    MaxAcceptableLen_13 = mercury__uint__f_slash_2_f_0(Var_22, (MR_Unsigned) 3U);
  }
  MaxAcceptableCost_14 = ((MR_Unsigned) 2U * MaxAcceptableLen_13);
  succeeded = (Cost_5 <= MaxAcceptableCost_14);
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec__diff_seq_line_to_pieces_2_p_0(
  MR_Word Diff_3,
  MR_Word * Pieces_4)
{
  MR_Word LinePieces_6;

  switch (MR_tag((MR_Word) Diff_3)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_String Str_5 = ((MR_String) ((MR_hl_field(0, Diff_3, 0))));
        MR_Word Var_7;
        MR_String Var_8;

        Var_8 = mercury__string__f_43_43_2_f_0((MR_String) " ", Str_5);
        {
          Var_7 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_7, 0) = ((MR_Box) (Var_8));
        }
        {
          LinePieces_6 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, LinePieces_6, 0) = ((MR_Box) (Var_7));
          MR_hl_field(1, LinePieces_6, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word Var_11;
        MR_Word Var_12;
        MR_String Var_13;
        MR_String Str_24 = ((MR_String) ((MR_hl_field(1, Diff_3, 0))));

        Var_13 = mercury__string__f_43_43_2_f_0((MR_String) "-", Str_24);
        {
          Var_12 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_12, 0) = ((MR_Box) (Var_13));
        }
        {
          Var_11 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_11, 0) = ((MR_Box) (Var_12));
          MR_hl_field(1, Var_11, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        LinePieces_6 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 1, Var_11);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word Var_16;
        MR_Word Var_17;
        MR_String Var_18;
        MR_String Str_25 = ((MR_String) ((MR_hl_field(2, Diff_3, 0))));

        Var_18 = mercury__string__f_43_43_2_f_0((MR_String) "+", Str_25);
        {
          Var_17 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_17, 0) = ((MR_Box) (Var_18));
        }
        {
          Var_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_16, 0) = ((MR_Box) (Var_17));
          MR_hl_field(1, Var_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        LinePieces_6 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 2, Var_16);
      }
      break;
  }
  *Pieces_4 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LinePieces_6, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])));
}

static void MR_CALL 
parse_tree__error_spec__change_hunk_to_pieces_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Word conv0_Pieces_4;

  parse_tree__error_spec__diff_seq_line_to_pieces_2_p_0(((MR_Word) (wrapper_arg_1)), &conv0_Pieces_4);
  *wrapper_arg_2 = ((MR_Box) (conv0_Pieces_4));
}

static void MR_CALL 
parse_tree__error_spec__change_hunk_to_pieces_2_p_0(
  MR_Word ChangeHunk_3,
  MR_Word * ChangeHunkPieces_4)
{
  MR_Unsigned StartA_5 = ((MR_Unsigned) ((MR_hl_field(0, ChangeHunk_3, 0))));
  MR_Unsigned LenA_6 = ((MR_Unsigned) ((MR_hl_field(0, ChangeHunk_3, 1))));
  MR_Unsigned StartB_7 = ((MR_Unsigned) ((MR_hl_field(0, ChangeHunk_3, 2))));
  MR_Unsigned LenB_8 = ((MR_Unsigned) ((MR_hl_field(0, ChangeHunk_3, 3))));
  MR_Word Diffs_9 = ((MR_Word) ((MR_hl_field(0, ChangeHunk_3, 4))));
  MR_String HeaderStr_10;
  MR_Word HeaderPieces_11;
  MR_Word DiffPieceLists_12;
  MR_Word Var_23;
  MR_Word Var_28;
  MR_String Var_36;
  MR_String Var_43;
  MR_String Var_45;
  MR_String Var_47;
  MR_String Var_54;
  MR_String Var_56;
  MR_String Var_58;
  MR_String Var_65;
  MR_String Var_67;
  MR_String Var_69;
  MR_String Var_76;

  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_2[0]), (MR_Integer) 1, LenB_8, &Var_36);
  Var_43 = mercury__string__f_43_43_2_f_0(Var_36, (MR_String) " \100\100");
  Var_45 = mercury__string__f_43_43_2_f_0((MR_String) ",", Var_43);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_2[0]), (MR_Integer) 1, StartB_7, &Var_47);
  Var_54 = mercury__string__f_43_43_2_f_0(Var_47, Var_45);
  Var_56 = mercury__string__f_43_43_2_f_0((MR_String) " +", Var_54);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_2[0]), (MR_Integer) 1, LenA_6, &Var_58);
  Var_65 = mercury__string__f_43_43_2_f_0(Var_58, Var_56);
  Var_67 = mercury__string__f_43_43_2_f_0((MR_String) ",", Var_65);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_2[0]), (MR_Integer) 1, StartA_5, &Var_69);
  Var_76 = mercury__string__f_43_43_2_f_0(Var_69, Var_67);
  HeaderStr_10 = mercury__string__f_43_43_2_f_0((MR_String) "\100\100 -", Var_76);
  {
    Var_23 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(2, Var_23, 0) = ((MR_Box) (HeaderStr_10));
  }
  {
    HeaderPieces_11 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, HeaderPieces_11, 0) = ((MR_Box) (Var_23));
    MR_hl_field(1, HeaderPieces_11, 1) = ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])));
  }
  mercury__list__map_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[3]), (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), (MR_Word) (&parse_tree__error_spec_scalar_common_5[9]), Diffs_9, &DiffPieceLists_12);
  {
    Var_28 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_28, 0) = ((MR_Box) (HeaderPieces_11));
    MR_hl_field(1, Var_28, 1) = ((MR_Box) (DiffPieceLists_12));
  }
  mercury__list__condense_2_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_28, ChangeHunkPieces_4);
}

static void MR_CALL 
parse_tree__error_spec__accumulate_contexts_in_msg_3_p_0(
  MR_Word Msg_4,
  MR_Word STATE_VARIABLE_Contexts_0_8,
  MR_Word * STATE_VARIABLE_Contexts_9)
{
  MR_Word MaybeContext_6;

  parse_tree__error_spec__extract_msg_maybe_context_2_p_0(Msg_4, &MaybeContext_6);
  if ((MaybeContext_6 == (MR_Word) ((MR_Unsigned) 0U)))
    *STATE_VARIABLE_Contexts_9 = STATE_VARIABLE_Contexts_0_8;
  else
  {
    MR_Word Context_7 = ((MR_Word) ((MR_hl_field(1, MaybeContext_6, 0))));

    mercury__set__insert_3_p_0((MR_Word) (&mercury__term_context__term_context__type_ctor_info_term_context_0), ((MR_Box) (Context_7)), STATE_VARIABLE_Contexts_0_8, STATE_VARIABLE_Contexts_9);
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__pieces_list_to_split_color_line_pieces_4_f_0(
  MR_Word MaybeColorA_6,
  MR_Word MaybeColorB_7,
  MR_Word LastSuffixB_8,
  MR_Word Pairs_9)
{
  MR_Word Pieces_10;

  parse_tree__error_spec__strict_general_list_to_split_line_pieces__ho1_6_p_0(MaybeColorA_6, MaybeColorB_7, LastSuffixB_8, Pairs_9, &Pieces_10);
  return Pieces_10;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_split_line_pieces__ho1_6_p_0(
  MR_Word MaybeColorA_8,
  MR_Word MaybeColorB_9,
  MR_Word LastSuffixB_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_Tuple Var_46 = ((MR_Tuple) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1A_14 = ((MR_Word) ((MR_hl_field(0, Var_46, 0))));
      MR_Word Pieces1B_15 = ((MR_Word) ((MR_hl_field(0, Var_46, 1))));
      MR_Word HeadPiecesA_16;
      MR_Word HeadPiecesB_17;
      MR_Word Var_24;

      if ((MaybeColorA_8 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPiecesA_16 = Pieces1A_14;
      else
      {
        MR_Word Color_47 = ((MR_Word) ((MR_hl_field(1, MaybeColorA_8, 0))));

        HeadPiecesA_16 = parse_tree__error_spec__color_pieces_2_f_0(Color_47, Pieces1A_14);
      }
      Var_24 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1B_15, LastSuffixB_10);
      if ((MaybeColorB_9 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPiecesB_17 = Var_24;
      else
      {
        MR_Word Color_48 = ((MR_Word) ((MR_hl_field(1, MaybeColorB_9, 0))));

        HeadPiecesB_17 = parse_tree__error_spec__color_pieces_2_f_0(Color_48, Var_24);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPiecesA_16, HeadPiecesB_17);
    }
    else
    {
      MR_Word TailPieces_21;
      MR_Word Var_30;
      MR_Word Var_32;
      MR_Word Var_33;
      MR_Word Pieces1A_38 = ((MR_Word) ((MR_hl_field(0, Var_46, 0))));
      MR_Word Pieces1B_39 = ((MR_Word) ((MR_hl_field(0, Var_46, 1))));
      MR_Word HeadPiecesA_40;
      MR_Word HeadPiecesB_41;

      if ((MaybeColorA_8 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPiecesA_40 = Pieces1A_38;
      else
      {
        MR_Word Color_49 = ((MR_Word) ((MR_hl_field(1, MaybeColorA_8, 0))));

        HeadPiecesA_40 = parse_tree__error_spec__color_pieces_2_f_0(Color_49, Pieces1A_38);
      }
      Var_30 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1B_39, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColorB_9 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPiecesB_41 = Var_30;
      else
      {
        MR_Word Color_50 = ((MR_Word) ((MR_hl_field(1, MaybeColorB_9, 0))));

        HeadPiecesB_41 = parse_tree__error_spec__color_pieces_2_f_0(Color_50, Var_30);
      }
      parse_tree__error_spec__strict_general_list_to_split_line_pieces__ho1_6_p_0(MaybeColorA_8, MaybeColorB_9, LastSuffixB_10, Var_45, &TailPieces_21);
      Var_33 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_21);
      Var_32 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPiecesB_41, Var_33);
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPiecesA_40, Var_32);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__pieces_list_to_color_line_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word PiecesList_7)
{
  MR_Word Pieces_8;
  MR_Word Var_16;

  {
    Var_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_16, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_line_pieces__ho49_5_p_0(Var_16, LastSuffix_6, PiecesList_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho49_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_Word Var_36 = ((MR_Word) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Var_18;

      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_36, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_37 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_37, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;

      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_36, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_38 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_38, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho49_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__piece_list_to_color_line_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word PieceList_7)
{
  MR_Word Pieces_8;
  MR_Word Var_17;

  {
    Var_17 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_17, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_line_pieces__ho48_5_p_0(Var_17, LastSuffix_6, PieceList_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho48_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_Word Var_36 = ((MR_Word) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_12;
      MR_Word Var_18;

      {
        Pieces1_12 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_12, 0) = ((MR_Box) (Var_36));
        MR_hl_field(1, Pieces1_12, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_12, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_38 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_38, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;
      MR_Word Pieces1_31;

      {
        Pieces1_31 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_31, 0) = ((MR_Box) (Var_36));
        MR_hl_field(1, Pieces1_31, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_31, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_40 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_40, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho48_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__quote_list_to_color_line_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word Strings_7)
{
  MR_Word Pieces_8;
  MR_Word Var_18;

  {
    Var_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_18, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_line_pieces__ho47_5_p_0(Var_18, LastSuffix_6, Strings_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho47_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_String Var_36 = ((MR_String) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_12;
      MR_Word Var_18;
      MR_Word Var_37;

      {
        Var_37 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_37, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_37, 1) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_12 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_12, 0) = ((MR_Box) (Var_37));
        MR_hl_field(1, Pieces1_12, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_12, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_39 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_39, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;
      MR_Word Pieces1_31;
      MR_Word Var_40;

      {
        Var_40 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_40, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_40, 1) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_31 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_31, 0) = ((MR_Box) (Var_40));
        MR_hl_field(1, Pieces1_31, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_31, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_42 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_42, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho47_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__fixed_list_to_color_line_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word Strings_7)
{
  MR_Word Pieces_8;
  MR_Word Var_18;

  {
    Var_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_18, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_line_pieces__ho46_5_p_0(Var_18, LastSuffix_6, Strings_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho46_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_String Var_36 = ((MR_String) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_12;
      MR_Word Var_18;
      MR_Word Var_37;

      {
        Var_37 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_37, 0) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_12 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_12, 0) = ((MR_Box) (Var_37));
        MR_hl_field(1, Pieces1_12, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_12, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_39 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_39, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;
      MR_Word Pieces1_31;
      MR_Word Var_40;

      {
        Var_40 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_40, 0) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_31 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_31, 0) = ((MR_Box) (Var_40));
        MR_hl_field(1, Pieces1_31, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_31, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_42 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_42, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho46_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__pieces_list_to_line_pieces_1_f_0(
  MR_Word PiecesList_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_line_pieces__ho45_5_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) ((MR_Unsigned) 0U), PiecesList_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho45_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_Word Var_36 = ((MR_Word) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Var_18;

      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_36, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_37 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_37, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;

      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_36, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_38 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_38, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho45_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__piece_list_to_line_pieces_1_f_0(
  MR_Word PieceList_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_line_pieces__ho44_5_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) ((MR_Unsigned) 0U), PieceList_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho44_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_Word Var_36 = ((MR_Word) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_12;
      MR_Word Var_18;

      {
        Pieces1_12 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_12, 0) = ((MR_Box) (Var_36));
        MR_hl_field(1, Pieces1_12, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_12, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_38 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_38, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;
      MR_Word Pieces1_31;

      {
        Pieces1_31 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_31, 0) = ((MR_Box) (Var_36));
        MR_hl_field(1, Pieces1_31, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_31, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_40 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_40, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho44_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__quote_list_to_line_pieces_1_f_0(
  MR_Word Strings_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_line_pieces__ho43_5_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) ((MR_Unsigned) 0U), Strings_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho43_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_String Var_36 = ((MR_String) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_12;
      MR_Word Var_18;
      MR_Word Var_37;

      {
        Var_37 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_37, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_37, 1) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_12 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_12, 0) = ((MR_Box) (Var_37));
        MR_hl_field(1, Pieces1_12, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_12, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_39 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_39, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;
      MR_Word Pieces1_31;
      MR_Word Var_40;

      {
        Var_40 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_40, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_40, 1) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_31 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_31, 0) = ((MR_Box) (Var_40));
        MR_hl_field(1, Pieces1_31, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_31, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_42 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_42, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho43_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__fixed_list_to_line_pieces_1_f_0(
  MR_Word Strings_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_line_pieces__ho42_5_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) ((MR_Unsigned) 0U), Strings_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_line_pieces__ho42_5_p_0(
  MR_Word MaybeColor_7,
  MR_Word LastSuffix_8,
  MR_Word Items_9,
  MR_Word * Pieces_10)
{
  if ((Items_9 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_10 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(1, Items_9, 1))));
    MR_String Var_36 = ((MR_String) ((MR_hl_field(1, Items_9, 0))));

    if ((Var_35 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_12;
      MR_Word Var_18;
      MR_Word Var_37;

      {
        Var_37 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_37, 0) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_12 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_12, 0) = ((MR_Box) (Var_37));
        MR_hl_field(1, Pieces1_12, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_12, LastSuffix_8);
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_10 = Var_18;
      else
      {
        MR_Word Color_39 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        *Pieces_10 = parse_tree__error_spec__color_pieces_2_f_0(Color_39, Var_18);
      }
    }
    else
    {
      MR_Word HeadPieces_15;
      MR_Word TailPieces_16;
      MR_Word Var_20;
      MR_Word Var_26;
      MR_Word Pieces1_31;
      MR_Word Var_40;

      {
        Var_40 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_40, 0) = ((MR_Box) (Var_36));
      }
      {
        Pieces1_31 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_31, 0) = ((MR_Box) (Var_40));
        MR_hl_field(1, Pieces1_31, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_20 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_31, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])));
      if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
        HeadPieces_15 = Var_20;
      else
      {
        MR_Word Color_42 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

        HeadPieces_15 = parse_tree__error_spec__color_pieces_2_f_0(Color_42, Var_20);
      }
      parse_tree__error_spec__strict_general_list_to_line_pieces__ho42_5_p_0(MaybeColor_7, LastSuffix_8, Var_35, &TailPieces_16);
      Var_26 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])), TailPieces_16);
      *Pieces_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadPieces_15, Var_26);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__pieces_strict_list_to_color_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word PiecesList_7)
{
  MR_Word Pieces_8;
  MR_Word Var_20;

  {
    Var_20 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_20, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_pieces__ho41_6_p_0(Var_20, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSuffix_6, PiecesList_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho41_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_Word Var_30 = ((MR_Word) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Var_19;

      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_30, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_31 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_31, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;

      parse_tree__error_spec__strict_general_list_to_pieces__ho41_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_30, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_32 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_32, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__piece_strict_list_to_color_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word PieceList_7)
{
  MR_Word Pieces_8;
  MR_Word Var_21;

  {
    Var_21 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_21, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_pieces__ho40_6_p_0(Var_21, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSuffix_6, PieceList_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho40_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_Word Var_30 = ((MR_Word) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_14;
      MR_Word Var_19;

      {
        Pieces1_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_14, 0) = ((MR_Box) (Var_30));
        MR_hl_field(1, Pieces1_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_14, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_32 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_32, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;
      MR_Word Pieces1_25;

      {
        Pieces1_25 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_25, 0) = ((MR_Box) (Var_30));
        MR_hl_field(1, Pieces1_25, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      parse_tree__error_spec__strict_general_list_to_pieces__ho40_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_25, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_34 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_34, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__quote_strict_list_to_color_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word Strings_7)
{
  MR_Word Pieces_8;
  MR_Word Var_22;

  {
    Var_22 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_22, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_pieces__ho39_6_p_0(Var_22, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSuffix_6, Strings_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho39_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_String Var_30 = ((MR_String) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_14;
      MR_Word Var_19;
      MR_Word Var_31;

      {
        Var_31 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_31, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_31, 1) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_14, 0) = ((MR_Box) (Var_31));
        MR_hl_field(1, Pieces1_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_14, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_33 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_33, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;
      MR_Word Pieces1_25;
      MR_Word Var_34;

      {
        Var_34 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_34, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_34, 1) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_25 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_25, 0) = ((MR_Box) (Var_34));
        MR_hl_field(1, Pieces1_25, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      parse_tree__error_spec__strict_general_list_to_pieces__ho39_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_25, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_36 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_36, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__fixed_strict_list_to_color_pieces_3_f_0(
  MR_Word Color_5,
  MR_Word LastSuffix_6,
  MR_Word Strings_7)
{
  MR_Word Pieces_8;
  MR_Word Var_22;

  {
    Var_22 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_22, 0) = ((MR_Box) (Color_5));
  }
  parse_tree__error_spec__strict_general_list_to_pieces__ho38_6_p_0(Var_22, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSuffix_6, Strings_7, &Pieces_8);
  return Pieces_8;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho38_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_String Var_30 = ((MR_String) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_14;
      MR_Word Var_19;
      MR_Word Var_31;

      {
        Var_31 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_31, 0) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_14, 0) = ((MR_Box) (Var_31));
        MR_hl_field(1, Pieces1_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_14, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_33 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_33, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;
      MR_Word Pieces1_25;
      MR_Word Var_34;

      {
        Var_34 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_34, 0) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_25 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_25, 0) = ((MR_Box) (Var_34));
        MR_hl_field(1, Pieces1_25, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      parse_tree__error_spec__strict_general_list_to_pieces__ho38_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_25, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_36 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_36, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__pieces_strict_list_to_pieces_1_f_0(
  MR_Word PiecesList_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_pieces__ho37_6_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), (MR_Word) ((MR_Unsigned) 0U), PiecesList_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho37_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_Word Var_30 = ((MR_Word) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Var_19;

      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_30, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_31 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_31, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;

      parse_tree__error_spec__strict_general_list_to_pieces__ho37_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_30, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_32 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_32, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__piece_strict_list_to_pieces_1_f_0(
  MR_Word PieceList_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_pieces__ho36_6_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), (MR_Word) ((MR_Unsigned) 0U), PieceList_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho36_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_Word Var_30 = ((MR_Word) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_14;
      MR_Word Var_19;

      {
        Pieces1_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_14, 0) = ((MR_Box) (Var_30));
        MR_hl_field(1, Pieces1_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_14, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_32 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_32, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;
      MR_Word Pieces1_25;

      {
        Pieces1_25 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_25, 0) = ((MR_Box) (Var_30));
        MR_hl_field(1, Pieces1_25, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      parse_tree__error_spec__strict_general_list_to_pieces__ho36_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_25, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_34 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_34, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__quote_strict_list_to_pieces_1_f_0(
  MR_Word Strings_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_pieces__ho35_6_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), (MR_Word) ((MR_Unsigned) 0U), Strings_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho35_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_String Var_30 = ((MR_String) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_14;
      MR_Word Var_19;
      MR_Word Var_31;

      {
        Var_31 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_31, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_31, 1) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_14, 0) = ((MR_Box) (Var_31));
        MR_hl_field(1, Pieces1_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_14, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_33 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_33, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;
      MR_Word Pieces1_25;
      MR_Word Var_34;

      {
        Var_34 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_34, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_34, 1) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_25 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_25, 0) = ((MR_Box) (Var_34));
        MR_hl_field(1, Pieces1_25, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      parse_tree__error_spec__strict_general_list_to_pieces__ho35_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_25, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_36 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_36, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__fixed_strict_list_to_pieces_1_f_0(
  MR_Word Strings_3)
{
  MR_Word Pieces_4;

  parse_tree__error_spec__strict_general_list_to_pieces__ho34_6_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), (MR_Word) ((MR_Unsigned) 0U), Strings_3, &Pieces_4);
  return Pieces_4;
}

static void MR_CALL 
parse_tree__error_spec__strict_general_list_to_pieces__ho34_6_p_0(
  MR_Word MaybeColor_8,
  MR_Word Sep_9,
  MR_Word LastSuffix_10,
  MR_Word Items_11,
  MR_Word * Pieces_12)
{
  if ((Items_11 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_12 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(1, Items_11, 1))));
    MR_String Var_30 = ((MR_String) ((MR_hl_field(1, Items_11, 0))));

    if ((Var_29 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_14;
      MR_Word Var_19;
      MR_Word Var_31;

      {
        Var_31 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_31, 0) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_14, 0) = ((MR_Box) (Var_31));
        MR_hl_field(1, Pieces1_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_14, LastSuffix_10);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_12 = Var_19;
      else
      {
        MR_Word Color_33 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        *Pieces_12 = parse_tree__error_spec__color_pieces_2_f_0(Color_33, Var_19);
      }
    }
    else
    {
      MR_Word TailPieces_17;
      MR_Word Var_22;
      MR_Word Var_23;
      MR_Word Pieces1_25;
      MR_Word Var_34;

      {
        Var_34 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_34, 0) = ((MR_Box) (Var_30));
      }
      {
        Pieces1_25 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_25, 0) = ((MR_Box) (Var_34));
        MR_hl_field(1, Pieces1_25, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      parse_tree__error_spec__strict_general_list_to_pieces__ho34_6_p_0(MaybeColor_8, Sep_9, LastSuffix_10, Var_29, &TailPieces_17);
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_25, Sep_9);
      if ((MaybeColor_8 == (MR_Word) ((MR_Unsigned) 0U)))
        Var_22 = Var_23;
      else
      {
        MR_Word Color_36 = ((MR_Word) ((MR_hl_field(1, MaybeColor_8, 0))));

        Var_22 = parse_tree__error_spec__color_pieces_2_f_0(Color_36, Var_23);
      }
      *Pieces_12 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_22, TailPieces_17);
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__pieces_list_to_color_pieces_4_f_0(
  MR_Word Color_6,
  MR_String LastSep_7,
  MR_Word LastSuffix_8,
  MR_Word PiecesList_9)
{
  MR_Word Pieces_10;
  MR_Word LastSepPieces_19;
  MR_Word Var_23;
  MR_Word Var_25;

  {
    Var_23 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_23, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_23, 1) = ((MR_Box) (LastSep_7));
  }
  {
    LastSepPieces_19 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_19, 0) = ((MR_Box) (Var_23));
    MR_hl_field(1, LastSepPieces_19, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    Var_25 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_25, 0) = ((MR_Box) (Color_6));
  }
  parse_tree__error_spec__general_list_to_pieces__ho33_7_p_0(Var_25, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_19, LastSuffix_8, PiecesList_9, &Pieces_10);
  return Pieces_10;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho33_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_Word Var_46 = ((MR_Word) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Var_23;

      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_46, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_49 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_49, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_Word Var_48 = ((MR_Word) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;

        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Var_46;
        else
        {
          MR_Word Color_50 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_50, Var_46);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_48, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_51 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_51, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;

        parse_tree__error_spec__general_list_to_pieces__ho33_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_46, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_52 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_52, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__piece_list_to_color_pieces_4_f_0(
  MR_Word Color_6,
  MR_String LastSep_7,
  MR_Word LastSuffix_8,
  MR_Word PieceList_9)
{
  MR_Word Pieces_10;
  MR_Word LastSepPieces_20;
  MR_Word Var_24;
  MR_Word Var_26;

  {
    Var_24 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_24, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_24, 1) = ((MR_Box) (LastSep_7));
  }
  {
    LastSepPieces_20 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_20, 0) = ((MR_Box) (Var_24));
    MR_hl_field(1, LastSepPieces_20, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    Var_26 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_26, 0) = ((MR_Box) (Color_6));
  }
  parse_tree__error_spec__general_list_to_pieces__ho32_7_p_0(Var_26, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_20, LastSuffix_8, PieceList_9, &Pieces_10);
  return Pieces_10;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho32_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_Word Var_46 = ((MR_Word) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_16;
      MR_Word Var_23;

      {
        Pieces1_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_16, 0) = ((MR_Box) (Var_46));
        MR_hl_field(1, Pieces1_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_16, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_50 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_50, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_Word Var_48 = ((MR_Word) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Pieces2_18;
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;
        MR_Word Pieces1_37;

        {
          Pieces1_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_37, 0) = ((MR_Box) (Var_46));
          MR_hl_field(1, Pieces1_37, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          Pieces2_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces2_18, 0) = ((MR_Box) (Var_48));
          MR_hl_field(1, Pieces2_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Pieces1_37;
        else
        {
          MR_Word Color_53 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_53, Pieces1_37);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces2_18, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_54 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_54, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;
        MR_Word Pieces1_39;

        {
          Pieces1_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_39, 0) = ((MR_Box) (Var_46));
          MR_hl_field(1, Pieces1_39, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        parse_tree__error_spec__general_list_to_pieces__ho32_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_39, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_56 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_56, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__quote_list_to_color_pieces_4_f_0(
  MR_Word Color_6,
  MR_String LastSep_7,
  MR_Word LastSuffix_8,
  MR_Word Strings_9)
{
  MR_Word Pieces_10;
  MR_Word LastSepPieces_21;
  MR_Word Var_25;
  MR_Word Var_27;

  {
    Var_25 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_25, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_25, 1) = ((MR_Box) (LastSep_7));
  }
  {
    LastSepPieces_21 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_21, 0) = ((MR_Box) (Var_25));
    MR_hl_field(1, LastSepPieces_21, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    Var_27 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_27, 0) = ((MR_Box) (Color_6));
  }
  parse_tree__error_spec__general_list_to_pieces__ho31_7_p_0(Var_27, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_21, LastSuffix_8, Strings_9, &Pieces_10);
  return Pieces_10;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho31_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_String Var_46 = ((MR_String) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_16;
      MR_Word Var_23;
      MR_Word Var_49;

      {
        Var_49 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_49, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_49, 1) = ((MR_Box) (Var_46));
      }
      {
        Pieces1_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_16, 0) = ((MR_Box) (Var_49));
        MR_hl_field(1, Pieces1_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_16, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_51 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_51, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_String Var_48 = ((MR_String) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Pieces2_18;
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;
        MR_Word Pieces1_37;
        MR_Word Var_52;
        MR_Word Var_54;

        {
          Var_52 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, Var_52, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, Var_52, 1) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_37, 0) = ((MR_Box) (Var_52));
          MR_hl_field(1, Pieces1_37, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          Var_54 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, Var_54, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, Var_54, 1) = ((MR_Box) (Var_48));
        }
        {
          Pieces2_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces2_18, 0) = ((MR_Box) (Var_54));
          MR_hl_field(1, Pieces2_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Pieces1_37;
        else
        {
          MR_Word Color_56 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_56, Pieces1_37);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces2_18, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_57 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_57, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;
        MR_Word Pieces1_39;
        MR_Word Var_58;

        {
          Var_58 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, Var_58, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, Var_58, 1) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_39, 0) = ((MR_Box) (Var_58));
          MR_hl_field(1, Pieces1_39, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        parse_tree__error_spec__general_list_to_pieces__ho31_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_39, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_60 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_60, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__fixed_list_to_color_pieces_4_f_0(
  MR_Word Color_6,
  MR_String LastSep_7,
  MR_Word LastSuffix_8,
  MR_Word Strings_9)
{
  MR_Word Pieces_10;
  MR_Word LastSepPieces_21;
  MR_Word Var_25;
  MR_Word Var_27;

  {
    Var_25 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_25, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_25, 1) = ((MR_Box) (LastSep_7));
  }
  {
    LastSepPieces_21 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_21, 0) = ((MR_Box) (Var_25));
    MR_hl_field(1, LastSepPieces_21, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    Var_27 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Var_27, 0) = ((MR_Box) (Color_6));
  }
  parse_tree__error_spec__general_list_to_pieces__ho30_7_p_0(Var_27, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_21, LastSuffix_8, Strings_9, &Pieces_10);
  return Pieces_10;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho30_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_String Var_46 = ((MR_String) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_16;
      MR_Word Var_23;
      MR_Word Var_49;

      {
        Var_49 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_49, 0) = ((MR_Box) (Var_46));
      }
      {
        Pieces1_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_16, 0) = ((MR_Box) (Var_49));
        MR_hl_field(1, Pieces1_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_16, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_51 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_51, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_String Var_48 = ((MR_String) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Pieces2_18;
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;
        MR_Word Pieces1_37;
        MR_Word Var_52;
        MR_Word Var_54;

        {
          Var_52 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_52, 0) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_37, 0) = ((MR_Box) (Var_52));
          MR_hl_field(1, Pieces1_37, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          Var_54 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_54, 0) = ((MR_Box) (Var_48));
        }
        {
          Pieces2_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces2_18, 0) = ((MR_Box) (Var_54));
          MR_hl_field(1, Pieces2_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Pieces1_37;
        else
        {
          MR_Word Color_56 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_56, Pieces1_37);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces2_18, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_57 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_57, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;
        MR_Word Pieces1_39;
        MR_Word Var_58;

        {
          Var_58 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_58, 0) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_39, 0) = ((MR_Box) (Var_58));
          MR_hl_field(1, Pieces1_39, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        parse_tree__error_spec__general_list_to_pieces__ho30_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_39, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_60 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_60, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__pieces_list_to_pieces_2_f_0(
  MR_String LastSep_4,
  MR_Word PiecesList_5)
{
  MR_Word Pieces_6;
  MR_Word LastSepPieces_16;
  MR_Word Var_21;

  {
    Var_21 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_21, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_21, 1) = ((MR_Box) (LastSep_4));
  }
  {
    LastSepPieces_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_16, 0) = ((MR_Box) (Var_21));
    MR_hl_field(1, LastSepPieces_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  parse_tree__error_spec__general_list_to_pieces__ho29_7_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_16, (MR_Word) ((MR_Unsigned) 0U), PiecesList_5, &Pieces_6);
  return Pieces_6;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho29_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_Word Var_46 = ((MR_Word) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Var_23;

      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_46, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_49 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_49, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_Word Var_48 = ((MR_Word) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;

        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Var_46;
        else
        {
          MR_Word Color_50 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_50, Var_46);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_48, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_51 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_51, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;

        parse_tree__error_spec__general_list_to_pieces__ho29_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_46, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_52 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_52, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__piece_list_to_pieces_2_f_0(
  MR_String LastSep_4,
  MR_Word PieceList_5)
{
  MR_Word Pieces_6;
  MR_Word LastSepPieces_17;
  MR_Word Var_22;

  {
    Var_22 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_22, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_22, 1) = ((MR_Box) (LastSep_4));
  }
  {
    LastSepPieces_17 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_17, 0) = ((MR_Box) (Var_22));
    MR_hl_field(1, LastSepPieces_17, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  parse_tree__error_spec__general_list_to_pieces__ho28_7_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_17, (MR_Word) ((MR_Unsigned) 0U), PieceList_5, &Pieces_6);
  return Pieces_6;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho28_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_Word Var_46 = ((MR_Word) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_16;
      MR_Word Var_23;

      {
        Pieces1_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_16, 0) = ((MR_Box) (Var_46));
        MR_hl_field(1, Pieces1_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_16, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_50 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_50, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_Word Var_48 = ((MR_Word) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Pieces2_18;
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;
        MR_Word Pieces1_37;

        {
          Pieces1_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_37, 0) = ((MR_Box) (Var_46));
          MR_hl_field(1, Pieces1_37, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          Pieces2_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces2_18, 0) = ((MR_Box) (Var_48));
          MR_hl_field(1, Pieces2_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Pieces1_37;
        else
        {
          MR_Word Color_53 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_53, Pieces1_37);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces2_18, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_54 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_54, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;
        MR_Word Pieces1_39;

        {
          Pieces1_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_39, 0) = ((MR_Box) (Var_46));
          MR_hl_field(1, Pieces1_39, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        parse_tree__error_spec__general_list_to_pieces__ho28_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_39, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_56 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_56, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__fixed_list_to_pieces_2_f_0(
  MR_String LastSep_4,
  MR_Word Strings_5)
{
  MR_Word Pieces_6;
  MR_Word LastSepPieces_18;
  MR_Word Var_23;

  {
    Var_23 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_23, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_23, 1) = ((MR_Box) (LastSep_4));
  }
  {
    LastSepPieces_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_18, 0) = ((MR_Box) (Var_23));
    MR_hl_field(1, LastSepPieces_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  parse_tree__error_spec__general_list_to_pieces__ho26_7_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_18, (MR_Word) ((MR_Unsigned) 0U), Strings_5, &Pieces_6);
  return Pieces_6;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho26_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_String Var_46 = ((MR_String) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_16;
      MR_Word Var_23;
      MR_Word Var_49;

      {
        Var_49 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(2, Var_49, 0) = ((MR_Box) (Var_46));
      }
      {
        Pieces1_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_16, 0) = ((MR_Box) (Var_49));
        MR_hl_field(1, Pieces1_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_16, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_51 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_51, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_String Var_48 = ((MR_String) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Pieces2_18;
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;
        MR_Word Pieces1_37;
        MR_Word Var_52;
        MR_Word Var_54;

        {
          Var_52 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_52, 0) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_37, 0) = ((MR_Box) (Var_52));
          MR_hl_field(1, Pieces1_37, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          Var_54 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_54, 0) = ((MR_Box) (Var_48));
        }
        {
          Pieces2_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces2_18, 0) = ((MR_Box) (Var_54));
          MR_hl_field(1, Pieces2_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Pieces1_37;
        else
        {
          MR_Word Color_56 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_56, Pieces1_37);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces2_18, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_57 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_57, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;
        MR_Word Pieces1_39;
        MR_Word Var_58;

        {
          Var_58 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_58, 0) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_39, 0) = ((MR_Box) (Var_58));
          MR_hl_field(1, Pieces1_39, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        parse_tree__error_spec__general_list_to_pieces__ho26_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_39, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_60 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_60, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__maybe_color_pieces_2_f_0(
  MR_Word MaybeColor_4,
  MR_Word Pieces_5)
{
  MR_Word MaybeColorPieces_6;

  if ((MaybeColor_4 == (MR_Word) ((MR_Unsigned) 0U)))
    MaybeColorPieces_6 = Pieces_5;
  else
  {
    MR_Word Color_7 = ((MR_Word) ((MR_hl_field(1, MaybeColor_4, 0))));

    MaybeColorPieces_6 = parse_tree__error_spec__color_pieces_2_f_0(Color_7, Pieces_5);
  }
  return MaybeColorPieces_6;
}

MR_Word MR_CALL 
parse_tree__error_spec__color_as_hint_1_f_0(
  MR_Word Pieces_3)
{
  MR_Word HeadVar__2_2;

  HeadVar__2_2 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 4, Pieces_3);
  return HeadVar__2_2;
}

MR_Word MR_CALL 
parse_tree__error_spec__color_as_inconsistent_1_f_0(
  MR_Word Pieces_3)
{
  MR_Word HeadVar__2_2;

  HeadVar__2_2 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 3, Pieces_3);
  return HeadVar__2_2;
}

MR_Word MR_CALL 
parse_tree__error_spec__color_as_incorrect_1_f_0(
  MR_Word Pieces_3)
{
  MR_Word HeadVar__2_2;

  HeadVar__2_2 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 2, Pieces_3);
  return HeadVar__2_2;
}

MR_Word MR_CALL 
parse_tree__error_spec__color_as_correct_1_f_0(
  MR_Word Pieces_3)
{
  MR_Word HeadVar__2_2;

  HeadVar__2_2 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 1, Pieces_3);
  return HeadVar__2_2;
}

MR_Word MR_CALL 
parse_tree__error_spec__color_as_subject_1_f_0(
  MR_Word Pieces_3)
{
  MR_Word HeadVar__2_2;

  HeadVar__2_2 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 0, Pieces_3);
  return HeadVar__2_2;
}

static MR_Box MR_CALL 
parse_tree__error_spec__maybe_construct_prefixed_did_you_mean_pieces_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv0_HeadVar__3_3;

  conv0_HeadVar__3_3 = mercury__string__add_prefix_2_f_0(((MR_String) ((MR_hl_field(0, closure, 3)))), ((MR_String) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv0_HeadVar__3_3));
  return wrapper_arg_2;
}

void MR_CALL 
parse_tree__error_spec__maybe_construct_prefixed_did_you_mean_pieces_4_p_0(
  MR_String Prefix_5,
  MR_String BaseName_6,
  MR_Word CandidateNames_7,
  MR_Word * DidYouMeanPieces_8)
{
  MR_Word Var_9;

  {
    Var_9 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_9, 0) = ((MR_Box) (&parse_tree__error_spec_scalar_common_6[2]));
    MR_hl_field(0, Var_9, 1) = ((MR_Box) (parse_tree__error_spec__maybe_construct_prefixed_did_you_mean_pieces_4_p_0_1));
    MR_hl_field(0, Var_9, 2) = ((MR_Box) ((MR_Integer) 1));
    MR_hl_field(0, Var_9, 3) = ((MR_Box) (Prefix_5));
  }
  parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0(BaseName_6, CandidateNames_7, Var_9, DidYouMeanPieces_8);
}

static MR_Box MR_CALL 
parse_tree__error_spec__maybe_construct_did_you_mean_pieces_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv0_HeadVar__2_9;

  conv0_HeadVar__2_9 = parse_tree__error_spec__IntroducedFrom__func__maybe_construct_did_you_mean_pieces__1235__1_1_f_0(((MR_String) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv0_HeadVar__2_9));
  return wrapper_arg_2;
}

void MR_CALL 
parse_tree__error_spec__maybe_construct_did_you_mean_pieces_3_p_0(
  MR_String BaseName_4,
  MR_Word CandidateNames_5,
  MR_Word * DidYouMeanPieces_6)
{
  parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0(BaseName_4, CandidateNames_5, (MR_Word) (&parse_tree__error_spec_scalar_common_5[8]), DidYouMeanPieces_6);
}

static void MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_4(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Char conv2_HeadVar__2_2;

  mercury__char__to_lower_2_p_0(((MR_Char) (MR_Word) wrapper_arg_1), &conv2_HeadVar__2_2);
  *wrapper_arg_2 = ((MR_Box) (MR_Word) (conv2_HeadVar__2_2));
}

static void MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Char conv1_HeadVar__2_2;

  mercury__char__to_lower_2_p_0(((MR_Char) (MR_Word) wrapper_arg_1), &conv1_HeadVar__2_2);
  *wrapper_arg_2 = ((MR_Box) (MR_Word) (conv1_HeadVar__2_2));
}

static MR_bool MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_bool succeeded;
  MR_Box closure = closure_arg;

  succeeded = parse_tree__error_spec__name_is_close_enough_4_p_0(((MR_Unsigned) ((MR_hl_field(0, closure, 3)))), ((MR_String) ((MR_hl_field(0, closure, 4)))), ((MR_Unsigned) ((MR_hl_field(0, closure, 5)))), ((MR_String) (wrapper_arg_1)));
  return succeeded;
}

static MR_Box MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_Box wrapper_arg_3;
  MR_Box closure = closure_arg;
  MR_Unsigned conv0_ReplacementCost_6;

  conv0_ReplacementCost_6 = parse_tree__error_spec__case_sensitive_replacement_cost_2_f_0(((MR_Char) (MR_Word) wrapper_arg_1), ((MR_Char) (MR_Word) wrapper_arg_2));
  wrapper_arg_3 = ((MR_Box) (conv0_ReplacementCost_6));
  return wrapper_arg_3;
}

static void MR_CALL 
parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0(
  MR_String BaseName_5,
  MR_Word CandidateNames_6,
  MR_Word TransformFunc_7,
  MR_Word * DidYouMeanPieces_8)
{
  MR_bool succeeded;
  MR_Integer BaseNameLen_10;
  MR_Unsigned BaseNameLenU_11;
  MR_Unsigned MaxCost_12;
  MR_Word CloseEnoughBestNames_19;
  MR_Word TypeCtorInfo_80_80;
  MR_Unsigned BestCost_15;
  MR_String HeadBestName_16;
  MR_Word TailBestNames_17;
  MR_Word BestNames_18;
  MR_Unsigned Var_42;
  MR_Word Var_43;

  mercury__string__count_code_points_2_p_0(BaseName_5, &BaseNameLen_10);
  BaseNameLenU_11 = mercury__uint__cast_from_int_1_f_0(BaseNameLen_10);
  succeeded = (BaseNameLenU_11 < (MR_Unsigned) 2U);
  if (succeeded)
    MaxCost_12 = (MR_Unsigned) 2U;
  else
  {
    MR_Unsigned Var_37;
    MR_Unsigned Var_38 = (BaseNameLenU_11 + (MR_Unsigned) 1U);

    Var_37 = mercury__uint__f_slash_2_f_0(Var_38, (MR_Unsigned) 2U);
    MaxCost_12 = (Var_37 * (MR_Unsigned) 2U);
  }
  succeeded = (CandidateNames_6 != (MR_Word) ((MR_Unsigned) 0U));
  if (succeeded)
  {
    succeeded = mercury__edit_distance__find_best_close_enough_strings_7_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_4[1]), BaseName_5, CandidateNames_6, MaxCost_12, &BestCost_15, &HeadBestName_16, &TailBestNames_17);
    if (succeeded)
    {
      Var_42 = (MR_Unsigned) 0U;
      succeeded = (BestCost_15 > Var_42);
      if (succeeded)
      {
        TypeCtorInfo_80_80 = (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0);
        {
          BestNames_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, BestNames_18, 0) = ((MR_Box) (HeadBestName_16));
          MR_hl_field(1, BestNames_18, 1) = ((MR_Box) (TailBestNames_17));
        }
        {
          Var_43 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_43, 0) = ((MR_Box) (&parse_tree__error_spec_scalar_common_8[0]));
          MR_hl_field(0, Var_43, 1) = ((MR_Box) (parse_tree__error_spec__do_maybe_construct_did_you_mean_pieces_4_p_0_2));
          MR_hl_field(0, Var_43, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_43, 3) = ((MR_Box) (BestCost_15));
          MR_hl_field(0, Var_43, 4) = ((MR_Box) (BaseName_5));
          MR_hl_field(0, Var_43, 5) = ((MR_Box) (BaseNameLenU_11));
        }
        mercury__list__filter_3_p_0(TypeCtorInfo_80_80, Var_43, BestNames_18, &CloseEnoughBestNames_19);
        succeeded = (CloseEnoughBestNames_19 != (MR_Word) ((MR_Unsigned) 0U));
      }
    }
  }
  if (succeeded)
  {
    MR_Word BaseNameChars_22;
    MR_Word BaseNameLowerChars_23;
    MR_Word SuggestedNames0_25;
    MR_Word NonSuggestedNames_26;
    MR_Word SuggestedNames_27;
    MR_Word SuggestedNamePieces_30;
    MR_Word DidYouMeanPieces0_31;
    MR_String Name_88;
    MR_Word Names_89;
    MR_Word NameChars_90;
    MR_Word NameLowerChars_91;

    BaseNameChars_22 = mercury__string__to_char_list_1_f_0(BaseName_5);
    mercury__list__map_3_p_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_character_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_character_0), (MR_Word) (&parse_tree__error_spec_scalar_common_5[6]), BaseNameChars_22, &BaseNameLowerChars_23);
    Name_88 = ((MR_String) ((MR_hl_field(1, CloseEnoughBestNames_19, 0))));
    Names_89 = ((MR_Word) ((MR_hl_field(1, CloseEnoughBestNames_19, 1))));
    NameChars_90 = mercury__string__to_char_list_1_f_0(Name_88);
    mercury__list__map_3_p_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_character_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_character_0), (MR_Word) (&parse_tree__error_spec_scalar_common_5[7]), NameChars_90, &NameLowerChars_91);
    mercury__list__split_upto_4_p_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Integer) 10, CloseEnoughBestNames_19, &SuggestedNames0_25, &NonSuggestedNames_26);
    if ((NonSuggestedNames_26 == (MR_Word) ((MR_Unsigned) 0U)))
      SuggestedNames_27 = mercury__list__map_2_f_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), TransformFunc_7, SuggestedNames0_25);
    else
    {
      MR_Word Var_46;

      Var_46 = mercury__list__map_2_f_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), TransformFunc_7, SuggestedNames0_25);
      SuggestedNames_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), Var_46, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[16])));
    }
    SuggestedNamePieces_30 = parse_tree__error_spec__quote_list_to_pieces_2_f_0((MR_String) "or", SuggestedNames_27);
    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[25]), ((MR_Box) (BaseNameLowerChars_23)), ((MR_Box) (NameLowerChars_91)));
    if (succeeded)
    {
      MR_Word Var_66;

      Var_66 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), SuggestedNamePieces_30, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[24])));
      DidYouMeanPieces0_31 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[18])), Var_66);
    }
    else
    {
      MR_Word SameButForCase_105;

      parse_tree__error_spec__is_any_suggestion_same_but_for_case_3_p_0(BaseNameLowerChars_23, Names_89, &SameButForCase_105);
      switch (SameButForCase_105) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word Var_55;

            Var_55 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), SuggestedNamePieces_30, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[20])));
            DidYouMeanPieces0_31 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[18])), Var_55);
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word Var_98;

            Var_98 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), SuggestedNamePieces_30, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[24])));
            DidYouMeanPieces0_31 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[18])), Var_98);
          }
          break;
      }
    }
    *DidYouMeanPieces_8 = parse_tree__error_spec__color_pieces_2_f_0((MR_Integer) 4, DidYouMeanPieces0_31);
  }
  else
    *DidYouMeanPieces_8 = (MR_Word) ((MR_Unsigned) 0U);
}

static void MR_CALL 
parse_tree__error_spec__is_any_suggestion_same_but_for_case_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Char conv0_HeadVar__2_2;

  mercury__char__to_lower_2_p_0(((MR_Char) (MR_Word) wrapper_arg_1), &conv0_HeadVar__2_2);
  *wrapper_arg_2 = ((MR_Box) (MR_Word) (conv0_HeadVar__2_2));
}

static void MR_CALL 
parse_tree__error_spec__is_any_suggestion_same_but_for_case_3_p_0(
  MR_Word BaseNameLowerChars_1,
  MR_Word HeadVar__2_2,
  MR_Word * HeadVar__3_3)
{
  while (MR_TRUE)
  {
    MR_bool succeeded;

    // setup for model_det tailcalls optimized into a loop
    ;
    if ((HeadVar__2_2 == (MR_Word) ((MR_Unsigned) 0U)))
      *HeadVar__3_3 = (MR_Integer) 0;
    else
    {
      MR_String Name_6 = ((MR_String) ((MR_hl_field(1, HeadVar__2_2, 0))));
      MR_Word Names_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
      MR_Word NameChars_9;
      MR_Word NameLowerChars_10;

      NameChars_9 = mercury__string__to_char_list_1_f_0(Name_6);
      mercury__list__map_3_p_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_character_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_character_0), (MR_Word) (&parse_tree__error_spec_scalar_common_5[4]), NameChars_9, &NameLowerChars_10);
      succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[25]), ((MR_Box) (BaseNameLowerChars_1)), ((MR_Box) (NameLowerChars_10)));
      if (succeeded)
        *HeadVar__3_3 = (MR_Integer) 1;
      else
      {
        MR_Word next_value_of_HeadVar__2_2 = Names_7;

        // direct tailcall eliminated
        ;
        HeadVar__2_2 = next_value_of_HeadVar__2_2;
        continue;
      }
    }
    break;
  }
}

MR_Word MR_CALL 
parse_tree__error_spec__quote_list_to_pieces_2_f_0(
  MR_String LastSep_4,
  MR_Word Strings_5)
{
  MR_Word Pieces_6;
  MR_Word LastSepPieces_18;
  MR_Word Var_23;

  {
    Var_23 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, Var_23, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, Var_23, 1) = ((MR_Box) (LastSep_4));
  }
  {
    LastSepPieces_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LastSepPieces_18, 0) = ((MR_Box) (Var_23));
    MR_hl_field(1, LastSepPieces_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  parse_tree__error_spec__general_list_to_pieces__ho27_7_p_0((MR_Word) ((MR_Unsigned) 0U), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[27])), LastSepPieces_18, (MR_Word) ((MR_Unsigned) 0U), Strings_5, &Pieces_6);
  return Pieces_6;
}

static void MR_CALL 
parse_tree__error_spec__general_list_to_pieces__ho27_7_p_0(
  MR_Word MaybeColor_9,
  MR_Word NonLastSep_10,
  MR_Word LastSep_11,
  MR_Word LastSuffix_12,
  MR_Word Items_13,
  MR_Word * Pieces_14)
{
  if ((Items_13 == (MR_Word) ((MR_Unsigned) 0U)))
    *Pieces_14 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_45 = ((MR_Word) ((MR_hl_field(1, Items_13, 1))));
    MR_String Var_46 = ((MR_String) ((MR_hl_field(1, Items_13, 0))));

    if ((Var_45 == (MR_Word) ((MR_Unsigned) 0U)))
    {
      MR_Word Pieces1_16;
      MR_Word Var_23;
      MR_Word Var_49;

      {
        Var_49 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_49, 0) = ((MR_Box) ((MR_Unsigned) 0U));
        MR_hl_field(3, Var_49, 1) = ((MR_Box) (Var_46));
      }
      {
        Pieces1_16 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Pieces1_16, 0) = ((MR_Box) (Var_49));
        MR_hl_field(1, Pieces1_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
      Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_16, LastSuffix_12);
      if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
        *Pieces_14 = Var_23;
      else
      {
        MR_Word Color_51 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

        *Pieces_14 = parse_tree__error_spec__color_pieces_2_f_0(Color_51, Var_23);
      }
    }
    else
    {
      MR_Word Var_47 = ((MR_Word) ((MR_hl_field(1, Var_45, 1))));
      MR_String Var_48 = ((MR_String) ((MR_hl_field(1, Var_45, 0))));

      if ((Var_47 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        MR_Word Pieces2_18;
        MR_Word Var_26;
        MR_Word Var_27;
        MR_Word Var_28;
        MR_Word Var_29;
        MR_Word Pieces1_37;
        MR_Word Var_52;
        MR_Word Var_54;

        {
          Var_52 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, Var_52, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, Var_52, 1) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_37, 0) = ((MR_Box) (Var_52));
          MR_hl_field(1, Pieces1_37, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          Var_54 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, Var_54, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, Var_54, 1) = ((MR_Box) (Var_48));
        }
        {
          Pieces2_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces2_18, 0) = ((MR_Box) (Var_54));
          MR_hl_field(1, Pieces2_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_26 = Pieces1_37;
        else
        {
          MR_Word Color_56 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_26 = parse_tree__error_spec__color_pieces_2_f_0(Color_56, Pieces1_37);
        }
        Var_29 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces2_18, LastSuffix_12);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_28 = Var_29;
        else
        {
          MR_Word Color_57 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_28 = parse_tree__error_spec__color_pieces_2_f_0(Color_57, Var_29);
        }
        Var_27 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), LastSep_11, Var_28);
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_27);
      }
      else
      {
        MR_Word TailPieces_21;
        MR_Word Var_34;
        MR_Word Var_35;
        MR_Word Pieces1_39;
        MR_Word Var_58;

        {
          Var_58 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, Var_58, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, Var_58, 1) = ((MR_Box) (Var_46));
        }
        {
          Pieces1_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Pieces1_39, 0) = ((MR_Box) (Var_58));
          MR_hl_field(1, Pieces1_39, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        parse_tree__error_spec__general_list_to_pieces__ho27_7_p_0(MaybeColor_9, NonLastSep_10, LastSep_11, LastSuffix_12, Var_45, &TailPieces_21);
        Var_35 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_39, NonLastSep_10);
        if ((MaybeColor_9 == (MR_Word) ((MR_Unsigned) 0U)))
          Var_34 = Var_35;
        else
        {
          MR_Word Color_60 = ((MR_Word) ((MR_hl_field(1, MaybeColor_9, 0))));

          Var_34 = parse_tree__error_spec__color_pieces_2_f_0(Color_60, Var_35);
        }
        *Pieces_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_34, TailPieces_21);
      }
    }
  }
}

static void MR_CALL 
parse_tree__error_spec__construct_diff_for_string_seqs_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Word conv0_ChangeHunkPieces_4;

  parse_tree__error_spec__change_hunk_to_pieces_2_p_0(((MR_Word) (wrapper_arg_1)), &conv0_ChangeHunkPieces_4);
  *wrapper_arg_2 = ((MR_Box) (conv0_ChangeHunkPieces_4));
}

void MR_CALL 
parse_tree__error_spec__construct_diff_for_string_seqs_4_p_0(
  MR_Word Params_5,
  MR_Word StrsA_6,
  MR_Word StrsB_7,
  MR_Word * Pieces_8)
{
  MR_Word EditSeq_9;
  MR_Word DiffSeq_10;
  MR_Word ChangeHunks_11;
  MR_Word PieceLists_12;

  mercury__edit_seq__find_shortest_edit_seq_4_p_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), Params_5, StrsA_6, StrsB_7, &EditSeq_9);
  mercury__edit_seq__find_diff_seq_3_p_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), StrsA_6, EditSeq_9, &DiffSeq_10);
  mercury__edit_seq__find_change_hunks_3_p_0((MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Unsigned) 3U, DiffSeq_10, &ChangeHunks_11);
  mercury__list__map_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_1[1]), (MR_Word) (&parse_tree__error_spec_scalar_common_1[2]), (MR_Word) (&parse_tree__error_spec_scalar_common_5[3]), ChangeHunks_11, &PieceLists_12);
  mercury__list__condense_2_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), PieceLists_12, Pieces_8);
}

void MR_CALL 
parse_tree__error_spec__maybe_add_diag_spec_id_std_4_p_0(
  MR_Word OptionTable_5,
  MR_String Id_6,
  MR_Word StdMsgs0_7,
  MR_Word * StdMsgs_8)
{
  MR_Word PrintId_9;

  mercury__getopt__lookup_bool_option_3_p_0((MR_Word) (&libs__options__libs__options__type_ctor_info_option_0), OptionTable_5, ((MR_Box) ((MR_Integer) 696)), &PrintId_9);
  switch (PrintId_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      *StdMsgs_8 = StdMsgs0_7;
      break;
    case (MR_Integer) 1:
      if ((StdMsgs0_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *StdMsgs_8 = StdMsgs0_7;
      else
      {
        MR_Word StdHeadMsg_10 = ((MR_Word) ((MR_hl_field(1, StdMsgs0_7, 0))));
        MR_Word MaybeHeadContext_12;
        MR_Word StdIdMsg_13;
        MR_Word Var_15 = (MR_Word) (StdHeadMsg_10);
        MR_Word Var_18;
        MR_Word Var_19;
        MR_Word Var_20;
        MR_Word Var_23;
        MR_Word Var_24;
        MR_Word Var_29;

        MaybeHeadContext_12 = ((MR_Word) ((MR_hl_field(3, Var_15, 1))));
        {
          Var_24 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_24, 0) = ((MR_Box) (Id_6));
        }
        {
          Var_23 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_23, 0) = ((MR_Box) (Var_24));
          MR_hl_field(1, Var_23, 1) = ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])));
        }
        {
          Var_20 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_20, 0) = ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[14])));
          MR_hl_field(1, Var_20, 1) = ((MR_Box) (Var_23));
        }
        {
          Var_19 = (MR_Word) MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_19, 0) = ((MR_Box) (Var_20));
        }
        {
          Var_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_18, 0) = ((MR_Box) (Var_19));
          MR_hl_field(1, Var_18, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          StdIdMsg_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, StdIdMsg_13, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, StdIdMsg_13, 1) = ((MR_Box) (MaybeHeadContext_12));
          MR_hl_field(3, StdIdMsg_13, 2) = (MR_Box) ((MR_Unsigned) ((MR_Integer) 1));
          MR_hl_field(3, StdIdMsg_13, 3) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, StdIdMsg_13, 4) = ((MR_Box) (Var_18));
        }
        {
          Var_29 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_29, 0) = ((MR_Box) (StdIdMsg_13));
          MR_hl_field(1, Var_29, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        *StdMsgs_8 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_std_diag_msg_0), StdMsgs0_7, Var_29);
      }
      break;
  }
}

void MR_CALL 
parse_tree__error_spec__extract_spec_msgs_and_maybe_add_id_3_p_0(
  MR_Word Globals_4,
  MR_Word Spec_5,
  MR_Word * Msgs_6)
{
  MR_Word Msgs0_7;
  MR_String Id_8;
  MR_Word OptionTable_9;

  parse_tree__error_spec__extract_spec_msgs_and_id_3_p_0(Spec_5, &Msgs0_7, &Id_8);
  libs__globals__get_options_2_p_0(Globals_4, &OptionTable_9);
  parse_tree__error_spec__maybe_add_diag_spec_id_4_p_0(OptionTable_9, Id_8, Msgs0_7, Msgs_6);
}

void MR_CALL 
parse_tree__error_spec__maybe_add_diag_spec_id_4_p_0(
  MR_Word OptionTable_5,
  MR_String Id_6,
  MR_Word Msgs0_7,
  MR_Word * Msgs_8)
{
  MR_Word PrintId_9;

  mercury__getopt__lookup_bool_option_3_p_0((MR_Word) (&libs__options__libs__options__type_ctor_info_option_0), OptionTable_5, ((MR_Box) ((MR_Integer) 696)), &PrintId_9);
  switch (PrintId_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      *Msgs_8 = Msgs0_7;
      break;
    case (MR_Integer) 1:
      if ((Msgs0_7 == (MR_Word) ((MR_Unsigned) 0U)))
        *Msgs_8 = Msgs0_7;
      else
      {
        MR_Word HeadMsg_10 = ((MR_Word) ((MR_hl_field(1, Msgs0_7, 0))));
        MR_Word MaybeHeadContext_12;
        MR_Word IdMsg_13;
        MR_Word Var_17;
        MR_Word Var_18;
        MR_Word Var_19;
        MR_Word Var_22;
        MR_Word Var_23;
        MR_Word Var_28;

        parse_tree__error_spec__extract_msg_maybe_context_2_p_0(HeadMsg_10, &MaybeHeadContext_12);
        {
          Var_23 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(2, Var_23, 0) = ((MR_Box) (Id_6));
        }
        {
          Var_22 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_22, 0) = ((MR_Box) (Var_23));
          MR_hl_field(1, Var_22, 1) = ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])));
        }
        {
          Var_19 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_19, 0) = ((MR_Box) (MR_mkword(3, &parse_tree__error_spec_scalar_common_1[14])));
          MR_hl_field(1, Var_19, 1) = ((MR_Box) (Var_22));
        }
        {
          Var_18 = (MR_Word) MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_18, 0) = ((MR_Box) (Var_19));
        }
        {
          Var_17 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_17, 0) = ((MR_Box) (Var_18));
          MR_hl_field(1, Var_17, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        {
          IdMsg_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(3, IdMsg_13, 0) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, IdMsg_13, 1) = ((MR_Box) (MaybeHeadContext_12));
          MR_hl_field(3, IdMsg_13, 2) = (MR_Box) ((MR_Unsigned) ((MR_Integer) 1));
          MR_hl_field(3, IdMsg_13, 3) = ((MR_Box) ((MR_Unsigned) 0U));
          MR_hl_field(3, IdMsg_13, 4) = ((MR_Box) (Var_17));
        }
        {
          Var_28 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_28, 0) = ((MR_Box) (IdMsg_13));
          MR_hl_field(1, Var_28, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
        *Msgs_8 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_0), Msgs0_7, Var_28);
      }
      break;
  }
}

void MR_CALL 
parse_tree__error_spec__extract_spec_msgs_and_id_3_p_0(
  MR_Word Spec_4,
  MR_Word * Msgs_5,
  MR_String * Id_6)
{
  switch (MR_tag((MR_Word) Spec_4)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Context_9;
        MR_Word Pieces_10;
        MR_Word Var_11;

        *Id_6 = ((MR_String) ((MR_hl_field(0, Spec_4, 0))));
        Context_9 = ((MR_Word) ((MR_hl_field(0, Spec_4, 3))));
        Pieces_10 = ((MR_Word) ((MR_hl_field(0, Spec_4, 4))));
        {
          Var_11 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_11, 0) = ((MR_Box) (Context_9));
          MR_hl_field(0, Var_11, 1) = ((MR_Box) (Pieces_10));
        }
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          *Msgs_5 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Var_11));
          MR_hl_field(1, base, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word Var_13;
        MR_Word Pieces_19;

        *Id_6 = ((MR_String) ((MR_hl_field(1, Spec_4, 0))));
        Pieces_19 = ((MR_Word) ((MR_hl_field(1, Spec_4, 3))));
        {
          Var_13 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_13, 0) = ((MR_Box) (Pieces_19));
        }
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          *Msgs_5 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Var_13));
          MR_hl_field(1, base, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
      }
      break;
    case (MR_Integer) 2:
      {
        *Id_6 = ((MR_String) ((MR_hl_field(2, Spec_4, 0))));
        *Msgs_5 = ((MR_Word) ((MR_hl_field(2, Spec_4, 3))));
      }
      break;
  }
}

static void MR_CALL 
parse_tree__error_spec__accumulate_contexts_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3)
{
  MR_Box closure = closure_arg;
  MR_Word conv0_STATE_VARIABLE_Contexts_9;

  parse_tree__error_spec__accumulate_contexts_in_msg_3_p_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)), &conv0_STATE_VARIABLE_Contexts_9);
  *wrapper_arg_3 = ((MR_Box) (conv0_STATE_VARIABLE_Contexts_9));
}

void MR_CALL 
parse_tree__error_spec__accumulate_contexts_3_p_0(
  MR_Word Spec_4,
  MR_Word STATE_VARIABLE_Contexts_0_19,
  MR_Word * STATE_VARIABLE_Contexts_20)
{
  switch (MR_tag((MR_Word) Spec_4)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Context_9 = ((MR_Word) ((MR_hl_field(0, Spec_4, 3))));

        mercury__set__insert_3_p_0((MR_Word) (&mercury__term_context__term_context__type_ctor_info_term_context_0), ((MR_Box) (Context_9)), STATE_VARIABLE_Contexts_0_19, STATE_VARIABLE_Contexts_20);
      }
      break;
    case (MR_Integer) 1:
      *STATE_VARIABLE_Contexts_20 = STATE_VARIABLE_Contexts_0_19;
      break;
    case (MR_Integer) 2:
      {
        MR_Word Msgs_18 = ((MR_Word) ((MR_hl_field(2, Spec_4, 3))));
        MR_Box conv1_STATE_VARIABLE_Contexts_20;

        mercury__list__foldl_4_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_0), (MR_Word) (&parse_tree__error_spec_scalar_common_1[0]), (MR_Word) (&parse_tree__error_spec_scalar_common_5[2]), Msgs_18, ((MR_Box) (STATE_VARIABLE_Contexts_0_19)), &conv1_STATE_VARIABLE_Contexts_20);
        *STATE_VARIABLE_Contexts_20 = ((MR_Word) (conv1_STATE_VARIABLE_Contexts_20));
      }
      break;
  }
}

void MR_CALL 
parse_tree__error_spec__extract_spec_severity_2_p_0(
  MR_Word Spec_3,
  MR_Word * Severity_4)
{
  switch (MR_tag((MR_Word) Spec_3)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      *Severity_4 = ((MR_Word) ((MR_hl_field(0, Spec_3, 1))));
      break;
    case (MR_Integer) 1:
      *Severity_4 = ((MR_Word) ((MR_hl_field(1, Spec_3, 1))));
      break;
    case (MR_Integer) 2:
      *Severity_4 = ((MR_Word) ((MR_hl_field(2, Spec_3, 1))));
      break;
  }
}

void MR_CALL 
parse_tree__error_spec__extract_spec_phase_2_p_0(
  MR_Word Spec_3,
  MR_Word * Phase_4)
{
  switch (MR_tag((MR_Word) Spec_3)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      *Phase_4 = ((MR_Word) ((MR_hl_field(0, Spec_3, 2))));
      break;
    case (MR_Integer) 1:
      *Phase_4 = ((MR_Word) ((MR_hl_field(1, Spec_3, 2))));
      break;
    case (MR_Integer) 2:
      *Phase_4 = ((MR_Word) ((MR_hl_field(2, Spec_3, 2))));
      break;
  }
}

void MR_CALL 
parse_tree__error_spec__extract_msg_maybe_context_2_p_0(
  MR_Word Msg_3,
  MR_Word * MaybeContext_4)
{
  switch (MR_tag((MR_Word) Msg_3)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Context_6 = ((MR_Word) ((MR_hl_field(0, Msg_3, 0))));

        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          *MaybeContext_4 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Context_6));
        }
      }
      break;
    case (MR_Integer) 1:
      *MaybeContext_4 = (MR_Word) ((MR_Unsigned) 0U);
      break;
    case (MR_Integer) 2:
      {
        MR_Word Context_12 = ((MR_Word) ((MR_hl_field(2, Msg_3, 0))));

        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          *MaybeContext_4 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Context_12));
        }
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, Msg_3, 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          *MaybeContext_4 = ((MR_Word) ((MR_hl_field(3, Msg_3, 1))));
          break;
        case (MR_Integer) 1:
          *MaybeContext_4 = ((MR_Word) ((MR_hl_field(3, Msg_3, 1))));
          break;
      }
      break;
  }
}

void MR_CALL 
parse_tree__error_spec__append_prefix_and_maybe_verbose_6_p_0(
  MR_Word MaybeColor_7,
  MR_Word NeutralPrefixPieces_8,
  MR_Word ColorPrefixPieces0_9,
  MR_Word MainPieces_10,
  MR_Word VerbosePieces_11,
  MR_Word * Component_12)
{
  MR_Word PrefixPieces_13;
  MR_Word Var_16;

  if ((MaybeColor_7 == (MR_Word) ((MR_Unsigned) 0U)))
    Var_16 = ColorPrefixPieces0_9;
  else
  {
    MR_Word Color_21 = ((MR_Word) ((MR_hl_field(1, MaybeColor_7, 0))));

    Var_16 = parse_tree__error_spec__color_pieces_2_f_0(Color_21, ColorPrefixPieces0_9);
  }
  PrefixPieces_13 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), NeutralPrefixPieces_8, Var_16);
  if ((VerbosePieces_11 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Word Var_17;

    Var_17 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), PrefixPieces_13, MainPieces_10);
    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL);
      *Component_12 = base;
      MR_hl_field(0, base, 0) = ((MR_Box) (Var_17));
    }
  }
  else
  {
    MR_Word Var_18;
    MR_Word Var_19;

    Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), PrefixPieces_13, VerbosePieces_11);
    Var_19 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), PrefixPieces_13, MainPieces_10);
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *Component_12 = base;
      MR_hl_field(2, base, 0) = ((MR_Box) (Var_18));
      MR_hl_field(2, base, 1) = ((MR_Box) (Var_19));
    }
  }
}

static MR_bool MR_CALL 
parse_tree__error_spec__color_pieces_2_f_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_bool succeeded;
  MR_Box closure = closure_arg;

  succeeded = parse_tree__error_spec__is_nl_piece_1_p_0(((MR_Word) (wrapper_arg_1)));
  return succeeded;
}

static MR_bool MR_CALL 
parse_tree__error_spec__color_pieces_2_f_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_bool succeeded;
  MR_Box closure = closure_arg;

  succeeded = parse_tree__error_spec__is_nl_piece_1_p_0(((MR_Word) (wrapper_arg_1)));
  return succeeded;
}

MR_Word MR_CALL 
parse_tree__error_spec__color_pieces_2_f_0(
  MR_Word Color_4,
  MR_Word Pieces0_5)
{
  MR_bool succeeded;
  MR_Word Pieces_6;
  MR_Word HeadNlPieces_7;
  MR_Word Pieces1_8;
  MR_Word RevPieces1_9;
  MR_Word RevTailNlPieces1_10;
  MR_Word RevMainPieces1_11;
  MR_Word TailNlPieces_12;
  MR_Word MainPieces_13;

  mercury__list__take_while_4_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (&parse_tree__error_spec_scalar_common_5[0]), Pieces0_5, &HeadNlPieces_7, &Pieces1_8);
  mercury__list__reverse_2_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Pieces1_8, &RevPieces1_9);
  mercury__list__take_while_4_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (&parse_tree__error_spec_scalar_common_5[1]), RevPieces1_9, &RevTailNlPieces1_10, &RevMainPieces1_11);
  mercury__list__reverse_2_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), RevTailNlPieces1_10, &TailNlPieces_12);
  mercury__list__reverse_2_p_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), RevMainPieces1_11, &MainPieces_13);
  if ((MainPieces_13 == (MR_Word) ((MR_Unsigned) 0U)))
    Pieces_6 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadNlPieces_7, TailNlPieces_12);
  else
  {
    MR_Word Var_18;
    MR_Word Var_19;
    MR_Word Var_20;
    MR_Word Var_22;
    MR_Word Var_23;
    MR_Word Var_24;
    MR_Word Var_25;

    {
      Var_20 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(3, Var_20, 0) = ((MR_Box) ((MR_Unsigned) 40U));
      MR_hl_field(3, Var_20, 1) = (MR_Box) ((MR_Unsigned) (Color_4));
    }
    {
      Var_19 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, Var_19, 0) = ((MR_Box) (Var_20));
      MR_hl_field(1, Var_19, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    }
    {
      Var_25 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(3, Var_25, 0) = ((MR_Box) ((MR_Unsigned) 41U));
      MR_hl_field(3, Var_25, 1) = (MR_Box) ((MR_Unsigned) (Color_4));
    }
    {
      Var_24 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, Var_24, 0) = ((MR_Box) (Var_25));
      MR_hl_field(1, Var_24, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    }
    Var_23 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_24, TailNlPieces_12);
    Var_22 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), MainPieces_13, Var_23);
    Var_18 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_19, Var_22);
    Pieces_6 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), HeadNlPieces_7, Var_18);
  }
  return Pieces_6;
}

MR_Word MR_CALL 
parse_tree__error_spec__add_suffix_if_nonempty_2_f_0(
  MR_Word BasePieces_4,
  MR_Word SuffixPieces_5)
{
  MR_Word Pieces_6;

  if ((BasePieces_4 == (MR_Word) ((MR_Unsigned) 0U)))
    Pieces_6 = (MR_Word) ((MR_Unsigned) 0U);
  else
    Pieces_6 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), BasePieces_4, SuffixPieces_5);
  return Pieces_6;
}

MR_String MR_CALL 
parse_tree__error_spec__add_quotes_1_f_0(
  MR_String Str_3)
{
  MR_String HeadVar__2_2;
  MR_String Var_5;

  Var_5 = mercury__string__f_43_43_2_f_0(Str_3, (MR_String) "\'");
  HeadVar__2_2 = mercury__string__f_43_43_2_f_0((MR_String) "\140", Var_5);
  return HeadVar__2_2;
}

MR_String MR_CALL 
parse_tree__error_spec__describe_sym_name_arity_1_f_0(
  MR_Word HeadVar__1_1)
{
  MR_String HeadVar__2_2;
  MR_Word SymName_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
  MR_Integer Arity_4 = ((MR_Integer) ((MR_hl_field(0, HeadVar__1_1, 1))));
  MR_String Var_8;
  MR_String Var_12;
  MR_String Var_20;
  MR_String Var_21;

  Var_8 = mdbcomp__sym_name__sym_name_to_string_1_f_0(SymName_3);
  mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__error_spec_scalar_common_2[0]), Arity_4, &Var_12);
  Var_20 = mercury__string__f_43_43_2_f_0((MR_String) "\'/", Var_12);
  Var_21 = mercury__string__f_43_43_2_f_0(Var_8, Var_20);
  HeadVar__2_2 = mercury__string__f_43_43_2_f_0((MR_String) "\140", Var_21);
  return HeadVar__2_2;
}

MR_String MR_CALL 
parse_tree__error_spec__describe_sym_name_1_f_0(
  MR_Word SymName_3)
{
  MR_String HeadVar__2_2;
  MR_String Var_7;
  MR_String Var_10;

  Var_7 = mdbcomp__sym_name__sym_name_to_string_1_f_0(SymName_3);
  Var_10 = mercury__string__f_43_43_2_f_0(Var_7, (MR_String) "\'");
  HeadVar__2_2 = mercury__string__f_43_43_2_f_0((MR_String) "\140", Var_10);
  return HeadVar__2_2;
}

MR_String MR_CALL 
parse_tree__error_spec__unth_fixed_str_1_f_0(
  MR_Unsigned N_3)
{
  MR_bool succeeded;
  MR_String Str_4;
  MR_String StrPrime_5;

  if ((((MR_Unsigned) ((MR_Integer) ((MR_Unsigned) N_3 - (MR_Unsigned) 1))) <= ((MR_Unsigned) 9)))
  {
    StrPrime_5 = ((&parse_tree__error_spec_vector_common_3[32 + (MR_Integer) ((MR_Unsigned) N_3 - (MR_Unsigned) 1)]))->parse_tree__error_spec__vector_common_type_3_0__vct_3_f_0;
    succeeded = MR_TRUE;
  }
  else
    succeeded = MR_FALSE;
  if (succeeded)
    Str_4 = StrPrime_5;
  else
  {
    MR_String NStr_6;
    MR_Unsigned LastDigit_7;

    NStr_6 = mercury__string__uint_to_string_1_f_0(N_3);
    LastDigit_7 = mercury__uint__mod_2_f_0(N_3, (MR_Unsigned) 10U);
    succeeded = (N_3 > (MR_Unsigned) 20U);
    if (succeeded)
      succeeded = (LastDigit_7 == (MR_Unsigned) 2U);
    if (succeeded)
      Str_4 = mercury__string__f_43_43_2_f_0(NStr_6, (MR_String) "nd");
    else
    {
      succeeded = (N_3 > (MR_Unsigned) 20U);
      if (succeeded)
        succeeded = (LastDigit_7 == (MR_Unsigned) 3U);
      if (succeeded)
        Str_4 = mercury__string__f_43_43_2_f_0(NStr_6, (MR_String) "rd");
      else
        Str_4 = mercury__string__f_43_43_2_f_0(NStr_6, (MR_String) "th");
    }
  }
  return Str_4;
}

MR_String MR_CALL 
parse_tree__error_spec__nth_fixed_str_1_f_0(
  MR_Integer N_3)
{
  MR_bool succeeded;
  MR_String Str_4;
  MR_String StrPrime_5;

  if ((((MR_Unsigned) ((MR_Integer) ((MR_Unsigned) N_3 - (MR_Unsigned) 1))) <= ((MR_Unsigned) 9)))
  {
    StrPrime_5 = ((&parse_tree__error_spec_vector_common_3[22 + (MR_Integer) ((MR_Unsigned) N_3 - (MR_Unsigned) 1)]))->parse_tree__error_spec__vector_common_type_3_0__vct_3_f_0;
    succeeded = MR_TRUE;
  }
  else
    succeeded = MR_FALSE;
  if (succeeded)
    Str_4 = StrPrime_5;
  else
  {
    MR_String NStr_6;
    MR_Integer LastDigit_7;

    NStr_6 = mercury__string__int_to_string_1_f_0(N_3);
    LastDigit_7 = mercury__int__mod_2_f_0(N_3, (MR_Integer) 10);
    succeeded = (N_3 > (MR_Integer) 20);
    if (succeeded)
      succeeded = (LastDigit_7 == (MR_Integer) 2);
    if (succeeded)
      Str_4 = mercury__string__f_43_43_2_f_0(NStr_6, (MR_String) "nd");
    else
    {
      succeeded = (N_3 > (MR_Integer) 20);
      if (succeeded)
        succeeded = (LastDigit_7 == (MR_Integer) 3);
      if (succeeded)
        Str_4 = mercury__string__f_43_43_2_f_0(NStr_6, (MR_String) "rd");
      else
        Str_4 = mercury__string__f_43_43_2_f_0(NStr_6, (MR_String) "th");
    }
  }
  return Str_4;
}

MR_String MR_CALL 
parse_tree__error_spec__uint_name_str_1_f_0(
  MR_Unsigned N_3)
{
  MR_bool succeeded;
  MR_String Str_4;
  MR_String StrPrime_5;

  if ((((MR_Unsigned) N_3) <= ((MR_Unsigned) 10)))
  {
    StrPrime_5 = ((&parse_tree__error_spec_vector_common_3[11 + N_3]))->parse_tree__error_spec__vector_common_type_3_0__vct_3_f_0;
    succeeded = MR_TRUE;
  }
  else
    succeeded = MR_FALSE;
  if (succeeded)
    Str_4 = StrPrime_5;
  else
    Str_4 = mercury__string__uint_to_string_1_f_0(N_3);
  return Str_4;
}

MR_String MR_CALL 
parse_tree__error_spec__int_name_str_1_f_0(
  MR_Integer N_3)
{
  MR_bool succeeded;
  MR_String Str_4;
  MR_String StrPrime_5;

  if ((((MR_Unsigned) N_3) <= ((MR_Unsigned) 10)))
  {
    StrPrime_5 = ((&parse_tree__error_spec_vector_common_3[0 + N_3]))->parse_tree__error_spec__vector_common_type_3_0__vct_3_f_0;
    succeeded = MR_TRUE;
  }
  else
    succeeded = MR_FALSE;
  if (succeeded)
    Str_4 = StrPrime_5;
  else
    Str_4 = mercury__string__int_to_string_1_f_0(N_3);
  return Str_4;
}

MR_String MR_CALL 
parse_tree__error_spec__is_or_are_1_f_0(
  MR_Word TypeInfo_for_T_11,
  MR_Word HeadVar__1_1)
{
  MR_String HeadVar__2_2;

  if ((HeadVar__1_1 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    HeadVar__2_2 = (MR_String) "";
    mercury__require__unexpected_2_p_0((MR_String) "function \140parse_tree.error_spec.is_or_are\'/1", (MR_String) "[]");
  }
  else
  {
    MR_Word Var_12 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));

    if ((Var_12 == (MR_Word) ((MR_Unsigned) 0U)))
      HeadVar__2_2 = (MR_String) "is";
    else
      HeadVar__2_2 = (MR_String) "are";
  }
  return HeadVar__2_2;
}

MR_Box MR_CALL 
parse_tree__error_spec__choose_number_3_f_0(
  MR_Word TypeInfo_for_T_17,
  MR_Word TypeInfo_for_U_18,
  MR_Word HeadVar__1_1,
  MR_Box HeadVar__2_2,
  MR_Box HeadVar__3_3)
{
  MR_Box HeadVar__4_4;

  if ((HeadVar__1_1 == (MR_Word) ((MR_Unsigned) 0U)))
    HeadVar__4_4 = HeadVar__3_3;
  else
  {
    MR_Word Var_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));

    if ((Var_19 == (MR_Word) ((MR_Unsigned) 0U)))
      HeadVar__4_4 = HeadVar__2_2;
    else
      HeadVar__4_4 = HeadVar__3_3;
  }
  return HeadVar__4_4;
}

MR_Word MR_CALL 
parse_tree__error_spec__indented_list_1_f_0(
  MR_Word Comps_3)
{
  MR_Word HeadVar__2_2;
  MR_Word Var_8;
  MR_Word Var_9;

  Var_9 = parse_tree__error_spec__indented_list_loop_1_f_0(Comps_3);
  Var_8 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_9, (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[13])));
  HeadVar__2_2 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), (MR_Word) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[11])), Var_8);
  return HeadVar__2_2;
}

static MR_Word MR_CALL 
parse_tree__error_spec__indented_list_loop_1_f_0(
  MR_Word HeadVar__1_1)
{
  MR_Word HeadVar__2_2;

  if ((HeadVar__1_1 == (MR_Word) ((MR_Unsigned) 0U)))
    HeadVar__2_2 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Var_17 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
    MR_Word Var_18 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));

    if ((Var_17 == (MR_Word) ((MR_Unsigned) 0U)))
      {
        HeadVar__2_2 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, HeadVar__2_2, 0) = ((MR_Box) (Var_18));
        MR_hl_field(1, HeadVar__2_2, 1) = ((MR_Box) ((MR_Unsigned) 0U));
      }
    else
    {
      MR_Word Var_10;
      MR_Word Var_14;
      MR_Word Var_33;
      MR_Word Var_34;

      {
        Var_10 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(1, Var_10, 0) = ((MR_Box) (Var_18));
        MR_hl_field(1, Var_10, 1) = ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])));
      }
      Var_34 = ((MR_Word) ((MR_hl_field(1, Var_17, 0))));
      Var_33 = ((MR_Word) ((MR_hl_field(1, Var_17, 1))));
      if ((Var_33 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          Var_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_14, 0) = ((MR_Box) (Var_34));
          MR_hl_field(1, Var_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
        }
      else
      {
        MR_Word Var_26;
        MR_Word Var_30;

        {
          Var_26 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_26, 0) = ((MR_Box) (Var_34));
          MR_hl_field(1, Var_26, 1) = ((MR_Box) (MR_mkword(1, &parse_tree__error_spec_scalar_common_1[15])));
        }
        Var_30 = parse_tree__error_spec__indented_list_loop_1_f_0(Var_33);
        Var_14 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_26, Var_30);
      }
      HeadVar__2_2 = mercury__list__f_43_43_2_f_0((MR_Word) (&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0), Var_10, Var_14);
    }
  }
  return HeadVar__2_2;
}

MR_Word MR_CALL 
parse_tree__error_spec__var_in_table_to_quote_piece_2_f_0(
  MR_Word VarTable_4,
  MR_Word Var_5)
{
  MR_Word HeadVar__3_3;
  MR_String Var_6;

  Var_6 = parse_tree__var_table__var_table_entry_name_2_f_0(VarTable_4, Var_5);
  {
    HeadVar__3_3 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, HeadVar__3_3, 0) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(3, HeadVar__3_3, 1) = ((MR_Box) (Var_6));
  }
  return HeadVar__3_3;
}

MR_Word MR_CALL 
parse_tree__error_spec__var_to_quote_piece_2_f_0(
  MR_Word TypeInfo_for_T_7,
  MR_Word VarSet_4,
  MR_Word Var_5)
{
  MR_Word HeadVar__3_3;
  MR_String Var_6;

  Var_6 = parse_tree__parse_tree_out_term__mercury_var_to_name_only_vs_2_f_0(TypeInfo_for_T_7, VarSet_4, Var_5);
  {
    HeadVar__3_3 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, HeadVar__3_3, 0) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(3, HeadVar__3_3, 1) = ((MR_Box) (Var_6));
  }
  return HeadVar__3_3;
}

MR_Word MR_CALL 
parse_tree__error_spec__string_to_words_piece_1_f_0(
  MR_String Str_3)
{
  MR_Word HeadVar__2_2;

  {
    HeadVar__2_2 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(3, HeadVar__2_2, 0) = ((MR_Box) ((MR_Unsigned) 9U));
    MR_hl_field(3, HeadVar__2_2, 1) = ((MR_Box) (Str_3));
  }
  return HeadVar__2_2;
}

MR_Word MR_CALL 
parse_tree__error_spec__oom_err_to_oom_diag_1_f_0(
  MR_Word OoMErrSpecs_3)
{
  MR_Word OoMDiagSpecs_4;
  MR_Word HeadErrSpec_5 = ((MR_Word) ((MR_hl_field(0, OoMErrSpecs_3, 0))));
  MR_Word TailErrSpecs_6 = ((MR_Word) ((MR_hl_field(0, OoMErrSpecs_3, 1))));
  MR_Word Var_7 = (MR_Word) (HeadErrSpec_5);
  MR_Word Var_8 = (MR_Word) (TailErrSpecs_6);

  {
    OoMDiagSpecs_4 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, OoMDiagSpecs_4, 0) = ((MR_Box) (Var_7));
    MR_hl_field(0, OoMDiagSpecs_4, 1) = ((MR_Box) (Var_8));
  }
  return OoMDiagSpecs_4;
}

void MR_CALL 
parse_tree__error_spec__record_warn_spec_3_p_0(
  MR_Word Warn_4,
  MR_Word ErrsWarns0_5,
  MR_Word * ErrsWarns_6)
{
  MR_Word Errs0_7 = ((MR_Word) ((MR_hl_field(0, ErrsWarns0_5, 0))));
  MR_Word Warns0_8 = ((MR_Word) ((MR_hl_field(0, ErrsWarns0_5, 1))));
  MR_Word Warns_9;

  {
    Warns_9 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Warns_9, 0) = ((MR_Box) (Warn_4));
    MR_hl_field(1, Warns_9, 1) = ((MR_Box) (Warns0_8));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *ErrsWarns_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (Errs0_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (Warns_9));
  }
}

void MR_CALL 
parse_tree__error_spec__record_err_spec_3_p_0(
  MR_Word Err_4,
  MR_Word ErrsWarns0_5,
  MR_Word * ErrsWarns_6)
{
  MR_Word Errs0_7 = ((MR_Word) ((MR_hl_field(0, ErrsWarns0_5, 0))));
  MR_Word Warns0_8 = ((MR_Word) ((MR_hl_field(0, ErrsWarns0_5, 1))));
  MR_Word Errs_9;

  {
    Errs_9 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, Errs_9, 0) = ((MR_Box) (Err_4));
    MR_hl_field(1, Errs_9, 1) = ((MR_Box) (Errs0_7));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *ErrsWarns_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (Errs_9));
    MR_hl_field(0, base, 1) = ((MR_Box) (Warns0_8));
  }
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____actual_severity_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____actual_severity_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____actual_severity_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____actual_severity_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____color_name_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____color_name_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____color_name_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____color_name_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_msg_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____diag_msg_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____diag_msg_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____diag_msg_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_msg_component_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____diag_msg_component_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____diag_msg_component_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____diag_msg_component_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____diag_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____diag_spec_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____diag_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____diag_spec_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____err_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____err_spec_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____err_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____err_spec_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____errs_warns_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____errs_warns_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____errs_warns_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____errs_warns_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____format_piece_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____format_piece_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____format_piece_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____format_piece_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____info_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____info_spec_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____info_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____info_spec_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____lp_piece_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____lp_piece_kind_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____lp_piece_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____lp_piece_kind_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____maybe_always_treat_as_first_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____maybe_always_treat_as_first_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____maybe_always_treat_as_first_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____maybe_always_treat_as_first_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____mode_report_control_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____mode_report_control_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____mode_report_control_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____mode_report_control_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____module_file_id_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____module_file_id_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____module_file_id_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____module_file_id_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____rp_piece_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____rp_piece_kind_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____rp_piece_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____rp_piece_kind_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____same_but_for_case_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____same_but_for_case_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____same_but_for_case_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____same_but_for_case_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_phase_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____spec_phase_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____spec_phase_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____spec_phase_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____spec_severity_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____spec_severity_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_err_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____spec_severity_err_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_err_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____spec_severity_err_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____spec_severity_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____spec_severity_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____spec_severity_warn_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____spec_severity_warn_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____spec_severity_warn_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____spec_severity_warn_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____std_diag_msg_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____std_diag_msg_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____std_diag_msg_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____std_diag_msg_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____std_diag_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____std_diag_spec_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____std_diag_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____std_diag_spec_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____verbose_always_or_once_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____verbose_always_or_once_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____verbose_always_or_once_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____verbose_always_or_once_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
parse_tree__error_spec____Unify____warn_spec_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = parse_tree__error_spec____Unify____warn_spec_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
parse_tree__error_spec____Compare____warn_spec_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  parse_tree__error_spec____Compare____warn_spec_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

void mercury__parse_tree__error_spec__init(void)
{
}

void mercury__parse_tree__error_spec__init_type_tables(void)
{
  static MR_bool initialised = MR_FALSE;
  if (initialised) return;
  initialised = MR_TRUE;

  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_actual_severity_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_color_name_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_msg_component_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_diag_spec_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_err_spec_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_errs_warns_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_format_piece_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_info_spec_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_lp_piece_kind_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_maybe_always_treat_as_first_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_mode_report_control_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_module_file_id_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_rp_piece_kind_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_same_but_for_case_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_phase_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_err_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_info_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_spec_severity_warn_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_std_diag_msg_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_std_diag_spec_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_verbose_always_or_once_0);
  MR_register_type_ctor_info(&parse_tree__error_spec__parse_tree__error_spec__type_ctor_info_warn_spec_0);
}

void mercury__parse_tree__error_spec__init_debugger(void)
{
  MR_fatal_error("debugger initialization in MLDS grade");
}

// Ensure everything is compiled with the same grade.
const char *mercury__parse_tree__error_spec__grade_check(void)
{
  return &MR_GRADE_VAR;
}

// :- end_module parse_tree.error_spec.
