Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data GhcPass (c :: Pass)
- data Pass
- = Parsed
- | Renamed
- | Typechecked
- type GhcPs = GhcPass Parsed
- type GhcRn = GhcPass Renamed
- type GhcTc = GhcPass Typechecked
- type GhcTcId = GhcTc
- type family PostTc x ty
- type family PostRn x ty
- type family IdP p
- type family XHsChar x
- type family XHsCharPrim x
- type family XHsString x
- type family XHsStringPrim x
- type family XHsInt x
- type family XHsIntPrim x
- type family XHsWordPrim x
- type family XHsInt64Prim x
- type family XHsWord64Prim x
- type family XHsInteger x
- type family XHsRat x
- type family XHsFloatPrim x
- type family XHsDoublePrim x
- type ForallX (c :: * -> Constraint) (x :: *) = (c (XHsChar x), c (XHsCharPrim x), c (XHsString x), c (XHsStringPrim x), c (XHsInt x), c (XHsIntPrim x), c (XHsWordPrim x), c (XHsInt64Prim x), c (XHsWord64Prim x), c (XHsInteger x), c (XHsRat x), c (XHsFloatPrim x), c (XHsDoublePrim x))
- class HasSourceText a where
- type SourceTextX x = (HasSourceText (XHsChar x), HasSourceText (XHsCharPrim x), HasSourceText (XHsString x), HasSourceText (XHsStringPrim x), HasSourceText (XHsIntPrim x), HasSourceText (XHsWordPrim x), HasSourceText (XHsInt64Prim x), HasSourceText (XHsWord64Prim x), HasSourceText (XHsInteger x))
- class HasDefault a where
- type HasDefaultX x = ForallX HasDefault x
- class Convertable a b | a -> b where
- type ConvertIdX a b = (XHsDoublePrim a ~ XHsDoublePrim b, XHsFloatPrim a ~ XHsFloatPrim b, XHsRat a ~ XHsRat b, XHsInteger a ~ XHsInteger b, XHsWord64Prim a ~ XHsWord64Prim b, XHsInt64Prim a ~ XHsInt64Prim b, XHsWordPrim a ~ XHsWordPrim b, XHsIntPrim a ~ XHsIntPrim b, XHsInt a ~ XHsInt b, XHsStringPrim a ~ XHsStringPrim b, XHsString a ~ XHsString b, XHsCharPrim a ~ XHsCharPrim b, XHsChar a ~ XHsChar b)
- type DataId p = (Data p, ForallX Data p, Data (NameOrRdrName (IdP p)), Data (IdP p), Data (PostRn p (IdP p)), Data (PostRn p (Located Name)), Data (PostRn p Bool), Data (PostRn p Fixity), Data (PostRn p NameSet), Data (PostRn p [Name]), Data (PostTc p (IdP p)), Data (PostTc p Coercion), Data (PostTc p ConLike), Data (PostTc p HsWrapper), Data (PostTc p Type), Data (PostTc p [ConLike]), Data (PostTc p [Type]))
- type OutputableBndrId id = (OutputableBndr (NameOrRdrName (IdP id)), OutputableBndr (IdP id))
Documentation
data GhcPass (c :: Pass) Source #
Used as a data type index for the hsSyn AST
Instances
Instances
Data Pass Source # | |
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pass -> c Pass Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pass Source # toConstr :: Pass -> Constr Source # dataTypeOf :: Pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pass) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pass) Source # gmapT :: (forall b. Data b => b -> b) -> Pass -> Pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pass -> m Pass Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass Source # |
type GhcTc = GhcPass Typechecked Source #
Maps the "normal" id type for a given pass
type family XHsCharPrim x Source #
Instances
type XHsCharPrim GhcTc Source # | |
type XHsCharPrim GhcRn Source # | |
type XHsCharPrim GhcPs Source # | |
type family XHsStringPrim x Source #
Instances
type XHsStringPrim GhcTc Source # | |
type XHsStringPrim GhcRn Source # | |
type XHsStringPrim GhcPs Source # | |
type family XHsIntPrim x Source #
Instances
type XHsIntPrim GhcTc Source # | |
type XHsIntPrim GhcRn Source # | |
type XHsIntPrim GhcPs Source # | |
type family XHsWordPrim x Source #
Instances
type XHsWordPrim GhcTc Source # | |
type XHsWordPrim GhcRn Source # | |
type XHsWordPrim GhcPs Source # | |
type family XHsInt64Prim x Source #
Instances
type XHsInt64Prim GhcTc Source # | |
type XHsInt64Prim GhcRn Source # | |
type XHsInt64Prim GhcPs Source # | |
type family XHsWord64Prim x Source #
Instances
type XHsWord64Prim GhcTc Source # | |
type XHsWord64Prim GhcRn Source # | |
type XHsWord64Prim GhcPs Source # | |
type family XHsInteger x Source #
Instances
type XHsInteger GhcTc Source # | |
type XHsInteger GhcRn Source # | |
type XHsInteger GhcPs Source # | |
type family XHsFloatPrim x Source #
Instances
type XHsFloatPrim GhcTc Source # | |
type XHsFloatPrim GhcRn Source # | |
type XHsFloatPrim GhcPs Source # | |
type family XHsDoublePrim x Source #
Instances
type XHsDoublePrim GhcTc Source # | |
type XHsDoublePrim GhcRn Source # | |
type XHsDoublePrim GhcPs Source # | |
type ForallX (c :: * -> Constraint) (x :: *) = (c (XHsChar x), c (XHsCharPrim x), c (XHsString x), c (XHsStringPrim x), c (XHsInt x), c (XHsIntPrim x), c (XHsWordPrim x), c (XHsInt64Prim x), c (XHsWord64Prim x), c (XHsInteger x), c (XHsRat x), c (XHsFloatPrim x), c (XHsDoublePrim x)) Source #
Helper to apply a constraint to all extension points. It has one entry per extension point type family.
class HasSourceText a where Source #
The SourceText
fields have been moved into the extension fields, thus
placing a requirement in the extension field to contain a SourceText
so
that the pretty printing and round tripping of source can continue to
operate.
The HasSourceText
class captures this requirement for the relevant fields.
noSourceText :: a Source #
sourceText :: String -> a Source #
setSourceText :: SourceText -> a Source #
getSourceText :: a -> SourceText Source #
Instances
HasSourceText SourceText Source # |
|
noSourceText :: SourceText Source # sourceText :: String -> SourceText Source # setSourceText :: SourceText -> SourceText Source # getSourceText :: SourceText -> SourceText Source # |
type SourceTextX x = (HasSourceText (XHsChar x), HasSourceText (XHsCharPrim x), HasSourceText (XHsString x), HasSourceText (XHsStringPrim x), HasSourceText (XHsIntPrim x), HasSourceText (XHsWordPrim x), HasSourceText (XHsInt64Prim x), HasSourceText (XHsWord64Prim x), HasSourceText (XHsInteger x)) Source #
Provide a summary constraint that lists all the extension points requiring
the HasSourceText
class, so that it can be changed in one place as the
named extensions change throughout the AST.
class HasDefault a where Source #
Defaults for each annotation, used to simplify creation in arbitrary contexts
Instances
HasDefault () Source # | |
HasDefault SourceText Source # | |
def :: SourceText Source # |
type HasDefaultX x = ForallX HasDefault x Source #
Provide a single constraint that captures the requirement for a default across all the extension points.
class Convertable a b | a -> b where Source #
Conversion of annotations from one type index to another. This is required
where the AST is converted from one pass to another, and the extension values
need to be brought along if possible. So for example a SourceText
is
converted via id
, but needs a type signature to keep the type checker
happy.
type ConvertIdX a b = (XHsDoublePrim a ~ XHsDoublePrim b, XHsFloatPrim a ~ XHsFloatPrim b, XHsRat a ~ XHsRat b, XHsInteger a ~ XHsInteger b, XHsWord64Prim a ~ XHsWord64Prim b, XHsInt64Prim a ~ XHsInt64Prim b, XHsWordPrim a ~ XHsWordPrim b, XHsIntPrim a ~ XHsIntPrim b, XHsInt a ~ XHsInt b, XHsStringPrim a ~ XHsStringPrim b, XHsString a ~ XHsString b, XHsCharPrim a ~ XHsCharPrim b, XHsChar a ~ XHsChar b) Source #
A constraint capturing all the extension points that can be converted via
instance Convertable a a
type DataId p = (Data p, ForallX Data p, Data (NameOrRdrName (IdP p)), Data (IdP p), Data (PostRn p (IdP p)), Data (PostRn p (Located Name)), Data (PostRn p Bool), Data (PostRn p Fixity), Data (PostRn p NameSet), Data (PostRn p [Name]), Data (PostTc p (IdP p)), Data (PostTc p Coercion), Data (PostTc p ConLike), Data (PostTc p HsWrapper), Data (PostTc p Type), Data (PostTc p [ConLike]), Data (PostTc p [Type])) Source #
type OutputableBndrId id = (OutputableBndr (NameOrRdrName (IdP id)), OutputableBndr (IdP id)) Source #
Constraint type to bundle up the requirement for OutputableBndr
on both
the id
and the NameOrRdrName
type for it