| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rzk.Check.Error
Description
Type errors, warnings and holes of the new checker, and how they are shown.
An error is captured at its own scope, with the context it was raised in, so that it can be shown with the names of that context. A warning and a hole are recorded already rendered, so they are independent of the scope they came from.
Synopsis
- data TypeError (n :: S)
- = TypeErrorOther String
- | TypeErrorUnsupported String
- | TypeErrorUnify (Core n) (Value n) (Value n)
- | TypeErrorUnifyTerms (Value n) (Value n)
- | TypeErrorNotPair (Core n) (Value n)
- | TypeErrorNotFunction (Core n) (Value n)
- | TypeErrorUnexpectedLambda (Raw n) (Value n)
- | TypeErrorUnexpectedPair (Raw n) (Value n)
- | TypeErrorUnexpectedRefl (Raw n) (Value n)
- | TypeErrorCannotInferBareLambda (Raw n)
- | TypeErrorCannotInferBareRefl (Raw n)
- | TypeErrorCannotInferHole (Raw n)
- | TypeErrorUnsolvedHole (Maybe VarIdent) (Value n)
- | TypeErrorUndefined VarIdent
- | TypeErrorTopeNotSatisfied [Tope n] (Tope n)
- | TypeErrorTopeContextDisjoint (Tope n) [Tope n]
- | TypeErrorInvalidArgumentType (Raw n) (Value n)
- | TypeErrorDuplicateTopLevel [VarIdent] VarIdent
- | TypeErrorUnusedVariable (Name n) (Value n)
- | TypeErrorUnusedUsedVariables [Name n] (Name n)
- | TypeErrorImplicitAssumption (Name n, Value n) (Name n)
- | TypeErrorNotIntervalCube String (Value n) (Value n)
- | TypeErrorRepeatedBinder VarIdent [VarIdent]
- typeErrorTag :: forall (n :: S). TypeError n -> String
- data ErrorInContext where
- ErrorInContext :: forall (n :: S). Distinct n => Context n -> TypeError n -> ErrorInContext
- errorTag :: ErrorInContext -> String
- errorLocation :: ErrorInContext -> Maybe LocationInfo
- ppTypeError :: forall (n :: S). Distinct n => Context n -> TypeError n -> String
- ppErrorInContext :: ErrorInContext -> String
- ppAction :: forall (n :: S). Distinct n => Context n -> Action n -> String
- ppTope :: forall (n :: S). Naming n -> Tope n -> String
- ppPoint :: forall (n :: S). Naming n -> Point n -> String
- data Warning
- warningTag :: Warning -> String
- warningLocation :: Warning -> Maybe LocationInfo
- ppWarning :: Warning -> String
- data Hint = SimplificationHint String String (Maybe LocationInfo)
- hintTag :: Hint -> String
- hintLocation :: Hint -> Maybe LocationInfo
- ppHint :: Hint -> String
- data HoleInfo = HoleInfo {
- holeName :: Maybe VarIdent
- holeGoal :: String
- holeTermVars :: [(String, String)]
- holeCubeVars :: [(String, String)]
- holeTopes :: [String]
- holeLocation :: Maybe LocationInfo
- ppHoleInfo :: HoleInfo -> String
Documentation
data TypeError (n :: S) Source #
Constructors
| TypeErrorOther String | a diagnostic that does not yet have a dedicated constructor |
| TypeErrorUnsupported String | a construct the new checker does not cover yet |
| TypeErrorUnify (Core n) (Value n) (Value n) | the term, the expected type and its actual type |
| TypeErrorUnifyTerms (Value n) (Value n) | the expected and actual values that are not convertible |
| TypeErrorNotPair (Core n) (Value n) | a projected term and its non-pair type |
| TypeErrorNotFunction (Core n) (Value n) | an applied term and its non-function type |
| TypeErrorUnexpectedLambda (Raw n) (Value n) | a λ checked against a non-function type |
| TypeErrorUnexpectedPair (Raw n) (Value n) | a pair checked against a non-pair type |
| TypeErrorUnexpectedRefl (Raw n) (Value n) | reflexivity checked against a non-identity type |
| TypeErrorCannotInferBareLambda (Raw n) | a λ without a parameter annotation in inference position |
| TypeErrorCannotInferBareRefl (Raw n) | reflexivity without an element annotation in inference position |
| TypeErrorCannotInferHole (Raw n) | a user hole whose type cannot be inferred |
| TypeErrorUnsolvedHole (Maybe VarIdent) (Value n) | a user hole and the goal it leaves unsolved in strict mode |
| TypeErrorUndefined VarIdent | an unresolved surface identifier |
| TypeErrorTopeNotSatisfied [Tope n] (Tope n) | context topes and the goal they do not entail |
| TypeErrorTopeContextDisjoint (Tope n) [Tope n] | a tope disjoint from the listed context |
| TypeErrorInvalidArgumentType (Raw n) (Value n) | a function parameter and its invalid kind |
| TypeErrorDuplicateTopLevel [VarIdent] VarIdent | previous definitions and the duplicate name |
| TypeErrorUnusedVariable (Name n) (Value n) | an unused section assumption and its type |
| TypeErrorUnusedUsedVariables [Name n] (Name n) | assumptions listed as used but not needed by the declaration |
| TypeErrorImplicitAssumption (Name n, Value n) (Name n) | an assumption used implicitly, its type, and the declaration using it |
| TypeErrorNotIntervalCube String (Value n) (Value n) | an operation and the two operand types, which are not interval cubes |
| TypeErrorRepeatedBinder VarIdent [VarIdent] | a repeated binder and its previous occurrences |
typeErrorTag :: forall (n :: S). TypeError n -> String Source #
The constructor name: the stable code of a diagnostic, and the tag the fixtures pin.
data ErrorInContext where Source #
An error with the context it was raised in. The scope is existential: the context says what the names are called.
Constructors
| ErrorInContext :: forall (n :: S). Distinct n => Context n -> TypeError n -> ErrorInContext |
errorTag :: ErrorInContext -> String Source #
ppErrorInContext :: ErrorInContext -> String Source #
An error, with the context it was raised in.
ppTope :: forall (n :: S). Naming n -> Tope n -> String Source #
A tope of the solver, shown with the context's names.
Warnings
A warning, rendered.
Constructors
| OverhangWarning String String [String] (Maybe LocationInfo) | a restriction face or a recOR branch guard, the tope, the local tope context |
| TopeFamilyDomainWarning String String (Maybe LocationInfo) | the family, its declared domain |
| ShadowingWarning String [String] (Maybe LocationInfo) | a binder, and the binding it shadows, each with where it was written |
| UnsupportedOptionWarning String (Maybe LocationInfo) | an option that the new checker accepts but does not implement |
warningTag :: Warning -> String Source #
The stable code of a warning.
Hints
A hint, rendered and independent of the scope where it was found.
Constructors
| SimplificationHint String String (Maybe LocationInfo) | the original and suggested terms, rendered, and the source location |
hintLocation :: Hint -> Maybe LocationInfo Source #
Holes
The goal and the context at a hole, rendered.
Constructors
| HoleInfo | |
Fields
| |
ppHoleInfo :: HoleInfo -> String Source #