Trying to work out iteratees

A few days ago I decided to explore the idea of using iteratee to do IO in Haskell. I read most of what Oleg has written on input processing using left-fold enumerators. Only a little wiser I took a look at the Iteratee IO package on Hackage. Unfortunately it still hadn’t quite sunk in. To …

Continue reading ‘Trying to work out iteratees’ »

Share

Making a choice from a list in Haskell, Vty (part 5, the last one)

The time has come for the final installment of this series of “discussions of a refactoring”. These are the earlier installments. This is where I finally add the ability to collapse a list item. This is a rather terse description of the changes, since I feel all of them are fairly obvious, and hence require …

Continue reading ‘Making a choice from a list in Haskell, Vty (part 5, the last one)’ »

Share

Fork/exec in Haskell

Here’s some simple code I put together. I’m mostly posting it so I won’t have any problems finding it in the future. module Main where   import Control.Monad import System.Exit import System.Posix.IO import System.Posix.Process   executeChild = do mapM_ closeFd [stdInput, stdOutput, stdError] devnull <- openFd "/dev/null" ReadWrite Nothing defaultFileFlags dup devnull; dup devnull executeFile …

Continue reading ‘Fork/exec in Haskell’ »

Share