Remove special case from TcTyVar level check
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 23 May 2018 12:14:50 +0000 (13:14 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 23 May 2018 13:44:40 +0000 (14:44 +0100)
commit49a832dd38bb87dc5f6c865e86a60319b44fdf5a
tree2dd7c05d8a9ea673152aa00e383174cf1899c9e6
parent928f606b80f6409aae41080e41c1daf075759d0a
Remove special case from TcTyVar level check

In TcMType.writeMetaTyVarRef we have an assertion
check, level_check_ok, that the type being written
to a unification variable is not deeper than the level
of the unification varaible itself.

This check used to have a special case for fmv/fsk
flatten vars, but this commit changed fmv/fsks to have
an ordinary level number:

    commit 2bbdd00c6d70bdc31ff78e2a42b26159c8717856
    Author: Simon Peyton Jones <simonpj@microsoft.com>
    Date:   Fri May 18 08:43:11 2018 +0100

    Orient TyVar/TyVar equalities with deepest on the left

So we can delete the isFlattenTyVar special case from
the level_check_ok assertion.  Simpler, less ad hoc.
compiler/typecheck/TcMType.hs