Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TypeAtom
- data TypeEquation = TypeEquation [TypeExp] TypeExp
- data TypeExp
- pattern Synonym :: Name -> TypeExp -> TypeExp
- fromType :: Type -> Q TypeExp
- fromName :: Name -> Q TypeExp
- substitute :: Name -> TypeExp -> TypeExp -> TypeExp
- substituteAll :: Map Name TypeExp -> TypeExp -> TypeExp
- reduce :: TypeExp -> TypeExp
- match :: TypeExp -> TypeExp -> Maybe (Map Name TypeExp)
Documentation
Type atom
data TypeEquation Source #
Type equation
Type expression
fromType :: Type -> Q TypeExp Source #
Get the type expression for a Type
. Attempts to reduce the resulting type expression.
fromName :: Name -> Q TypeExp Source #
Get the type expression for a Name
. Attempts to reduce the resulting type expression.
substitute :: Name -> TypeExp -> TypeExp -> TypeExp Source #
substitute name typ exp
replaces all occurences of name
in exp
with typ
.
substituteAll :: Map Name TypeExp -> TypeExp -> TypeExp Source #
Just like substitute
but for more variables.