pIntervalPattern :: CharParser () IntervalPattern
pIntervalPattern = do
    noInversions <- isJust <$> optionMaybe (char '=')
    intervalDef <- pInterval
    isOptional <- isJust <$> optionMaybe (char '?')
    let ipv = IntervalPatternValue { interval = intervalDef, inversionsAllowed = not noInversions }
    let po = if isOptional then OneOrNone ipv else ExactlyOne ipv
    return $ po
pIntervalPattern :: CharParser () IntervalPattern
pIntervalPattern = do
    noInversions <- isJust <$> optionMaybe (char '=')
    intervalDef <- pInterval
    isOptional <- isJust <$> optionMaybe (char '?')
    let ipv = IntervalPatternValue { interval = intervalDef, inversionsAllowed = not noInversions }
    let po = if isOptional then OneOrNone ipv else ExactlyOne ipv
    return $ po
pIntervalPattern = do
    noInversions <- isJust <$> optionMaybe (char '=')
    intervalDef <- pInterval
    isOptional <- isJust <$> optionMaybe (char '?')
    let ipv = IntervalPatternValue { interval = intervalDef, inversionsAllowed = not noInversions }
    let po = if isOptional then OneOrNone ipv else ExactlyOne ipv
    return $ po