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 

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

Instances

Instances details
Show Attribute Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

showsPrec :: Int -> Attribute -> ShowS

show :: Attribute -> String

showList :: [Attribute] -> ShowS

Eq Attribute Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

(==) :: Attribute -> Attribute -> Bool

(/=) :: Attribute -> Attribute -> Bool

Ord Attribute Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

compare :: Attribute -> Attribute -> Ordering

(<) :: Attribute -> Attribute -> Bool

(<=) :: Attribute -> Attribute -> Bool

(>) :: Attribute -> Attribute -> Bool

(>=) :: Attribute -> Attribute -> Bool

max :: Attribute -> Attribute -> Attribute

min :: Attribute -> Attribute -> Attribute

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

Methods

showsPrec :: Int -> Directive -> ShowS

show :: Directive -> String

showList :: [Directive] -> ShowS

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

data EntityField Source #

Constructors

EntityField 

Fields

Instances

Instances details
Show EntityField Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

showsPrec :: Int -> EntityField -> ShowS

show :: EntityField -> String

showList :: [EntityField] -> ShowS

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

Methods

showsPrec :: Int -> FieldName -> ShowS

show :: FieldName -> String

showList :: [FieldName] -> ShowS

Eq FieldName Source # 
Instance details

Defined in Database.Persist.Quasi.Internal.ModelParser

Methods

(==) :: FieldName -> FieldName -> Bool

(/=) :: FieldName -> FieldName -> Bool

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

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 #