add super-hacky type checker (WIP), code from hackage's AlgorithmW