createMemoryManager :: (Maybe NodeId) -> Maybe ComponentId -> Sim ComponentId
createMemoryManager n p = componentLookupN n MemoryManager >>= \x -> case x of
    Nothing  -> createComponentNPS n Nothing (Just iState) MemoryManager
    Just cId -> return cId
  where
    iState = memMgrIState { _parentMM = p }
createMemoryManager :: (Maybe NodeId) -> Maybe ComponentId -> Sim ComponentId
createMemoryManager n p = componentLookupN n MemoryManager >>= \x -> case x of
    Nothing  -> createComponentNPS n Nothing (Just iState) MemoryManager
    Just cId -> return cId
  where
    iState = memMgrIState { _parentMM = p }
createMemoryManager n p = componentLookupN n MemoryManager >>= \x -> case x of
    Nothing  -> createComponentNPS n Nothing (Just iState) MemoryManager
    Just cId -> return cId
  where
    iState = memMgrIState { _parentMM = p }