Agda-2.8.0: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.TypeChecking.Empty

Synopsis

- isEmptyType :: MonadTCM tcm => Type -> tcm Bool
- isEmptyTel :: MonadTCM tcm => Telescope -> tcm Bool
- ensureEmptyType :: Range -> Type -> TCM ()
- checkEmptyTel :: Range -> Telescope -> TCM (Either ErrorNonEmpty Int)

# Documentation

isEmptyType :: MonadTCM tcm => Type -> tcm Bool Source #

Check whether a type is empty.

isEmptyTel :: MonadTCM tcm => Telescope -> tcm Bool Source #

Check whether some type in a telescope is empty.

ensureEmptyType Source #

Arguments

:: Range | Range of the absurd pattern.
-> Type | Type that should be empty (empty data type or iterated product of such).
-> TCM () |

Ensure that a type is empty. This check may be postponed as emptiness constraint.

checkEmptyTel :: Range -> Telescope -> TCM (Either ErrorNonEmpty Int) Source #

Check whether one of the types in the given telescope is constructor-less and if yes, return its index in the telescope (0 = leftmost).