I considered that approach, but I didn't want this change to make the elm server slower than it was before, when Elm essentially 'cached' by using unsafePerformIO and NOINLINE. In order to do that, it seems like we want to load the interfaces once in the main function in the elm server and then pass them every time we compile a source program.

If you're ok with reading the interfaces.data on every request, or want to try that approach first, I agree that giving this a return value in the IO monad is better. Let me know if you want to go that way, or if there is another possibility I'm not considering.

Thanks!