useWith :: Text -> Int64 -> Text -> Handler Text
useWith obj areaId urlHash = do
    let words' = words obj
    case words' of
        x:"with":xs -> do
            obj <- lookAtItemByUnique (unwords xs) areaId
            case obj of
                Just obj' -> do
                    inv <- showInventory urlHash
                    case itemInInventoryByName inv x of
                        True -> do
                            case (x,(unwords xs)) of
                                ("key", "chest") -> win "You found the magic secret!" urlHash
                                ("pokeball", "missingno") -> die "of memory corruption" urlHash
                                _ -> return "Cannot use those two items together."
                        False -> return "The item has to be in your inventory."
                Nothing -> return "No such item in this area."
        _ -> return "Invalid input."
useWith :: Text -> Int64 -> Text -> Handler Text
useWith obj areaId urlHash = do
    let words' = words obj
    case words' of
        x:"with":xs -> do
            obj <- lookAtItemByUnique (unwords xs) areaId
            case obj of
                Just obj' -> do
                    inv <- showInventory urlHash
                    case itemInInventoryByName inv x of
                        True -> do
                            case (x,(unwords xs)) of
                                ("key", "chest") -> win "You found the magic secret!" urlHash
                                ("pokeball", "missingno") -> die "of memory corruption" urlHash
                                _ -> return "Cannot use those two items together."
                        False -> return "The item has to be in your inventory."
                Nothing -> return "No such item in this area."
        _ -> return "Invalid input."
useWith obj areaId urlHash = do
    let words' = words obj
    case words' of
        x:"with":xs -> do
            obj <- lookAtItemByUnique (unwords xs) areaId
            case obj of
                Just obj' -> do
                    inv <- showInventory urlHash
                    case itemInInventoryByName inv x of
                        True -> do
                            case (x,(unwords xs)) of
                                ("key", "chest") -> win "You found the magic secret!" urlHash
                                ("pokeball", "missingno") -> die "of memory corruption" urlHash
                                _ -> return "Cannot use those two items together."
                        False -> return "The item has to be in your inventory."
                Nothing -> return "No such item in this area."
        _ -> return "Invalid input."