| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Language.Haskell.Liquid.Types.PrettyPrint
Description
This module contains a single function that converts a RType -> Doc without using *any* simplifications.
Synopsis
- type OkRT c tv r = (TyConable c, PPrint tv, PPrint c, PPrint r, Reftable r, Reftable (RTProp c tv ()), Reftable (RTProp c tv r), Eq c, Eq tv, Hashable tv)
- rtypeDoc :: OkRT c tv r => Tidy -> RType c tv r -> Doc
- pprManyOrdered :: (PPrint a, Ord a) => Tidy -> String -> [a] -> [Doc]
- pprintLongList :: PPrint a => Tidy -> [a] -> Doc
- pprintSymbol :: Symbol -> Doc
- printWarning :: Logger -> Warning -> IO ()
- data Filter
- getFilters :: Config -> [Filter]
- reduceFilters :: (e -> String) -> [Filter] -> e -> [Filter]
- defaultFilterReporter :: FilePath -> [Filter] -> TcRn ()
- data FilterReportErrorsArgs (m :: Type -> Type) filter msg e a = FilterReportErrorsArgs {
- errorReporter :: [e] -> m ()
- filterReporter :: [filter] -> m ()
- failure :: m a
- continue :: m a
- matchingFilters :: e -> [filter]
- filters :: [filter]
- filterReportErrorsWith :: (Monad m, Ord filter) => FilterReportErrorsArgs m filter msg e a -> [e] -> m a
- filterReportErrors :: (Show e', PPrint e') => FilePath -> TcRn a -> TcRn a -> [Filter] -> Tidy -> [TError e'] -> TcRn a
Printable RTypes
type OkRT c tv r = (TyConable c, PPrint tv, PPrint c, PPrint r, Reftable r, Reftable (RTProp c tv ()), Reftable (RTProp c tv r), Eq c, Eq tv, Hashable tv) Source #
Printers
Printing Lists (TODO: move to fixpoint)
pprintSymbol :: Symbol -> Doc Source #
Printing diagnostics
printWarning :: Logger -> Warning -> IO () Source #
Printing Warnings ---------------------------------------------------------
Filtering errors
Filters match errors. They are used to ignore classes of errors they
match. AnyFilter matches all errors. StringFilter matches any error whose
"representation" contains the given String. A "representation" is
pretty-printed String of the error.
Constructors
| StringFilter String | |
| AnyFilter |
reduceFilters :: (e -> String) -> [Filter] -> e -> [Filter] Source #
Return the list of filters that matched the err , given a renderer
for the err and some filters
defaultFilterReporter :: FilePath -> [Filter] -> TcRn () Source #
Report errors via GHC's API stating the given Filters did not get
matched. Does nothing if the list of filters is empty.
Reporting errors in the typechecking phase
data FilterReportErrorsArgs (m :: Type -> Type) filter msg e a Source #
Used in filterReportErrorsWith'
Constructors
| FilterReportErrorsArgs | |
Fields
| |
filterReportErrorsWith :: (Monad m, Ord filter) => FilterReportErrorsArgs m filter msg e a -> [e] -> m a Source #
Calls the continuations in FilterReportErrorsArgs depending on whethere there are unmatched errors, unmatched filters or none.
filterReportErrors :: (Show e', PPrint e') => FilePath -> TcRn a -> TcRn a -> [Filter] -> Tidy -> [TError e'] -> TcRn a Source #
Pretty-printing errors ----------------------------------------------------
Similar in spirit to reportErrors from the GHC API, but it uses our
pretty-printer and shim functions under the hood. Also filters the errors
according to the given Filter list.
filterReportErrors failure continue filters k will call failure if there
are unexpected errors, or will call continue otherwise.
An error is expected if there is any filter that matches it.
Orphan instances
| Show Predicate Source # | |
| PPrint Class Source # | |
| PPrint Type Source # | |
| PPrint Name Source # | |
| PPrint SourceError Source # | A whole bunch of PPrint instances follow ---------------------------------- |
| PPrint Var Source # | |
| PPrint Tidy Source # | |
| PPrint LogicMap Source # | |
| PPrint a => Show (AnnInfo a) Source # | |
| PPrint (Bind Var) Source # | |
| PPrint (Expr Var) Source # | |
| PPrint a => PPrint (AnnInfo a) Source # | |
| PPrint t => PPrint (Annot t) Source # | |
| (Ord v, Fixpoint v, PPrint v) => PPrint (LMapV v) Source # | |
| (PPrint (PredicateV v), Reftable (PredicateV v), PPrint r, Reftable r) => PPrint (UReftV v r) Source # | |
| (PPrint tv, PPrint ty) => PPrint (RTAlias tv ty) Source # | |
| (PPrint tv, PPrint t) => PPrint (RTEnv tv t) Source # | |
| OkRT c tv r => PPrint (RType c tv r) Source # | Pretty Printing RefType --------------------------------------------------- |