persistent-2.17.1.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 Attribute Source #

An attribute of an entity field definition or a directive.

Since: 2.17.1.0

Constructors

Assignment Text Text 
Parenthetical Text 
PText Text 
Quotation Text

Quoted field attributes are deprecated since 2.17.1.0.

attributeContent :: Attribute -> Text Source #

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

Since: 2.16.0.0

data Directive Source #

Constructors

Directive 

Fields

Instances

Instances details
Show Directive Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

directiveContent :: Directive -> [Text] Source #

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

Since: 2.17.1.0

entityField :: Parser Member Source #

newtype FieldName Source #

Constructors

FieldName Text 

Instances

Instances details
Show FieldName Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Eq FieldName Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

memberEntityFields :: Member -> [EntityField] Source #

Represents an entity member as a list of EntityFields

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 #