persistent-2.17.0.0: Type-safe, multi-backend data serialization.
Safe HaskellNone
LanguageHaskell2010

Database.Persist.Quasi.Internal.ModelParser

Synopsis

Documentation

data SourceLoc Source #

Source location: file and line/col information. This is half of a SourceSpan.

Since: 2.16.0.0

Constructors

SourceLoc 

Instances

Instances details
Show SourceLoc Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Lift SourceLoc Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

lift :: Quote m => SourceLoc -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SourceLoc -> Code m SourceLoc #

data Token Source #

Instances

Instances details
Show Token Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Eq Token Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Ord Token Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

compare :: Token -> Token -> Ordering #

(<) :: Token -> Token -> Bool #

(<=) :: Token -> Token -> Bool #

(>) :: Token -> Token -> Bool #

(>=) :: Token -> Token -> Bool #

max :: Token -> Token -> Token #

min :: Token -> Token -> Token #

tokenContent :: Token -> Text Source #

Converts a token into a Text representation for second-stage parsing or presentation to the user

Since: 2.16.0.0

memberBlockAttrs :: Member -> [BlockAttr] Source #

Represents an entity member as a list of BlockAttrs

Since: 2.16.0.0

parserWarningMessage :: ParserWarning -> String Source #

Uses errorBundlePretty to render a parser warning.

Since: 2.16.0.0

type ParseResult a = (Set ParserWarning, Either (ParseErrorBundle String Void) a) Source #

Result of parsing a single source text.

Since: 2.16.0.0

type CumulativeParseResult a = (Set ParserWarning, Either [EntityParseError] a) Source #

Cumulative result of parsing multiple source texts.

Since: 2.16.0.0

renderErrors :: [EntityParseError] -> String Source #

Renders a list of EntityParseErrors as a String using errorBundlePretty, separated by line breaks. @since 2.16.0.0

runConfiguredParser :: PersistSettings -> ExtraState -> Parser a -> String -> String -> InternalParseResult a Source #

Run a parser using provided PersistSettings and ExtraState @since 2.16.0.0

initialExtraState :: ExtraState Source #