| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Language.Fluent.AST
Description
The abstract syntax tree of FTL, the Project Fluent file format.
The documentation of each type links to the relevant chapter of the Fluent Syntax Guide.
The normative reference is the grammar.
Synopsis
- newtype Resource = Resource {}
- data Entry
- data Message = Message {
- id :: Identifier
- value :: Maybe Pattern
- attributes :: [Attribute]
- comment :: Maybe Comment
- data Term = Term {
- id :: Identifier
- value :: Pattern
- attributes :: [Attribute]
- comment :: Maybe Comment
- newtype Comment = Comment Text
- data Attribute = Attribute Identifier Pattern
- newtype Pattern = Pattern (NonEmpty PatternElement)
- data PatternElement
- data Placeable
- placeableExpression :: Placeable -> Expression
- data SelectExpression = SelectExpression InlineExpression VariantList
- data InlineExpression
- = StringLiteralExpression StringLiteral
- | NumberLiteralExpression NumberLiteral
- | FunctionReference Identifier CallArguments
- | MessageReference Identifier (Maybe AttributeAccessor)
- | TermReference Identifier (Maybe AttributeAccessor) (Maybe CallArguments)
- | VariableReference Identifier
- | PlaceableExpression Expression
- newtype AttributeAccessor = AttributeAccessor Identifier
- data Expression
- data Variant = Variant {}
- newtype VariantKey = VariantKey (Either NumberLiteral Identifier)
- newtype VariantList = VariantList (NonEmpty Variant)
- newtype CallArguments = CallArguments [Either NamedArgument InlineExpression]
- data NamedArgument = NamedArgument Identifier (Either StringLiteral NumberLiteral)
- newtype Identifier = Identifier Text
- newtype NumberLiteral = NumberLiteral Text
- data StringLiteral = StringLiteral {}
Documentation
An entire FTL file
A top-level element of a Resource
Constructors
| MessageEntry Message | A |
| TermEntry Term | A |
| CommentEntry Comment | |
| GroupCommentEntry Comment | A |
| ResourceCommentEntry Comment | A |
| JunkEntry Text | Source text which could not be parsed, preserved verbatim. See the guide on error recovery. |
Instances
A translation unit. Either the value or the attributes must be present.
Constructors
| Message | |
Fields
| |
Instances
| Generic Message Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show Message Source # | |||||
| Eq Message Source # | |||||
| Lift Message Source # | |||||
| type Rep Message Source # | |||||
Defined in Language.Fluent.AST type Rep Message = D1 ('MetaData "Message" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "Message" 'PrefixI 'True) ((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Pattern))) :*: (S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Attribute]) :*: S1 ('MetaSel ('Just "comment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Comment))))) | |||||
A translation unit which is only ever referenced by other translations. See Terms.
Constructors
| Term | |
Fields
| |
Instances
| Generic Term Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show Term Source # | |||||
| Eq Term Source # | |||||
| Lift Term Source # | |||||
| type Rep Term Source # | |||||
Defined in Language.Fluent.AST type Rep Term = D1 ('MetaData "Term" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "Term" 'PrefixI 'True) ((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pattern)) :*: (S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Attribute]) :*: S1 ('MetaSel ('Just "comment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Comment))))) | |||||
The text of a comment, with the # prefixes and the space following them removed.
See Comments.
A named Pattern belonging to a Message or a Term, written as
.key = value on a line of its own.
See Attributes.
Constructors
| Attribute Identifier Pattern |
Instances
| Generic Attribute Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show Attribute Source # | |||||
| Eq Attribute Source # | |||||
| Lift Attribute Source # | |||||
| type Rep Attribute Source # | |||||
Defined in Language.Fluent.AST type Rep Attribute = D1 ('MetaData "Attribute" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "Attribute" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pattern))) | |||||
The value of a Message, Term, Attribute or Variant: text interspersed
with placeables.
See Writing Text.
Constructors
| Pattern (NonEmpty PatternElement) |
Instances
| Generic Pattern Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show Pattern Source # | |||||
| Eq Pattern Source # | |||||
| Lift Pattern Source # | |||||
| type Rep Pattern Source # | |||||
Defined in Language.Fluent.AST type Rep Pattern = D1 ('MetaData "Pattern" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'True) (C1 ('MetaCons "Pattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty PatternElement)))) | |||||
data PatternElement Source #
A single piece of a Pattern.
Constructors
| InlineText Text | Text on the first line of the pattern, or following a |
| BlockText Text | Text on a continuation line, already dedented according to the multiline rules. |
| Placeable Placeable |
Instances
| Generic PatternElement Source # | |||||
Defined in Language.Fluent.AST Associated Types
Methods from :: PatternElement -> Rep PatternElement x # to :: Rep PatternElement x -> PatternElement # | |||||
| Show PatternElement Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> PatternElement -> ShowS # show :: PatternElement -> String # showList :: [PatternElement] -> ShowS # | |||||
| Eq PatternElement Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: PatternElement -> PatternElement -> Bool # (/=) :: PatternElement -> PatternElement -> Bool # | |||||
| Lift PatternElement Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => PatternElement -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => PatternElement -> Code m PatternElement # | |||||
| type Rep PatternElement Source # | |||||
Defined in Language.Fluent.AST type Rep PatternElement = D1 ('MetaData "PatternElement" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "InlineText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "BlockText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "Placeable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Placeable)))) | |||||
An Expression embedded in a Pattern between braces, e.g. { $userName }.
See Placeables.
Constructors
| InlinePlaceable Expression | A placeable on the same line as the text preceding it. |
| BlockPlaceable Int Expression | A placeable on a continuation line, together with its indentation in
columns, which takes part in computing the common indent of the |
Instances
| Generic Placeable Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show Placeable Source # | |||||
| Eq Placeable Source # | |||||
| Lift Placeable Source # | |||||
| type Rep Placeable Source # | |||||
Defined in Language.Fluent.AST type Rep Placeable = D1 ('MetaData "Placeable" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "InlinePlaceable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expression)) :+: C1 ('MetaCons "BlockPlaceable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expression))) | |||||
placeableExpression :: Placeable -> Expression Source #
The Expression of a Placeable, whether inline or block.
data SelectExpression Source #
A choice between several Variants, made by matching the selector, an
InlineExpression, against the VariantKeys: { $count -> ... }.
See Selectors.
Constructors
| SelectExpression InlineExpression VariantList |
Instances
| Generic SelectExpression Source # | |||||
Defined in Language.Fluent.AST Associated Types
Methods from :: SelectExpression -> Rep SelectExpression x # to :: Rep SelectExpression x -> SelectExpression # | |||||
| Show SelectExpression Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> SelectExpression -> ShowS # show :: SelectExpression -> String # showList :: [SelectExpression] -> ShowS # | |||||
| Eq SelectExpression Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: SelectExpression -> SelectExpression -> Bool # (/=) :: SelectExpression -> SelectExpression -> Bool # | |||||
| Lift SelectExpression Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => SelectExpression -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => SelectExpression -> Code m SelectExpression # | |||||
| type Rep SelectExpression Source # | |||||
Defined in Language.Fluent.AST type Rep SelectExpression = D1 ('MetaData "SelectExpression" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "SelectExpression" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InlineExpression) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VariantList))) | |||||
data InlineExpression Source #
An expression which yields a value.
Constructors
| StringLiteralExpression StringLiteral | |
| NumberLiteralExpression NumberLiteral | |
| FunctionReference Identifier CallArguments | A call of a built-in or implementation-provided function, e.g.
|
| MessageReference Identifier (Maybe AttributeAccessor) | A reference to another |
| TermReference Identifier (Maybe AttributeAccessor) (Maybe CallArguments) | A reference to a |
| VariableReference Identifier | A reference to an argument passed in by the application, e.g. |
| PlaceableExpression Expression | A placeable nested inside another placeable, used for grouping. |
Instances
| Generic InlineExpression Source # | |||||
Defined in Language.Fluent.AST Associated Types
Methods from :: InlineExpression -> Rep InlineExpression x # to :: Rep InlineExpression x -> InlineExpression # | |||||
| Show InlineExpression Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> InlineExpression -> ShowS # show :: InlineExpression -> String # showList :: [InlineExpression] -> ShowS # | |||||
| Eq InlineExpression Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: InlineExpression -> InlineExpression -> Bool # (/=) :: InlineExpression -> InlineExpression -> Bool # | |||||
| Lift InlineExpression Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => InlineExpression -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => InlineExpression -> Code m InlineExpression # | |||||
| type Rep InlineExpression Source # | |||||
Defined in Language.Fluent.AST type Rep InlineExpression = D1 ('MetaData "InlineExpression" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) ((C1 ('MetaCons "StringLiteralExpression" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StringLiteral)) :+: (C1 ('MetaCons "NumberLiteralExpression" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NumberLiteral)) :+: C1 ('MetaCons "FunctionReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CallArguments)))) :+: ((C1 ('MetaCons "MessageReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AttributeAccessor))) :+: C1 ('MetaCons "TermReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AttributeAccessor)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CallArguments))))) :+: (C1 ('MetaCons "VariableReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier)) :+: C1 ('MetaCons "PlaceableExpression" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expression))))) | |||||
newtype AttributeAccessor Source #
The .key suffix of a reference, selecting an Attribute of the referent.
See Attributes.
Constructors
| AttributeAccessor Identifier |
Instances
| Generic AttributeAccessor Source # | |||||
Defined in Language.Fluent.AST Associated Types
Methods from :: AttributeAccessor -> Rep AttributeAccessor x # to :: Rep AttributeAccessor x -> AttributeAccessor # | |||||
| Show AttributeAccessor Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> AttributeAccessor -> ShowS # show :: AttributeAccessor -> String # showList :: [AttributeAccessor] -> ShowS # | |||||
| Eq AttributeAccessor Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: AttributeAccessor -> AttributeAccessor -> Bool # (/=) :: AttributeAccessor -> AttributeAccessor -> Bool # | |||||
| Lift AttributeAccessor Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => AttributeAccessor -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => AttributeAccessor -> Code m AttributeAccessor # | |||||
| type Rep AttributeAccessor Source # | |||||
Defined in Language.Fluent.AST type Rep AttributeAccessor = D1 ('MetaData "AttributeAccessor" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'True) (C1 ('MetaCons "AttributeAccessor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier))) | |||||
data Expression Source #
The contents of a Placeable.
See Placeables.
Constructors
| Select SelectExpression | |
| Inline InlineExpression |
Instances
| Generic Expression Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show Expression Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> Expression -> ShowS # show :: Expression -> String # showList :: [Expression] -> ShowS # | |||||
| Eq Expression Source # | |||||
Defined in Language.Fluent.AST | |||||
| Lift Expression Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => Expression -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Expression -> Code m Expression # | |||||
| type Rep Expression Source # | |||||
Defined in Language.Fluent.AST type Rep Expression = D1 ('MetaData "Expression" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "Select" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SelectExpression)) :+: C1 ('MetaCons "Inline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InlineExpression))) | |||||
One branch of a SelectExpression, written as [key] value on a line of its own.
See Selectors.
Constructors
| Variant | |
Instances
| Generic Variant Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show Variant Source # | |||||
| Eq Variant Source # | |||||
| Lift Variant Source # | |||||
| type Rep Variant Source # | |||||
Defined in Language.Fluent.AST type Rep Variant = D1 ('MetaData "Variant" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "Variant" 'PrefixI 'True) (S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VariantKey) :*: (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pattern) :*: S1 ('MetaSel ('Just "isDefault") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) | |||||
newtype VariantKey Source #
Constructors
| VariantKey (Either NumberLiteral Identifier) |
Instances
| Generic VariantKey Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show VariantKey Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> VariantKey -> ShowS # show :: VariantKey -> String # showList :: [VariantKey] -> ShowS # | |||||
| Eq VariantKey Source # | |||||
Defined in Language.Fluent.AST | |||||
| Lift VariantKey Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => VariantKey -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => VariantKey -> Code m VariantKey # | |||||
| type Rep VariantKey Source # | |||||
Defined in Language.Fluent.AST type Rep VariantKey = D1 ('MetaData "VariantKey" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'True) (C1 ('MetaCons "VariantKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either NumberLiteral Identifier)))) | |||||
newtype VariantList Source #
The Variants of a SelectExpression. Exactly one of them is the default.
See Selectors.
Constructors
| VariantList (NonEmpty Variant) |
Instances
| Generic VariantList Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show VariantList Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> VariantList -> ShowS # show :: VariantList -> String # showList :: [VariantList] -> ShowS # | |||||
| Eq VariantList Source # | |||||
Defined in Language.Fluent.AST | |||||
| Lift VariantList Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => VariantList -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => VariantList -> Code m VariantList # | |||||
| type Rep VariantList Source # | |||||
Defined in Language.Fluent.AST type Rep VariantList = D1 ('MetaData "VariantList" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'True) (C1 ('MetaCons "VariantList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Variant)))) | |||||
newtype CallArguments Source #
The parenthesised arguments of a FunctionReference or TermReference.
Positional arguments must precede named ones.
See Functions.
Constructors
| CallArguments [Either NamedArgument InlineExpression] |
Instances
| Generic CallArguments Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show CallArguments Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> CallArguments -> ShowS # show :: CallArguments -> String # showList :: [CallArguments] -> ShowS # | |||||
| Eq CallArguments Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: CallArguments -> CallArguments -> Bool # (/=) :: CallArguments -> CallArguments -> Bool # | |||||
| Lift CallArguments Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => CallArguments -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => CallArguments -> Code m CallArguments # | |||||
| type Rep CallArguments Source # | |||||
Defined in Language.Fluent.AST type Rep CallArguments = D1 ('MetaData "CallArguments" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'True) (C1 ('MetaCons "CallArguments" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Either NamedArgument InlineExpression]))) | |||||
data NamedArgument Source #
An argument passed by name, e.g. minimumFractionDigits: 2.
See Functions.
Constructors
| NamedArgument Identifier (Either StringLiteral NumberLiteral) |
Instances
| Generic NamedArgument Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show NamedArgument Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> NamedArgument -> ShowS # show :: NamedArgument -> String # showList :: [NamedArgument] -> ShowS # | |||||
| Eq NamedArgument Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: NamedArgument -> NamedArgument -> Bool # (/=) :: NamedArgument -> NamedArgument -> Bool # | |||||
| Lift NamedArgument Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => NamedArgument -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => NamedArgument -> Code m NamedArgument # | |||||
| type Rep NamedArgument Source # | |||||
Defined in Language.Fluent.AST type Rep NamedArgument = D1 ('MetaData "NamedArgument" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "NamedArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either StringLiteral NumberLiteral)))) | |||||
newtype Identifier Source #
Constructors
| Identifier Text |
Instances
| Show Identifier Source # | |
Defined in Language.Fluent.AST Methods showsPrec :: Int -> Identifier -> ShowS # show :: Identifier -> String # showList :: [Identifier] -> ShowS # | |
| Eq Identifier Source # | |
Defined in Language.Fluent.AST | |
| Ord Identifier Source # | |
Defined in Language.Fluent.AST Methods compare :: Identifier -> Identifier -> Ordering # (<) :: Identifier -> Identifier -> Bool # (<=) :: Identifier -> Identifier -> Bool # (>) :: Identifier -> Identifier -> Bool # (>=) :: Identifier -> Identifier -> Bool # max :: Identifier -> Identifier -> Identifier # min :: Identifier -> Identifier -> Identifier # | |
| Hashable Identifier Source # | |
Defined in Language.Fluent.AST | |
| Lift Identifier Source # | |
Defined in Language.Fluent.TH Methods lift :: Quote m => Identifier -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Identifier -> Code m Identifier # | |
newtype NumberLiteral Source #
A decimal number with arbitrary precision.
Constructors
| NumberLiteral Text |
Instances
| Generic NumberLiteral Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show NumberLiteral Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> NumberLiteral -> ShowS # show :: NumberLiteral -> String # showList :: [NumberLiteral] -> ShowS # | |||||
| Eq NumberLiteral Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: NumberLiteral -> NumberLiteral -> Bool # (/=) :: NumberLiteral -> NumberLiteral -> Bool # | |||||
| Lift NumberLiteral Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => NumberLiteral -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => NumberLiteral -> Code m NumberLiteral # | |||||
| type Rep NumberLiteral Source # | |||||
Defined in Language.Fluent.AST type Rep NumberLiteral = D1 ('MetaData "NumberLiteral" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'True) (C1 ('MetaCons "NumberLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
data StringLiteral Source #
A quoted string, used to write characters which are otherwise special in FTL.
Constructors
| StringLiteral | |
Instances
| Generic StringLiteral Source # | |||||
Defined in Language.Fluent.AST Associated Types
| |||||
| Show StringLiteral Source # | |||||
Defined in Language.Fluent.AST Methods showsPrec :: Int -> StringLiteral -> ShowS # show :: StringLiteral -> String # showList :: [StringLiteral] -> ShowS # | |||||
| Eq StringLiteral Source # | |||||
Defined in Language.Fluent.AST Methods (==) :: StringLiteral -> StringLiteral -> Bool # (/=) :: StringLiteral -> StringLiteral -> Bool # | |||||
| Lift StringLiteral Source # | |||||
Defined in Language.Fluent.TH Methods lift :: Quote m => StringLiteral -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => StringLiteral -> Code m StringLiteral # | |||||
| type Rep StringLiteral Source # | |||||
Defined in Language.Fluent.AST type Rep StringLiteral = D1 ('MetaData "StringLiteral" "Language.Fluent.AST" "fluent-syntax-1.0.0-7BgVkF4w5nsLx3MmJftb3I" 'False) (C1 ('MetaCons "StringLiteral" 'PrefixI 'True) (S1 ('MetaSel ('Just "raw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||