Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data SimplifyOpts a = SimplifyOpts {
- touch_lets :: Bool
- remove_variable_scrutinee_in_branches :: Bool
- should_inline :: Occurrences -> Maybe (Scope a) -> Expr a -> Bool
- inline_match :: Bool
- newtype Occurrences = Occurrences Int
- gentlyNoInline :: SimplifyOpts a
- gently :: SimplifyOpts a
- aggressively :: Name a => SimplifyOpts a
- simplifyTheory :: Name a => SimplifyOpts a -> Theory a -> Fresh (Theory a)
- simplifyExpr :: forall f a. (TransformBiM (WriterT Any Fresh) (Expr a) (f a), Name a) => SimplifyOpts a -> f a -> Fresh (f a)
- simplifyExprIn :: forall f a. (TransformBiM (WriterT Any Fresh) (Expr a) (f a), Name a) => Maybe (Theory a) -> SimplifyOpts a -> f a -> Fresh (f a)
- isConstructor :: Name a => Maybe (Scope a) -> Head a -> Bool
- missingCase :: Name a => Maybe (Scope a) -> a -> [Case a] -> Maybe (Datatype a, Constructor a)
- tryMatch :: Name a => Maybe (Scope a) -> Expr a -> [Case a] -> Maybe (Expr a)
Documentation
data SimplifyOpts a Source
Options for the simplifier
SimplifyOpts | |
|
newtype Occurrences Source
gentlyNoInline :: SimplifyOpts a Source
Gentle, but without inlining
gently :: SimplifyOpts a Source
Gentle options: if there is risk for code duplication, only inline atomic expressions
aggressively :: Name a => SimplifyOpts a Source
Aggressive options: inline everything that might plausibly lead to simplification
simplifyTheory :: Name a => SimplifyOpts a -> Theory a -> Fresh (Theory a) Source
Simplify an entire theory
simplifyExpr :: forall f a. (TransformBiM (WriterT Any Fresh) (Expr a) (f a), Name a) => SimplifyOpts a -> f a -> Fresh (f a) Source
Simplify an expression, without knowing its theory
simplifyExprIn :: forall f a. (TransformBiM (WriterT Any Fresh) (Expr a) (f a), Name a) => Maybe (Theory a) -> SimplifyOpts a -> f a -> Fresh (f a) Source
Simplify an expression within a theory
missingCase :: Name a => Maybe (Scope a) -> a -> [Case a] -> Maybe (Datatype a, Constructor a) Source