Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Fresh a
- name :: a -> Fresh a
- freshify :: MonadUnwrap m => Fresh a -> m (Fresh a)
- data Counter
- type UnwrapT = GenT Counter
- type Unwrap = Gen Counter
- runUnwrapT :: Monad m => UnwrapT m a -> m a
- runUnwrap :: Unwrap a -> a
- unwrap :: (Monad f, Functor m, MonadUnwrap m) => Fresh a -> Scope () f (Fresh a) -> m (Fresh a, f (Fresh a))
- unwrapAll :: (Monad f, MonadUnwrap m) => Fresh a -> [Scope () f (Fresh a)] -> m (Fresh a, [f (Fresh a)])
Documentation
Create a name. This name isn't unique at all at this point. Once you have a name you can pass it to freshify to render it unique within the current monadic context.
freshify :: MonadUnwrap m => Fresh a -> m (Fresh a) Source
Render a name unique within the scope of a monadic computation.
runUnwrapT :: Monad m => UnwrapT m a -> m a Source