liquidhaskell-boot-0.9.10.1.2: Liquid Types for Haskell
Safe HaskellNone
LanguageHaskell98

Language.Haskell.Liquid.Bare.Expand

Description

This module has the code for applying refinement (and) type aliases and the pipeline for "cooking" a BareType into a SpecType. TODO: _only_ export makeRTEnv, cookSpecType and maybe qualifyExpand...

Synopsis

Create alias expansion environment

makeRTEnv :: Env -> ModName -> BareSpec -> [(ModName, BareSpec)] -> LogicMap -> BareRTEnv Source #

makeRTEnv initializes the env needed to expand refinements and types, that is, the below needs to be called *before* we use expand

Expand

class Expand a where Source #

Using the BareRTEnv to do alias-expansion

Methods

expand :: BareRTEnv -> SourcePos -> a -> a Source #

Instances

Instances details
Expand Expr Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand Reft Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand DataCtor Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand DataDecl Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand BareType Source #

expand on a BareType actually applies the type- and expression- aliases.

Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand RReft Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand SpecType Source #

expand on a SpecType simply expands the refinements, i.e. *does not* apply the type aliases, but just the 1. predicate aliases, 2. inlines, 3. stuff from LogicMap

Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand BareDef Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand BareMeasure Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand BareSpec Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand BareRTAlias Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand Body Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand () Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Methods

expand :: BareRTEnv -> SourcePos -> () -> () Source #

Expand a => Expand (Located a) Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand (BRType ()) Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Methods

expand :: BareRTEnv -> SourcePos -> BRType () -> BRType () Source #

Expand a => Expand (Maybe a) Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Methods

expand :: BareRTEnv -> SourcePos -> Maybe a -> Maybe a Source #

Expand a => Expand [a] Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Methods

expand :: BareRTEnv -> SourcePos -> [a] -> [a] Source #

Expand (RTAlias Symbol Expr) Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Expand a => Expand (HashMap k a) Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Methods

expand :: BareRTEnv -> SourcePos -> HashMap k a -> HashMap k a Source #

Expand a => Expand (LocSymbol, a) Source # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Expand

Methods

expand :: BareRTEnv -> SourcePos -> (LocSymbol, a) -> (LocSymbol, a) Source #

Converting BareType to SpecType

cookSpecType :: Env -> SigEnv -> ModName -> PlugTV Var -> LocBareType -> LocSpecType Source #

cookSpecType is the central place where a BareType gets processed, in multiple steps, into a SpecType. See [NOTE:Cooking-SpecType] for details of each of the individual steps.

Re-exported for data-constructors