PreviousUpNext

14.5.49  Unify_Typoids

The compiler Unify_Typoids api defines access to unify functionality for type inference. Mythryl uses Prolog-style “unification” to perform type inference; this api defines the needed unify_typoids operation.

The Unify_Typoids api is implemented by the unify_typoids package.

The Unify_Typoids api source code is in src/lib/compiler/front/typer/types/unify-typoids.pkg.

The above information is manually maintained and may contain errors.

api {   Unify_Fail
        = CIRCULARITY
        |
        LITERAL_TYPE_MISMATCH
        type_declaration_types::Typevar
        |
        NEED_EQUALITY_TYPE
        |
        OVERLOADED_TYPEVAR_MISMATCH
        |
        RECORD_FIELD_LABELS_MISMATCH
        |
        TYPE_MISMATCH
        (type_declaration_types::Type , type_declaration_types::Type)
        |
        TYPOID_MISMATCH
        (type_declaration_types::Typoid , type_declaration_types::Typoid)
        |
        USER_TYPEVAR_MISMATCH
        type_declaration_types::Typevar;
    exception UNIFY_TYPOIDS Unify_Fail;
    fail_message : Unify_Fail -> String;
        unify_typoids :
            (   String , String , type_declaration_types::Typoid , type_declaration_types::Typoid , List(String ) ,
                Ref(Null_Or(List((Void -> Void) ) ) )
            )
            ->
            Void;
    debugging : Ref(Bool );};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext