
9 Jun
2011
9 Jun
'11
1:11 p.m.
On Thu, Jun 9, 2011 at 13:40, Neil Davies
Anyone out there got an elegant solution to being able to fork a haskell thread and replace its 'stdin' ?
If you don't mind being tied to GHC you can use hDuplicateTo from GHC.IO.Handle [1]. You can also use dupTo from the unix package [2], but that ties you to unix-like platforms instead. Erik [1] http://hackage.haskell.org/packages/archive/base/latest/doc/html/GHC-IO-Hand... [2] http://hackage.haskell.org/packages/archive/unix/latest/doc/html/System-Posi...