persistent-2.16.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 

Fields

Instances

Instances details
Show SourceLoc Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

showsPrec :: Int -> SourceLoc -> ShowS

show :: SourceLoc -> String

showList :: [SourceLoc] -> ShowS

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 #

Constructors

Quotation Text 
Equality Text Text 
Parenthetical Text 
BlockKey Text 
PText Text 

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

data ParsedEntityDef Source #

Instances

Instances details
Show ParsedEntityDef Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

showsPrec :: Int -> ParsedEntityDef -> ShowS

show :: ParsedEntityDef -> String

showList :: [ParsedEntityDef] -> ShowS

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

data ParserErrorLevel Source #

Since: 2.16.0.0

Constructors

LevelError 
LevelWarning 

Instances

Instances details
Show ParserErrorLevel Source # 
Instance details

Defined in Database.Persist.Quasi.PersistSettings.Internal

Methods

showsPrec :: Int -> ParserErrorLevel -> ShowS

show :: ParserErrorLevel -> String

showList :: [ParserErrorLevel] -> ShowS

Eq ParserErrorLevel Source # 
Instance details

Defined in Database.Persist.Quasi.PersistSettings.Internal

initialExtraState :: ExtraState Source #