sliceToPred :: Traversal' QExpr QSlice -> QSlice -> State RuleState (QSlice -> Bool)
sliceToPred path (SliceProper lower upper (Just stride) _) =
    pSliceProper <$>
        maybeExprToPred (path.slice_lowerL) lower <*>
            maybeExprToPred (path.slice_upperL) upper <*>
                (pJust <$> maybeExprToPred (path.slice_strideL._Just) stride)
sliceToPred :: Traversal' QExpr QSlice -> QSlice -> State RuleState (QSlice -> Bool)
sliceToPred path (SliceProper lower upper (Just stride) _) =
    pSliceProper <$>
        maybeExprToPred (path.slice_lowerL) lower <*>
            maybeExprToPred (path.slice_upperL) upper <*>
                (pJust <$> maybeExprToPred (path.slice_strideL._Just) stride)
sliceToPred path (SliceProper lower upper (Just stride) _) =
    pSliceProper <$>
        maybeExprToPred (path.slice_lowerL) lower <*>
            maybeExprToPred (path.slice_upperL) upper <*>
                (pJust <$> maybeExprToPred (path.slice_strideL._Just) stride)