liquidhaskell-boot
Safe HaskellNone
LanguageHaskell98

Language.Haskell.Liquid.Constraint.Monad

Description

This module contains various functions that add/update in the CG monad.

Synopsis

Documentation

addC :: SubC -> String -> CG () Source #

addC adds a subtyping constraint into the global pool.

addPost :: CGEnv -> SpecType -> CG SpecType Source #

addPost: RJ: what DOES this function do?

addW :: WfC -> CG () Source #

Add Well formedness Constraint

addWarning :: Error -> CG () Source #

Add a warning

addIdA :: Var -> Annot SpecType -> CG () Source #

Add Identifier Annotations, used for annotation binders (i.e. at binder sites)

addLocA :: Maybe Var -> SrcSpan -> Annot SpecType -> CG () Source #

Used for annotating reads (i.e. at Var x sites)

updateLocA :: Maybe SrcSpan -> SpecType -> CG () Source #

Update annotations for a location, due to (ghost) predicate applications

addA :: Outputable a => SrcSpan -> Maybe a -> b -> AnnInfo b -> AnnInfo b Source #

addHole :: SrcSpan -> Var -> SpecType -> CGEnv -> CG () Source #

Record a term hole together with the type we assigned to it and the local environment needed to render a useful warning later.

addHoleANF :: (Var, SrcSpan) -> Var -> CoreExpr -> SpecType -> CG () Source #

Remember an ANF expression that mentions a hole-linked binder so the final warning can report the surrounding expressions that constrain the hole.

linkANFToHole :: Var -> (Var, SrcSpan) -> CG () Source #

Associate an ANF binder with the concrete hole occurrence it was created from so later traversals can recover the original hole.

isANFInHole :: Var -> CG (Maybe (Var, SrcSpan)) Source #

Resolve an ANF binder back to the hole occurrence that introduced it, if the binder was previously linked by linkANFToHole.

envToSub :: [(a, b)] -> ([(a, b)], b, b) Source #