Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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.
data ParsedIntPiece Source #
Piece of interpolation string.
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 showsPrec :: Int -> ParsedIntPiece -> ShowS # show :: ParsedIntPiece -> String # showList :: [ParsedIntPiece] -> ShowS # | |
Eq ParsedIntPiece Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base (==) :: ParsedIntPiece -> ParsedIntPiece -> Bool # (/=) :: ParsedIntPiece -> ParsedIntPiece -> Bool # |
type ParsedInterpolatedString = [ParsedIntPiece] Source #
type InterpolatedString = [IntPiece] Source #
Switches
data ReturnType Source #
Return type of the interpolator.
AnyFromBuilder | FromBuilder a => a |
ConcreteText | |
ConcreteLText | |
ConcreteBuilder |
Instances
Show ReturnType Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base showsPrec :: Int -> ReturnType -> ShowS # show :: ReturnType -> String # showList :: [ReturnType] -> ShowS # | |
Eq ReturnType Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base (==) :: ReturnType -> ReturnType -> Bool # (/=) :: ReturnType -> ReturnType -> Bool # |
data PreviewLevel Source #
Requested preview level.
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 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 showsPrec :: Int -> PreviewLevel -> ShowS # show :: PreviewLevel -> String # showList :: [PreviewLevel] -> ShowS # | |
Eq PreviewLevel Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base (==) :: PreviewLevel -> PreviewLevel -> Bool # (/=) :: PreviewLevel -> PreviewLevel -> Bool # |
data SwitchesOptions Source #
All switches options.
Instances
Show SwitchesOptions Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base showsPrec :: Int -> SwitchesOptions -> ShowS # show :: SwitchesOptions -> String # showList :: [SwitchesOptions] -> ShowS # | |
Eq SwitchesOptions Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base (==) :: 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.
Instances
Show DefaultSwitchesOptions Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Base 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.
newtype InvisibleCharsPreview Source #
Transformation that describes how to mark the invisible characters.
Use Monoid
instance to sequence multiple such transformations.
data InterpolatorOptions Source #
Options set when creating an interpolator.
InterpolatorOptions | |
|