help migrating a tool that uses the ghc api