-- The eval function steps through each GM state until the final GM state is 
-- reached.
gmEval :: GMState -> [GMState]
gmEval state = state : restStates
    where
    restStates | gmFinal state = []
              | otherwise = gmEval nextState
    nextState = doAdmin (gmStep state)
gmEval :: GMState -> [GMState]
gmEval state = state : restStates
    where
    restStates | gmFinal state = []
              | otherwise = gmEval nextState
    nextState = doAdmin (gmStep state)
gmEval state = state : restStates
    where
    restStates | gmFinal state = []
              | otherwise = gmEval nextState
    nextState = doAdmin (gmStep state)