cabal-install
Safe HaskellNone
LanguageHaskell2010

Distribution.Client.Errors.Parser

Synopsis

Documentation

data CabalFileParseError Source #

Errors reported upon failing to parse a .cabal file.

Constructors

CabalFileParseError 

Fields

data ProjectFileSource Source #

Instances

Instances details
Generic ProjectFileSource Source # 
Instance details

Defined in Distribution.Client.Errors.Parser

Associated Types

type Rep ProjectFileSource 
Instance details

Defined in Distribution.Client.Errors.Parser

type Rep ProjectFileSource = D1 ('MetaData "ProjectFileSource" "Distribution.Client.Errors.Parser" "cabal-install-3.18.1.0-inplace" 'False) (C1 ('MetaCons "ProjectFileSource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProjectConfigPath, ByteString))))
Show ProjectFileSource Source # 
Instance details

Defined in Distribution.Client.Errors.Parser

Eq ProjectFileSource Source # 
Instance details

Defined in Distribution.Client.Errors.Parser

Ord ProjectFileSource Source # 
Instance details

Defined in Distribution.Client.Errors.Parser

type Rep ProjectFileSource Source # 
Instance details

Defined in Distribution.Client.Errors.Parser

type Rep ProjectFileSource = D1 ('MetaData "ProjectFileSource" "Distribution.Client.Errors.Parser" "cabal-install-3.18.1.0-inplace" 'False) (C1 ('MetaCons "ProjectFileSource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProjectConfigPath, ByteString))))

renderParseError :: Ord src => (src -> ([PError], [PWarning]) -> String) -> NonEmpty (PErrorWithSource src) -> [PWarningWithSource src] -> String Source #

Render parse error highlighting the part of the input file.

renderParseErrorFile Source #

Arguments

:: String

Human name for the kind of file (i.e. cabal, project "file")

-> FilePath

Path to the file

-> Maybe String

Provenance, any additional contextual info to print

-> ByteString

Contents of the file

-> ([PError], [PWarning]) 
-> String 

Render a parse error which resulted from a file on disk

renderParseErrorGeneral Source #

Arguments

:: String

What we were parsing when the error occurred.

-> Maybe String

A simpler/shorter header to display when displaying each error (normally a filepath)

-> Maybe String

Provenance, used to print additional context about what file failed (used to print the import path of a project file which failed to parse)

-> (Position -> [String])

Extra information to render based on the position

-> [PError] 
-> [PWarning] 
-> String 

A generic rendering function which can render from many sources.

data Zipper a Source #

Constructors

Zipper [a] [a]