prop_agent_dieOfAge :: SugAgentState -> Gen Bool
prop_agent_dieOfAge as0 = do
    age <- choose (60, 100)
    let as = as0 { sugAgAge = age }
    return $ prop_agent_dieOfAge_prop as age
  where
    prop_agent_dieOfAge_prop :: SugAgentState
                             -> Int
                             -> Bool
    prop_agent_dieOfAge_prop as age
        = died == (age >= asMaxAge) && asUnchanged && aoEmpty
      where
        asMaxAge    = fromJust $ sugAgMaxAge as
        (died, as', ao) = runAgentMonadDefaultConst dieOfAge as Nothing Nothing Nothing
        asUnchanged = as == as'
        -- agentout must not have changed
        aoEmpty = ao == mkAgentOut
prop_agent_dieOfAge :: SugAgentState -> Gen Bool
prop_agent_dieOfAge as0 = do
    age <- choose (60, 100)
    let as = as0 { sugAgAge = age }
    return $ prop_agent_dieOfAge_prop as age
  where
    prop_agent_dieOfAge_prop :: SugAgentState
                             -> Int
                             -> Bool
    prop_agent_dieOfAge_prop as age
        = died == (age >= asMaxAge) && asUnchanged && aoEmpty
      where
        asMaxAge    = fromJust $ sugAgMaxAge as
        (died, as', ao) = runAgentMonadDefaultConst dieOfAge as Nothing Nothing Nothing
        asUnchanged = as == as'
        -- agentout must not have changed
        aoEmpty = ao == mkAgentOut
prop_agent_dieOfAge as0 = do
    age <- choose (60, 100)
    let as = as0 { sugAgAge = age }
    return $ prop_agent_dieOfAge_prop as age
  where
    prop_agent_dieOfAge_prop :: SugAgentState
                             -> Int
                             -> Bool
    prop_agent_dieOfAge_prop as age
        = died == (age >= asMaxAge) && asUnchanged && aoEmpty
      where
        asMaxAge    = fromJust $ sugAgMaxAge as
        (died, as', ao) = runAgentMonadDefaultConst dieOfAge as Nothing Nothing Nothing
        asUnchanged = as == as'
        -- agentout must not have changed
        aoEmpty = ao == mkAgentOut