-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.


{-# LANGUAGE GADTs #-}


module Duckling.Rules.TH
  ( defaultRules
  , langRules
  , localeRules
  ) where

import Duckling.Dimensions.Types
import Duckling.Locale
import Duckling.Types
import qualified Duckling.Numeral.TH.Rules as Numeral

defaultRules :: Seal Dimension -> [Rule]
defaultRules :: Seal Dimension -> [Rule]
defaultRules = Seal Dimension -> [Rule]
langRules

localeRules :: Region -> Seal Dimension -> [Rule]
localeRules :: Region -> Seal Dimension -> [Rule]
localeRules Region
region (Seal (CustomDimension a
dim)) = Region -> a -> [Rule]
forall a. CustomDimension a => Region -> a -> [Rule]
dimLocaleRules Region
region a
dim
localeRules Region
_ Seal Dimension
_ = []

langRules :: Seal Dimension -> [Rule]
langRules :: Seal Dimension -> [Rule]
langRules (Seal Dimension a
AmountOfMoney) = []
langRules (Seal Dimension a
CreditCardNumber) = []
langRules (Seal Dimension a
Distance) = []
langRules (Seal Dimension a
Duration) = []
langRules (Seal Dimension a
Email) = []
langRules (Seal Dimension a
Numeral) = [Rule]
Numeral.rules
langRules (Seal Dimension a
Ordinal) = []
langRules (Seal Dimension a
PhoneNumber) = []
langRules (Seal Dimension a
Quantity) = []
langRules (Seal Dimension a
RegexMatch) = []
langRules (Seal Dimension a
Temperature) = []
langRules (Seal Dimension a
Time) = []
langRules (Seal Dimension a
TimeGrain) = []
langRules (Seal Dimension a
Url) = []
langRules (Seal Dimension a
Volume) = []
langRules (Seal (CustomDimension a
dim)) = Lang -> a -> [Rule]
forall a. CustomDimension a => Lang -> a -> [Rule]
dimLangRules Lang
TH a
dim