syntactic-1.15.1: 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

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