Goose  Diff

Differences From Artifact [892b018554]:

  • File bs/sema/typecheck.h — part of check-in [46e87c202b] at 2021-08-28 17:55:26 on branch trunk —
    • Instead of falling back to unification as the default type checking rule, implemented default type checking rules similar to the default unification ones
    • Fixed a nasty generator bug
    • Fixed reference type parsing not generating a location
    • Fixed where operator not generating a location that spanned both the types and the predicates
    • Various fixes to accomodate random api changes in the latest llvm
    • Updates fmt and catch2 versions
    (user: achavasse size: 755)

To Artifact [9d2a3e2465]:

  • File bs/sema/typecheck.h — part of check-in [0b47976c86] at 2021-09-23 21:32:13 on branch failed-ovl-resolution-optim-attempt — An attempt at optimizing overload resolution which works but provides no gain, archived in case some of the code might end up being useful some day (user: achavasse size: 1224)

12
13
14
15
16
17
18

19
20







21


22
23
24
25
26
27
        NoUnification,
        AmbiguousTypeCheck,
        TCSol
    >;

    TypeCheckingSolution FindBestTyping( const Term& lhs, const Term& rhs, const Context& context );


    using TCGen = Generator< pair< Term, TypeCheckingContext > >;








    TCGen TypeCheck( const Term& lhs, const Term& rhs, const TypeCheckingContext& tcc );



    TCGen Unify( const Term& lhs, const Term& rhs, const TypeCheckingContext& tcc );
    optional< Term > HalfUnify( const Term& lhs, TypeCheckingContext& tcc );
}

#endif







>
|

>
>
>
>
>
>
>

>
>






12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
        NoUnification,
        AmbiguousTypeCheck,
        TCSol
    >;

    TypeCheckingSolution FindBestTyping( const Term& lhs, const Term& rhs, const Context& context );

    using TCInput = pair< MatchScore, const TypeCheckingRuleSet::BinaryRule* >;
    using TCInputGen = Generator< TCInput >;

    template< typename T >
    TCInputGen ContainerTCInputGen( const T& container )
    {
        for( auto&& input : container )
            co_yield TCInput( input );
    }

    TCGen TypeCheck( const Term& lhs, const Term& rhs, const TypeCheckingContext& tcc );
    TCGen TypeCheck( TCInputGen&& ig, const Term& lhs, const Term& rhs, const TypeCheckingContext& tcc );
    optional< TCGen > SelectTypeCheckRule( TCInputGen&& ig, const Term& lhs, const Term& rhs, const TypeCheckingContext& tcc );

    TCGen Unify( const Term& lhs, const Term& rhs, const TypeCheckingContext& tcc );
    optional< Term > HalfUnify( const Term& lhs, TypeCheckingContext& tcc );
}

#endif