liquidhaskell-0.8.10.1: Liquid Types for Haskell
Safe HaskellNone
LanguageHaskell98

Language.Haskell.Liquid.Synthesize.Monad

Synopsis

Documentation

type SSEnv = HashMap Symbol (SpecType, Var) #

Synthesis Monad ----------------------------------------------------------

type SSDecrTerm = [(Var, [Var])] #

type T = HashMap Type (CoreExpr, Int) #

data SState #

Constructors

SState 

Fields

locally :: SM a -> SM a #

evalSM :: SM a -> Context -> SSEnv -> SState -> IO a #

initState :: Context -> Config -> CGInfo -> CGEnv -> REnv -> Var -> [Var] -> SSEnv -> IO SState #

addsEnv :: [(Var, SpecType)] -> SM () #

addsEmem :: [(Var, SpecType)] -> SM () #

addEnv :: Var -> SpecType -> SM () #

addEmem :: Var -> SpecType -> SM () #

addDecrTerm :: Var -> [Var] -> SM () #

lookupAll :: Var -> [Var] -> SSDecrTerm -> SM () #

thisReplace :: Int -> a -> [a] -> [a] #

structuralCheck :: [CoreExpr] -> SM [CoreExpr] #

Entry point.

liftCG0 :: (CGEnv -> CG CGEnv) -> SM () #

liftCG :: CG a -> SM a #

withIncrDepth :: Monoid a => SM a -> SM a #

safeIxScruts :: Int -> [a] -> Maybe Int #

symbolExpr :: Type -> Symbol -> SM CoreExpr #

initExprMem :: SSEnv -> ExprMemory #

Initializes ExprMemory structure. 1. Transforms refinement types to conventional (Haskell) types. 2. All Depths are initialized to 0.

applyTy :: [Type] -> CoreExpr -> Maybe CoreExpr #

Used for instantiation: Applies types to an expression. > The result does not have forall. Nothing as a result suggests that there are more types than foralls in the expression.

fixEMem :: SpecType -> SM () #

Instantiation based on current goal-type.

instantiateTL :: SM (Type, CoreExpr) #

Instantiate the top-level variable.

apply :: [Var] -> CoreExpr -> Maybe CoreExpr #

Applies type variables (1st argument) to an expression. The expression is guaranteed to have the same level of parametricity (same number of forall) as the length of the 1st argument. > The result has zero forall.