elara
Safe HaskellNone
LanguageGHC2024

Elara.Core.Analysis

Synopsis

Documentation

overForAll :: Type -> (Type -> Type) -> Type Source #

Applies a function over the monotype of a potential forall expression For example, given a type `forall a. a -> a`, overForAll would apply the function to `a -> a` Or for forall a b c. a -> b -> c, it would apply the function to a -> b -> c

class FreeCoreVars (ast :: Type -> Type) where Source #

Methods

freeCoreVars :: Ord b => ast b -> Set b Source #

Instances

Instances details
FreeCoreVars Expr Source # 
Instance details

Defined in Elara.Core.Analysis

Methods

freeCoreVars :: Ord b => Expr b -> Set b Source #

FreeCoreVars AExpr Source # 
Instance details

Defined in Elara.Core.Analysis

Methods

freeCoreVars :: Ord b => AExpr b -> Set b Source #

FreeCoreVars CExpr Source # 
Instance details

Defined in Elara.Core.Analysis

Methods

freeCoreVars :: Ord b => CExpr b -> Set b Source #

FreeCoreVars Expr Source # 
Instance details

Defined in Elara.Core.Analysis

Methods

freeCoreVars :: Ord b => Expr b -> Set b Source #

freeCoreVarsBind :: forall (ast :: Type -> Type) a. (FreeCoreVars ast, Ord a) => Bind a ast -> Set a Source #

splitForAlls :: Type -> ([TypeVariable], Type) Source #

Splits a forall type into its bound type variables and the body type. i.e. forall a b. T becomes ([a, b], T)

substType :: Map TypeVariable Type -> Type -> Type Source #

Apply a simple type substitution to a type