ase
    (_:Token Numeral NumeralData{TNumeral.value = v}:_) ->
      double $ 10000 + v*1000
    _ -> Nothing
  }

rules :: [Rule]
rules =
  [ ruleDecimalNumeral
  , ruleDecimalWithThousandsSeparator
  , ruleInteger
  , ruleIntegerWithThousandsSeparator
  , ruleNumeral
  , ruleNumeralsIntersectConsecutiv
ruleTenThousandPrefix :: Rule
ruleTenThousandPrefix = Rule
  { name = "ten thousand and <integer> (short form)"
  , pattern =
    [ regex "万|萬"
    , numberBetween 1 10
    ]
  , prod = \case
    (_:Token Numeral NumeralData{TNumeral.value = v}:_) ->
      double $ 10000 + v*1000
    _ -> Nothing
  }
ruleTenThousandPrefix = Rule
  { name = "ten thousand and <integer> (short form)"
  , pattern =
    [ regex "万|萬"
    , numberBetween 1 10
    ]
  , prod = \case
    (_:Token Numeral NumeralData{TNumeral.value = v}:_) ->
      double $ 10000 + v*1000
    _ -> Nothing
  }