string-interpolate-0.3.1.1: Haskell string/text/bytestring interpolation that just works
Copyright(c) William Yao 2019-2021
LicenseBSD-3
Maintainerwilliamyaoh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.String.Interpolate.Parse

Description

YOU SHOULD NOT USE THIS MODULE.

This is exported mainly so tests can introspect on the implementation.

Synopsis

Documentation

data ParseOutput Source #

Each section here is a list of lines.

Content here is defined by the contiguous sequence of lines begining with the first non-blank line and ending with the last non-blank line

Constructors

ParseOutput 

Instances

Instances details
Eq ParseOutput Source # 
Instance details

Defined in Data.String.Interpolate.Parse

Show ParseOutput Source # 
Instance details

Defined in Data.String.Interpolate.Parse

parseInput :: String -> Either String ParseOutput Source #

Like parseInterpSegments, but for cases where we need to do more complicated transformations on the input. Separates the interpolation input into its content, whitespace header, and whitespace footer.

parseInterpSegments :: String -> Either String Lines Source #

Given the raw input from a quasiquote, parse it into the information we need to output the actual expression.

Returns an error message if parsing fails.