rewire-embedder-2.8: A ReWire-to-Isabelle embedder
Safe HaskellSafe
LanguageHaskell2010

ReWire.HSE.Annotate

Synopsis

Documentation

annotate :: Module SrcSpanInfo -> Module Annote Source #

Replace every haskell-src-exts source span in a parsed module with the compiler's own annotation, recording each node's origin span.

data Annote #

The annotation carried by every IR node: its provenance plus any human-readable context breadcrumbs accumulated as it travels through the passes.

Instances

Instances details
NFData Annote 
Instance details

Defined in ReWire.Annotation

Methods

rnf :: Annote -> () #

Data Annote

Opaque to SYB: gfoldl uses its default (no children), so unAnn and the generic traversals treat an annotation as an indivisible leaf rather than recursing into its provenance.

Instance details

Defined in ReWire.Annotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Annote -> c Annote #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Annote #

toConstr :: Annote -> Constr #

dataTypeOf :: Annote -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Annote) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Annote) #

gmapT :: (forall b. Data b => b -> b) -> Annote -> Annote #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Annote -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Annote -> r #

gmapQ :: (forall d. Data d => d -> u) -> Annote -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Annote -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Annote -> m Annote #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Annote -> m Annote #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Annote -> m Annote #

Show Annote 
Instance details

Defined in ReWire.Annotation

Eq Annote 
Instance details

Defined in ReWire.Annotation

Methods

(==) :: Annote -> Annote -> Bool #

(/=) :: Annote -> Annote -> Bool #

Ord Annote

Annotations are metadata about a node, not part of its meaning. Equality, ordering, and hashing are therefore intentionally blind to them: two terms that differ only in source location must still compare equal, or type comparison and term deduplication (which run over annotated IR) would wrongly distinguish them.

Instance details

Defined in ReWire.Annotation

Hashable Annote 
Instance details

Defined in ReWire.Annotation

Methods

hashWithSalt :: Int -> Annote -> Int

hash :: Annote -> Int

SrcInfo Annote 
Instance details

Defined in ReWire.HSE.SrcLoc

Methods

toSrcInfo :: SrcLoc -> [SrcSpan] -> SrcLoc -> Annote

fromSrcInfo :: SrcSpanInfo -> Annote

getPointLoc :: Annote -> SrcLoc

fileName :: Annote -> String

startLine :: Annote -> Int

startColumn :: Annote -> Int

Annotation Annote 
Instance details

Defined in ReWire.Annotation

Methods

toAnnote :: Annote -> Annote #

TextShow Annote 
Instance details

Defined in ReWire.Annotation

QNamish (Name Annote) Source # 
Instance details

Defined in ReWire.HSE.Rename

Methods

toQNamish :: Name Annote -> QName ()

fromQNamish :: QName l -> Name Annote

QNamish (QName Annote) Source # 
Instance details

Defined in ReWire.HSE.Rename

Methods

toQNamish :: QName Annote -> QName ()

fromQNamish :: QName l -> QName Annote