fluent
Safe HaskellNone
LanguageHaskell2010

Language.Fluent.Pattern

Synopsis

Documentation

newtype Pattern Source #

A Pattern with all the selections and interpolations resolved down to SomeValue and isolation marks.

Instances

Instances details
Value Pattern Source # 
Instance details

Defined in Language.Fluent.Pattern

Semigroup Pattern Source # 
Instance details

Defined in Language.Fluent.Pattern

IsString Pattern Source # 
Instance details

Defined in Language.Fluent.Pattern

Methods

fromString :: String -> Pattern #

Show Pattern Source # 
Instance details

Defined in Language.Fluent.Pattern

data PatternElement Source #

A single piece of a Pattern.

Constructors

Value SomeValue

A value, ready to be formatted.

Isolated Pattern

A sequence of values surrounded by isolation marks (FSI, PDI).

matchesExact :: SomeValue -> SomeValue -> Bool Source #

Whether a selector value exactly equals a variant key.

matchesCategory :: Locale l => l -> SomeValue -> SomeValue -> Bool Source #

Whether a numeric selector falls into the plural category named by a variant key (e.g. a selector of 1 against the key one).