ghcide-2.7.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Session.Diagnostics

Synopsis

- data CradleErrorDetails = CradleErrorDetails {
  - cabalProjectFiles :: [FilePath]
  }
- renderCradleError :: CradleError -> Cradle a -> NormalizedFilePath -> FileDiagnostic
- data MultiCradleErr = MultiCradleErr {
  - mcPwd :: FilePath
  - mcFilePath :: FilePath
  - mcPrefixes :: [(FilePath, String)]
  }
- parseMultiCradleErr :: [String] -> Maybe MultiCradleErr
- multiCradleErrMessage :: MultiCradleErr -> [String]
- unknownModuleMessage :: String -> [String]

# Documentation

data CradleErrorDetails #

Constructors

CradleErrorDetails |

Fields

- cabalProjectFiles :: [FilePath]

  files related to the cradle error i.e. .cabal, cabal.project, etc.

#### Instances

Instances details

FromJSON CradleErrorDetails # |
Instance details Defined in Development.IDE.Session.Diagnostics Methods parseJSON :: Value -> Parser CradleErrorDetails # parseJSONList :: Value -> Parser [CradleErrorDetails] # omittedField :: Maybe CradleErrorDetails #
ToJSON CradleErrorDetails # |
Instance details Defined in Development.IDE.Session.Diagnostics Methods toJSON :: CradleErrorDetails -> Value # toEncoding :: CradleErrorDetails -> Encoding # toJSONList :: [CradleErrorDetails] -> Value # toEncodingList :: [CradleErrorDetails] -> Encoding # omitField :: CradleErrorDetails -> Bool #
Generic CradleErrorDetails # |

Instance details

Defined in Development.IDE.Session.Diagnostics

Associated Types

type Rep CradleErrorDetails |
Instance details Defined in Development.IDE.Session.Diagnostics type Rep CradleErrorDetails = D1 ('MetaData "CradleErrorDetails" "Development.IDE.Session.Diagnostics" "ghcide-2.7.0.0-4RFlm38cSV494413rRqzNs" 'False) (C1 ('MetaCons "CradleErrorDetails" 'PrefixI 'True) (S1 ('MetaSel ('Just "cabalProjectFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])))

Methods

from :: CradleErrorDetails -> Rep CradleErrorDetails x #

to :: Rep CradleErrorDetails x -> CradleErrorDetails #

Read CradleErrorDetails # |
Instance details Defined in Development.IDE.Session.Diagnostics Methods readsPrec :: Int -> ReadS CradleErrorDetails # readList :: ReadS [CradleErrorDetails] # readPrec :: ReadPrec CradleErrorDetails # readListPrec :: ReadPrec [CradleErrorDetails] #
Show CradleErrorDetails # |
Instance details Defined in Development.IDE.Session.Diagnostics Methods showsPrec :: Int -> CradleErrorDetails -> ShowS # show :: CradleErrorDetails -> String # showList :: [CradleErrorDetails] -> ShowS #
Eq CradleErrorDetails # |
Instance details Defined in Development.IDE.Session.Diagnostics Methods (==) :: CradleErrorDetails -> CradleErrorDetails -> Bool # (/=) :: CradleErrorDetails -> CradleErrorDetails -> Bool #
Ord CradleErrorDetails # |

Instance details

Defined in Development.IDE.Session.Diagnostics

Methods

compare :: CradleErrorDetails -> CradleErrorDetails -> Ordering #

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

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

(>) :: CradleErrorDetails -> CradleErrorDetails -> Bool #

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

max :: CradleErrorDetails -> CradleErrorDetails -> CradleErrorDetails #

min :: CradleErrorDetails -> CradleErrorDetails -> CradleErrorDetails #

type Rep CradleErrorDetails # |
Instance details Defined in Development.IDE.Session.Diagnostics type Rep CradleErrorDetails = D1 ('MetaData "CradleErrorDetails" "Development.IDE.Session.Diagnostics" "ghcide-2.7.0.0-4RFlm38cSV494413rRqzNs" 'False) (C1 ('MetaCons "CradleErrorDetails" 'PrefixI 'True) (S1 ('MetaSel ('Just "cabalProjectFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])))

renderCradleError :: CradleError -> Cradle a -> NormalizedFilePath -> FileDiagnostic #

Takes a cradle error, the corresponding cradle and the file path where the cradle error occurred (of the file we attempted to load). Depicts the cradle error in a user-friendly way.

data MultiCradleErr #

Information included in Multi Cradle error messages

Constructors

MultiCradleErr |

Fields

- mcPwd :: FilePath
- mcFilePath :: FilePath
- mcPrefixes :: [(FilePath, String)]

#### Instances

Instances details

Show MultiCradleErr # |
Instance details Defined in Development.IDE.Session.Diagnostics Methods showsPrec :: Int -> MultiCradleErr -> ShowS # show :: MultiCradleErr -> String # showList :: [MultiCradleErr] -> ShowS #

parseMultiCradleErr :: [String] -> Maybe MultiCradleErr #

Attempt to parse a multi-cradle message

multiCradleErrMessage :: MultiCradleErr -> [String] #

unknownModuleMessage :: String -> [String] #