| Safe Haskell | None |
|---|
E.TypeCheck
- canBeBox :: (CanType (TypeOf a), CanType a, ~ * (TypeOf (TypeOf a)) E) => a -> Bool
- eAp :: E -> E -> E
- inferType :: (ContextMonad m, ContextOf m ~ String) => DataTable -> [(TVr, E)] -> E -> m E
- infertype :: CanTypeCheck a => DataTable -> a -> E
- typecheck :: (CanTypeCheck a, Monad m) => DataTable -> a -> m E
- match :: Monad m => (Id -> Maybe E) -> [TVr] -> E -> E -> m [(TVr, E)]
- sortSortLike :: E -> Bool
- sortKindLike :: E -> Bool
- sortTermLike :: E -> Bool
- sortTypeLike :: E -> Bool
- typeInfer :: DataTable -> E -> E
- typeInfer' :: DataTable -> [(TVr, E)] -> E -> E
Documentation
inferType :: (ContextMonad m, ContextOf m ~ String) => DataTable -> [(TVr, E)] -> E -> m ESource
Perform a full typecheck, evaluating type terms as necessary.
Arguments
| :: Monad m | |
| => (Id -> Maybe E) | function to look up values in the environment |
| -> [TVr] | vars which may be substituted |
| -> E | pattern to match |
| -> E | input expression |
| -> m [(TVr, E)] |
find substitution that will transform the left term into the right one, only substituting for the vars in the list
sortSortLike :: E -> BoolSource
sortKindLike :: E -> BoolSource
sortTermLike :: E -> BoolSource
sortTypeLike :: E -> BoolSource