syntactic-1.17: Generic abstract syntax, and utilities for embedded languages

Safe HaskellNone
LanguageHaskell2010

Language.Syntactic.Sharing.StableName

Synopsis

Documentation

data StName c where Source #

StableName of a (c (Full a)) with hidden result type

Constructors

StName :: StableName (c (Full a)) -> StName c 
Instances
Eq (StName c) Source # 
Instance details

Defined in Language.Syntactic.Sharing.StableName

Methods

(==) :: StName c -> StName c -> Bool #

(/=) :: StName c -> StName c -> Bool #

type History c = IntMap [(StName c, NodeId)] Source #

A hash table from StName to NodeId (with hash as the hashing function). I.e. it is assumed that the StNames at each entry all have the same hash, and that this number is equal to the entry's key.

lookHistory :: History c -> StName c -> Maybe NodeId Source #

Lookup a name in the history

remember :: StName c -> NodeId -> History c -> History c Source #

Insert the name into the history

fresh :: (Enum a, MonadIO m) => IORef a -> m a Source #

Return a fresh identifier from the given supply