{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.ZH.MO.Rules
( rules
) where
import Prelude
import Duckling.Regex.Types
import Duckling.Time.Helpers
import Duckling.Types
ruleNationalDay :: Rule
ruleNationalDay :: Rule
ruleNationalDay = Rule :: Text -> Pattern -> Production -> Rule
Rule
{ name :: Text
name = Text
"national day"
, pattern :: Pattern
pattern =
[ String -> PatternItem
regex String
"(国庆|國慶)(节|節)?"
]
, prod :: Production
prod = \[Token]
_ -> TimeData -> Maybe Token
tt (TimeData -> Maybe Token) -> TimeData -> Maybe Token
forall a b. (a -> b) -> a -> b
$ Int -> Int -> TimeData
monthDay Int
10 Int
1
}
rules :: [Rule]
rules :: [Rule]
rules =
[ Rule
ruleNationalDay
]