Safe Haskell | None |
---|---|
Language | Haskell2010 |
Fresh monad and the Name type class
Documentation
The Fresh monad
freshPass :: (Foldable f, Name a) => (f a -> Fresh b) -> f a -> b Source
Continues making unique names after the highest numbered name in a foldable value.
freshFrom :: (Foldable f, Name b) => Fresh a -> f b -> a Source
Run fresh from starting from the greatest unique in a structure
runFreshFrom :: Int -> Fresh a -> a Source
Run fresh from some starting value
class (PrettyVar a, Ord a) => Name a where Source
The Name type class
Make a fresh name
refresh :: a -> Fresh a Source
Refresh a name, which could have some resemblance to the original name
freshNamed :: String -> Fresh a Source
Make a fresh name that can incorporate the given string
refreshNamed :: String -> a -> Fresh a Source
Refresh a name with an additional hint string
Gets the unique associated with a name.