Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- coreToDef :: Reftable r => LocSymbol -> Var -> CoreExpr -> LogicM [Def (Located (RRType r)) DataCon]
- coreToFun :: LocSymbol -> Var -> CoreExpr -> LogicM ([Var], Either Expr Expr)
- coreToLogic :: CoreExpr -> LogicM Expr
- mkLit :: Literal -> Maybe Expr
- mkI :: Integer -> Maybe Expr
- mkS :: ByteString -> Maybe Expr
- runToLogic :: TCEmb TyCon -> LogicMap -> DataConMap -> (String -> Error) -> LogicM t -> Either Error t
- runToLogicWithBoolBinds :: [Var] -> TCEmb TyCon -> LogicMap -> DataConMap -> (String -> Error) -> LogicM t -> Either Error t
- logicType :: Reftable r => Type -> RRType r
- inlineSpecType :: Var -> SpecType
- measureSpecType :: Var -> SpecType
- weakenResult :: Var -> SpecType -> SpecType
- normalize :: Simplify a => a -> a
Documentation
coreToDef :: Reftable r => LocSymbol -> Var -> CoreExpr -> LogicM [Def (Located (RRType r)) DataCon] #
coreToLogic :: CoreExpr -> LogicM Expr #
mkS :: ByteString -> Maybe Expr #
runToLogic :: TCEmb TyCon -> LogicMap -> DataConMap -> (String -> Error) -> LogicM t -> Either Error t #
runToLogicWithBoolBinds :: [Var] -> TCEmb TyCon -> LogicMap -> DataConMap -> (String -> Error) -> LogicM t -> Either Error t #
inlineSpecType :: Var -> SpecType #
measureSpecType :: Var -> SpecType #
Refine types of measures: keep going until you find the last data con! this code is a hack! we refine the last data constructor, it got complicated to support both 1. multi parameter measures (see testsposHasElem.hs) 2. measures returning functions (fromReader :: Reader r a -> (r -> a) ) TODO: SIMPLIFY by dropping support for multi parameter measures
weakenResult :: Var -> SpecType -> SpecType #
'weakenResult foo t' drops the singleton constraint `v = foo x y`
that is added, e.g. for measures in /strengthenResult'.
This should only be used _when_ checking the body of foo
where the output, is, by definition, equal to the singleton.