mirror of
https://github.com/facebook/duckling.git
synced 2024-11-29 01:03:44 +03:00
0527be1ce0
Summary: Adding locale rules for ES Numeral because Spain use "," as decimal but south american country use "." as decimal. Wiki: https://en.wikipedia.org/wiki/Decimal_separator Reviewed By: haoxuany Differential Revision: D20040111 fbshipit-source-id: e2a4bfc2928df19976ef98e90ee82e7d21b52313
55 lines
925 B
Haskell
55 lines
925 B
Haskell
-- 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 DeriveAnyClass #-}
|
|
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE NoRebindableSyntax #-}
|
|
|
|
module Duckling.Region
|
|
( Region(..)
|
|
) where
|
|
|
|
import Data.Hashable
|
|
import GHC.Generics
|
|
import Prelude
|
|
import TextShow (TextShow)
|
|
import qualified TextShow as TS
|
|
|
|
-- | ISO 3166-1 alpha-2 Country code (includes regions and territories).
|
|
-- See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
data Region
|
|
= AR
|
|
| AU
|
|
| BE
|
|
| BZ
|
|
| CA
|
|
| CL
|
|
| CN
|
|
| CO
|
|
| ES
|
|
| GB
|
|
| HK
|
|
| IE
|
|
| IN
|
|
| JM
|
|
| MN
|
|
| MX
|
|
| MO
|
|
| NL
|
|
| NZ
|
|
| PE
|
|
| PH
|
|
| TT
|
|
| TW
|
|
| US
|
|
| VE
|
|
| ZA
|
|
deriving (Bounded, Enum, Eq, Generic, Hashable, Ord, Read, Show)
|
|
|
|
instance TextShow Region where
|
|
showb = TS.fromString . show
|