You can use execute or executeWith in GHCi, but after 10 seconds we were getting an message about a timeout and an exit code. This was of course the 10 second timeout used to terminate the program in the event that graceful shutdown of the output and telemetry channels fails. Strangely, though, it was coming out only in GHCi.
Inspection showed the reason, pretty silly; a running process that exits eliminates the timer thread but in GHCi it runs to completion.
Simple fix: explicitly end the timeout thread before exiting.
You can use
execute
orexecuteWith
in GHCi, but after 10 seconds we were getting an message about a timeout and an exit code. This was of course the 10 second timeout used to terminate the program in the event that graceful shutdown of the output and telemetry channels fails. Strangely, though, it was coming out only in GHCi.Inspection showed the reason, pretty silly; a running process that exits eliminates the timer thread but in GHCi it runs to completion.
Simple fix: explicitly end the timeout thread before exiting.