diff --git a/types/model/app.anubis b/types/model/app.anubis index 1bff755..7fb61c5 100644 --- a/types/model/app.anubis +++ b/types/model/app.anubis @@ -10,7 +10,8 @@ transmit help.anubis transmit tables.anubis transmit icons.anubis - +read tools/basis.anubis +transmit system/muscle.anubis public type HK_App: hk_app( @@ -47,3 +48,56 @@ public define HK_App List(HK_Table) hk_tables )= hk_app(app_name, no_icon, no_help_text, hk_tables). + + type HK_App: + hk_app( + String app_name, + HK_Icon icon, + HK_Help_Text help, + List(HK_Table) hk_tables + ). + + _HK_APP: + ======== + +----------+---------------+-------------------------- + | name | type | description + +----------+---------------+-------------------------------- + | "name" | String | Name of the application + | "icon" | Message | Icon description, contained in message id _HK_ICON + | "help" | Message | Help string, contained in message id _HK_HELP_TEXT + | "tables" | List(Message) | List of tables of that application contained in message id _HK_TABLE + +public define Message + to_Message + ( + HK_App app + )= + with hk_app_message = message(_HK_APP), + forget(add_string(hk_app_message, "name", app.app_name)); + forget(add_message(hk_app_message, "icon", to_Message(app.icon))); + forget(add_message(hk_app_message, "help", to_Message(app.help))); + map_forget((HK_Table table) |-> add_message(hk_app_message, "tables", to_Message(table)), app.hk_tables); + //print_to_stream(hk_app_message); + hk_app_message + . + +public define Maybe(HK_App) + from_Message + ( + Message hk_app_message + )= + if *hk_app_message.what = _HK_APP then + if find_string(hk_app_message, "name") is {failure then failure, success(name) then + if find_message(hk_app_message, "icon") is {failure then failure, success(icon_msg) then + if (Maybe(HK_Icon))from_Message(icon_msg) is {failure then failure, success(icon) then + if find_message(hk_app_message, "help") is {failure then failure, success(help_msg) then + if (Maybe(HK_Help_Text))from_Message(help_msg) is {failure then failure, success(help) then + + with tables = map_escape((Message msg_app) |-> (Maybe(HK_Table))from_Message(msg_app), find_messages(hk_app_message, "tables")), + if tables is {failure then failure, success(table_list) then + //return the application + success(hk_app(name, icon, help, table_list)) + }}}}}} + else + failure + . diff --git a/types/model/columns.anubis b/types/model/columns.anubis index f71ee84..c1dc12b 100644 --- a/types/model/columns.anubis +++ b/types/model/columns.anubis @@ -6,6 +6,8 @@ * © Calexium */ +read tools/basis.anubis + transmit help.anubis transmit fields.anubis @@ -16,8 +18,44 @@ public type HK_Model_Attr: // in a table which already contains some rows) not_null. - *** (1.4) 'HK_Model_Column' (describing a column in a table). +public define Message + to_Message + ( + HK_Model_Attr hk_model_attr + )= + with hk_model_attr_message = message(_HK_COLUMN_ATTRIBUTES), + if hk_model_attr is + { + unique then forget(add_string(hk_model_attr_message, "hk_column_attr", "unique")), + indexed then forget(add_string(hk_model_attr_message, "hk_column_attr", "indexed")), + default(value) then forget(add_string(hk_model_attr_message, "hk_column_attr", "default")); + forget(add_string(hk_model_attr_message, "value", value)), + not_null then forget(add_string(hk_model_attr_message, "hk_column_attr", "not_null")) + }; + hk_model_attr_message + . +public define Maybe(HK_Model_Attr) + from_Message + ( + Message hk_model_attr_message + )= + if *hk_model_attr_message.what = _HK_COLUMN_ATTRIBUTES then + if find_string(hk_model_attr_message, "hk_column_attr") is {failure then failure, success(col_attr) then + if col_attr = "unique" then success(unique) + else if col_attr = "indexed" then success(indexed) + else if col_attr = "default" then + if find_string(hk_model_attr_message, "value") is {failure then failure, success(value) then + success(default(value)) + } + else if col_attr = "not_null" then success(not_null) + else failure + } + else + failure + . + + 'HK_Model_Column' (describing a column in a table). Description of a column: public type HK_Model_Column: @@ -50,3 +88,50 @@ public define HK_Model_Column hk_column(name, type, [], no_help_text). + _HK_COLUMN message format: + ========================== + + +--------------+---------------+-------------------------- + | name | type | description + +--------------+---------------+-------------------------------- + | "name" | String | Name of the column in table + | "field_type" | Message | computation String to be shown to summarize row content. This string is Anubis source code + | "attributes" | List(Message) | List of attributes of the table Message id is _HK_COLUMN_ATTRIBUTES + | "text" | Message | help text to use during edit screen + +public define Message + to_Message + ( + HK_Model_Column hk_column + )= + with hk_model_column = message(_HK_COLUMN), + forget(add_string(hk_model_column, "name", hk_column.name)); + forget(add_message(hk_model_column, "field_type", to_Message(hk_column.type))); + map_forget((HK_Model_Attr attribute) |-> add_message(hk_model_column, "attributes", to_Message(attribute)), hk_column.attributes); + forget(add_message(hk_model_column, "text", to_Message(hk_column.help))); + + //print_to_stream(hk_model_column); + hk_model_column + . + + +public define Maybe(HK_Model_Column) + from_Message + ( + Message msg_hk_column + )= + if *msg_hk_column.what = _HK_COLUMN then + if find_string(msg_hk_column, "name") is {failure then failure, success(name) then + if find_message(msg_hk_column, "field_type") is {failure then failure, success(field_type_msg) then + if (Maybe(HK_Model_Field))from_Message(field_type_msg) is {failure then failure, success(field_type) then + if find_message(msg_hk_column, "text") is {failure then failure, success(help_msg) then + if (Maybe(HK_Help_Text))from_Message(help_msg) is {failure then failure, success(help) then + + with mb_attribs = map_escape((Message msg_col) |-> (Maybe(HK_Model_Attr))from_Message(msg_col), find_messages(msg_hk_column, "attributes")), + if mb_attribs is {failure then failure, success(attributes_list) then + //return the application + success(hk_column(name, field_type, attributes_list, help)) + }}}}}} + else + failure + . diff --git a/types/model/database.anubis b/types/model/database.anubis index 6f3cd7a..e0ca04f 100644 --- a/types/model/database.anubis +++ b/types/model/database.anubis @@ -8,7 +8,58 @@ transmit app.anubis +transmit tools/basis.anubis +transmit system/muscle.anubis +transmit calexium_lib/CXM_message_constants.anubis + + public type HK_Database: hk_database (String name, // name of the database List(HK_App) apps //list of applications ). + + + _HK_DATABASE message format: + ========================= + + +-----------+---------------+-------------------------- + | name | type | description + +-----------+---------------+-------------------------------- + | "name" | String | Name of the database + | "apps" | List(Message) | List of Application of the database the application Message id is _HK_APP + +public define Message + to_Message + ( + HK_Database hk_db + )= + with hk_db_message = message(_HK_DATABASE), + forget(add_string(hk_db_message, "name", hk_db.name)); + map_forget((HK_App app) |-> add_message(hk_db_message, "apps", to_Message(app)), hk_db.apps); + + //print_to_stream(hk_db_message); + hk_db_message + . + + +public define Maybe(HK_Database) + from_Message + ( + Message hk_db_message + )= + if *hk_db_message.what = _HK_DATABASE then + if find_string(hk_db_message, "name") is + { + failure then failure, + success(name) then + with app_list = map_escape((Message msg_app) |-> (Maybe(HK_App))from_Message(msg_app), find_messages(hk_db_message, "apps")), + if app_list is + { + failure then failure, + success(apps) then success(hk_database(name, apps)) + } + } + else + failure + . + diff --git a/types/model/display.anubis b/types/model/display.anubis index f8cc7e3..c4fe5d6 100644 --- a/types/model/display.anubis +++ b/types/model/display.anubis @@ -6,16 +6,95 @@ * © Calexium */ +transmit system/muscle.anubis +transmit tools/basis.anubis +transmit calexium_lib/CXM_message_constants.anubis public type HK_List_View: list_view_all, list_view(String view_name, List(String) columns). +public define Message + to_Message + ( + HK_List_View list_view + )= + with _msg = message(_HK_LIST_VIEW), + if list_view is + { + list_view_all then forget(add_string(_msg, "type", "list_view_all")), + list_view(name, columns) then + forget(add_string(_msg, "type", "list_view")); + forget(add_string(_msg, "view_name", name)); + map_forget((String column) |-> forget(add_string(_msg, "columns", column)), columns) + }; + _msg + . + +public define Maybe(HK_List_View) + from_Message + ( + Message msg + )= + if *msg.what = _HK_LIST_VIEW then + if find_string(msg, "type") is {failure then failure, success(type) then + if type = "list_view_all" then success(list_view_all) else + if type = "list_view" then + if find_string(msg, "view_name") is {failure then failure, success(view_name) then + with columns = find_strings(msg, "columns"), + success(list_view(view_name, columns))} + else + failure + } + else + failure + . + public type HK_Edit_View: edit_view_all, edit_view(String view_name, List(String) columns). + + _HK_MODEL_DISPLAY message format: + ========================= + The message string name is "hk_display" + +--------------+---------------+-------------------------------- + | name | type | description + +--------------+---------------+-------------------------------- + | "edits" | List(String) | List of columns for edit panel + | "list_views" | List(Message) | List of (view list) the Message id is _HK_LIST_VIEW + public type HK_Display: hk_display(List(HK_List_View) list_views, //List(HK_Edit_View) edit_views List(String)). + +public define Message + to_Message + ( + HK_Display display + )= + with hk_display_msg = message(_HK_MODEL_DISPLAY), + since display is hk_display(list_views, list_edit), + map_forget((HK_List_View _view) |-> add_message(hk_display_msg, "list_views", to_Message(_view)), list_views); + map_forget((String _str) |-> add_string(hk_display_msg, "edits", _str), list_edit); + hk_display_msg + . + +public define Maybe(HK_Display) + get_hk_display + ( + Message msg + )= + if find_message(msg, "hk_display") is { failure then failure, success(msg_hk_display) then + if *msg_hk_display.what = _HK_MODEL_DISPLAY then + with view_list = map_escape((Message _msg) |-> (Maybe(HK_List_View))from_Message(_msg), find_messages(msg_hk_display, "list_views")), + if view_list is + { + failure then failure, + success(list_views) then success(hk_display(list_views, find_strings(msg, "edits"))) + } + else + failure + }. + diff --git a/types/model/fields.anubis b/types/model/fields.anubis index 3fb532e..e995c77 100644 --- a/types/model/fields.anubis +++ b/types/model/fields.anubis @@ -6,6 +6,10 @@ * © Calexium */ +transmit tools/basis.anubis +transmit system/convert.anubis +transmit system/muscle.anubis +transmit calexium_lib/CXM_message_constants.anubis *** 'HK_Model_Field' (data types of table columns). @@ -31,23 +35,90 @@ public type HK_App_Name: app_name(String name), none. +public define Message + to_Message + ( + HK_App_Name hk_app_name + )= + with hk_app_name_message = message(_HK_APP_NAME), + if hk_app_name is + { + this then forget(add_string(hk_app_name_message, "type", "this")), + app_name(name)then forget(add_string(hk_app_name_message, "type", "app_name")); + forget(add_string(hk_app_name_message, "name", name)), + none then forget(add_string(hk_app_name_message, "type", "none")) + }; + hk_app_name_message + . + +public define Maybe(HK_App_Name) + from_Message + ( + Message hk_app_name_message + )= + if *hk_app_name_message.what = _HK_APP_NAME then + if find_string(hk_app_name_message, "type") is {failure then failure, success(type) then + if type = "this" then success(this) + else if type = "app_name" then + if find_string(hk_app_name_message, "name") is {failure then failure, success(name) then + success(app_name(name)) + } + else if type = "none" then success(none) + else failure + } + else + failure + . + + public type HK_Datetime_Field_Attr: none, //Nothing special, normal behaviour auto_now, //Always update datetime at SQL update auto_now_add. //Set current datetime when row is created and can't be edited anymore +define String + to_String + ( + HK_Datetime_Field_Attr attr + )= + if attr is + { + none then "none", + auto_now then "auto_now", + auto_now_add then "auto_now_add" + }. +define HK_Datetime_Field_Attr + to_HK_Datetime_Field_Attr + ( + String dt_attr_str + )= + if dt_attr_str = "none" then none else + if dt_attr_str = "auto_now" then auto_now else + if dt_attr_str = "auto_now_add" then auto_now_add + else none. + +define HK_Datetime_Field_Attr + get_dt_attribute + ( + Message msg + )= + if find_string(msg, "dt_attribute") is + { + failure then none, + success(dt_attrib) then to_HK_Datetime_Field_Attr(dt_attrib) + }. public type HK_Model_Field: - p_key, - boolean_field, // true or false - date_field (HK_Datetime_Field_Attr), // date with the precision of the day - time_field (HK_Datetime_Field_Attr), // time with the precision of the second - datetime_field(HK_Datetime_Field_Attr), // datetime with the precision of the second - foreign_key (HK_App_Name app_name, String table_name), // foreign key to 'id' in another (or same) table and column_name for choice selector. - integer_field, // integer of arbitrary size - char_field (Int size), // text of maximal size 'size' (number of characters) - text_field. // text of variable size + p_key, + boolean_field, // true or false + date_field (HK_Datetime_Field_Attr), // date with the precision of the day + time_field (HK_Datetime_Field_Attr), // time with the precision of the second + datetime_field(HK_Datetime_Field_Attr), // datetime with the precision of the second + foreign_key (HK_App_Name app_name, String table_name), // foreign key to 'id' in another (or same) table and column_name for choice selector. + integer_field, // integer of arbitrary size + char_field (Int size), // text of maximal size 'size' (number of characters) + text_field. // text of variable size public define HK_Model_Field foreign_key @@ -55,3 +126,113 @@ public define HK_Model_Field String table_name )= foreign_key(this, table_name). + + /* * + _HK_FIELD message format: + ============================= + +----------------+-----------+-------------------------------- + | name | type | description + +----------------+-----------+-------------------------------- + | "type" | String | type of the field. It sould be + "p_key" + "boolean_field" + "date_field" __________ + "time_field" ________ | + "datetime_field" __ | | + ________________________________________________|_|_| + | "foreign_key" _________ + | "integer_field" + | "char_field" + | "text_field" + | + --> date_field or time_field or datetime_field: + +-------------+--------+------------------------------------+ + | name | type | description | + |-------------+--------+------------------------------------| + | "attribute" | String | 'none', 'auto_now', 'auto_now_add' | + +-----------------------------------------------------------+ + +*/ + +public define Message + to_Message + ( + HK_Model_Field hk_model_field + )= + with hk_model_field_message = message(_HK_FIELD), + if hk_model_field is + { + p_key then + forget(add_string(hk_model_field_message, "type", "p_key")), + + boolean_field then + forget(add_string(hk_model_field_message, "type", "boolean_field")), + + date_field(attr) then + forget(add_string(hk_model_field_message, "type", "date_field")); + forget(add_string(hk_model_field_message, "dt_attribute", to_String(attr))), + + time_field(attr) then + forget(add_string(hk_model_field_message, "type", "time_field")); + forget(add_string(hk_model_field_message, "dt_attribute", to_String(attr))), + + datetime_field(attr) then + forget(add_string(hk_model_field_message, "type", "datetime_field")); + forget(add_string(hk_model_field_message, "dt_attribute", to_String(attr))), + + foreign_key(app_name, table_name) then // foreign key to 'id' in another (or same) table and column_name for choice selector. + forget(add_string(hk_model_field_message, "type", "foreign_key")); + forget(add_message(hk_model_field_message, "app_name", to_Message(app_name))); + forget(add_string(hk_model_field_message, "table_name", table_name)), + + integer_field then // integer of arbitrary size + forget(add_string(hk_model_field_message, "type", "integer_field")), + + char_field (size) then // text of maximal size 'size' (number of characters) + forget(add_string(hk_model_field_message, "type", "char_field")); + forget(add_int32(hk_model_field_message, "size", truncate_to_Word32(size))), + + text_field then // text of variable size + forget(add_string(hk_model_field_message, "type", "text_field")) + + }; + hk_model_field_message + . + +define Maybe(HK_Model_Field) + get_field + ( + Message hk_model_field_message, + String type + )= + if type = "p_key" then success(p_key) + else if type = "boolean_field" then success(boolean_field) + else if type = "date_field" then success(date_field(get_dt_attribute(hk_model_field_message))) + else if type = "time_field" then success(time_field(get_dt_attribute(hk_model_field_message))) + else if type = "datetime_field" then success(datetime_field(get_dt_attribute(hk_model_field_message))) + else if type = "foreign_key" then + if find_string(hk_model_field_message, "table_name") is {failure then failure, success(table_name) then + if find_message(hk_model_field_message, "app_name") is {failure then failure, success(msg_app_name) then + if from_Message(msg_app_name) is {failure then failure, success(app_name) then + success(foreign_key(app_name, table_name)) + }}} + else if type = "integer_field" then success(integer_field) + else if type = "char_field" then + if find_int32(hk_model_field_message, "size") is {failure then failure, success(w32_size) then + success(char_field(to_Int(w32_size)))} + else if type = "text_field" then success(text_field) + else failure + . + +public define Maybe(HK_Model_Field) + from_Message + ( + Message hk_model_field_message + )= + if *hk_model_field_message.what = _HK_FIELD then + if find_string(hk_model_field_message, "type") is {failure then failure, success(type) then + get_field(hk_model_field_message, type) + } + else + failure + . diff --git a/types/model/help.anubis b/types/model/help.anubis index ab5f05e..77ac8ac 100644 --- a/types/model/help.anubis +++ b/types/model/help.anubis @@ -6,6 +6,9 @@ * © Calexium */ +transmit tools/basis.anubis +transmit system/muscle.anubis +transmit calexium_lib/CXM_message_constants.anubis public type HK_Help_Text: no_help_text, //no help text available @@ -25,3 +28,63 @@ public define String help_text_TAG(tag) then "help_text_TAG(\""+tag+"\")", help_text(str) then "help_text(\""+str+"\")" }. + + /* * + _HK_HELP_TEXT message format: + ============================= + +----------------+-----------+-------------------------------- + | name | type | description + +----------------+-----------+-------------------------------- + | "hk_help_text" | String | type of the help text. It sould be + "no_help" + "TAG" ____ + "text" __ | + ______________________________________|_| + | + --> TAG or text: + +---------+-----------+-------------------------------- + | name | type | description + +---------+-----------+-------------------------------- + | "value" | String | String name of the 16x16 icon. + +*/ + +public define Message + to_Message + ( + HK_Help_Text hk_help + )= + with hk_help_message = message(_HK_HELP_TEXT), + if hk_help is + { + no_help_text then forget(add_string(hk_help_message, "hk_help_text", "no_help")), + help_text_TAG(tag) then forget(add_string(hk_help_message, "hk_help_text", "TAG")); + forget(add_string(hk_help_message, "value", tag)), + help_text(value) then forget(add_string(hk_help_message, "hk_help_text", "text")); + forget(add_string(hk_help_message, "value", value)) + }; + hk_help_message + . + +public define Maybe(HK_Help_Text) + from_Message + ( + Message hk_help_message + )= + if *hk_help_message.what = _HK_HELP_TEXT then + if find_string(hk_help_message, "hk_help_text") is {failure then failure, success(help_type) then + if help_type = "no_help" then success(no_help_text) + else if help_type = "TAG" then + if find_string(hk_help_message, "value") is {failure then failure, success(value) then + success(help_text_TAG(value)) + } + else if help_type = "text" then + if find_string(hk_help_message, "value") is {failure then failure, success(value) then + success(help_text(value)) + } + else failure + } + else + failure + . + diff --git a/types/model/icons.anubis b/types/model/icons.anubis index b74c104..43e0fa7 100644 --- a/types/model/icons.anubis +++ b/types/model/icons.anubis @@ -6,6 +6,9 @@ * © Calexium */ +transmit tools/basis.anubis +transmit system/muscle.anubis +transmit calexium_lib/CXM_message_constants.anubis public type HK_Icon: no_icon, @@ -36,3 +39,56 @@ public define String no_icon then "\"\"", icon16(icn_str) then "\""+icn_str+"_icon\"" }. + + * * + _HK_ICON message format: + ======================= + +-----------+-----------+-------------------------------- + | name | type | description + +-----------+-----------+-------------------------------- + | "hk_icon" | String | type of the icon. It sould be + "no_icon" + "icon_16" __ + ______________________________________| + | + --> icon_16: + +-----------+-----------+-------------------------------- + | name | type | description + +-----------+-----------+-------------------------------- + | "icn_str" | String | String name of the 16x16 icon. + + */ + +public define Message + to_Message + ( + HK_Icon hk_icon + )= + with hk_icon_message = message(_HK_ICON), + if hk_icon is + { + no_icon then forget(add_string(hk_icon_message, "hk_icon", "no_icon")); + hk_icon_message, + icon16(icn_str) then forget(add_string(hk_icon_message, "hk_icon", "icon_16")); + forget(add_string(hk_icon_message, "icn_str", icn_str)); + hk_icon_message + }. + +public define Maybe(HK_Icon) + from_Message + ( + Message hk_icon_message + )= + if *hk_icon_message.what = _HK_ICON then + if find_string(hk_icon_message, "hk_icon") is {failure then failure, success(hk_icon) then + if hk_icon = "no_icon" then success(no_icon) + else if hk_icon = "icon_16" then + if find_string(hk_icon_message, "icn_str") is {failure then failure, success(icn_str) then + success(icon16(icn_str)) + } + else failure + } + else + failure + . + diff --git a/types/model/model.anubis b/types/model/model.anubis index 4e1e071..2ec5f0f 100644 --- a/types/model/model.anubis +++ b/types/model/model.anubis @@ -6,10 +6,50 @@ * © Calexium */ +transmit tools/basis.anubis transmit columns.anubis public type HK_Model: hk_model( List(HK_Model_Column) columns, // columns other than the primary key column (if any) String show_string). + _HK_MODEL message format: + ======================== + + +------------+---------------+-------------------------- + | name | type | description + +------------+---------------+-------------------------------- + | "columns" | List(Message) | List of columns of the table Message id is _HK_COLUMN + | "show_str" | String | computation String to be shown to summarize row content. This string is Anubis source code + where the row content is in datum, named "obj". + + +public define Message + to_Message + ( + HK_Model hk_model + )= + with hk_model_message = message(_HK_MODEL), + map_forget((HK_Model_Column column) |-> add_message(hk_model_message, "columns", to_Message(column)), hk_model.columns); + forget(add_string(hk_model_message, "show_str", hk_model.show_string)); + + //print_to_stream(hk_model_message); + hk_model_message + . + +public define Maybe(HK_Model) + from_Message + ( + Message hk_model_msg + )= + if *hk_model_msg.what = _HK_MODEL then + if find_string(hk_model_msg, "show_str") is {failure then failure, success(show_str) then + with mb_columns = map_escape((Message column_msg) |-> (Maybe(HK_Model_Column))from_Message(column_msg), find_messages(hk_model_msg, "columns")), + if mb_columns is {failure then failure, success(columns_list) then + //return the model + success(hk_model(columns_list, show_str)) + }} + else + failure + . diff --git a/types/model/tables.anubis b/types/model/tables.anubis index a3d0c0c..dd67b5b 100644 --- a/types/model/tables.anubis +++ b/types/model/tables.anubis @@ -6,6 +6,7 @@ * © Calexium */ +read tools/basis.anubis transmit display.anubis transmit model.anubis @@ -23,3 +24,47 @@ public define HK_Table HK_Display display )= hk_table(name, "", model, display). + + + _HK_TABLE message format: + ========================= + +--------------+-----------+-------------------------- + | name | type | description + +--------------+-----------+-------------------------------- + | "name" | String | Name of the table + | "short_name" | String | Name of the table without app_name prefix + | "model" | Message | Model description, contained in message id _HK_MODEL + | "hk_display" | Message | Help string, contained in message id _HK_MODEL_DISPLAY + + +public define Message + to_Message + ( + HK_Table table + )= + with hk_table_message = message(_HK_TABLE), + forget(add_string(hk_table_message, "name", table.name)); + forget(add_string(hk_table_message, "short_name", table.name)); + forget(add_message(hk_table_message, "model", to_Message(table.model))); + forget(add_message(hk_table_message, "hk_display", to_Message(table.display))); + //print_to_stream(hk_table_message); + hk_table_message. + +public define Maybe(HK_Table) + from_Message + ( + Message table_message + )= + if *table_message.what = _HK_TABLE then + if find_string(table_message, "name") is {failure then failure, success(name) then + if find_string(table_message, "short_name") is {failure then failure, success(short_name) then + if find_message(table_message, "model") is {failure then failure, success(model_msg) then + if (Maybe(HK_Model))from_Message(model_msg) is {failure then failure, success(model) then + if get_hk_display(table_message) is {failure then failure, success(display) then + //return the table + success(hk_table(name, "", model, display)) + }}}}} + else + failure + . + -- libgit2 0.21.4