Safe Haskell | None |
---|---|
Language | Haskell98 |
This module contains the *types* related creating Errors. It depends only on Fixpoint and basic haskell libraries, and hence, should be importable everywhere.
- data TError t
- = ErrSubType { }
- | ErrFCrash { }
- | ErrAssType { }
- | ErrParse { }
- | ErrTySpec { }
- | ErrTermSpec { }
- | ErrDupAlias { }
- | ErrDupSpecs { }
- | ErrDupMeas { }
- | ErrBadData { }
- | ErrDataCon { }
- | ErrInvt { }
- | ErrIAl { }
- | ErrIAlMis { }
- | ErrMeas { }
- | ErrHMeas { }
- | ErrUnbound { }
- | ErrGhc { }
- | ErrMismatch { }
- | ErrPartPred { }
- | ErrAliasCycle { }
- | ErrIllegalAliasApp { }
- | ErrAliasApp { }
- | ErrSaved { }
- | ErrTermin { }
- | ErrRClass { }
- | ErrBadQual { }
- | ErrOther { }
- data CtxError t = CtxError {}
- errorWithContext :: TError t -> IO (CtxError t)
- data Oblig
- type UserError = TError Doc
- panic :: Maybe SrcSpan -> String -> a
- panicDoc :: SrcSpan -> Doc -> a
- todo :: Maybe SrcSpan -> String -> a
- impossible :: Maybe SrcSpan -> String -> a
- uError :: UserError -> a
- ppError :: (PPrint a, Show a) => Tidy -> Doc -> TError a -> Doc
- ppError' :: (PPrint a, Show a) => Tidy -> Doc -> Doc -> TError a -> Doc
- realSrcSpan :: FilePath -> Int -> Int -> Int -> Int -> RealSrcSpan
- unpackRealSrcSpan :: RealSrcSpan -> (String, Int, Int, Int, Int)
Generic Error Type
Generic Type for Error Messages -------------------------------------------
INVARIANT : all Error constructors should have a pos field
ErrSubType | liquid type error |
ErrFCrash | liquid type error |
ErrAssType | condition failure error |
ErrParse | specification parse error |
ErrTySpec | sort error in specification |
ErrTermSpec | sort error in specification |
ErrDupAlias | multiple alias with same name error |
ErrDupSpecs | multiple specs for same binder error |
ErrDupMeas | multiple definitions of the same measure |
ErrBadData | bad data type specification (?) |
ErrDataCon | refined datacon mismatches haskell datacon |
ErrInvt | Invariant sort error |
ErrIAl | Using sort error |
ErrIAlMis | Incompatible using error |
ErrMeas | Measure sort error |
ErrHMeas | Haskell bad Measure error |
ErrUnbound | Unbound symbol in specification |
ErrGhc | GHC error: parsing or type checking |
ErrMismatch | Mismatch between Liquid and Haskell types |
ErrPartPred | Mismatch in expected/actual args of abstract refinement |
ErrAliasCycle | Cyclic Refined Type Alias Definitions |
ErrIllegalAliasApp | Illegal RTAlias application (from BSort, eg. in PVar) |
ErrAliasApp | |
ErrSaved | Previously saved error, that carries over after DiffCheck |
ErrTermin | Termination Error |
ErrRClass | Refined Class/Interfaces Conflict |
ErrBadQual | Non well sorted Qualifier |
ErrOther | Sigh. Other. |
Functor TError Source | |
Show UserError Source | |
Exception UserError Source | |
PPrint UserError Source | |
Result UserError Source | |
Result Error Source | |
Eq (TError a) Source | |
Ord (TError a) Source | |
Generic (TError t) Source | |
(PPrint a, Show a) => ToJSON (TError a) Source | |
FromJSON (TError a) Source | |
Result [Error] Source | |
type Rep (TError t) Source |
Error with Source Context
Context information for Error Messages ------------------------------------
errorWithContext :: TError t -> IO (CtxError t) Source
Subtyping Obligation Type
Different kinds of Check Obligations ------------------------------------
Panic (unexpected failures)
type UserError = TError Doc Source
Simple unstructured type for panic ----------------------------------------
todo :: Maybe SrcSpan -> String -> a Source
Construct and show an Error with an optional SrcSpan, then crash This function should be used to mark unimplemented functionality
impossible :: Maybe SrcSpan -> String -> a Source
Construct and show an Error with an optional SrcSpan, then crash This function should be used to mark impossible-to-reach codepaths
Printing Errors
SrcSpan Helpers
realSrcSpan :: FilePath -> Int -> Int -> Int -> Int -> RealSrcSpan Source
unpackRealSrcSpan :: RealSrcSpan -> (String, Int, Int, Int, Int) Source