getCurrentExercise :: Handler ExerciseId
getCurrentExercise = do
    mtExId <- lookupSession "custom_exercise_id"
    maxExId <- runDB lastExerciseId
    return $ case decimal <$> mtExId of
          Just (Right (i, _)) -> toSqlKey i
          _ -> maxExId
getCurrentExercise :: Handler ExerciseId
getCurrentExercise = do
    mtExId <- lookupSession "custom_exercise_id"
    maxExId <- runDB lastExerciseId
    return $ case decimal <$> mtExId of
          Just (Right (i, _)) -> toSqlKey i
          _ -> maxExId
getCurrentExercise = do
    mtExId <- lookupSession "custom_exercise_id"
    maxExId <- runDB lastExerciseId
    return $ case decimal <$> mtExId of
          Just (Right (i, _)) -> toSqlKey i
          _ -> maxExId