skeletest
Safe HaskellNone
LanguageGHC2021

Skeletest.Internal.GHC

Description

Provide a pure API for GHC internals.

All GHC operations should go through this API, to isolate the rest of the logic from GHC internals logic, which can include breaking changes between versions.

Synopsis

Documentation

data PluginDef Source #

Our pure definition of PluginDef, agnostic of GHC version.

Constructors

PluginDef 

Fields

data Ctx Source #

Constructors

Ctx 

ParsedModule

data FunDef Source #

Constructors

FunDef 

Expressions

data HsExpr p Source #

A Haskell expression that is either: 1. A parsed expression from the compiler * ghcExpr is Just * hsExpr is not HsExprOther if the expression is something we care about parsing, otherwise HsExprOther 3. A new expression we're creating * ghcExpr is Nothing * hsExpr is not HsExprOther

Invariants: * If ghcExpr is Just, hsExpr must not have been modified * if ghcExpr is Nothing, hsExpr is not HsExprOther

Instances

Instances details
Show (HsExpr p) Source # 
Instance details

Defined in Skeletest.Internal.GHC

Methods

showsPrec :: Int -> HsExpr p -> ShowS #

show :: HsExpr p -> String #

showList :: [HsExpr p] -> ShowS #

data HsExprData p Source #

Instances

Instances details
Show (HsExprData p) Source # 
Instance details

Defined in Skeletest.Internal.GHC

hsExprLam :: [HsPat p] -> HsExpr p -> HsExpr p Source #

hsExprCase :: HsExpr p -> [(HsPat p, HsExpr p)] -> HsExpr p Source #

Types

data HsType p Source #

Constructors

HsTypeCon (HsName p) 
HsTypeApps (HsType p) [HsType p] 
HsTypeTuple [HsType p] 

Patterns

data HsPat p Source #

Constructors

HsPatCon (HsName p) [HsPat p] 
HsPatVar (HsName p) 
HsPatRecord (HsName p) [(HsName p, HsPat p)] 
HsPatWild 

Instances

Instances details
Show (HsPat p) Source # 
Instance details

Defined in Skeletest.Internal.GHC

Methods

showsPrec :: Int -> HsPat p -> ShowS #

show :: HsPat p -> String #

showList :: [HsPat p] -> ShowS #

Names

data HsName p Source #

Instances

Instances details
Show (HsName p) Source # 
Instance details

Defined in Skeletest.Internal.GHC

Methods

showsPrec :: Int -> HsName p -> ShowS #

show :: HsName p -> String #

showList :: [HsName p] -> ShowS #

Eq (HsName p) Source # 
Instance details

Defined in Skeletest.Internal.GHC

Methods

(==) :: HsName p -> HsName p -> Bool #

(/=) :: HsName p -> HsName p -> Bool #