Skip to content

Extend `StackTypePattern` polymorphism to match on parts of types

Clarification and motivation

Currently the a in stacktype '[a, a] can only match on top level types. We want to extend this so that

'[pair a b, a]

will also resolve for a. This will be especially useful for extending the usefulness of LetMacro type signatures.

Relevant documentation: https://gitlab.com/morley-framework/morley/blob/master/docs/morleyInstructions.md#stacktype

Acceptance criteria

  • Modify parser and typechecker to implement the above.