    = case Map.lookup name conf of
       Just p  -> updateProgram (Just p{programArgs=(words args)}) conf'
       Nothing -> updateProgram (Just $ Program name name (words args) EmptyLocation) conf'

-- |Update this program's entry in the configuration.  No changes if
-- you pass in Nothing.
updateProgram :: Maybe Program -> ProgramConfiguration -> ProgramConfiguration
updateProgram (Just p@Program{programName=n}) (ProgramConfiguration conf)
    = ProgramConfiguration $ Map.insert n p conf
updateProgram Nothing conf = conf

-- |Runs the given program.
rawSystemProgram :: Int      -- ^Verbosity
                 -> Program  -- ^The program to run