Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 #
Instances
Show OptionChanged Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Parser showsPrec :: Int -> OptionChanged -> ShowS # show :: OptionChanged -> String # showList :: [OptionChanged] -> ShowS # | |
Eq OptionChanged Source # | |
Defined in Text.Interpolation.Nyan.Core.Internal.Parser (==) :: OptionChanged -> OptionChanged -> Bool # (/=) :: OptionChanged -> OptionChanged -> Bool # |
data SwitchesOptionsBuilder Source #
An accumulator for switch options during parsing.
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 #
Instances
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.