Let's say I'm building a web application with haskell as both server-side and client-side code. During the build phase, I want to compile server-side code with ghc and client-side code with some haskell to js transpiler.
The haskell transpiler tools expose an executable that I need to feed with .hs files and it will compile to .js files. How do I specify in cabal to run external programs during the build phase? I can see, that the UserHooks field buildHook has the return type IO(), so I can theoretically probably use for example shelly library to execute shell code to run the transpiler, but I don't know if this is the cleanest solution.