v0.1.0
-
Generalize functions for binders, support general patterns (see #16)
-
Add
withPattern
method toCoSinkable
. It can be seen as a CPS-style traversal over binders in a pattern.
Our Template Haskell support covers generation ofwithPattern
,
so normally the user does not have to think about it. -
Generalize many functions to work with arbitrary patterns, not just
NameBinder
:withFreshPattern
— towithRefreshedPattern
andwithRefreshedPattern'
extendScopePattern
— extend a given scope with all binders in a given patternnamesOfPattern
— collect all names from a patternunsinkNamePattern
— try to unsink names from a scope extended with binders from a given patternassertDistinctPattern
— 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 likeandThenUnifyPatterns
andandThenUnifyNameBinders
,
as well as Template Haskell support to deriveUnifiablePattern
. -
Generalize Free Foil to support arbitrary patterns.
-
The
Foil
andFreeFoilTH
implementations now make use of the generalized pattern support.
-