| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Text.Interpolation.Nyan.Core.Internal.Base
Contents
Synopsis
- data IntData = IntData {}
- data ParsedIntPiece
- type ParsedInterpolatedString = [ParsedIntPiece]
- data IntPiece
- type InterpolatedString = [IntPiece]
- data ReturnType
- data PreviewLevel
- data SwitchesOptions = SwitchesOptions {}
- data DefaultSwitchesOptions = DefaultSwitchesOptions {}
- basicDefaultSwitchesOptions :: DefaultSwitchesOptions
- recommendedDefaultSwitchesOptions :: DefaultSwitchesOptions
- newtype ValueInterpolator = ValueInterpolator {
- runValueInterpolator :: Text -> ExpQ
- newtype InvisibleCharsPreview = InvisibleCharsPreview {}
- data InterpolatorOptions = InterpolatorOptions {}
Documentation
import Data.Text import Data.Text.Lazy
Interpolation data
Information about single piece that is to be interpolated.
Constructors
| IntData | |
data ParsedIntPiece Source #
Piece of interpolation string.
Constructors
| PipString Text | Mere text. |
| PipNewline Text | Some line feed.
This must be preferred over |
| PipLeadingWs Word | Whitespaces at the beginning of the line.
This must be preferred over |
| PipEmptyLine | Line without any text. The line feed is not included here.
This must be preferred over |
| PipInt IntData | Interpolator piece. |
Instances
| Show ParsedIntPiece Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods showsPrec :: Int -> ParsedIntPiece -> ShowS # show :: ParsedIntPiece -> String # showList :: [ParsedIntPiece] -> ShowS # | |
| Eq ParsedIntPiece Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods (==) :: ParsedIntPiece -> ParsedIntPiece -> Bool # (/=) :: ParsedIntPiece -> ParsedIntPiece -> Bool # | |
type ParsedInterpolatedString = [ParsedIntPiece] Source #
type InterpolatedString = [IntPiece] Source #
Switches
data ReturnType Source #
Return type of the interpolator.
Constructors
| AnyFromBuilder | FromBuilder a => a |
| ConcreteText | |
| ConcreteLText | |
| ConcreteBuilder |
Instances
| Show ReturnType Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods showsPrec :: Int -> ReturnType -> ShowS # show :: ReturnType -> String # showList :: [ReturnType] -> ShowS # | |
| Eq ReturnType Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base | |
data PreviewLevel Source #
Requested preview level.
Constructors
| PreviewNone | Do nothing special. |
| PreviewExact | Print the resulting text as-is (without substitutions). |
| PreviewInvisible | Print the text, replacing invisible characters with special symbols. |
Instances
| Bounded PreviewLevel Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base | |
| Enum PreviewLevel Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods succ :: PreviewLevel -> PreviewLevel # pred :: PreviewLevel -> PreviewLevel # toEnum :: Int -> PreviewLevel # fromEnum :: PreviewLevel -> Int # enumFrom :: PreviewLevel -> [PreviewLevel] # enumFromThen :: PreviewLevel -> PreviewLevel -> [PreviewLevel] # enumFromTo :: PreviewLevel -> PreviewLevel -> [PreviewLevel] # enumFromThenTo :: PreviewLevel -> PreviewLevel -> PreviewLevel -> [PreviewLevel] # | |
| Show PreviewLevel Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods showsPrec :: Int -> PreviewLevel -> ShowS # show :: PreviewLevel -> String # showList :: [PreviewLevel] -> ShowS # | |
| Eq PreviewLevel Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base | |
data SwitchesOptions Source #
All switches options.
Constructors
| SwitchesOptions | |
Fields | |
Instances
| Show SwitchesOptions Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods showsPrec :: Int -> SwitchesOptions -> ShowS # show :: SwitchesOptions -> String # showList :: [SwitchesOptions] -> ShowS # | |
| Eq SwitchesOptions Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods (==) :: SwitchesOptions -> SwitchesOptions -> Bool # (/=) :: SwitchesOptions -> SwitchesOptions -> Bool # | |
data DefaultSwitchesOptions Source #
Default switches options set in the interpolator, those that are used
in [int||...|].
When no default value for a switch is specified, this switch is left mandatory for specifying in the interpolator.
Constructors
| DefaultSwitchesOptions | |
Instances
| Show DefaultSwitchesOptions Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base Methods showsPrec :: Int -> DefaultSwitchesOptions -> ShowS # show :: DefaultSwitchesOptions -> String # showList :: [DefaultSwitchesOptions] -> ShowS # | |
basicDefaultSwitchesOptions :: DefaultSwitchesOptions Source #
Default DefaultSwitchesOptions.
This set of switches tries to leave the text as much unmodified as possible.
It does not define default switches used by Text.Interpolation.Nyan
module, and you will likely want to enable at least some options here.
recommendedDefaultSwitchesOptions :: DefaultSwitchesOptions Source #
DefaultSwitchesOptions used in the Text.Interpolation.Nyan module
in the default interpolator.
newtype ValueInterpolator Source #
How to expand values in #{} into Haskell AST.
Constructors
| ValueInterpolator | |
Fields
| |
newtype InvisibleCharsPreview Source #
Transformation that describes how to mark the invisible characters.
Use Monoid instance to sequence multiple such transformations.
Constructors
| InvisibleCharsPreview | |
Fields | |
Instances
data InterpolatorOptions Source #
Options set when creating an interpolator.
Constructors
| InterpolatorOptions | |
Fields
| |