문제

I have a Haskell function which returns quite a large output. (In fact, beyond the console's buffer size.) Is there any way GHCI output can be automatically saved to an external txt file rather than simply displayed?

도움이 되었습니까?

해결책

The result of the last command is bound to the variable it.

You can

writeFile "filename.txt" $ show it

or

writefile "filename.txt" $ show $ <statement>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top