need to thread IContext through Typecheck.hs