Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Names = [Name]
- type MonadReflectedToAbstract m = (MonadReader Names m, MonadFresh NameId m, MonadError TCErr m, MonadTCEnv m, ReadTCState m, HasOptions m, HasConstInfo m)
- withName :: MonadReflectedToAbstract m => String -> (Name -> m a) -> m a
- askName :: MonadReflectedToAbstract m => Int -> m (Maybe Name)
- class ToAbstract r a | r -> a where
- toAbstract :: MonadReflectedToAbstract m => r -> m a
- toAbstract_ :: (ToAbstract r a, MonadFresh NameId m, MonadError TCErr m, MonadTCEnv m, ReadTCState m, HasOptions m, HasConstInfo m) => r -> m a
- toAbstractWithoutImplicit :: (ToAbstract r a, MonadFresh NameId m, MonadError TCErr m, MonadTCEnv m, ReadTCState m, HasOptions m, HasConstInfo m) => r -> m a
- mkDef :: HasConstInfo m => QName -> m Expr
- mkSet :: Expr -> Expr
- toAbstractPats :: MonadReflectedToAbstract m => [Arg Pattern] -> m (Names, [NamedArg Pattern])
Documentation
type MonadReflectedToAbstract m = (MonadReader Names m, MonadFresh NameId m, MonadError TCErr m, MonadTCEnv m, ReadTCState m, HasOptions m, HasConstInfo m) Source #
withName :: MonadReflectedToAbstract m => String -> (Name -> m a) -> m a Source #
Adds a new unique name to the current context.
askName :: MonadReflectedToAbstract m => Int -> m (Maybe Name) Source #
Returns the name of the variable with the given de Bruijn index.
class ToAbstract r a | r -> a where Source #
toAbstract :: MonadReflectedToAbstract m => r -> m a Source #
Instances
toAbstract_ :: (ToAbstract r a, MonadFresh NameId m, MonadError TCErr m, MonadTCEnv m, ReadTCState m, HasOptions m, HasConstInfo m) => r -> m a Source #
Translate reflected syntax to abstract, using the names from the current typechecking context.
toAbstractWithoutImplicit :: (ToAbstract r a, MonadFresh NameId m, MonadError TCErr m, MonadTCEnv m, ReadTCState m, HasOptions m, HasConstInfo m) => r -> m a Source #
Drop implicit arguments unless --show-implicit is on.
toAbstractPats :: MonadReflectedToAbstract m => [Arg Pattern] -> m (Names, [NamedArg Pattern]) Source #