Opened 5 years ago

Last modified 3 months ago

#191 new enhancement

Pass More Information to Resolver

Reported by: ajbeach Owned by:
Priority: minor Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description (last modified by ajbeach)

I would like to add an extra argument to the resolver's findSingleExpression or to add a similar function that has a similar role but makes sure the result time satisfies a given trait or matches a certain pattern.

Language constructs do not always interact with fixed types. But those are the main constraints we can pass into the resolver. So instead language constructs are converted into functions that are more expressive and then resolved. Sometimes that is enough, other times we have to then convert the resolved functions into something else.

Some examples include throw (there is a unbound type that must match a trait) and intptr (an unknown type that must be some variety of pointer). These and other examples all work, but they can include as much as a library or prelude function, a pre-resolver pass to convert the node to that and a post-resolver pass to convert or erase the function.

Change History (1)

comment:1 Changed 3 months ago by ajbeach

Description: modified (diff)
Summary: Resolve For Assertions/TraitsPass More Information to Resolver

Updated to be (hopefully) a bit clearer and mention another example intptr that is logically simpler but actually has more parts to solve it.

Note: See TracTickets for help on using tickets.