Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- substTyVarA :: Applicative f => (tyname -> f ( Maybe ( Type tyname uni ann))) -> Type tyname uni ann -> f ( Type tyname uni ann)
- substVarA :: Applicative f => (name -> f ( Maybe ( Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> f ( Term tyname name uni fun ann)
- substTyVar :: (tyname -> Maybe ( Type tyname uni ann)) -> Type tyname uni ann -> Type tyname uni ann
- substVar :: (name -> Maybe ( Term tyname name uni fun ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann
- termSubstNamesM :: Monad m => (name -> m ( Maybe ( Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> m ( Term tyname name uni fun ann)
- termSubstTyNamesM :: Monad m => (tyname -> m ( Maybe ( Type tyname uni ann))) -> Term tyname name uni fun ann -> m ( Term tyname name uni fun ann)
- typeSubstTyNamesM :: Monad m => (tyname -> m ( Maybe ( Type tyname uni ann))) -> Type tyname uni ann -> m ( Type tyname uni ann)
- termSubstNames :: (name -> Maybe ( Term tyname name uni fun ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann
- termSubstTyNames :: (tyname -> Maybe ( Type tyname uni ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann
- typeSubstTyNames :: (tyname -> Maybe ( Type tyname uni ann)) -> Type tyname uni ann -> Type tyname uni ann
- termSubstFreeNamesA :: ( Applicative f, HasUnique name TermUnique ) => (name -> f ( Maybe ( Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> f ( Term tyname name uni fun ann)
- termSubstFreeNames :: HasUnique name TermUnique => (name -> Maybe ( Term tyname name uni fun ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann
- fvTerm :: Ord name => Term tyname name uni fun ann -> Set name
- ftvTerm :: Ord tyname => Term tyname name uni fun ann -> Set tyname
- ftvTy :: Ord tyname => Type tyname uni ann -> Set tyname
- vTerm :: Ord name => Term tyname name uni fun ann -> Set name
- tvTerm :: Ord tyname => Term tyname name uni fun ann -> Set tyname
- tvTy :: Ord tyname => Type tyname uni ann -> Set tyname
- uniquesType :: HasUniques ( Type tyname uni ann) => Type tyname uni ann -> Set Unique
- uniquesTerm :: HasUniques ( Term tyname name uni fun ann) => Term tyname name uni fun ann -> Set Unique
Documentation
substTyVarA :: Applicative f => (tyname -> f ( Maybe ( Type tyname uni ann))) -> Type tyname uni ann -> f ( Type tyname uni ann) Source #
Applicatively replace a type variable using the given function.
substVarA :: Applicative f => (name -> f ( Maybe ( Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> f ( Term tyname name uni fun ann) Source #
Applicatively replace a variable using the given function.
substTyVar :: (tyname -> Maybe ( Type tyname uni ann)) -> Type tyname uni ann -> Type tyname uni ann Source #
Replace a type variable using the given function.
substVar :: (name -> Maybe ( Term tyname name uni fun ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #
Replace a variable using the given function.
termSubstNamesM :: Monad m => (name -> m ( Maybe ( Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> m ( Term tyname name uni fun ann) Source #
Naively monadically substitute names using the given function (i.e. do not substitute binders).
termSubstTyNamesM :: Monad m => (tyname -> m ( Maybe ( Type tyname uni ann))) -> Term tyname name uni fun ann -> m ( Term tyname name uni fun ann) Source #
Naively monadically substitute type names using the given function (i.e. do not substitute binders).
typeSubstTyNamesM :: Monad m => (tyname -> m ( Maybe ( Type tyname uni ann))) -> Type tyname uni ann -> m ( Type tyname uni ann) Source #
Naively monadically substitute type names (i.e. do not substitute binders). INLINE is important here because the function is too polymorphic (determined from profiling)
termSubstNames :: (name -> Maybe ( Term tyname name uni fun ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #
Naively substitute names using the given function (i.e. do not substitute binders).
termSubstTyNames :: (tyname -> Maybe ( Type tyname uni ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #
Naively substitute type names using the given function (i.e. do not substitute binders).
typeSubstTyNames :: (tyname -> Maybe ( Type tyname uni ann)) -> Type tyname uni ann -> Type tyname uni ann Source #
Naively substitute type names (i.e. do not substitute binders).
termSubstFreeNamesA :: ( Applicative f, HasUnique name TermUnique ) => (name -> f ( Maybe ( Term tyname name uni fun ann))) -> Term tyname name uni fun ann -> f ( Term tyname name uni fun ann) Source #
Applicatively substitute *free* names using the given function.
termSubstFreeNames :: HasUnique name TermUnique => (name -> Maybe ( Term tyname name uni fun ann)) -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #
Substitute *free* names using the given function.
fvTerm :: Ord name => Term tyname name uni fun ann -> Set name Source #
Get all the free term variables in a term.
ftvTerm :: Ord tyname => Term tyname name uni fun ann -> Set tyname Source #
Get all the free type variables in a term.
ftvTy :: Ord tyname => Type tyname uni ann -> Set tyname Source #
Get all the free type variables in a type.
vTerm :: Ord name => Term tyname name uni fun ann -> Set name Source #
Get all the term variables in a term.
tvTerm :: Ord tyname => Term tyname name uni fun ann -> Set tyname Source #
Get all the type variables in a term.
tvTy :: Ord tyname => Type tyname uni ann -> Set tyname Source #
Get all the type variables in a type.
uniquesType :: HasUniques ( Type tyname uni ann) => Type tyname uni ann -> Set Unique Source #
Get all the uniques in a type.
uniquesTerm :: HasUniques ( Term tyname name uni fun ann) => Term tyname name uni fun ann -> Set Unique Source #
Get all the uniques in a term (including the type-level ones).