PreviousUpNext

14.5.22  Module_Level_Declarations

The compiler Module_Level_Declarations api defines access to functionlity tracking modules in the compilation process. (In this context, a “module” is essentially what you get from compiling one sourcefile.)

The Module_Level_Declarations api is implemented by the module_level_declarations package.

The Module_Level_Declarations api source code is in src/lib/compiler/front/typer-stuff/modules/module.api.

See also: Module_Junk.

The above information is manually maintained and may contain errors.

api {
    Share_Spec  = List(symbol_path::Symbol_Path );
    Api  = API Api_Record | ERRONEOUS_API;
        Api_Element
        = GENERIC_IN_API
        {a_generic_api:Generic_Api, module_stamp:stamp::Stamp, slot:Int}
        |
        PACKAGE_IN_API
        {an_api:Api, definition:Null_Or(((Package_Definition , Int)) ), module_stamp:stamp::Stamp, slot:Int}
        |
        TYPE_IN_API
        {is_a_replica:Bool, module_stamp:stamp::Stamp, scope:Int, type:type_declaration_types::Type}
        |
        VALCON_IN_API
        {slot:Null_Or(Int ), sumtype:type_declaration_types::Valcon}
        |
        VALUE_IN_API
        {slot:Int, typoid:type_declaration_types::Typoid};
        Generic_Api
        = ERRONEOUS_GENERIC_API
        |
        GENERIC_API
                {body_api:Api, kind:Null_Or(symbol::Symbol ), parameter_api:Api,
                parameter_symbol:Null_Or(symbol::Symbol ), parameter_variable:stamp::Stamp};
        External_Definition
        = EXTERNAL_DEFINITION_OF_PACKAGE
        (symbol_path::Symbol_Path , Package_Definition)
        |
        EXTERNAL_DEFINITION_OF_TYPE
                {extdef_is_relative:Bool, extdef_path:symbol_path::Symbol_Path,
                extdef_type:type_declaration_types::Type};
        Package_Definition
          = CONSTANT_PACKAGE_DEFINITION Package | VARIABLE_PACKAGE_DEFINITION (Api , ?.stamppath::Stamppath);
        Package
        = A_PACKAGE
        Package_Record
        |
        ERRONEOUS_PACKAGE
        |
        PACKAGE_API
        {an_api:Api, stamppath:?.stamppath::Stamppath};
    Generic  = ERRONEOUS_GENERIC | GENERIC Generic_Record;
        Typerstore_Entry
        = ERRONEOUS_ENTRY
        |
        GENERIC_ENTRY
        Typechecked_Generic
        |
        PACKAGE_ENTRY
        Typechecked_Package
        |
        TYPE_ENTRY
        Typechecked_Type;
        Generic_Closure
        = GENERIC_CLOSURE       {body_package_expression:Package_Expression, parameter_module_stamp:stamp::Stamp,
                                typerstore:Typerstore};
    Stamp_Expression  = GET_STAMP Package_Expression | MAKE_STAMP;
        Typechecked_Type_Expression
        = CONSTANT_TYPE
        type_declaration_types::Type
        |
        FORMAL_TYPE
        type_declaration_types::Type
        |
        TYPEVAR_TYPE
        ?.stamppath::Stamppath;
        Package_Expression
        = ABSTRACT_PACKAGE
        (Api , Package_Expression)
        |
        APPLY
        (Generic_Expression , Package_Expression)
        |
        COERCED_PACKAGE
        {boundvar:stamp::Stamp, coercion:Package_Expression, raw:Package_Expression}
        |
        CONSTANT_PACKAGE
        Typechecked_Package
        |
        FORMAL_PACKAGE
        Generic_Api
        |
        PACKAGE
        {module_declaration:Module_Declaration, stamp:Stamp_Expression}
        |
        PACKAGE_LET
        {declaration:Module_Declaration, expression:Package_Expression}
        |
        VARIABLE_PACKAGE
        ?.stamppath::Stamppath;
        Generic_Expression
        = CONSTANT_GENERIC
        Typechecked_Generic
        |
        LAMBDA
        {body:Package_Expression, parameter:stamp::Stamp}
        |
        LAMBDA_TP
        {an_api:Generic_Api, body:Package_Expression, parameter:stamp::Stamp}
        |
        LET_GENERIC
        (Module_Declaration , Generic_Expression)
        |
        VARIABLE_GENERIC
        ?.stamppath::Stamppath;
        Module_Expression
        = DUMMY_GENERIC_EVALUATION_EXPRESSION
        |
        ERRONEOUS_ENTRY_EXPRESSION
        |
        GENERIC_EXPRESSION
        Generic_Expression
        |
        PACKAGE_EXPRESSION
        Package_Expression
        |
        TYPE_EXPRESSION
        Typechecked_Type_Expression;
        Module_Declaration
        = EMPTY_GENERIC_EVALUATION_DECLARATION
        |
        ERRONEOUS_ENTRY_DECLARATION
        |
        GENERIC_DECLARATION
        (stamp::Stamp , Generic_Expression)
        |
        LOCAL_DECLARATION
        (Module_Declaration , Module_Declaration)
        |
        PACKAGE_DECLARATION
        (stamp::Stamp , Package_Expression , symbol::Symbol)
        |
        SEQUENTIAL_DECLARATIONS
        List(Module_Declaration )
        |
        TYPE_DECLARATION
        (stamp::Stamp , Typechecked_Type_Expression);
        Typerstore
        = ERRONEOUS_ENTRY_DICTIONARY
        |
        MARKED_TYPERSTORE
        Typerstore_Record
        |
        NAMED_TYPERSTORE
        (?.stamppath::Map(Typerstore_Entry ) , Typerstore)
        |
        NULL_TYPERSTORE;
        Modtree
        = API_MODTREE_NODE
        Api_Record
        |
        GENERIC_MODTREE_NODE
        Generic_Record
        |
        MODTREE_BRANCH
        List(Modtree )
        |
        PACKAGE_MODTREE_NODE
        Package_Record
        |
        SUMTYPE_MODTREE_NODE
        type_declaration_types::Sumtype_Record
        |
        TYPERSTORE_MODTREE_NODE
        Typerstore_Record;
    Stub_Info  = {is_lib:Bool, modtree:Modtree, owner:picklehash::Picklehash};
          Api_Record  =
                {api_elements:List(((symbol::Symbol , Api_Element)) ), closed:Bool, contains_generic:Bool,
                name:Null_Or(symbol::Symbol ), package_sharing:List(Share_Spec ),
                property_list:property_list::Property_List, stamp:stamp::Stamp, stub:Null_Or(Stub_Info ),
                symbols:List(symbol::Symbol ), type_sharing:List(Share_Spec )};
    Typerstore_Record  = {stamp:stamp::Stamp, stub:Null_Or(Stub_Info ), typerstore:Typerstore};
          Typechecked_Package  =
                {inverse_path:?.inverse_path::Inverse_Path, property_list:property_list::Property_List,
                stamp:stamp::Stamp, stub:Null_Or(Stub_Info ), typerstore:Typerstore};
          Package_Record  =
                {an_api:Api, inlining_data:inlining_data::Inlining_Data, typechecked_package:Typechecked_Package,
                varhome:varhome::Varhome};
          Typechecked_Generic  =
                {generic_closure:Generic_Closure, inverse_path:?.inverse_path::Inverse_Path,
                property_list:property_list::Property_List, stamp:stamp::Stamp, stub:Null_Or(Stub_Info ),
                typepath:Null_Or(type_declaration_types::Typepath )};
          Generic_Record  =         {a_generic_api:Generic_Api, inlining_data:inlining_data::Inlining_Data,
                                    typechecked_generic:Typechecked_Generic, varhome:varhome::Varhome};
    Typechecked_Type  = type_declaration_types::Type;
    Api_Elements  = List(((symbol::Symbol , Api_Element)) );
    bogus_typechecked_package : Typechecked_Package;
    bogus_typechecked_generic : Typechecked_Generic;};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext