ermine-0.6: Ermine

Copyright(c) Edward Kmett and Dan Doel 2012
LicenseBSD3
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Ermine.Unification.Type

Description

This module tells us how to unify types. We use a simplified form of HMF-style unification to deal with unification of foralls.

Synopsis

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

zonkKindsAndTypes :: (MonadMeta s m, MonadWriter Any m) => TypeM s -> m (TypeM s) Source

zonkKindsAndTypesWith :: (MonadMeta s m, MonadWriter Any m) => TypeM s -> (MetaK s -> m ()) -> (MetaT s -> m ()) -> m (TypeM s) Source