merlin type-checking not working properly -- reverted