content: -- 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.EL
    ( defaultRules
    , langRules
    , localeRules
    ) where
  
  import Duckling.Dimensions.Types
  import Duckling.Locale
  import Duckling.Types
  import qualified Duckling.Duration.EL.Rules as Duration
  import qualified Duckling.Numeral.EL.Rules as Numeral
  import qualified Duckling.Ordinal.EL.Rules as Ordinal
  import qualified Duckling.Time.EL.Rules as Time
  import qualified Duckling.TimeGrain.EL.Rules as TimeGrain
  
  defaultRules :: Seal Dimension -> [Rule]
  defaultRules = langRules
  
  localeRules :: Region -> Seal Dimension -> [Rule]
  localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
  localeRules _ _ = []
  
  langRules :: Seal Dimension -> [Rule]
  langRules (Seal AmountOfMoney) = []
  langRules (Seal CreditCardNumber) = []
  langRules (Seal Distance) = []
  langRules (Seal Duration) = Duration.rules
  langRules (Seal Email) = []
  langRules (Seal Numeral) = Numeral.rules
  langRules (Seal Ordinal) = Ordinal.rules
  langRules (Seal PhoneNumber) = []
  langRules (Seal Quantity) = []
  langRules (Seal RegexMatch) = []
  langRules (Seal Temperature) = []
  langRules (Seal Time) = Time.rules
  langRules (Seal TimeGrain) = TimeGrain.rules
  langRules (Seal Url) = []
  langRules (Seal Volume) = []
  langRules (Seal (CustomDimension dim)) = dimLangRules EL dim
  