Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- expandLambdas :: Ord m => Term m -> GraphFlow m (Term m)
- foldOverTerm :: TraversalOrder -> (a -> Term m -> a) -> a -> Term m -> a
- foldOverType :: TraversalOrder -> (a -> Type m -> a) -> a -> Type m -> a
- freeVariablesInScheme :: Show m => TypeScheme m -> Set VariableType
- freeVariablesInTerm :: Term m -> Set Variable
- freeVariablesInType :: Type m -> Set VariableType
- moduleDependencyNamespaces :: Bool -> Bool -> Bool -> Module m -> Set Namespace
- isFreeIn :: Variable -> Term m -> Bool
- removeTermAnnotations :: Ord m => Term m -> Term m
- removeTypeAnnotations :: Ord m => Type m -> Type m
- replaceFreeVariableType :: Ord m => VariableType -> Type m -> Type m -> Type m
- rewrite :: ((a -> b) -> a -> b) -> ((a -> b) -> a -> b) -> a -> b
- rewriteTerm :: Ord b => ((Term a -> Term b) -> Term a -> Term b) -> (a -> b) -> Term a -> Term b
- rewriteTermM :: Ord b => ((Term a -> Flow s (Term b)) -> Term a -> Flow s (Term b)) -> (a -> Flow s b) -> Term a -> Flow s (Term b)
- rewriteTermMeta :: Ord b => (a -> b) -> Term a -> Term b
- rewriteType :: ((Type a -> Type b) -> Type a -> Type b) -> (a -> b) -> Type a -> Type b
- rewriteTypeMeta :: (a -> b) -> Type a -> Type b
- simplifyTerm :: Ord m => Term m -> Term m
- substituteVariable :: Ord m => Variable -> Variable -> Term m -> Term m
- subterms :: Term m -> [Term m]
- subtypes :: Type m -> [Type m]
- termDependencyNames :: Bool -> Bool -> Bool -> Term m -> Set Name
- topologicalSortElements :: [Element m] -> Maybe [Name]
Documentation
expandLambdas :: Ord m => Term m -> GraphFlow m (Term m) Source #
Turn arbitrary terms like 'compareTo 42' into terms like 'x.compareTo 42 x', whose arity (in the absences of application terms) is equal to the depth of nested lambdas. This function leaves application terms intact, simply rewriting their left and right subterms.
foldOverTerm :: TraversalOrder -> (a -> Term m -> a) -> a -> Term m -> a Source #
foldOverType :: TraversalOrder -> (a -> Type m -> a) -> a -> Type m -> a Source #
freeVariablesInScheme :: Show m => TypeScheme m -> Set VariableType Source #
freeVariablesInType :: Type m -> Set VariableType Source #
removeTermAnnotations :: Ord m => Term m -> Term m Source #
Recursively remove term annotations, including within subterms
removeTypeAnnotations :: Ord m => Type m -> Type m Source #
Recursively remove type annotations, including within subtypes
replaceFreeVariableType :: Ord m => VariableType -> Type m -> Type m -> Type m Source #
rewriteTerm :: Ord b => ((Term a -> Term b) -> Term a -> Term b) -> (a -> b) -> Term a -> Term b Source #
rewriteTermM :: Ord b => ((Term a -> Flow s (Term b)) -> Term a -> Flow s (Term b)) -> (a -> Flow s b) -> Term a -> Flow s (Term b) Source #
rewriteTypeMeta :: (a -> b) -> Type a -> Type b Source #