Copyright | (c) Edward Kmett and Dan Doel 2012 |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module tells us how to unify types. We use a simplified form of HMF-style unification to deal with unification of foralls.
Documentation
unifyType :: (MonadWriter Any m, MonadMeta s m) => TypeM s -> TypeM s -> m (TypeM s) Source
Unify two types, with access to a visited set, logging via MonadWriter
whether or not the answer differs from the first type argument.
This returns the result of unification with any modifications expanded, as we calculated it in passing