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

Safe HaskellNone

Language.Syntactic.Sharing.StableName

Synopsis

Documentation

data StName c whereSource

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

Constructors

StName :: StableName (c (Full a)) -> StName c 

Instances

Eq (StName c) 

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 NodeIdSource

Lookup a name in the history

remember :: StName c -> NodeId -> History c -> History cSource

Insert the name into the history

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

Return a fresh identifier from the given supply