Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Text.Interpolation.Nyan.Core.Internal.Parser
Synopsis
- newtype OptionChanged = OptionChanged Bool
- data SwitchesOptionsBuilder = SwitchesOptionsBuilder {
- spacesTrimmingB :: (OptionChanged, Maybe Bool)
- indentationStrippingB :: (OptionChanged, Maybe Bool)
- leadingNewlineStrippingB :: (OptionChanged, Maybe Bool)
- trailingSpacesStrippingB :: (OptionChanged, Maybe Bool)
- returnTypeB :: (OptionChanged, Maybe ReturnType)
- reducedNewlinesB :: (OptionChanged, Maybe Bool)
- monadicB :: (OptionChanged, Maybe Bool)
- previewLevelB :: PreviewLevel
- toSwitchesOptionsBuilder :: DefaultSwitchesOptions -> SwitchesOptionsBuilder
- finalizeSwitchesOptions :: MonadFail m => SwitchesOptionsBuilder -> m SwitchesOptions
- type SwitchesOptionsSetter m = (MonadState SwitchesOptionsBuilder m, MonadFail m)
- setIfNew :: (MonadFail m, Eq a) => String -> a -> (OptionChanged, Maybe a) -> m (OptionChanged, Maybe a)
- setSpacesTrimming :: SwitchesOptionsSetter m => Bool -> m ()
- setIndentationStripping :: SwitchesOptionsSetter m => Bool -> m ()
- setLeadingNewlineStripping :: SwitchesOptionsSetter m => Bool -> m ()
- setTrailingSpacesStripping :: SwitchesOptionsSetter m => Bool -> m ()
- setReducedNewlines :: SwitchesOptionsSetter m => Bool -> m ()
- setMonadic :: SwitchesOptionsSetter m => Bool -> m ()
- setReturnType :: SwitchesOptionsSetter m => ReturnType -> m ()
- accountPreview :: SwitchesOptionsSetter m => m ()
- notAnyOf :: [Char -> Bool] -> Char -> Bool
- one :: a -> [a]
- data CustomParserFailure = SwitchesHelpRequested DefaultSwitchesOptions
- switchesSectionP :: DefaultSwitchesOptions -> Parsec CustomParserFailure Text SwitchesOptions
- switchesHelpMessage :: DefaultSwitchesOptions -> Builder
- intPieceP :: Ord e => Parsec e Text [ParsedIntPiece]
- glueParsedStrings :: ParsedInterpolatedString -> ParsedInterpolatedString
- intStringP :: DefaultSwitchesOptions -> Parsec CustomParserFailure Text (SwitchesOptions, ParsedInterpolatedString)
- parseIntString :: DefaultSwitchesOptions -> Text -> Either String (SwitchesOptions, ParsedInterpolatedString)
Documentation
newtype OptionChanged Source #
Constructors
OptionChanged Bool |
Instances
Show OptionChanged Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Parser Methods showsPrec :: Int -> OptionChanged -> ShowS # show :: OptionChanged -> String # showList :: [OptionChanged] -> ShowS # | |
Eq OptionChanged Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Parser Methods (==) :: OptionChanged -> OptionChanged -> Bool # (/=) :: OptionChanged -> OptionChanged -> Bool # |
data SwitchesOptionsBuilder Source #
An accumulator for switch options during parsing.
Constructors
type SwitchesOptionsSetter m = (MonadState SwitchesOptionsBuilder m, MonadFail m) Source #
setIfNew :: (MonadFail m, Eq a) => String -> a -> (OptionChanged, Maybe a) -> m (OptionChanged, Maybe a) Source #
setSpacesTrimming :: SwitchesOptionsSetter m => Bool -> m () Source #
setIndentationStripping :: SwitchesOptionsSetter m => Bool -> m () Source #
setLeadingNewlineStripping :: SwitchesOptionsSetter m => Bool -> m () Source #
setTrailingSpacesStripping :: SwitchesOptionsSetter m => Bool -> m () Source #
setReducedNewlines :: SwitchesOptionsSetter m => Bool -> m () Source #
setMonadic :: SwitchesOptionsSetter m => Bool -> m () Source #
setReturnType :: SwitchesOptionsSetter m => ReturnType -> m () Source #
accountPreview :: SwitchesOptionsSetter m => m () Source #
data CustomParserFailure Source #
Constructors
SwitchesHelpRequested DefaultSwitchesOptions |
Instances
Eq CustomParserFailure Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Parser Methods (==) :: CustomParserFailure -> CustomParserFailure -> Bool # (/=) :: CustomParserFailure -> CustomParserFailure -> Bool # | |
Ord CustomParserFailure Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Parser Methods compare :: CustomParserFailure -> CustomParserFailure -> Ordering # (<) :: CustomParserFailure -> CustomParserFailure -> Bool # (<=) :: CustomParserFailure -> CustomParserFailure -> Bool # (>) :: CustomParserFailure -> CustomParserFailure -> Bool # (>=) :: CustomParserFailure -> CustomParserFailure -> Bool # max :: CustomParserFailure -> CustomParserFailure -> CustomParserFailure # min :: CustomParserFailure -> CustomParserFailure -> CustomParserFailure # | |
ShowErrorComponent CustomParserFailure Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Parser Methods |
switchesSectionP :: DefaultSwitchesOptions -> Parsec CustomParserFailure Text SwitchesOptions Source #
glueParsedStrings :: ParsedInterpolatedString -> ParsedInterpolatedString Source #
Since the parser may produce several PipString
with different kind of
content (e.g. spaces and words), we would like to glue those before passing
the interpolated string to the next stage.