Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.1.0 #17

Merged
merged 1 commit into from
Aug 17, 2024
Merged

Release v0.1.0 #17

merged 1 commit into from
Aug 17, 2024

Conversation

fizruk
Copy link
Owner

@fizruk fizruk commented Aug 17, 2024

  • Generalize functions for binders, support general patterns (see #16)

    • Add withPattern method to CoSinkable. It can be seen as a CPS-style traversal over binders in a pattern.
      Our Template Haskell support covers generation of withPattern,
      so normally the user does not have to think about it.

    • Generalize many functions to work with arbitrary patterns, not just NameBinder:

      • withFreshPattern — to
      • withRefreshedPattern and withRefreshedPattern'
      • extendScopePattern — extend a given scope with all binders in a given pattern
      • namesOfPattern — collect all names from a pattern
      • unsinkNamePattern — try to unsink names from a scope extended with binders from a given pattern
      • assertDistinctPattern — establish that extended scope is distinct (if outer scope is)
      • assertDistinctExt — establish that extended scope is distinct and indeed an extension
    • Implement unification for patterns in unifyPatterns.
      This turns out to be one of the most difficult places, especially for compound patterns.
      Implementing patterns properly on the user side not comfortable at all!
      Luckily, we provide useful helpers like andThenUnifyPatterns and andThenUnifyNameBinders,
      as well as Template Haskell support to derive UnifiablePattern.

    • Generalize Free Foil to support arbitrary patterns.

    • The Foil and FreeFoilTH implementations now make use of the generalized pattern support.

@fizruk fizruk merged commit 5f4e513 into main Aug 17, 2024
3 checks passed
@fizruk fizruk deleted the release-v0.1.0 branch August 17, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant