Copyright | (c) 2014 Aleksey Kliger |
---|---|
License | BSD3 (See LICENSE) |
Maintainer | Aleksey Kliger |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Names stand for values. They may be bound or free.
Names over terms
An abstract datatype of names Name a
that stand for terms of
type a
. The type a
is used as a tag to distinguish these names
from names that may stand for other sorts of terms.
Two names in a term are considered
aeq
equal when they
are the same name (in the sense of (==)
). In patterns, however,
any two names are equal if they occur in the same place within the
pattern. This induces alpha equivalence on terms in general.
Names may either be free or bound (see isFreeName
). Free names
may be extracted from patterns using
isPat
. Bound names
cannot be.
Instances
Name construction
Name inspection
Heterogeneous names
An AnyName
is a name that stands for a term of some (existentially hidden) type.
Instances
Show AnyName Source # | |
Eq AnyName Source # | |
Ord AnyName Source # | |
Defined in Unbound.Generics.LocallyNameless.Name | |
Alpha AnyName Source # | |
Defined in Unbound.Generics.LocallyNameless.Alpha aeq' :: AlphaCtx -> AnyName -> AnyName -> Bool Source # fvAny' :: (Contravariant f, Applicative f) => AlphaCtx -> (AnyName -> f AnyName) -> AnyName -> f AnyName Source # close :: AlphaCtx -> NamePatFind -> AnyName -> AnyName Source # open :: AlphaCtx -> NthPatFind -> AnyName -> AnyName Source # isPat :: AnyName -> DisjointSet AnyName Source # isTerm :: AnyName -> All Source # isEmbed :: AnyName -> Bool Source # nthPatFind :: AnyName -> NthPatFind Source # namePatFind :: AnyName -> NamePatFind Source # swaps' :: AlphaCtx -> Perm AnyName -> AnyName -> AnyName Source # lfreshen' :: LFresh m => AlphaCtx -> AnyName -> (AnyName -> Perm AnyName -> m b) -> m b Source # freshen' :: Fresh m => AlphaCtx -> AnyName -> m (AnyName, Perm AnyName) Source # acompare' :: AlphaCtx -> AnyName -> AnyName -> Ordering Source # | |
Subst b AnyName Source # | |
Defined in Unbound.Generics.LocallyNameless.Subst |