Refining the definition for the stack type.