Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- getRewrite :: OCAlgebra oc Expr IO -> RewriteArgs -> oc -> SubExpr -> AutoRewrite -> MaybeT IO ((Expr, Expr), Expr, oc)
- subExprs :: Expr -> [SubExpr]
- unify :: [Symbol] -> Expr -> Expr -> Maybe Subst
- ordConstraints :: RESTOrdering -> (Handle, Handle) -> OCAlgebra OCType RuntimeTerm IO
- convert :: Expr -> RuntimeTerm
- passesTerminationCheck :: OCAlgebra oc a IO -> RewriteArgs -> oc -> IO Bool
- data RewriteArgs = RWArgs {}
- data RWTerminationOpts
- type SubExpr = (Expr, Expr -> Expr)
- data TermOrigin
- data OCType
- data RESTOrdering
Documentation
getRewrite :: OCAlgebra oc Expr IO -> RewriteArgs -> oc -> SubExpr -> AutoRewrite -> MaybeT IO ((Expr, Expr), Expr, oc) Source #
Yields the result of rewriting an expression with an autorewrite equation.
Yields nothing if:
- The result of the rewrite is identical to the original expression
- Any of the arguments of the autorewrite has a refinement type which is not satisfied in the current context.
unify :: [Symbol] -> Expr -> Expr -> Maybe Subst Source #
unify vs template e = Just su
yields a substitution su
such that subst su template == e
Moreover, su
is constraint to only substitute variables in vs
.
Yields Nothing
if no substitution exists.
ordConstraints :: RESTOrdering -> (Handle, Handle) -> OCAlgebra OCType RuntimeTerm IO Source #
passesTerminationCheck :: OCAlgebra oc a IO -> RewriteArgs -> oc -> IO Bool Source #
data RewriteArgs Source #
RWArgs | |
|
data TermOrigin Source #
Instances
Show TermOrigin Source # | |
Defined in Language.Fixpoint.Solver.Rewrite showsPrec :: Int -> TermOrigin -> ShowS # show :: TermOrigin -> String # showList :: [TermOrigin] -> ShowS # | |
Eq TermOrigin Source # | |
Defined in Language.Fixpoint.Solver.Rewrite (==) :: TermOrigin -> TermOrigin -> Bool # (/=) :: TermOrigin -> TermOrigin -> Bool # | |
PPrint TermOrigin Source # | |
Defined in Language.Fixpoint.Solver.Rewrite pprintTidy :: Tidy -> TermOrigin -> Doc Source # pprintPrec :: Int -> Tidy -> TermOrigin -> Doc Source # |
Instances
Generic OCType Source # | |
Show OCType Source # | |
Eq OCType Source # | |
Hashable OCType Source # | |
Defined in Language.Fixpoint.Solver.Rewrite | |
type Rep OCType Source # | |
Defined in Language.Fixpoint.Solver.Rewrite type Rep OCType = D1 ('MetaData "OCType" "Language.Fixpoint.Solver.Rewrite" "liquid-fixpoint-0.9.2.5-8VOJ4a5jXPy7nyhLFTxkOW" 'False) ((C1 ('MetaCons "RPO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConstraintsADT Op))) :+: C1 ('MetaCons "LPO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConstraintsADT Op)))) :+: (C1 ('MetaCons "KBO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SMTExpr Bool))) :+: C1 ('MetaCons "Fuel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) |
data RESTOrdering Source #