Pregunta

My haskell program produces .tex output using my own module. I can't see my way around having to run 'pdflatex' everytime I want to see a result. I can hardly believe this cannot be done in a more direct manner;

Is there a way to have my code compile the .tex-file?

¿Fue útil?

Solución

Is the System.Process package what you are looking for? You can use the function

system :: String -> IO ExitCode

to perform system calls.

$ touch tempfile.txt
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/   :? for help
>> import System.Process
>> system "ls"
tempfile.txt
ExitSuccess

Not particularly idiomatic, but it gets the job done.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top