Goose  Diff

Differences From Artifact [5144cf5169]:

  • File bs/sema/uni-quote.h — part of check-in [68eda7b3fe] at 2019-03-17 11:49:51 on branch trunk — Added a way to quote an expression so that its content is ignored during unification, and used it for function signatures. (user: achavasse size: 273)

To Artifact [56df3d853f]:

  • File bs/sema/uni-quote.h — part of check-in [dd70f4c696] at 2019-03-17 15:54:13 on branch trunk — Sema: terms can now be wrapped along with a callback to be invoked by Substitute(). (user: achavasse size: 540)

1
2
3
4
5




6
7
8
9
10
11
12
#ifndef EMPATHY_SEMA_UNI_QUOTE_H
#define EMPATHY_SEMA_UNI_QUOTE_H

namespace empathy::sema
{




    extern Term Quote( const Term& t );
    extern optional< Term > Unquote( const Term& t );

    extern void SetupQuoteUnificationRules( UnificationRuleSet& ruleSet );
}

#endif





>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef EMPATHY_SEMA_UNI_QUOTE_H
#define EMPATHY_SEMA_UNI_QUOTE_H

namespace empathy::sema
{
    // Expressions can be quoted so that they aren't recursed into during
    // unification. This allows to carry unification patterns around (like function
    // signatures) without them causing an unification failure because their holes remain
    // unresolved.
    extern Term Quote( const Term& t );
    extern optional< Term > Unquote( const Term& t );

    extern void SetupQuoteUnificationRules( UnificationRuleSet& ruleSet );
}

#endif