I need a fast way (1000’s of typechecks per second) to typecheck generated Haskell source code.
We tried hint which was fast enough except it cannot access dynamically loaded code unless the source code is available which we would not have in some cases. Maybe there is some way to register dynamically loaded code as a package or something since hint can access registered packages it seems?
We tried using the ghc api, but it appears to require the files be on disk and all the file IO required makes it too slow.
We can use haskell-src-exts to generate the code, but we need to typecheck it.
Thousands of type checks per second doesn’t seem feasible sequentially — you’re doing these concurrently, with some hope for parallelism I hope?
And I assume you are supporting the full GHC type system? So a stripped down type checker (e.g. THIH won’t suffice).