Maintainer | hapytexeu+gh@gmail.com |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
A module that defines the flag emoji. There are basically three types of flags:
flags for nations, flags for subnations (like England, Scotland and Wales); and
ExtraFlag
s that contain a list of flags used for occassions and political purposes.
Synopsis
- data Flag
- flag :: Char -> Char -> Maybe Flag
- flag' :: Char -> Char -> Flag
- flagChars :: Flag -> (Char, Char)
- iso3166Alpha2ToFlag :: Char -> Char -> Maybe Text
- iso3166Alpha2ToFlag' :: Char -> Char -> Text
- validFlagEmoji :: Char -> Char -> Bool
- data SubFlag
- data ExtraFlag
- pattern AC :: Flag
- pattern AD :: Flag
- pattern AE :: Flag
- pattern AF :: Flag
- pattern AG :: Flag
- pattern AI :: Flag
- pattern AL :: Flag
- pattern AM :: Flag
- pattern AO :: Flag
- pattern AQ :: Flag
- pattern AR :: Flag
- pattern AS :: Flag
- pattern AT :: Flag
- pattern AU :: Flag
- pattern AW :: Flag
- pattern AX :: Flag
- pattern AZ :: Flag
- pattern BA :: Flag
- pattern BB :: Flag
- pattern BD :: Flag
- pattern BE :: Flag
- pattern BF :: Flag
- pattern BG :: Flag
- pattern BH :: Flag
- pattern BI :: Flag
- pattern BJ :: Flag
- pattern BL :: Flag
- pattern BM :: Flag
- pattern BN :: Flag
- pattern BO :: Flag
- pattern BQ :: Flag
- pattern BR :: Flag
- pattern BS :: Flag
- pattern BT :: Flag
- pattern BV :: Flag
- pattern BW :: Flag
- pattern BY :: Flag
- pattern BZ :: Flag
- pattern CA :: Flag
- pattern CC :: Flag
- pattern CD :: Flag
- pattern CF :: Flag
- pattern CG :: Flag
- pattern CH :: Flag
- pattern CI :: Flag
- pattern CK :: Flag
- pattern CL :: Flag
- pattern CM :: Flag
- pattern CN :: Flag
- pattern CO :: Flag
- pattern CP :: Flag
- pattern CR :: Flag
- pattern CU :: Flag
- pattern CV :: Flag
- pattern CW :: Flag
- pattern CX :: Flag
- pattern CY :: Flag
- pattern CZ :: Flag
- pattern DE :: Flag
- pattern DG :: Flag
- pattern DJ :: Flag
- pattern DK :: Flag
- pattern DM :: Flag
- pattern DO :: Flag
- pattern DZ :: Flag
- pattern EA :: Flag
- pattern EC :: Flag
- pattern EE :: Flag
- pattern EG :: Flag
- pattern EH :: Flag
- pattern ER :: Flag
- pattern ES :: Flag
- pattern ET :: Flag
- pattern EU :: Flag
- pattern FI :: Flag
- pattern FJ :: Flag
- pattern FK :: Flag
- pattern FM :: Flag
- pattern FO :: Flag
- pattern FR :: Flag
- pattern GA :: Flag
- pattern GB :: Flag
- pattern GD :: Flag
- pattern GE :: Flag
- pattern GF :: Flag
- pattern GG :: Flag
- pattern GH :: Flag
- pattern GI :: Flag
- pattern GL :: Flag
- pattern GM :: Flag
- pattern GN :: Flag
- pattern GP :: Flag
- pattern GQ :: Flag
- pattern GR :: Flag
- pattern GS :: Flag
- pattern GT :: Flag
- pattern GU :: Flag
- pattern GW :: Flag
- pattern GY :: Flag
- pattern HK :: Flag
- pattern HM :: Flag
- pattern HN :: Flag
- pattern HR :: Flag
- pattern HT :: Flag
- pattern HU :: Flag
- pattern IC :: Flag
- pattern ID :: Flag
- pattern IE :: Flag
- pattern IL :: Flag
- pattern IM :: Flag
- pattern IN :: Flag
- pattern IO :: Flag
- pattern IQ :: Flag
- pattern IR :: Flag
- pattern IS :: Flag
- pattern IT :: Flag
- pattern JE :: Flag
- pattern JM :: Flag
- pattern JO :: Flag
- pattern JP :: Flag
- pattern KE :: Flag
- pattern KG :: Flag
- pattern KH :: Flag
- pattern KI :: Flag
- pattern KM :: Flag
- pattern KN :: Flag
- pattern KP :: Flag
- pattern KR :: Flag
- pattern KW :: Flag
- pattern KY :: Flag
- pattern KZ :: Flag
- pattern LA :: Flag
- pattern LB :: Flag
- pattern LC :: Flag
- pattern LI :: Flag
- pattern LK :: Flag
- pattern LR :: Flag
- pattern LS :: Flag
- pattern LT :: Flag
- pattern LU :: Flag
- pattern LV :: Flag
- pattern LY :: Flag
- pattern MA :: Flag
- pattern MC :: Flag
- pattern MD :: Flag
- pattern ME :: Flag
- pattern MF :: Flag
- pattern MG :: Flag
- pattern MH :: Flag
- pattern MK :: Flag
- pattern ML :: Flag
- pattern MM :: Flag
- pattern MN :: Flag
- pattern MO :: Flag
- pattern MP :: Flag
- pattern MQ :: Flag
- pattern MR :: Flag
- pattern MS :: Flag
- pattern MT :: Flag
- pattern MU :: Flag
- pattern MV :: Flag
- pattern MW :: Flag
- pattern MX :: Flag
- pattern MY :: Flag
- pattern MZ :: Flag
- pattern NA :: Flag
- pattern NC :: Flag
- pattern NE :: Flag
- pattern NF :: Flag
- pattern NG :: Flag
- pattern NI :: Flag
- pattern NL :: Flag
- pattern NO :: Flag
- pattern NP :: Flag
- pattern NR :: Flag
- pattern NU :: Flag
- pattern NZ :: Flag
- pattern OM :: Flag
- pattern PA :: Flag
- pattern PE :: Flag
- pattern PF :: Flag
- pattern PG :: Flag
- pattern PH :: Flag
- pattern PK :: Flag
- pattern PL :: Flag
- pattern PM :: Flag
- pattern PN :: Flag
- pattern PR :: Flag
- pattern PS :: Flag
- pattern PT :: Flag
- pattern PW :: Flag
- pattern PY :: Flag
- pattern QA :: Flag
- pattern RE :: Flag
- pattern RO :: Flag
- pattern RS :: Flag
- pattern RU :: Flag
- pattern RW :: Flag
- pattern SA :: Flag
- pattern SB :: Flag
- pattern SC :: Flag
- pattern SD :: Flag
- pattern SE :: Flag
- pattern SG :: Flag
- pattern SH :: Flag
- pattern SI :: Flag
- pattern SJ :: Flag
- pattern SK :: Flag
- pattern SL :: Flag
- pattern SM :: Flag
- pattern SN :: Flag
- pattern SO :: Flag
- pattern SR :: Flag
- pattern SS :: Flag
- pattern ST :: Flag
- pattern SV :: Flag
- pattern SX :: Flag
- pattern SY :: Flag
- pattern SZ :: Flag
- pattern TA :: Flag
- pattern TC :: Flag
- pattern TD :: Flag
- pattern TF :: Flag
- pattern TG :: Flag
- pattern TH :: Flag
- pattern TJ :: Flag
- pattern TK :: Flag
- pattern TL :: Flag
- pattern TM :: Flag
- pattern TN :: Flag
- pattern TO :: Flag
- pattern TR :: Flag
- pattern TT :: Flag
- pattern TV :: Flag
- pattern TW :: Flag
- pattern TZ :: Flag
- pattern UA :: Flag
- pattern UG :: Flag
- pattern UM :: Flag
- pattern UN :: Flag
- pattern US :: Flag
- pattern UY :: Flag
- pattern UZ :: Flag
- pattern VA :: Flag
- pattern VC :: Flag
- pattern VE :: Flag
- pattern VG :: Flag
- pattern VI :: Flag
- pattern VN :: Flag
- pattern VU :: Flag
- pattern WF :: Flag
- pattern WS :: Flag
- pattern XK :: Flag
- pattern YE :: Flag
- pattern YT :: Flag
- pattern ZA :: Flag
- pattern ZM :: Flag
- pattern ZW :: Flag
- pattern ENG :: SubFlag
- pattern SCT :: SubFlag
- pattern WLS :: SubFlag
Flag emoji
A data type that stores a (country) flag by the two characters of the ISO 3166 Alpa-2 standard. The data constructor is hidden to prevent making flags with a combination of characters that is invalid. Besides the countries defined in the ISO-3166 Alpha-2 standard, only the Antarctica (AQ), the European Union (EU) and the United Nations (UN) have a flag. Deprecated territories like the Soviet Union (SU) and Yugoslavia (YU) have no corresponding flag.
Instances
Arbitrary Flag Source # | |
Data Flag Source # | |
Defined in Data.Char.Emoji.Flag gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Flag -> c Flag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Flag # dataTypeOf :: Flag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Flag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Flag) # gmapT :: (forall b. Data b => b -> b) -> Flag -> Flag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Flag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Flag -> r # gmapQ :: (forall d. Data d => d -> u) -> Flag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Flag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Flag -> m Flag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Flag -> m Flag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Flag -> m Flag # | |
Bounded Flag Source # | |
Enum Flag Source # | |
Generic Flag Source # | |
Read Flag Source # | |
Show Flag Source # | |
NFData Flag Source # | |
Defined in Data.Char.Emoji.Flag | |
Eq Flag Source # | |
Ord Flag Source # | |
Hashable Flag Source # | |
Defined in Data.Char.Emoji.Flag | |
UnicodeText Flag Source # | |
Defined in Data.Char.Emoji.Flag | |
type Rep Flag Source # | |
Defined in Data.Char.Emoji.Flag type Rep Flag = D1 ('MetaData "Flag" "Data.Char.Emoji.Flag" "unicode-tricks-0.12.2.0-Exhm9LDkx5134hbKziw835" 'False) (C1 ('MetaCons "Flag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char))) |
:: Char | The first character of the ISO 3166 Alpha-2 standard. |
-> Char | The second character of the ISO 3166 Alpha-2 standard. |
-> Maybe Flag | A |
Convert the given two characters that represent a flag according to the ISO
3166 Alpha-2 standard to a Flag
wrapped in a Just
data constructor, if
that flag exists; Nothing
otherwise.
One can pass characters in upper case (A-Z
) and lower case (a-z
). The
flag will hold the upper case variant.
The Emoji have flags for the countries defined by the ISO 3166 Alpha-2
standard without deprecated regions like the Soviet Union (SU) and Yugoslavia
(YU). Furthermore there are Emoji for the flags of Antarctica (AQ), the
European Union (EU) and the United Nations (UN).
:: Char | The first character of the ISO 3166 Alpha-2 standard. |
-> Char | The second character of the ISO 3166 Alpha-2 standard. |
-> Flag | The equivalent |
Convert the given two characters that represent a flag according to the ISO
3166 Alpha-2 standard to a Flag
. If the flag does not exists, then the
result is unspecified.
One can pass characters in upper case (A-Z
) and lower case (a-z
). The
flag will hold the upper case variant.
The Emoji have flags for the countries defined by the ISO 3166 Alpha-2
standard without deprecated regions like the Soviet Union (SU) and Yugoslavia
(YU). Furthermore there are Emoji for the flags of Antarctica (AQ), the
European Union (EU) and the United Nations (UN).
Obtain the two-characters that specify the given Flag
. These two
characters are always upper case (A-Z
).
:: Char | The first |
-> Char | The second |
-> Maybe Text | A |
Convert the given two Char
acters of the ISO3166-1 Alpha-2 standard to an
Emoji that renders the flag of the corresponding country or terroitory
wrapped in a Just
data constructor. Deprecated regions, such as SU
(Soviet Union) and YU (Yugoslavia) have no flag. The European Union (EU),
Antarctica (AQ) and United Nations (UN) are included as marcoregion flags.
If the flag does not exists, Nothing
is returned.
:: Char | The first |
-> Char | The second |
-> Text | A |
Convert the given two Char
acters of the ISO3166-1 Alpha-2 standard to an
Emoji that renders the flag of the corresponding country or terroitory.
Deprecated regions, such as SU (Soviet Union) and YU (Yugoslavia) have no
flag. The European Union (EU), Antarctica (AQ) and United Nations (UN)
are included as marcoregion flags. This function does not check if the
two characters map to a valid flag token.
:: Char | The first |
-> Char | The second |
-> Bool |
|
Check if for the given two Char
acters, a flag emoji exists. The two
character combinations for which a flag exist are defined in the ISO3166-1
Alpha-2 standard where deprecated reagions, such as SU and YU have no flag,
and the European Union (EU), Antarctica (AQ), and the United Nations (UN)
have a flag. The characters can be upper case (A-Z
) or lower case (a-z
).
Subregional flag emoji
A data type to store a subregion flag. This is specified by the parent flag, and three characters of the subregion. At the moment, the only three subregional flags are England (eng), Scotland (sct) and Wales (wls), all beloning under the United Kingdom flag (GB). The data constructor is made private to prevent making non-existing subflags.
Instances
A data type to represent additional non-regional flags defined by the Unicode standard.
ChequeredFlag | A flag with black and white square like in a checkerboard pattern. These are often used to signal the start or end of a car race. This is rendered as 🏁. |
TriangularFlagOnPost | A triangular flag that is often used for golf. This is rendered as 🚩. |
CrossedFlags | This emoji depicts two Japanese flags crossed at the base. Older versions of Samsung use two South Korean flags. This is rendered as 🎌. |
BlackFlag | A waving black flag. This is rendered as 🏴. |
WavingWhiteFlag | A waving white flag. This is often used as a sign of surrender. This is rendered as 🏳️. |
RainbowFlag | A flag with six colors of the rainbow that usually include red, orange, yellow, green, blue and purple. This is rendered as 🏳️🌈. |
TransgenderFlag | A flag with horizontal pale blue and pale pink stripes and a single white stripe in the middle. This is used as a transgender pride flag. This is rendered as 🏳️⚧️. |
PirateFlag | A skull and crossbones displayed on a black flag. On pirate ships this is known as the Jolly Roger. This is rendered as 🏴☠️. |
Instances
Pattern symbols for Flag
s
The Flag
pattern used for the South Georgia & South Sandwich Islands denoted with GS.
The Flag
pattern used for British Indian Ocean Territory denoted with IO.
The Flag
pattern used for the French Southern Territories denoted with TF.