unify :: Subst.Unify a => a -> a -> TC ()
unify a b = TC $
  do RW { .. } <- get
     su' <- Subst.unify rwSubst a b
     set $! RW { rwSubst = su' }

-- | Remove type variables from a thing that has types.
--
-- NOTE: this will fail if the type given is infinite.
unify :: Subst.Unify a => a -> a -> TC ()
unify a b = TC $
  do RW { .. } <- get
     su' <- Subst.unify rwSubst a b
     set $! RW { rwSubst = su' }

-- | Remove type variables from a thing that has types.
--
-- NOTE: this will fail if the type given is infinite.
unify a b = TC $
  do RW { .. } <- get
     su' <- Subst.unify rwSubst a b
     set $! RW { rwSubst = su' }

-- | Remove type variables from a thing that has types.
--
-- NOTE: this will fail if the type given is infinite.